User Tools

Site Tools


smtp_auth_test

SMTP Auth test using TELNET

This is simple but it is very useful procedure to test email functionality.

you need following information to authenticate your self.
base64 encoded value for username and password.
You can generate it using following command.

perl -MMIME::Base64 -e "print encode_base64('username')"
perl -MMIME::Base64 -e "print encode_base64('password')"

above will return two values based on your input.
look like below.

aW1mb2BhcnRpc4Rwci5jb69=
bWFybWx3bnY=

First connect to your server using telnet

telnet xx.yy.zz.pp 25
Connected to xx.yy.zz.pp.
Escape character is '^]'.
220 xx.yy.zz.pp ESMTP

Initialize communication Enter following line.

EHLO xyz.com

will return like below

250-xx.yy.zz.pp
250-PIPELINING
250-8BITMIME
250-SIZE 0
250 AUTH LOGIN PLAIN CRAM-MD5

Now initialize Login.

AUTH LOGIN

which will return values like below.
First enter your username and second your password.

334 VJBlcm9hbWU4
aW1mb2BhcnRpc4Rwci5jb69=
334 UFDcc4dvcmQ8                           
bWFybWx3bnY=

If you have successfully authenticated the server will return: “235 authenticated”.

Enter MAIL FROM: YourUserName@YourDomain.com"
Enter RCPT TO: DestinationEmail
Enter DATA
Enter Subject: Test using telnet"
Enter 
Enter This is just a test to see if I can SMTP auth from my PC
 
Enter "."
 
The server will return: "250 Message queued"
Enter "quit"

Testing complete

smtp_auth_test.txt · Last modified: 2020/08/10 02:35 (external edit)