Postfix - sasl - Problem

Postfix, QMail, Sendmail, Dovecot, Cyrus, Courier, Anti-Spam
chris786
Posts: 11
Joined: 2005-04-25 18:28
 

Postfix - sasl - Problem

Post by chris786 »

Hallo Leute
Schon seit etlichen Stunden ärgere ich mich mit Postfix und sasldb (Debian Sarge) rum.
Da ich schon einigen Ärger hatte habe ich mir angewöhnt erst einmal alles local zu Haus zu testen. DORT läuft die Sache auch - nur auf meinem Server leider nicht. Aber der Reihe nach.

sasldblistusers2 zeigt die den User richtig an, die Datei habe ich nach /var/spool/postfix/etc kopiert. Die Zugriffrechte habe ich ebenfalls richtig gesetzt.
In den Logfiles /var/log/mail.log taucht immer das gleiche auf:

Code: Select all

postfix/smtpd[4028]: connect from dslb-00000-000-204-000.pools.arcor-ip.net[00.00.224.000]
postfix/smtpd[4028]: warning: SASL authentication failure: no secret in database
postfix/smtpd[4028]: warning: dslb-000-000-204-000.pools.arcor-ip.net[00.00.224.000]: SASL CRAM-MD5 authentication failed
postfix/smtpd[4028]: warning: Read failed in network_biopair_interop with errno=0: num_read=0, want_read=5
: lost connection after AUTH from dslb-000-057-000-000.pools.arcor-ip.net[00.00.224.000]
: disconnect from dslb-000-057-000-000.pools.arcor-ip.net[00.00.224.000]
Hier eine ausschnitt aus /etc/postfix/main.cf

Code: Select all

### TLS  keys
smtpd_tls_cert_file = /etc/postfix/mail.cert
smtpd_tls_key_file = /etc/postfix/mail.key
#### TLS aktivieren
smtpd_use_tls = yes
smtpd_enforce_tls = no
smtpd_tls_auth_only = yes
## SMTP AUTH 
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = meine Domains
broken_sasl_auth_clients = yes
#Diese Zeile dient dazu, um Clients, welche sich nicht an den RFC 2254 halten,
#trotzdem zu authentifizieren (z.B. Outlook Express 4, Exchange 5.0).
smtpd_sasl_security_options = noanonymous

und hier meine /etc/postfix/sasl/smtpd.conf:

Code: Select all

