Testing SMTP AUTH

When you test SMTP authentication, don't use a regular mail client as the mail client may introduce some problems. Instead use the Telnet client program and connect to Postfix in an SMTP communication. You will need to send the username and password of your test user in a Base64-encoded form so the first step will be to create such a string. Use the following command to create a Base64 encoded string for the user test using the password testpass:

$ perl -MMIME::Base64 -e 'print encode_base64("test\0test\0testpass");'
dGVzdAB0ZXN0AHRlc3RwYXNz

Note

Note that the \0 separates the username from the password, and the username will have to be repeated twice. This is because SASL expects two, possibly different usernames (userid, authid ...

Get Linux E-mail now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.