Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I used to be able to send emails using a gmail account & sendmail configured using one of the guides on the Internet, for example:

This is a small server and I've recently moved it to a different house. And sendmail has stop working. The only thing different in the network setup is a new router.

What is happening:

  1. In the log files, I see the following error:

    ...stat=Deferred: No route to host

  2. When I run from the command line:

    strace sendmail -f A -t B -u "Subject" -m "Message" -tls=yes ssl=yes -s -xu A -xp XYZ

It hangs on this call:

recvfrom(3, "m0\201\203\0\1\0\0\0\0\0\0\4ares\3lan\0\0\34\0\1", 8192, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("")}, [16]) = 26
close(3)                                = 0
time(NULL)                              = 1339997943
open("/etc/localtime", O_RDONLY)        = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=3477, ...}) = 0
fstat64(3, {st_mode=S_IFREG|0644, st_size=3477, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb76ff000
read(3, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\4\0\0\0\4\0\0\0\0"..., 4096) = 3477
_llseek(3, -24, [3453], SEEK_CUR)       = 0
read(3, "\nEST5EDT,M3.2.0,M11.1.0\n", 4096) = 24
close(3)                                = 0
munmap(0xb76ff000, 4096)                = 0
connect(3, {sa_family=AF_FILE, path="/dev/log"}, 110) = 0
send(3, "<18>Jun 18 01:39:03 sendmail[268"..., 96, MSG_NOSIGNAL) = 96
nanosleep({60, 0}, 

So it looks like at some point it tries to resolve the DNS name, but I don't have anything running on 53, so it dies out and then just hangs. The other interesting thing is that msmtp works just fine on the same server.

Update: ares in strace output is actually the name of my server, but .254 IP address is the address of the router.

Could anyone tell me why this is happening or what further steps can I take to investigate the issue? Thanks!

share|improve this question
Are you still using the same ISP? – nickgrim Jun 18 '12 at 9:04
Are you able to reach other hosts on the internet? Can you confirm that you subnet mask is accurate in your network connection details? – Mike B Jun 18 '12 at 15:28
Different ISP, can access everything else (locally and remotely) just fine. – Nikita Jun 19 '12 at 3:25
  • What are the contents of /etc/resolv.conf in ares?

  • Does the problem persist when you use and as your DNS servers?

  • Can you telnet 587 ?

Usually such problems mean that your ISP does not allow you to connect to certain ports at the remote host.

share|improve this answer
resolv.conf actually gets overwritten every time I recycle eth0, is that because I use DHCP? Currently it lists only one nameserver and this is the IP of the router. I don't seem to be able to telnet to 587. I guess I don't have much choice unless I find a provider that will allow connections on 587? – Nikita Jun 19 '12 at 2:35
actually, never mind, I am able to telnet 587 to – Nikita Jun 19 '12 at 3:24
So is not the issue resolved, or does it persist? – adamo Jun 19 '12 at 6:58
The problem persists: I am able to telnet in 587, plus msmtp works which I think means that the provider does not block the port. But even when I use, sendmail simply hangs. – Nikita Jun 19 '12 at 11:51
Try this – adamo Jun 19 '12 at 14:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.