pwcheck_method: auxprop
mech_list: CRAM-MD5 DIGEST-MD5
log_level: 3
auxprop_plugin: sasldb
Wie gesagt ich habe mittlerweile mich schon etliche Stunden mit der Sache beschäft finde aber keinen Fehler, vor allem weil die hier vorstellte Konfiguration auf meinem lokalen Server läuft :-(.
Also wenn jemand eine Idee hat. Ich bin für jeden Tip dankbar
Chris
nigg
Posts: 6
Joined: 2006-09-10 17:48
 

Re: Postfix - sasl - Problem

Post by nigg »

Ich kann dir zwar nicht helfen, aber ich hab ein ähnliches Problem. Ich möchte Postfix mit saslauthd zum Laufen bekommen, aber egal was ich mache, ich bekomme immer:

Code: Select all

postfix/smtpd[27958]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Er soll sasl2db überhaupt nicht benutzen.
Roger Wilco
Posts: 5923
Joined: 2004-05-23 12:53
 

Re: Postfix - sasl - Problem

Post by Roger Wilco »

Nigg wrote:Er soll sasl2db überhaupt nicht benutzen.
Dann konfiguriere /etc/postfix/sasl/smtpd.conf bzw. /etc/sasl2/smtpd.conf (je nach Distribution) korrekt.
nigg
Posts: 6
Joined: 2006-09-10 17:48
 

Re: Postfix - sasl - Problem

Post by nigg »

das hab ich .. das ist ja der käse
adjustman
Posts: 1132
Joined: 2003-03-26 23:29
Location: SA
 

Re: Postfix - sasl - Problem

Post by adjustman »

chris786 wrote:Hallo Leute
Schon seit etlichen Stunden ärgere ich mich mit Postfix und sasldb (Debian Sarge) rum.
ich kann (ja, sicher zum Xten Mal) nur raten,
saslfinger -s laufen zu lassen und den Output zu posten. :wink:
Nigg wrote:das hab ich .. das ist ja der käse
dann zeig doch mal
chris786
Posts: 11
Joined: 2005-04-25 18:28
 

saslfinger

Post by chris786 »

Hier der Output, ich kann da nix erkennen was den Fehler erklärt bzw. dazu Beitragen würde ihn zu finden. Aber es lesen hier ja Leute mit die mehr Erfahrung und Wissen haben .....

saslfinger -s

Code: Select all

saslfinger - postfix Cyrus sasl configuration Thu Sep 14 07:52:47 UTC 2006
version: 1.0
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 (0x40189000)

-- active SMTP AUTH and TLS parameters for smtpd --
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = XXXXX
smtpd_sasl_security_options = noanonymous
smtpd_tls_auth_only = yes
smtpd_tls_cert_file = /etc/postfix/mail.cert
smtpd_tls_key_file = /etc/postfix/mail.key
smtpd_use_tls = yes


-- listing of /usr/lib/sasl2 --
total 808
drwxr-xr-x   2 root root  3072 Sep 13 15:11 .
drwxr-xr-x  34 root root  8192 Sep 13 15:11 ..
-rw-r--r--   1 root root 13492 Aug  7 22:40 libanonymous.a
-rw-r--r--   1 root root   851 Aug  7 22:40 libanonymous.la
-rw-r--r--   1 root root 13824 Aug  7 22:40 libanonymous.so
-rw-r--r--   1 root root 13824 Aug  7 22:40 libanonymous.so.2
-rw-r--r--   1 root root 13824 Aug  7 22:40 libanonymous.so.2.0.19
-rw-r--r--   1 root root 16298 Aug  7 22:40 libcrammd5.a
-rw-r--r--   1 root root   837 Aug  7 22:40 libcrammd5.la
-rw-r--r--   1 root root 16180 Aug  7 22:40 libcrammd5.so
-rw-r--r--   1 root root 16180 Aug  7 22:40 libcrammd5.so.2
-rw-r--r--   1 root root 16180 Aug  7 22:40 libcrammd5.so.2.0.19
-rw-r--r--   1 root root 47520 Aug  7 22:40 libdigestmd5.a
-rw-r--r--   1 root root   860 Aug  7 22:40 libdigestmd5.la
-rw-r--r--   1 root root 43944 Aug  7 22:40 libdigestmd5.so
-rw-r--r--   1 root root 43944 Aug  7 22:40 libdigestmd5.so.2
-rw-r--r--   1 root root 43944 Aug  7 22:40 libdigestmd5.so.2.0.19
-rw-r--r--   1 root root 13726 Aug  7 22:40 liblogin.a
-rw-r--r--   1 root root   831 Aug  7 22:40 liblogin.la
-rw-r--r--   1 root root 14028 Aug  7 22:40 liblogin.so
-rw-r--r--   1 root root 14028 Aug  7 22:40 liblogin.so.2
-rw-r--r--   1 root root 14028 Aug  7 22:40 liblogin.so.2.0.19
-rw-r--r--   1 root root 31248 Aug  7 22:40 libntlm.a
-rw-r--r--   1 root root   825 Aug  7 22:40 libntlm.la
-rw-r--r--   1 root root 30692 Aug  7 22:40 libntlm.so
-rw-r--r--   1 root root 30692 Aug  7 22:40 libntlm.so.2
-rw-r--r--   1 root root 30692 Aug  7 22:40 libntlm.so.2.0.19
-rw-r--r--   1 root root 20142 Aug  7 22:40 libotp.a
-rw-r--r--   1 root root   825 Aug  7 22:40 libotp.la
-rw-r--r--   1 root root 43184 Aug  7 22:40 libotp.so
-rw-r--r--   1 root root 43184 Aug  7 22:40 libotp.so.2
-rw-r--r--   1 root root 43184 Aug  7 22:40 libotp.so.2.0.19
-rw-r--r--   1 root root 13886 Aug  7 22:40 libplain.a
-rw-r--r--   1 root root   831 Aug  7 22:40 libplain.la
-rw-r--r--   1 root root 14096 Aug  7 22:40 libplain.so
-rw-r--r--   1 root root 14096 Aug  7 22:40 libplain.so.2
-rw-r--r--   1 root root 14096 Aug  7 22:40 libplain.so.2.0.19
-rw-r--r--   1 root root 21810 Aug  7 22:40 libsasldb.a
-rw-r--r--   1 root root   852 Aug  7 22:40 libsasldb.la
-rw-r--r--   1 root root 18692 Aug  7 22:40 libsasldb.so
-rw-r--r--   1 root root 18692 Aug  7 22:40 libsasldb.so.2
-rw-r--r--   1 root root 18692 Aug  7 22:40 libsasldb.so.2.0.19




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

pwcheck_method: auxprop
mech_list: CRAM-MD5 DIGEST-MD5
log_level: 3
auxprop_plugin: sasldb

#pwcheck_method: pwcheck

### SASL auth autifizierung
#pwcheck_method: saslauthd
#mech_list: PLAIN LOGIN
#log_level: 3

#pwcheck_method: auxprop
#mech_list: digest-md5 cram-md5

#pwcheck_method: sasldb
#mech_list: PLAIN
#LOGIN digest-md5 cram-md5
#saslauthd_path: /var/run/saslauthd/mux/mux
#autotransition:true


-- 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
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}

