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
) to support additional functionality that isn't used for SMTP authentication.
Also keep in mind that if your username or password contains the @
or $
characters you will need to escape them with a prepended \
, or Perl will interpret them and this...