[Postfixbuch-users] debian postfix (chrooted ) +sasl: smtpd findet saslauthd nicht

robert robert at root-4.us
Sa Okt 8 01:02:24 CEST 2005


Hallo liste,

ich bin gerade dabei ein postfix mit sasl authentication aufzusetzen,
Problem: der smtpd läuft chrooted und findet seinen sasl nicht:
- der sasl läuft:
/etc/postfix# ps faux | grep sasl
root      8087  0.0  0.1  6808 1588 ?        Ss   21:23   0:00 /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -a pam -r
root      8088  0.0  0.1  6972 1888 ?        S    21:23   0:00  \_ /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -a pam -r
root      8089  0.0  0.1  6972 1888 ?        S    21:23   0:00  \_ /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -a pam -r
root      8090  0.0  0.1  6808 1588 ?        S    21:23   0:00  \_ /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -a pam -r
root      8091  0.0  0.1  6808 1588 ?        S    21:23   0:00  \_ /usr/sbin/saslauthd -m /var/spool/postfix/var/run/saslauthd -a pam -r

und funktioniert so weit (user&passwort sind nur beispiele ;):
/etc/postfix# testsaslauthd -u test.domain.com -p passwort -f /var/spool/postfix/var/run/saslauthd/mux
0: OK "Success."

postfix weiss auch wo der sasl ist
-- content of /etc/postfix/sasl/smtpd.conf --
log_level: 7
pwcheck_method: saslauthd
saslauthd_path: /var/spool/postfix/var/run/saslauthd/mux
mech_list: plain login

und sucht es entsprechend, kann es aber nicht finden:
/etc/postfix# strace -ff -F -o tracefile postfix start
/etc/postfix# grep mux tracefile*
tracefile.8316:connect(12, {sa_family=AF_FILE, path="/var/spool/postfix/var/run/saslauthd/mux"}, 110) = -1 ENOENT (No such file or directory)

wenn ich das ganze OHNE CHROOT laufen lasse :
(smtp      inet  n       -       -       n       -       smtpd -v -v)
tracefile.8621:connect(12, {sa_family=AF_FILE, path="/var/spool/postfix/var/run/saslauthd/mux"}, 110) = 0

stimmen die BERECHTIGUNGEN???
Ich denke schon, alle welt kann auf das socket zugreifen, oder?
/etc/postfix# file /var/spool/postfix/var/run/saslauthd/mux
/var/spool/postfix/var/run/saslauthd/mux: socket
/etc/postfix# ls -la /var/spool/postfix/var/run/saslauthd/mux
srwxrwxrwx  1 root root 0 2005-10-07 21:23 /var/spool/postfix/var/run/saslauthd/mux

Wie sieht es mit dem pfad aus?
213-239-205-61:/etc/postfix# ls -la /var/spool/postfix/var/
insgesamt 12
drwxr-xr-x   3 root root 4096 2005-10-07 11:27 .
drwxr-xr-x  20 root root 4096 2005-10-07 11:26 ..
drwxr-xr-x   4 root root 4096 2005-10-07 18:21 run
213-239-205-61:/etc/postfix# ls -la /var/spool/postfix/var/run/
insgesamt 16
drwxr-xr-x  4 root  root 4096 2005-10-07 18:21 .
drwxr-xr-x  3 root  root 4096 2005-10-07 11:27 ..
drwxr-xr-x  2 mysql root 4096 2005-10-07 19:45 mysqld
drwx--x---  2 root  sasl 4096 2005-10-07 21:23 saslauthd

OK, ok saslauthd ist nur für root:sasl zugänglich, ABER
/etc/postfix# grep postfix /etc/group
sasl:x:45:cyrus,postfix

