Test Authenticated SMTP using Telnet

We all know how to test SMTP server by telneting to port 25. But, what if you have to test a SMTP server that has to be authenticated before you send a test mail using telnet. The only difference from normal test is, here you have to authenticate with the user/password, not in plain text, but you should send the authentication string with a Base64-encoded (http://base64-encoder-online.waraxe.us) password.

So, here is how you would test authenticated smtp server using telnet.

telnet smtp.mymailserver.net 25

220 mi1 ESMTP service ready
ehlo localhost
250-mi1
250-8BITMIME
250-SIZE 20480000
250-AUTH=PLAIN LOGIN
250-AUTH PLAIN LOGIN
250 STARTTLS
Auth Login
334 VXNlcm5hbWU6
c3VwcG9ydEyMHBsdXNjbHViLmNvbQ==
334 UGFzc3dvcmQ6
RHZsNIwWA==
235 Authentication successful.
MAIL FROM: support@mydomain.com
250 Sender address accepted
RCPT TO: soj@yahoo.com
250 Recipient address accepted
DATA
354 Continue
This is a test message for SMTP auth using telnet. Plz ignore. Don't reply.
.
250 Delivery in progress

So, the difference is what you see in those 3 lines starting from “Auth Login” and the following 2 codes are username and password respectively which does SMTP authentication. Those 2 encoded codes are generated using http://base64-encoder-online.waraxe.us

I hope this helps.

Advertisements