PDA

View Full Version : Sendmail stat=Deferred: Connection refused by [127.0.0.1]


Mosquito
16th October 2007, 00:59
Recently I started having a problem with Sendmail on my Fedora 7 server. The only thing that I can thing of that has changed recently, is I did a yum update. I know that's know very specific, and no I don't know exactly what was installed when I did it, because I am not 100% sure of when it broke.

The problem is, when I use send mail to send a message from the server, I am getting the following error in my maillog:


Oct 15 10:07:25 mail sendmail[16375]: l9FF7Pp6016375: to=user@mydomain.com, ctladdr=Mosquito (500/500), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30099, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
Oct 15 10:42:06 mail sendmail[16478]: l9FFg0a6016478: from=Mosquito, size=11, class=0, nrcpts=1, msgid=<200710151542.l9FFg0a6016478@mail.mydomain.com>, relay=Mosquito@localhost

(Domain information has been sanitized)

First, I thought it was a firewall issue, so I compared it to my Fedora 7 desktop - which is located on the same network behind the same router. The firewall rules match.


sudo iptables -L
Password:
Chain INPUT (policy ACCEPT)
target prot opt source destination
RH-Firewall-1-INPUT all -- anywhere anywhere

Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target prot opt source destination

Chain RH-Firewall-1-INPUT (1 references)
target prot opt source destination
ACCEPT all -- anywhere anywhere
DROP icmp -- anywhere anywhere icmp any
ACCEPT tcp -- anywhere anywhere tcp dpt:ipp
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ftp
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:smtp
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:https
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:http
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:mysql
REJECT all -- anywhere anywhere reject-with icmp-host-prohibited


Can anyone help me? Why does send mail fail on the server but succeed on the desktop? Both are running Fedora 7 and are on the same network behind the same firewall. There are no external firewall rules forwarding to either machine (I use sendmail to send out monitoring alerts, not to receive email)

Mosquito
17th October 2007, 05:39
I figured out how to solve this problem. I'm not entirely sure what caused it in the first place, but I did determine some differences between the server and the desktop and was able to use that to solve my problems.

First, on the server, sendmail had been changed to run only on run level 4 - while on the desktop it runs on 2, 3, 4 and 5.

I ran the following to reset sendmail to match the desktop.

sudo chkconfig --levels 235 sendmail on


After this, simply restarting the sendmail service made sendmail work.

sudo service sendmail restart