Am KanalSeit zwei Tagen versuche ich meinem Postfix/smtpd die sasl-Autorisation beizubringen. Gut, immer nebenbei vorm Fernseher, da ist man nicht besonders konzentriert. Aber der Postfix scheint den sasl-Deamon nicht zu finden.
Nachdem ich jetzt mehrere Stunden damit zugebracht habe, stelle ich jetzt fest, dass der smtpd-Deamon doch in einer chroot-Umgebung läuft. Das erklärt dann auch das Problem.

# cd /etc/default
# diff -Natur saslauthd.old saslauthd
--- saslauthd.old       2007-01-27 19:34:06.000000000 +0200
+++ saslauthd   2007-01-28 19:33:36.000000000 +0200
@@ -4,7 +4,7 @@
 #
 
 # Should saslauthd run automatically on startup? (default: no)
-START=no
+START=yes
 
 # Description of this saslauthd instance. Recommended.
 # (suggestion: SASL Authentication Daemon)
@@ -52,4 +52,5 @@
 # information about these options.
 #
 # Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd"
-OPTIONS="-c -m /var/run/saslauthd"
+#OPTIONS="-c -m /var/run/saslauthd"
+OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"
----
# cd /var/run
# rmdir saslauthd
# ln -s /var/spool/postfix/var/run/saslauthd/ saslauthd

Wieder ein typischer Fall von „Kaum macht man es richtig – funktioniert es!“

Nachtrag:
Ein paar Monate später konnte sich postfix schon wieder nicht authentifizieren. Dieses mal lag das Problem aber ganz wo anders. Offensichtlich hing es nicht vom Kennwort sondern vom Service ab, ob es klappte oder nicht.:

root@uranus:~#  testsaslauthd -s smtp -r imap -u uwe -p password
0: NO "authentication failed"
root@uranus:~#  testsaslauthd -s imap -r imap -u uwe -p password
0: OK "Success."
root@uranus:~#

Ersteres ergab dann folgende Fehlermeldung im Debug-Mode:

# /usr/sbin/saslauthd -a pam -V -c -m /var/spool/postfix/var/run/saslauthd -n 3 -d
....
saslauthd[14039] :cache_lookup    : [login=uwe] [service=] [realm=smtp]: not found, update pending
saslauthd[14039] :cache_un_lock   : attempting to release lock on slot: 501
saslauthd[14039] :do_auth         : auth failure: [user=uwe] [service=smtp] [realm=] [mech=pam] [reason=PAM auth error]
.....

Landschaftspark NordNach dem ich lange gebastelt hatte und ‚ganz Google leer gelesen‘ habe – ohne etwas zu finden :-( – lag das Problem dann ‚einfach nur‘ an der pam-Datei für den smtp-Dienst. Die Lösung war dann simpel, da der imap-Dienst funktionierte, benutzte ich die entsprechende Datei auch für smtp.:

/etc/pam.d# mv smtp smtp.o
/etc/pam.d# ln -s imap smtp
/etc/pam.d#