Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
Hi Everyone, A couple days ago I got a call from a client that was trying to reset their password on a wordpress site I had built for them, but ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    May 2014
    Posts
    7

    sendmail stat=Deferred: Connection timed out


    Hi Everyone,
    A couple days ago I got a call from a client that was trying to reset their password on a wordpress site I had built for them, but the email never came. I tried as well and also never received the email. I checked the logs and it looks like sendmail was timing out.

    I pull the site down and try on my local machine. and I get the same error. (the rest of this post is all based on scripts and errors on my local machine). Now keep in mind everything was working properly on the server and on my local machine before. And I can't think of anything that would have changed that would have effected my local machine and this server as well.

    back to the debugging - then I tried a simple script:
    Code:
    echo "hello" | mail -s "test" EMAIL-AT-REDACTED.com
    and I get the same error.
    Code:
    May  7 11:45:14 localhost sendmail[9142]: s47FjEIQ009142: from=tomjane-AT-localhost.localdomain, size=80, class=0, nrcpts=1, msgid=<201405071545.s47FjEIQ009142-AT-localhost.localdomain>, relay=tomjane-AT-localhost
    May  7 11:45:14 localhost sm-mta[9143]: s47FjEXR009143: from=<tomjane-AT-localhost.localdomain>, size=363, class=0, nrcpts=1, msgid=<201405071545.s47FjEIQ009142-AT-localhost.localdomain>, proto=ESMTP, daemon=MTA-v4, relay=localhost.localdomain [127.0.0.1]
    May  7 11:45:14 localhost sendmail[9142]: s47FjEIQ009142: to=<EMAIL-AT-REDACTED.com>, ctladdr=tomjane-AT-localhost.localdomain (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30080, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s47FjEXR009143 Message accepted for delivery)
    May  7 11:47:21 localhost sm-mta[9145]: s47FjEXR009143: to=<EMAIL-AT-REDACTED.com>, ctladdr=<tomjane-AT-localhost.localdomain> (1000/1000), delay=00:02:07, xdelay=00:02:07, mailer=esmtp, pri=120363, relay=mail.REDACTED.com. [##.###.###.###], dsn=4.0.0, stat=Deferred: Connection timed out with mail.REDACTED.com.
    There is one email address (my work email) that gives me a different error (though I still don't receive an email):

    Code:
    May  7 11:57:41 localhost sendmail[9300]: s47FvfEi009300: from=tomjane-AT-localhost.localdomain, size=98, class=0, nrcpts=1, msgid=<201405071557.s47FvfEi009300-AT-localhost.localdomain>, relay=tomjane-AT-localhost
    May  7 11:57:41 localhost sm-mta[9301]: s47Fvf8q009301: from=<tomjane-AT-localhost.localdomain>, size=381, class=0, nrcpts=1, msgid=<201405071557.s47FvfEi009300-AT-localhost.localdomain>, proto=ESMTP, daemon=MTA-v4, relay=localhost.localdomain [127.0.0.1]
    May  7 11:57:41 localhost sendmail[9300]: s47FvfEi009300: to=<EMAIL-AT-REDACTED_2.com>, ctladdr=tomjane-AT-localhost.localdomain (1000/1000), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30098, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (s47Fvf8q009301 Message accepted for delivery)
    May  7 11:57:42 localhost sm-mta[9303]: STARTTLS=client, relay=mail.REDACTED_2.com., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
    May  7 11:57:42 localhost sm-mta[9303]: s47Fvf8q009301: to=<EMAIL-AT-REDACTED_2.com>, ctladdr=<tomjane-AT-localhost.localdomain> (1000/1000), delay=00:00:01, xdelay=00:00:01, mailer=esmtp, pri=120381, relay=mail.REDACTED_2.com. [##.###.###.###], dsn=5.0.0, stat=Service unavailable
    May  7 11:57:42 localhost sm-mta[9303]: s47Fvf8q009301: s47Fvg8q009303: DSN: Service unavailable
    May  7 11:57:43 localhost sm-mta[9303]: s47Fvg8q009303: to=<tomjane-AT-localhost.localdomain>, delay=00:00:01, xdelay=00:00:00, mailer=local, pri=30000, dsn=2.0.0, stat=Sent
    Server OS:
    Ubuntu 12.04.3 LTS (GNU/Linux 3.2.0-57-virtual x86_64)

    Local OS:
    Linux Mint 14 (Which is a flavor of Ubuntu 12.10)

    I've been working on this for a couple days now and I'm kinda at the end of my rope. I've been searching around and I tried things like changing ports and other suggestions I've come across but nothing seems to work. Any help would be greatly appreciated!

  2. #2
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,288
    What happens if you run:
    Code:
    dig EMAIL-AT-REDACTED.com MX
    and
    Code:
    dig EMAIL-AT-REDACTED.com

  3. #3
    Just Joined!
    Join Date
    May 2014
    Posts
    7
    Thank you for the quick reply. output below:
    Code:
    ~  $ dig EMAIL-AT-REDACTED.com mx
    
    ; <<>> DiG 9.8.1-P1 <<>> EMAIL-AT-REDACTED.com mx
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 46134
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;EMAIL\-AT-REDACTED.com.			IN	MX
    
    ;; AUTHORITY SECTION:
    com.			900	IN	SOA	a.gtld-servers.net. nstld.verisign-grs.com. 1399483242 1800 900 604800 86400
    
    ;; Query time: 118 msec
    ;; SERVER: 127.0.1.1#53(127.0.1.1)
    ;; WHEN: Wed May  7 13:21:07 2014
    ;; MSG SIZE  rcvd: 104
    and

    Code:
    ~  $ dig EMAIL-AT-REDACTED.com
    
    ; <<>> DiG 9.8.1-P1 <<>> EMAIL-AT-REDACTED.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 38569
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;EMAIL\-AT-REDACTED.com.			IN	A
    
    ;; AUTHORITY SECTION:
    com.			783	IN	SOA	a.gtld-servers.net. nstld.verisign-grs.com. 1399483242 1800 900 604800 86400
    
    ;; Query time: 46 msec
    ;; SERVER: 127.0.1.1#53(127.0.1.1)
    ;; WHEN: Wed May  7 13:23:04 2014
    ;; MSG SIZE  rcvd: 104

  4. #4
    Just Joined!
    Join Date
    May 2014
    Posts
    7
    I'm not really sure what I'm supposed to be looking for here, is this output normal?

    I get these errors with every email I try, free accounts like gmail, domains that I host on other servers and even client emails that are on an exchange server. I don't think it's anything specific to any one recipient.

  5. #5
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,288
    It looks to me like there is no route to EMAIL-AT-REDACTED.com.

  6. #6
    Just Joined!
    Join Date
    May 2014
    Posts
    7
    Quote Originally Posted by gregm View Post
    It looks to me like there is no route to EMAIL-AT-REDACTED.com.
    just to clarify, this forum would not let me post the 'AT' sign, so EMAIL-AT-REDACTED.com is an actual email address and not a domain. So post #3 was the output of dig when I ran the command with the email address... which I think might have actually been wrong... possibly.

    here is the output when using the domain:
    Code:
    ~  $ dig DOMAIN-NAME.com mx
    
    ; <<>> DiG 9.8.1-P1 <<>> DOMAIN-NAME.com mx
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 64183
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 1
    
    ;; QUESTION SECTION:
    ;DOMAIN-NAME.com.			IN	MX
    
    ;; ANSWER SECTION:
    DOMAIN-NAME.com.		11859	IN	MX	0 mail.DOMAIN-NAME.com.
    
    ;; ADDITIONAL SECTION:
    mail.DOMAIN-NAME.com.	11859	IN	A	##.###.###.###
    
    ;; Query time: 44 msec
    ;; SERVER: 127.0.1.1#53(127.0.1.1)
    ;; WHEN: Thu May  8 11:27:56 2014
    ;; MSG SIZE  rcvd: 65
    and

    Code:
    ~  $ dig DOMAIN-NAME.com
    
    ; <<>> DiG 9.8.1-P1 <<>> DOMAIN-NAME.com
    ;; global options: +cmd
    ;; Got answer:
    ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 7063
    ;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
    
    ;; QUESTION SECTION:
    ;DOMAIN-NAME.com.			IN	A
    
    ;; ANSWER SECTION:
    DOMAIN-NAME.com.		11868	IN	A	##.###.###.###
    
    ;; Query time: 57 msec
    ;; SERVER: 127.0.1.1#53(127.0.1.1)
    ;; WHEN: Thu May  8 11:27:47 2014
    ;; MSG SIZE  rcvd: 44
    The IP address that I've hashed out is the correct IP and mail.DOMAIN-NAME.com is my mail server for that particular domain.

  7. #7
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,288
    Ah hah.
    That looks right.

    Have you tried testing by sending an emailwith telnet? It might give you some information not available otherwise.

  8. #8
    Just Joined!
    Join Date
    May 2014
    Posts
    7
    Telnet is pretty much the same since it ultimately sends the email via sendmail

    Code:
    ~  $ telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.localdomain.
    Escape character is '^]'.
    220 localhost.localdomain ESMTP Sendmail 8.14.4/8.14.4/Debian-2.1ubuntu1; Thu, 8 May 2014 13:34:29 -0400; (No UCE/UBE) logging access from: localhost.localdomain(OK)-localhost.localdomain [127.0.0.1]
    HELO localhost.localdomain
    250 localhost.localdomain Hello localhost.localdomain [127.0.0.1], pleased to meet you
    MAIL FROM: FROM-EMAIL-ADDRESS.com
    250 2.1.0 FROM-EMAIL-ADDRESS.com... Sender ok
    RCPT TO: TO-EMAIL-ADDRESS.com
    250 2.1.5 TO-EMAIL-ADDRESS.com... Recipient ok
    DATA
    354 Enter mail, end with "." on a line by itself
    SUBJECT: Test email from telnet
    
    This is a test.
    .
    250 2.0.0 s48HYThf027577 Message accepted for delivery
    QUIT
    221 2.0.0 localhost.localdomain closing connection
    Connection closed by foreign host.
    when I run the above I get no email and the same errors in the logs

  9. #9
    Linux Engineer
    Join Date
    Dec 2013
    Posts
    1,288
    I meant connect directly to the server at DOMAIN-NAME.com

  10. #10
    Just Joined!
    Join Date
    May 2014
    Posts
    7
    I don't think I can do that, the one email I was trying is gmail, another was on a shared host, I might be wrong but I doubt either would let you do that.

    I should also make clear that these email addresses send and receive mail just fine through the browser interface and/or with desktop clients like thunderbird. I just can't use 'sendmail' via any type of script or the command line.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •