[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [msmtp-users] `No route to host' can mean `incorrect port number'



On Fri, 26. Jan 2007, 14:18:09 +0900, John McCabe-Dansted wrote:
> I was getting the following error with msmtp. The problem goes away if
> I set the port to be something other than 25 (e.g. the correct port
> number: 587). The moral of the story:
>    "`No route to host' may actually mean `incorrect port number'"
> 
> $ ./msmtp a
> msmtp: cannot connect to smtp.gmail.com, port 25: No route to host
> msmtp: could not send mail (account default from /home/elizabeth/.msmtprc)
> $ ping smtp.gmail.com
> PING gmail-smtp.l.google.com (66.249.93.111) 56(84) bytes of data.
> 64 bytes from 66.249.93.111: icmp_seq=1 ttl=238 time=375 ms
> 64 bytes from 66.249.93.111: icmp_seq=2 ttl=238 time=374 ms

This should not happen. Can you telnet to port 25?
$ telnet smtp.gmail.com 25

I can connect to smtp.gmail.com:25 from here:
$ msmtp -S --host=smtp.gmail.com
SMTP server at smtp.gmail.com, port 25:
[...]

Does your firewall or your provider block port 25 somehow?

Regards,
Martin