Getting SASL to work
Posted: 31 Mar 2024 15:55
I followed this post from 2017, but I think some things change since then. EFA-4.0.4
https://forum.efa-project.org/viewtopi ... 85#p11085
Make sure you've already ran the LetsEncrypt setup (option 15)...
-enable HTTPS, redirect is fine, open port 80.
1) /etc/postfix/main.cf
2) Create a sasl user in the db.
3) Last step took me about a day and a half to figure out
4) Test with your favorite smtp tester, using AUTH LOGIN
----------------------------------------------------------
it seems like most of the steps from the 2017 post were added in recent versions. such as;
-uncomment in master.cf
-and /etc/sasl2/smtpd.conf
----------------------------------------------------------
My intention for enabling sasl is to allow an external service to relay through using auth login, for alerts and stuff. The regular relay based on ip address (menu 7/menu 1) works fine but im moving my external service to azure which totally blocks outbound port 25, must use tls/587.
Next step is configure my external service (postfix) to relay through efa using login.
https://forum.efa-project.org/viewtopi ... 85#p11085
Make sure you've already ran the LetsEncrypt setup (option 15)...
-enable HTTPS, redirect is fine, open port 80.
1) /etc/postfix/main.cf
Code: Select all
smtpd_sasl_path = smtpd
smtpd_sasl_auth_enable = yes
Code: Select all
saslpasswd2 -c -u adomain.com username
# ie username@adomain.com
Code: Select all
sasldblistusers2
# to verify the user is in the db.
Code: Select all
(you can skip this)
testsaslauthd -u username@adomain.com -p secret
or
testsaslauthd -u username@adomain.com -p secret -s smtp
# testing it with testsaslauthd, it always says "NO authentication failed". idk how to fix that
# HOWever, testing AUTH LOGIN through an smtp session, it is authenticating ok.



Code: Select all
systemctl start saslauthd
systemctl enable saslauthd
systemctl restart postfix
# enable sasl lol
----------------------------------------------------------
it seems like most of the steps from the 2017 post were added in recent versions. such as;
-uncomment in master.cf
-and /etc/sasl2/smtpd.conf
----------------------------------------------------------
My intention for enabling sasl is to allow an external service to relay through using auth login, for alerts and stuff. The regular relay based on ip address (menu 7/menu 1) works fine but im moving my external service to azure which totally blocks outbound port 25, must use tls/587.
Next step is configure my external service (postfix) to relay through efa using login.