-- mechanisms on localhost --
adjustman
Posts: 1132
Joined: 2003-03-26 23:29
Location: SA
 

Re: saslfinger

Post by adjustman »

chris786 wrote:-- mechanisms on localhost --
und Schluss! Es werden keine - mechanisms - angezeigt. :wink:
Bei auxprop, so wie du das hast, muss es eine sasldb mit den Secrets geben. Oder dann per MySql, aber dazu fehlt dir ein Modul.
chris786
Posts: 11
Joined: 2005-04-25 18:28
 

Re: Postfix - sasl - Problem

Post by chris786 »

Ok, aber auf meinem localen Router läuft die Sache mit der Config, ich habe gearde saslfinger -s darüber laufen lassen mit dem selben Resultat.
Als Passwörter nimmt er auf dem Router die die unter /var/spool/postfix/etc/ angezeigt werden bzw. die die ich mit saslpasswd2 erstellt habe.

Aber nun gut, wenn du meinst das da was fehlt um es zum laufen zu bringen.
Eine MySQL datenbank will ich eigentlich nicht - bei 10 Mail-Adressen ist das ein wenig überdimensioniert.
Hm, Hm also was müßte ich in der /etc/postfix/sasl/smtpd.conf ändern das die Datenbank /var/spool/postfix/etc/sasl2db nimmt?
Chris
adjustman
Posts: 1132
Joined: 2003-03-26 23:29
Location: SA
 

Re: Postfix - sasl - Problem

Post by adjustman »

ich würde erstmal alles aus dem chroot rausnehmen.
Dann saslauth testen, ob es läuft.
Dann die sasldb zu "Fuss" testen.
Siehe auch
http://postfix.state-of-mind.de/patrick ... ation.html
nigg
Posts: 6
Joined: 2006-09-10 17:48
 

Re: Postfix - sasl - Problem

Post by nigg »

Mir gehts genauso. Ich bin der Ansicht die Config passt - andererseits kanns ja nur ein Konfigurationsfehler sein. Ich will einfach nur das er saslauthd nimmt (das Postfix soll zusammen mit Confixx arbeiten, POP3 funzt, local smtp auch).

