postfix+saslauthd - postfix/smtpd verwendet nicht den saslauthd

S

snoci

Moin,

ich krieg den SASL Kram nicht zum laufen.

Ich habe hier FreeBSD 8.2-RELEASE mit:

cyrus-sasl-2.1.23_3
cyrus-sasl-saslauthd-2.1.23
postfix-2.8.0,1

Der saslauthdaemon läuft:

Code:
root    66659  0.0  0.0  9832  1504   3  IJ   11:55PM   0:00.00 /usr/local/sbin/saslauthd -a getpwent -d
root    66663  0.0  0.0  9832  1504   3  IJ   11:55PM   0:00.00 /usr/local/sbin/saslauthd -a getpwent -d
root    66664  0.0  0.0  9832  1504   3  IJ   11:55PM   0:00.00 /usr/local/sbin/saslauthd -a getpwent -d
root    66665  0.0  0.0  9832  1504   3  IJ   11:55PM   0:00.00 /usr/local/sbin/saslauthd -a getpwent -d
root    66666  0.0  0.0  9832  1504   3  IJ   11:55PM   0:00.00 /usr/local/sbin/saslauthd -a getpwent -d

Postfix verwendet SASL:

Code:
# postconf -n|grep smtpd_sasl
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = smtpd
smtpd_sasl_security_options = noanonymous

Der smtpd läuft nicht im Chroot (weil der ganze Server im Jail läuft), master.conf:

Code:
212.227.*.*:smtp      inet  n       -       n       -       -       smtpd -v

meine /usr/local/lib/sasl2/smtpd.conf:

Code:
saslauthd_version: 2
pwcheck_method: saslauthd
mech_list: CRAM-MD5 DIGEST-MD5
saslauthd_path: /var/run/saslauthd/mux
log_level: 7

Da ich "getpwent" verwende, hab ich einen lokalen User "testmx", der funktioniert:

Code:
# testsaslauthd -u testmx -p test
0: OK "Success."

Das debug-output vom saslauthd sagt:

Code:
saslauthd[66664] :rel_accept_lock : released accept lock
saslauthd[66665] :get_accept_lock : acquired accept lock
saslauthd[66664] :do_auth         : auth success: [user=testmx] [service=imap] [realm=] [mech=getpwent]
saslauthd[66664] :do_request      : response: OK

Grundsätzlich funktioniert er also.

Über den Postfix geht es aber nicht. Im Maillog steht:

Code:
Mar  9 00:15:46 p3 postfix/smtpd[68497]: xsasl_cyrus_server_create: SASL service=smtp, realm=(null)
Mar  9 00:15:46 p3 postfix/smtpd[68497]: xsasl_cyrus_server_create: SASL service=smtp, realm=(null)
Mar  9 00:15:47 p3 postfix/smtpd[68497]: xsasl_cyrus_server_first: sasl_method CRAM-MD5
Mar  9 00:15:47 p3 postfix/smtpd[68497]: xsasl_cyrus_server_auth_response: uncoded server challenge: <2409722764.7780592@********.de>
Mar  9 00:15:47 p3 postfix/smtpd[68497]: xsasl_cyrus_server_next: decoded response: testmx 2c5aba95e2bd5fe5a303ee56b7601f6e
Mar  9 00:15:47 p3 postfix/smtpd[68497]: warning: SASL authentication failure: Could not open db
Mar  9 00:15:47 p3 postfix/smtpd[68497]: warning: SASL authentication failure: Could not open db
Mar  9 00:15:47 p3 postfix/smtpd[68497]: warning: SASL authentication failure: no secret in database
Mar  9 00:15:47 p3 postfix/smtpd[68497]: warning: *****.dip.t-dialin.net[79.255.*.*]: SASL CRAM-MD5 authentication failed: authentication failure

Während ich es über den Postfix versuche, kommt beim saslauthd kein Request rein. Der läuft ja mit eingeschaltetem Debugging und es kommt da kein Output. Ich kann den auch anhalten, die Logmeldungen vom Postfix ändern sich dann auch nicht.

Ich hab den Postfix/smtpd Prozess mit truss verfolgt und dort sieht man das hier:

Code:
68497: open("/usr/local/etc/sasldb2.db",O_RDONLY,0600) ERR#2 'No such file or directory'
68497: open("/usr/local/etc/sasldb2.db",O_RDONLY,0600) ERR#2 'No such file or directory'

Allerdings habe ich sowohl sasl als auch den saslauthd OHNE Berkeley-DB Support gebaut:

Code:
# cat /var/db/ports/cyrus-sasl2/options 
# This file is auto-generated by 'make config'.
# No user-servicable parts inside!
# Options for cyrus-sasl-2.1.23_3
_OPTIONS_READ=cyrus-sasl-2.1.23_3
WITHOUT_BDB=true
WITHOUT_MYSQL=true
WITHOUT_PGSQL=true
WITHOUT_SQLITE=true
WITHOUT_DEV_URANDOM=true
WITHOUT_ALWAYSTRUE=true
WITHOUT_KEEP_DB_OPEN=true
WITH_AUTHDAEMOND=true
WITH_LOGIN=true
WITH_PLAIN=true
WITH_CRAM=true
WITH_DIGEST=true
WITHOUT_OTP=true
WITHOUT_NTLM=true

Der User postfix darf den Socket vom saslauthd auch lesen:

Code:
# id postfix
uid=125(postfix) gid=125(postfix) groups=125(postfix),6(mail)

# ls -ld /var/run/saslauthd 
drwxrwx---  2 cyrus  mail  512 Mar  8 23:56 /var/run/saslauthd

# ls -l /var/run/saslauthd/mux
srwxrwxrwx  1 root  mail  0 Mar  8 23:55 /var/run/saslauthd/mux

Mir ist das ein vollkommenes Rätsel. Kann mir da bitte jemand weiterhelfen?


Vielen Dank,
snoci
 
Hallo snoci

schau dir mal dies hier an:
Habe ein kleines readme geschrieben.

Gruss tiptel170
 

Anhänge

  • readme.txt
    4,5 KB · Aufrufe: 20

Ähnliche Themen

postfix/dovecot/cyrus sasl: basic conf

dovecot und postfix Konfiguration Problem

procmail problem

SMTP mag plötzlich nicht mehr...

Postfix + SASL

Zurück
Oben