This page is part of the EmailServer article.
Troubleshooting SASL authentication
To ensure that your authentication process works fine, we'll check what the server reports when we try to feed it a correct login.
Since logins are base64 encoded, copy and paste the following in a file that you call
encode_sasl_plain.pl (don't forget to
chmod 755 to make it executable):
Testing your Authentication Config
This section was inspired from the very complete book Postfix: the Definitive Guide from O'Reilly. Highly reommended!
Then use it to encode a username/password pair as it would be expected by the mail server for authentication. Here I use the existing administrator user (the account must exist on the system):
Then, talk to your mail server manually:
- # telnet localhost 25
- Trying 127.0.0.1...
- Connected to localhost.localdomain (127.0.0.1).
- Escape character is '^]'.
- 220 mail.example.com ESMTP MyOwnPostOffice
- EHLO test.faraway.com
- 250-SIZE 20971520
- 250-AUTH LOGIN DIGEST-MD5 PLAIN CRAM-MD5
- 250-AUTH=LOGIN DIGEST-MD5 PLAIN CRAM-MD5
- 250 8BITMIME
- AUTH PLAIN YWRtaW5pc3RyYXRvcgBhZG1pbmlzdHJhdG9yADEyMzQ1Ng==
- 235 Authentication successful
- 221 Bye