Code: Select all

~# saslfinger -s
saslfinger - postfix Cyrus sasl configuration Thu Sep 14 21:44:01 CEST 2006
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 (0xb7d70000)

-- active SMTP AUTH and TLS parameters for smtpd --
broken_sasl_auth_clients = yes
smtpd_sasl_application_name = smtpd (Postfix < 2.3)
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = BLAHFASEL
smtpd_sasl_security_options = noanonymous
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes

-- listing of /usr/lib/sasl2 --
total 860
drwxr-xr-x   2 root root  4096 Sep  1 22:07 .
drwxr-xr-x  54 root root 16384 Sep 13 16:46 ..
-rw-r--r--   1 root root 13492 Aug  8 00:40 libanonymous.a
-rw-r--r--   1 root root   851 Aug  8 00:40 libanonymous.la
-rw-r--r--   1 root root 13824 Aug  8 00:40 libanonymous.so
-rw-r--r--   1 root root 13824 Aug  8 00:40 libanonymous.so.2
-rw-r--r--   1 root root 13824 Aug  8 00:40 libanonymous.so.2.0.19
-rw-r--r--   1 root root 16298 Aug  8 00:40 libcrammd5.a
-rw-r--r--   1 root root   837 Aug  8 00:40 libcrammd5.la
-rw-r--r--   1 root root 16180 Aug  8 00:40 libcrammd5.so
-rw-r--r--   1 root root 16180 Aug  8 00:40 libcrammd5.so.2
-rw-r--r--   1 root root 16180 Aug  8 00:40 libcrammd5.so.2.0.19
-rw-r--r--   1 root root 47520 Aug  8 00:40 libdigestmd5.a
-rw-r--r--   1 root root   860 Aug  8 00:40 libdigestmd5.la
-rw-r--r--   1 root root 43944 Aug  8 00:40 libdigestmd5.so
-rw-r--r--   1 root root 43944 Aug  8 00:40 libdigestmd5.so.2
-rw-r--r--   1 root root 43944 Aug  8 00:40 libdigestmd5.so.2.0.19
-rw-r--r--   1 root root 13726 Aug  8 00:40 liblogin.a
-rw-r--r--   1 root root   831 Aug  8 00:40 liblogin.la
-rw-r--r--   1 root root 14028 Aug  8 00:40 liblogin.so
-rw-r--r--   1 root root 14028 Aug  8 00:40 liblogin.so.2
-rw-r--r--   1 root root 14028 Aug  8 00:40 liblogin.so.2.0.19
-rw-r--r--   1 root root 31248 Aug  8 00:40 libntlm.a
-rw-r--r--   1 root root   825 Aug  8 00:40 libntlm.la
-rw-r--r--   1 root root 30692 Aug  8 00:40 libntlm.so
-rw-r--r--   1 root root 30692 Aug  8 00:40 libntlm.so.2
-rw-r--r--   1 root root 30692 Aug  8 00:40 libntlm.so.2.0.19
-rw-r--r--   1 root root 20142 Aug  8 00:40 libotp.a
-rw-r--r--   1 root root   825 Aug  8 00:40 libotp.la
-rw-r--r--   1 root root 43184 Aug  8 00:40 libotp.so
-rw-r--r--   1 root root 43184 Aug  8 00:40 libotp.so.2
-rw-r--r--   1 root root 43184 Aug  8 00:40 libotp.so.2.0.19
-rw-r--r--   1 root root 13886 Aug  8 00:40 libplain.a
-rw-r--r--   1 root root   831 Aug  8 00:40 libplain.la
-rw-r--r--   1 root root 14096 Aug  8 00:40 libplain.so
-rw-r--r--   1 root root 14096 Aug  8 00:40 libplain.so.2
-rw-r--r--   1 root root 14096 Aug  8 00:40 libplain.so.2.0.19
-rw-r--r--   1 root root 21810 Aug  8 00:40 libsasldb.a
-rw-r--r--   1 root root   852 Aug  8 00:40 libsasldb.la
-rw-r--r--   1 root root 18692 Aug  8 00:40 libsasldb.so
-rw-r--r--   1 root root 18692 Aug  8 00:40 libsasldb.so.2
-rw-r--r--   1 root root 18692 Aug  8 00:40 libsasldb.so.2.0.19
-rwxr-xr-x   1 root root    81 Sep 13 15:53 smtpd.conf




