Sendmail stat=Deferred: Connection refused by [127.0.0.1]

Discussion in 'Technical' started by Mosquito, Oct 15, 2007.

  1. Mosquito

    Mosquito New Member

    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:

    Code:
    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.

    Code:
    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)
     
    Last edited: Oct 16, 2007
  2. Mosquito

    Mosquito New Member

    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.
    Code:
    sudo chkconfig --levels 235 sendmail on
    
    After this, simply restarting the sendmail service made sendmail work.
    Code:
    sudo service sendmail restart
    
     
  3. seangates

    seangates New Member

    I know this is old, but: Thank you, thank you, THANK YOU!

    This totally fixed my issue. I was pulling my hair out knowing that sendmail was up and running, but just not configured correctly. I'm using an Amazon Web Serveces (EC2) off-the-shelf instance. Hope this helps someone else figure out sendmail on Amazon.

    Also, two other settings of note:

    1. use an Elastic IP
    2. then, you need to set up a domain or subdomain for your instance
     
    Last edited: Jan 18, 2010
  4. brum

    brum New Member

Share This Page