smtptelnet

Telnet smtp.mail - must issue STARTTLS command first


On my Mac terminal, I am trying to telnet into my smtp.gmail.com through port 587.

On Google Apps, (which is set to manage a Dreamhost domain), I have relay configured, as follows:

"Allowed senders: Only addresses in my domains" "Require SMTP Authentication: Yes"

when I HELO <me@domain.com>, I get:

250 smtp.gmail.com at your service

then I enter MAIL FROM: <me@example.com>

which returns:

530 5.7.0 Must issue a STARTTLS command first.

what am I doing wrong?


Solution

  • You're required to start encrypting the connection first. This is done using the STARTTLS command.

    You can use the following command instead of telnet:

    openssl s_client -starttls smtp -ign_eof -crlf -connect smtp.gmail.com:587

    It works like the telnet command, but takes care of starting the encryption first.