Tips on Testing SMTP on Port 25 and 465

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 10.11.12.13:25

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

use openssl without -starttls

openssl s_client -crlf -connect 10.11.12.13:25

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."

0 Comments

Submit a Comment

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

You May Also Like…

How to Research a CPU Upgrade

How to Research a CPU Upgrade

Upgrade Time! Doing a lot of VMWare Workstation virtualization to create labs for self-study and training. Finding...