I stuck with not starting saslauthd service after upgrade Ubuntu to 24.04 (it runs along with Virutalmin). So i can't authenticate to smtp (cant send mails, but still can recieve) due to error:
454 4.7.0 Temporary authetnitaction failure: generic failiure
I was trying to run saslauthd service by (systemctl status saslauthd
shows service as: inactive (dead)
):
systemctl start saslauthd
ends with timed out:
Job for saslauthd.service failed because a timeout was exceeded.
See "systemctl status saslauthd.service" and "journalctl -xeu saslauthd.service" for details.
during the start process - its create some files in /var/spool/postfix/var/run/saslauthd
but after it ends with time out - directory its again empty.
I managed to run saslauthd by command bellow:
/usr/sbin/saslauthd -a pam -c -m /var/spool/postfix/var/run/saslauthd -r -n 5
and authorization started to work
Also after creating symlink:
ln -s /var/spool/postfix/var/run/saslauthd /var/run
I can start saslauthd by systemctl start saslauthd
and it works.
- tested with command bellow (also desktop client works):
nc localhost 25
220 ################ ESMTP Postfix (Ubuntu)
AUTH LOGIN
334 VXNlcm5hbWU6
######
334 UGFzc3dvcmQ6
######
235 2.7.0 Authentication successful
Envoirnment:
postfix 3.8.6
saslauthd 2.1.28
Ubuntu 24.04
Postfix 3.8.6 smtp config /etc/postfix/master.cf:
smtp inet n - y - - smtpd -o smtpd_sasl_auth_enable=yes -o smtpd_tls_security_level=may
smtps inet n - y - - smtpd -o smtpd_sasl_auth_enable=yes -o smtpd_tls_security_level=may -o smtpd_tls_wrappermode=yes
saslauthd 2.1.28 config /etc/default/saslauthd (remove commented lines)
START=yes
DESC="SASL Authentication Daemon"
NAME="saslauthd"
MECHANISMS="pam"
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"
THREADS=5
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd -r"
PARAMS="-m /var/spool/postfix/var/run/saslauthd -r"