FAZIT:
Eigentlich sollte alles stimmen, aber es tut nicht!!!
Naja, wahrscheinlich stehe ich auf dem schlauch ... ?!?!
:-(

Kann da jemand mal nen blick drauf werfen?
Vielen dank im voraus ...

greetz

robert

---------------------------------------------------------------------------------------
/var/log/mail.log

postfix/smtpd[8316]: < localhost.localdomain[127.0.0.1]: AUTH PLAIN dGVzdAB0ZXN0AHRlc3RwYXNz
postfix/smtpd[8316]: smtpd_sasl_authenticate: sasl_method PLAIN, init_response dGVzdAB0ZXN0AHRlc3RwYXNz
postfix/smtpd[8316]: smtpd_sasl_authenticate: decoded initial response test
postfix/smtpd[8316]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
postfix/smtpd[8316]: warning: SASL authentication failure: Password verification failed
postfix/smtpd[8316]: warning: localhost.localdomain[127.0.0.1]: SASL PLAIN authentication failed
postfix/smtpd[8316]: > localhost.localdomain[127.0.0.1]: 535 Error: authentication failed


----------------------------------------------------------------------------------------

saslfinger - postfix Cyrus sasl configuration Fr Okt  7 22:13:13 CEST 2005
version: 0.9.9.1
mode: server-side SMTP AUTH

-- basics --
Postfix: 2.1.5
System: Debian GNU/Linux 3.1 \n \l

-- smtpd is linked to --
        libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x4019f000)

-- active SMTP AUTH and TLS parameters for smtpd --
broken_sasl_auth_clients = yes
smtpd_sasl_application_name = smtpd
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous


-- listing of /usr/lib/sasl2 --
insgesamt 944
drwxr-xr-x   2 root root  4096 2005-10-07 17:02 .
drwxr-xr-x  39 root root  8192 2005-10-07 17:15 ..
-rw-r--r--   1 root root 13488 2004-10-16 23:02 libanonymous.a
-rw-r--r--   1 root root   851 2004-10-16 23:02 libanonymous.la
-rw-r--r--   1 root root 13824 2004-10-16 23:02 libanonymous.so
-rw-r--r--   1 root root 13824 2004-10-16 23:02 libanonymous.so.2
-rw-r--r--   1 root root 13824 2004-10-16 23:02 libanonymous.so.2.0.19
-rw-r--r--   1 root root 16298 2004-10-16 23:02 libcrammd5.a
-rw-r--r--   1 root root   837 2004-10-16 23:02 libcrammd5.la
-rw-r--r--   1 root root 16180 2004-10-16 23:02 libcrammd5.so
-rw-r--r--   1 root root 16180 2004-10-16 23:02 libcrammd5.so.2
-rw-r--r--   1 root root 16180 2004-10-16 23:02 libcrammd5.so.2.0.19
-rw-r--r--   1 root root 47516 2004-10-16 23:02 libdigestmd5.a
-rw-r--r--   1 root root   860 2004-10-16 23:02 libdigestmd5.la
-rw-r--r--   1 root root 43944 2004-10-16 23:02 libdigestmd5.so
-rw-r--r--   1 root root 43944 2004-10-16 23:02 libdigestmd5.so.2
-rw-r--r--   1 root root 43944 2004-10-16 23:02 libdigestmd5.so.2.0.19
-rw-r--r--   1 root root 13726 2004-10-16 23:02 liblogin.a
-rw-r--r--   1 root root   831 2004-10-16 23:02 liblogin.la
-rw-r--r--   1 root root 14028 2004-10-16 23:02 liblogin.so
-rw-r--r--   1 root root 14028 2004-10-16 23:02 liblogin.so.2
-rw-r--r--   1 root root 14028 2004-10-16 23:02 liblogin.so.2.0.19
-rw-r--r--   1 root root 31248 2004-10-16 23:02 libntlm.a
-rw-r--r--   1 root root   825 2004-10-16 23:02 libntlm.la
-rw-r--r--   1 root root 30660 2004-10-16 23:02 libntlm.so
-rw-r--r--   1 root root 30660 2004-10-16 23:02 libntlm.so.2
-rw-r--r--   1 root root 30660 2004-10-16 23:02 libntlm.so.2.0.19
-rw-r--r--   1 root root 20142 2004-10-16 23:02 libotp.a
-rw-r--r--   1 root root   825 2004-10-16 23:02 libotp.la
-rw-r--r--   1 root root 43184 2004-10-16 23:02 libotp.so
-rw-r--r--   1 root root 43184 2004-10-16 23:02 libotp.so.2
-rw-r--r--   1 root root 43184 2004-10-16 23:02 libotp.so.2.0.19
-rw-r--r--   1 root root 13886 2004-10-16 23:02 libplain.a
-rw-r--r--   1 root root   831 2004-10-16 23:02 libplain.la
-rw-r--r--   1 root root 14096 2004-10-16 23:02 libplain.so
-rw-r--r--   1 root root 14096 2004-10-16 23:02 libplain.so.2
-rw-r--r--   1 root root 14096 2004-10-16 23:02 libplain.so.2.0.19
-rw-r--r--   1 root root 21798 2004-10-16 23:02 libsasldb.a
-rw-r--r--   1 root root   852 2004-10-16 23:02 libsasldb.la
-rw-r--r--   1 root root 18692 2004-10-16 23:02 libsasldb.so
-rw-r--r--   1 root root 18692 2004-10-16 23:02 libsasldb.so.2
-rw-r--r--   1 root root 18692 2004-10-16 23:02 libsasldb.so.2.0.19
-rw-r--r--   1 root root 22168 2004-10-16 23:02 libsql.a
-rw-r--r--   1 root root   874 2004-10-16 23:02 libsql.la
-rw-r--r--   1 root root 22132 2004-10-16 23:02 libsql.so
-rw-r--r--   1 root root 22132 2004-10-16 23:02 libsql.so.2
-rw-r--r--   1 root root 22132 2004-10-16 23:02 libsql.so.2.0.19


