Links
This expects you to have netcat, perl and openssl installed
Hello without TLS
nc mail.server.com 25
220 mail.server.com ESMTP Sendmail 8.14.7/8.14.7; Thu, 11 Sep 2014 12:01:22 +0200 (CEST)
> ehlo friendly.server.com
250-mail.server.com Hello friendly [1.2.3.4], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-AUTH DIGEST-MD5 CRAM-MD5
250-STARTTLS
250-DELIVERBY
250 HELP
> quit<
221 2.0.0 mail.server.com closing connection
Hello with TLS
openssl s_client -starttls smtp -crlf -connect mail.server.com:25
# ...Loads of text here...
> ehlo friendly.server.com
# ... Same as login without TLS (above) ...
Test login
$ perl -MMIME::Base64 -e 'print encode_base64("\000coolname\@iix.se\000my-password")'
AGNvb2xuYW1lQGlpeC5zZQBteS1wYXNzd29yZA==
# .. Log in to server with one of the above ...
> AUTH PLAIN AGNvb2xuYW1lQGlpeC5zZQBteS1wYXNzd29yZA==
235 2.0.0 OK Authenticated
> quit
221 2.0.0 mail.server.com closing connection
Sending mail
> mail from: <[email protected]>
250 ok
> rcpt to: <[email protected]>
250 ok
> data
354 go ahead
> From: John <[email protected]>
> To: Nobody <[email protected]>
> Subject: fnord
>
> hail eris!
> .
250 ok 1113954693 qp 29052
> quit