Unable to connect gmail and hotmail via telnet

gmailpostfixsmtp

Hey all i am try to connect to gmail and hotmail server via telnet.

As:

$: telnet smtp.gmail.com 25
Trying 74.125.127.109...
Connected to gmail-smtp-msa.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP j3sm3044317ybe.11
helo
250 mx.google.com at your service
220 2.0.0 Ready to start TLS
mail from: codeomnitrix@smtp.localhost.com
Connection closed by foreign host.

Here codeomnitrix is a user of smtp.localhost.com. And i am running postfix at my system with sitename being smtp.localhost.com.

And i am able to sent mail locally from one user to another user but can't send to any other user who is not local.

Thanks in advance:)

Best Answer

The reason telnet isn't working is because Google is now requiring ESMTP (EHLO verb, not HELO) and TLS. Telnet is now broken. You can use openssl, though.

openssl s_client -starttls smtp -crlf -connect smtp.gmail.com:25

The normal SMTP commands should work from there.