This shows you the differences between two versions of the page.
smtp_auth_test [2009/08/06 04:21] k2patel |
smtp_auth_test [2020/08/10 02:35] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== 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.\\ | ||
- | <code perl> | ||
- | perl -MMIME::Base64 -e "print encode_base64('username')" | ||
- | perl -MMIME::Base64 -e "print encode_base64('password')" | ||
- | </code> | ||
- | above will return two values based on your input.\\ | ||
- | look like below. | ||
- | <code bash> | ||
- | aW1mb2BhcnRpc4Rwci5jb69= | ||
- | bWFybWx3bnY= | ||
- | </code> | ||
- | |||
- | First connect to your server using telnet | ||
- | <code bash> | ||
- | telnet xx.yy.zz.pp 25 | ||
- | Connected to xx.yy.zz.pp. | ||
- | Escape character is '^]'. | ||
- | 220 xx.yy.zz.pp ESMTP | ||
- | </code> | ||
- | Initialize communication Enter following line. | ||
- | <code bash> | ||
- | EHLO xyz.com | ||
- | </code> | ||
- | will return like below | ||
- | <code bash> | ||
- | 250-xx.yy.zz.pp | ||
- | 250-PIPELINING | ||
- | 250-8BITMIME | ||
- | 250-SIZE 0 | ||
- | 250 AUTH LOGIN PLAIN CRAM-MD5 | ||
- | </code> | ||
- | Now initialize Login. | ||
- | <code bash> | ||
- | AUTH LOGIN | ||
- | </code> | ||
- | which will return values like below.\\ | ||
- | First enter your username and second your password. | ||
- | <code bash> | ||
- | 334 VJBlcm9hbWU4 | ||
- | aW1mb2BhcnRpc4Rwci5jb69= | ||
- | 334 UFDcc4dvcmQ8 | ||
- | bWFybWx3bnY= | ||
- | </code> | ||
- | If you have successfully authenticated the server will return: "235 authenticated".\\ | ||
- | <code text> | ||
- | 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" | ||
- | </code> | ||
- | |||
- | Testing complete |