Written by James McDonald

December 3, 2017

When testing your login using AUTH PLAIN if your passwords starts with a number you need to use a \000 instead of \0 other wise you will always get an error as the base64 encoded string will be wrong

printf 'username\0username\0001234567pwd' | mmencode

perl -MMIME::Base64 -e 'print encode_base64("username\0username\0001234567pwd");'

more information here http://postfix.1071664.n5.nabble.com/Issues-enabling-SASL-in-Postfix-tp22327p22328.html

To test SMTP port 25 and SSL/TLS use -starttls smtp

openssl s_client -starttls smtp -crlf -connect

To test port 465 which is immediate SSL/TLS don’t use -starttls

use openssl without -starttls

openssl s_client -crlf -connect

Do use testsaslauthd for check if it’s working. If you are using postfix with chroot enabled you have to specify the path to the unix socket.

testsaslauthd -f /var/spool/postfix/var/run/saslauthd/mux -u username -p password
0: OK "Success."


Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…