ubuntu - Sendmail Deferred: Connection timed out

08
2014-07
  • xpt

    I got the following "Connection timed out" errors from some of the email servers, like google:

    $ tail -1 /var/log/mail.log
    Jun 15 15:55:52 coral sm-mta[9924]: s5FAo29p007675: to=<[email protected]>, delay=09:05:50, xdelay=00:10:36, mailer=esmtp, pri=2550569, relay=alt4.gmail-smtp-in.l.google.com. [74.125.136.26], dsn=4.0.0, stat=Deferred: Connection timed out with alt4.gmail-smtp-in.l.google.com.
    

    Since not all my emails are blocked, I think that the problem is not at my local side, but the remote SMTP server. This is what I did to look into the problem:

    $ dig mx gmail.com
    ;; QUESTION SECTION:
    ;gmail.com.                     IN      MX
    
    ;; ANSWER SECTION:
    gmail.com.              3280    IN      MX      20 alt2.gmail-smtp-in.l.google.com.
    gmail.com.              3280    IN      MX      10 alt1.gmail-smtp-in.l.google.com.
    gmail.com.              3280    IN      MX      5 gmail-smtp-in.l.google.com.
    gmail.com.              3280    IN      MX      30 alt3.gmail-smtp-in.l.google.com.
    gmail.com.              3280    IN      MX      40 alt4.gmail-smtp-in.l.google.com.
    
    $ telnet alt4.gmail-smtp-in.l.google.com 25
    Trying 74.125.136.27...
    Trying 2a00:1450:4013:c01::1a...
    telnet: Unable to connect to remote host: Network is unreachable
    
    $ telnet alt4.gmail-smtp-in.l.google.com 587
    Trying 74.125.136.26...
    ^C
    

    Now I'm confused -- the MX/DNS records for the gmail.com lists alt4.gmail-smtp-in.l.google.com as one of the servers, yet it is not listing to either port 25 or 587.

    Is my DNS get polluted, or I'm going after the wrong thing? Please help.
    How to fix this "Connection timed out" errors for my Ubuntu sendmail?
    This is Ubuntu 13.10 Saucy BTW. Thanks

  • Answers
    Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

    Related Question

    smtp - OSX telnet not working from localhost
  • Stewie

    Telnet from my mac OSx doesn't work while it works from the AWS instances and other networks. I have no local firewalls. Nothing related in /var/log/system

    In the below transcript, the telnet hangs at "Trying 74.125.136.26..." I have tried many different addresses across multiple domains.. same result !

    Rocky-Balboas-MacBook-Pro:~ rocky$ 
    Rocky-Balboas-MacBook-Pro:~ rocky$ dig gmail.com MX +short
    30 alt3.gmail-smtp-in.l.google.com.
    40 alt4.gmail-smtp-in.l.google.com.
    10 alt1.gmail-smtp-in.l.google.com.
    20 alt2.gmail-smtp-in.l.google.com.
    5 gmail-smtp-in.l.google.com.
    Rocky-Balboas-MacBook-Pro:~ rocky$ telnet alt2.gmail-smtp-in.l.google.com 25
    Trying 74.125.136.26...
    ^C
    Rocky-Balboas-MacBook-Pro:~ rocky$ telnet localhost 80
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    ^C
    Connection closed by foreign host.
    Rocky-Balboas-MacBook-Pro:~ rocky$ 
    

    edit: let the telnet command run and here are the results

    telnet: connect to address 74.125.136.27: Operation timed out
    Trying 2a00:1450:4013:c01::1a...
    telnet: connect to address 2a00:1450:4013:c01::1a: No route to host
    telnet: Unable to connect to remote host
    

  • Related Answers
  • Barmar

    Your ISP most likely blocks port 25. This is a very common anti-spam technique, to deal with customers whose computers have been infected and turns into spam zombies.