-- content of /etc/postfix/sasl/smtpd.conf --

log_level: 7

pwcheck_method: saslauthd

saslauthd_path: /var/spool/postfix/var/run/saslauthd/mux

mech_list: plain login

-- active services in /etc/postfix/master.cf --

# service type  private unpriv  chroot  wakeup  maxproc command + args

#               (yes)   (yes)   (yes)   (never) (100)

smtp      inet  n       -       -       -       -       smtpd -v -v

pickup    fifo  n       -       -       60      1       pickup

cleanup   unix  n       -       -       -       0       cleanup

qmgr      fifo  n       -       -       300     1       qmgr

rewrite   unix  -       -       -       -       -       trivial-rewrite

bounce    unix  -       -       -       -       0       bounce

defer     unix  -       -       -       -       0       bounce

trace     unix  -       -       -       -       0       bounce

verify    unix  -       -       -       -       1       verify

flush     unix  n       -       -       1000?   0       flush

proxymap  unix  -       -       n       -       -       proxymap

smtp      unix  -       -       -       -       -       smtp

relay     unix  -       -       -       -       -       smtp

showq     unix  n       -       -       -       -       showq

error     unix  -       -       -       -       -       error

local     unix  -       n       n       -       -       local

virtual   unix  -       n       n       -       -       virtual

lmtp      unix  -       -       n       -       -       lmtp

anvil     unix  -       -       n       -       1       anvil

maildrop  unix  -       n       n       -       -       pipe

  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}

uucp      unix  -       n       n       -       -       pipe

  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)

ifmail    unix  -       n       n       -       -       pipe

  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)

bsmtp     unix  -       n       n       -       -       pipe

  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -d -t$nexthop -f$sender $recipient

scalemail-backend unix  -       n       n       -       2       pipe

  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}

cyrus     unix  -       n       n       -       -       pipe

  flags=R user=cyrus argv=/usr/sbin/cyrdeliver -e  -r ${sender} -m ${extension} ${user}

-- mechanisms on localhost --




Mehr Informationen über die Mailingliste Postfixbuch-users