• VMware

    Learn about VMware virtualization for its products like vsphere ESX and ESXi, vCenter Server, VMware View, VMware P2V and many more

  • Linux

    Step by step configuration tutorials for many of the Linux services like DNS, DHCP, FTP, Samba4 etc including many tips and tricks in Red Hat Linux.

  • Database

    Learn installation and configuration of databases like Oracle, My SQL, Postgresql, etc including many other related tutorials in Linux.

  • How to Fix "stat=Deferred: Connection timed out error in sendmail"

    I got this error while trying to send out mail using my MTA which in my case was sendmail.


    If you receive this error then it means that your mail server is unable to connect to your smtp provider most probably due to firewall. So check your firewall and if your server is listening to port 25, 587 and 465 which are the smtp ports unless you have specified some custom port no.
    # netstat -ntlp | grep sendmail
    tcp   0*    LISTEN    1419/sendmail
    tcp   0   0*    LISTEN    1419/sendmail 
    tcp   0   0*    LISTEN    1419/sendmail
    Many a times it happens that your network firewall might be blocking some particular port so you can check using telnet.


    Make the below changes in your sendmail.mc file

    Comment out the below shown line as this will restrict your mail server to only listen to localhost loopback address and no any other address

    NOTE: In sendmail "#" is not used to comment out any line. You need to use "dnl" or "dnl #"
    dnl DAEMON_OPTIONS(`Port=smtp,Addr=, Name=MTA')dnl
    instead of commenting the above line you can change it to
    DAEMON_OPTIONS(`Port=smtp,Addr=, Name=MTA')dnl

    In case you are using port 587 uncomment this line

    DAEMON_OPTIONS(`Port=submission, Name=MSA, M=Ea')dnl
    and for port 465 uncomment below line
    DAEMON_OPTIONS(`Port=smtps, Name=TLSMTA, M=s')dnl
    You can use ssl ports by adding these two lines in your sendmail.mc file
    define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
    define(`ESMTP_MAILER_ARGS', `
    TCP $h 465')dnl
    Save and exit your file

    # m4 sendmail.mc > sendmail.cf
    # service sendmail restart

    For my configuration file you can refer this post
    Configuring MAIL server using sendmail

    Now re-try to connect your SMTP server as in my case it is smtp.gmail.com using port no.
    # telnet smtp.gmail.com 25
     Connected to smtp.gmail.com. 
     Escape character is '^]'. 
     220 mx.google.com ESMTP io2sm27316728pbc.24
    So it shows connected, similarly you can check for other port no.

    How to Fix "stat=Deferred: Connection timed out error in sendmail" How to Fix "stat=Deferred: Connection timed out error in sendmail" Reviewed by admin on Tuesday, June 04, 2013 Rating: 5

    No comments:

    Powered by Blogger.