-- content of /usr/lib/sasl2/smtpd.conf --
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5
log_level: 3
-- content of /etc/postfix/sasl/smtpd.conf --
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5
log_level: 3

-- 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
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}

smtps     inet  n       -       n       -       -       smtpd -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
587       inet  n       -       n       -       -       smtpd -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes

-- mechanisms on localhost --
250-AUTH NTLM LOGIN PLAIN DIGEST-MD5 CRAM-MD5
250-AUTH=NTLM LOGIN PLAIN DIGEST-MD5 CRAM-MD5

-- end of saslfinger output --

adjustman
Posts: 1132
Joined: 2003-03-26 23:29
Location: SA
 

Re: Postfix - sasl - Problem

Post by adjustman »

Nigg wrote:Ich bin der Ansicht die Config passt
offensichtlich nicht
andererseits kanns ja nur ein Konfigurationsfehler sein
das ist fein beobachtet (Loriot) :wink:
nigg
Posts: 6
Joined: 2006-09-10 17:48
 

Re: Postfix - sasl - Problem

Post by nigg »

womit wir dann auch nicht weiter wären.

ps: aus dem kontext gerissen zitieren kann ich auch
adjustman
Posts: 1132
Joined: 2003-03-26 23:29
Location: SA
 

Re: Postfix - sasl - Problem

Post by adjustman »

Nigg wrote:aus dem kontext gerissen zitieren kann ich auch
sorry. Aber Lesen doch auch. Oben stehen ein paar grundlegende Dinge.
Ein bisschen Transferleistung ist doch nicht zu viel verlangt ..
nigg
Posts: 6
Joined: 2006-09-10 17:48
 

Re: Postfix - sasl - Problem

Post by nigg »

bitte formuliere das so um dass ich es verstehe
adjustman
Posts: 1132
Joined: 2003-03-26 23:29
Location: SA
 

Re: Postfix - sasl - Problem

Post by adjustman »

Nigg wrote:bitte formuliere das so um dass ich es verstehe
nö. :lol:
*scnr* An dieser Stelle mal wieder der Spruch:
Wer lesen kann, ist klar im Vorteil oder die SuFu oder Google ist dein Freund. Maaaan :evil:
nigg
Posts: 6
Joined: 2006-09-10 17:48
 

Re: Postfix - sasl - Problem

Post by nigg »

ich verstehe zwar nicht was sasldb2 mit saslauthd zu tun hat, aber danke trotzdem vielmals.

ps: wenn du die SuFu nutzt findest du meinen anderen Thread indem ich erwähnt habe was bisher nicht geholfen hat. genauso wie 20938203 andere threads in dem irgendwer ein problem unter sarge mit smtp auth hatte und wos überall unterschiedliche lösungsansätze gab
rootsvr
Posts: 538
Joined: 2005-09-02 11:12
 

Re: Postfix - sasl - Problem

Post by rootsvr »

@Nigg: Warum Hijacks Du eigentlich einen Thread mit einem anderen (wenn auch SASL betreffenden Problem) und bringst dadurch komplettes Chaos in diesen Thread?

sasldb ist das Default Backend von Cyrus, wenn alles andere fehlschlägt versucht er da halt zu suchen.
Setz den Loglevel höher und schau was fehlschlägt.. aber mach dir nen eigenen Thread ich kann dir nicht helfen hab aber ein ähnliches Problem macht alles nur völlig undurchsichtig.