Reputation: 14461
I want to use telnet to google mail server on linux. I want to send mail using SMTP. But it is not able to do so. I am using this command.
telnet alt4.gmail-smtp-in.l.google.com 25
But it says
Trying 209.85.220.19...
After some time, it gives time out. Does anyone knows how to do it?
Upvotes: 12
Views: 57435
Reputation: 1
In other words, "mail.google.com" can resolve to different IP addresses depending on whether you want to visit it as a webpage (or connect to via telnet), or send a mail to it.
Upvotes: 0
Reputation: 575
To run the telnet test on a Windows computer:
Upvotes: 3
Reputation: 107042
You should also note that DNS records for mail servers have the "MX" type which is not the same as the standard "A" type that telnet uses.
In other words, "mail.google.com" can resolve to different IP addresses depending on whether you want to visit it as a webpage (or connect to via telnet), or send a mail to it.
Upvotes: 1
Reputation: 67820
It connects for me too. I think the most likely reason is that your ISP is blocking your external access to port 25. This is a common and sensible thing to do because SMTP from end-user PCs is a significant source of spam.
You may be able to talk your provider into opening the port up for you, or you can use a proxy server out on the 'net, or you can use a different service, such as SSMTP (?) which connects over a secure channel using a different port.
Upvotes: 14