This shows you the differences between two versions of the page.
smtp_auth_test [2009/08/06 04:13] k2patel created |
smtp_auth_test [2009/08/06 04:21] k2patel |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== SMTP Auth test using TELNET ====== | ====== SMTP Auth test using TELNET ====== | ||
This is simple but it is very useful procedure to test email functionality. | 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 | First connect to your server using telnet | ||
Line 21: | Line 35: | ||
250 AUTH LOGIN PLAIN CRAM-MD5 | 250 AUTH LOGIN PLAIN CRAM-MD5 | ||
</code> | </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 |