[Postfixbuch-users] Einstellungen Sasl-Auth

Patrick Ben Koetter p at state-of-mind.de
Do Jun 29 22:15:13 CEST 2006


Hallo Neuwiener,

* mo <neuwiener at googlemail.com>:
> Ich habe mich vor ungefähr 2,3 Wochen an Euch gewand, da ich Probleme mit
> dem configure script von cyrus-sasl hatte. Die erste Antwort die ich bekam
> war, dass ich doch lieber die Pakete meiner Distribution Ubuntu nehmen solle
> und gerade im begriff wäre, meinen Rechner zu zerschiessen. Das hat mich
> natürlich nachdenklich gemacht und da das ding die Wochen zuvor mit so
> vielen unsachmässigen Installationsversuchen konfrontiert war, ist es neu
> aufgesetzt und ich nutze nun die vorgefertigten Pakete.
> 
> Leider hänge ich wieder an bei smtp-auth :-(
> 
> Ich glaube, dass das Problem diesmal an der Datenbankverbindung liegt, da in
> der Logdatei der DB keine Einträge einer Verbindung zu finden ist. Ich
> erinnere mich, dass ich bei dem configure Script die option
> --with-pgsql=/usr/lib/pgsql angegeben habe. Nun, bei der Nutzung des
> vorgefertigten Pakets wurde ich nicht nach dem Ort von pgsql gefragt.
> Wahrscheinlich kann man das irgentwo einstellen, aber wo?
> 
> Oder bin ich auf dem Holzweg?
> 
> Anbei jedenfalls der output von saslfinger,
> 
> fg,
> 
> Mo
> 
> saslfinger:
> 
> sudo saslfinger -s
> saslfinger - postfix Cyrus sasl configuration Don Jun 29 10:11:42 CEST 2006
> version: 1.0
> mode: server-side SMTP AUTH
> 
> -- basics --
> Postfix: 2.2.10
> System: Ubuntu 6.06 LTS \n \l
> 
> -- smtpd is linked to --
>        libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x00002aaaab4f0000)
>

OK 


> -- active SMTP AUTH and TLS parameters for smtpd --
> broken_sasl_auth_clients = yes
> smtpd_sasl_auth_enable = yes

OK

> -- listing of /usr/lib/sasl2 --
> total 1072
> drwxr-xr-x  2 root root  4096 2006-06-26 15:19 .
> drwxr-xr-x 33 root root  8192 2006-06-26 15:19 ..
> -rw-r--r--  1 root root 19036 2006-04-24 13:38 libanonymous.a
> -rw-r--r--  1 root root   855 2006-04-24 13:38 libanonymous.la
> -rw-r--r--  1 root root 15712 2006-04-24 13:38 libanonymous.so
> -rw-r--r--  1 root root 15712 2006-04-24 13:38 libanonymous.so.2
> -rw-r--r--  1 root root 15712 2006-04-24 13:38 libanonymous.so.2.0.19
> -rw-r--r--  1 root root 21802 2006-04-24 13:38 libcrammd5.a
> -rw-r--r--  1 root root   841 2006-04-24 13:38 libcrammd5.la
> -rw-r--r--  1 root root 19104 2006-04-24 13:38 libcrammd5.so
> -rw-r--r--  1 root root 19104 2006-04-24 13:38 libcrammd5.so.2
> -rw-r--r--  1 root root 19104 2006-04-24 13:38 libcrammd5.so.2.0.19
> -rw-r--r--  1 root root 59792 2006-04-24 13:38 libdigestmd5.a
> -rw-r--r--  1 root root   864 2006-04-24 13:38 libdigestmd5.la
> -rw-r--r--  1 root root 46336 2006-04-24 13:38 libdigestmd5.so
> -rw-r--r--  1 root root 46336 2006-04-24 13:38 libdigestmd5.so.2
> -rw-r--r--  1 root root 46336 2006-04-24 13:38 libdigestmd5.so.2.0.19
> -rw-r--r--  1 root root 19262 2006-04-24 13:38 liblogin.a
> -rw-r--r--  1 root root   835 2006-04-24 13:38 liblogin.la
> -rw-r--r--  1 root root 16352 2006-04-24 13:38 liblogin.so
> -rw-r--r--  1 root root 16352 2006-04-24 13:38 liblogin.so.2
> -rw-r--r--  1 root root 16352 2006-04-24 13:38 liblogin.so.2.0.19
> -rw-r--r--  1 root root 38724 2006-04-24 13:38 libntlm.a
> -rw-r--r--  1 root root   829 2006-04-24 13:38 libntlm.la
> -rw-r--r--  1 root root 32264 2006-04-24 13:38 libntlm.so
> -rw-r--r--  1 root root 32264 2006-04-24 13:38 libntlm.so.2
> -rw-r--r--  1 root root 32264 2006-04-24 13:38 libntlm.so.2.0.19
> -rw-r--r--  1 root root 27142 2006-04-24 13:38 libotp.a
> -rw-r--r--  1 root root   829 2006-04-24 13:38 libotp.la
> -rw-r--r--  1 root root 48856 2006-04-24 13:38 libotp.so
> -rw-r--r--  1 root root 48856 2006-04-24 13:38 libotp.so.2
> -rw-r--r--  1 root root 48856 2006-04-24 13:38 libotp.so.2.0.19
> -rw-r--r--  1 root root 19342 2006-04-24 13:38 libplain.a
> -rw-r--r--  1 root root   835 2006-04-24 13:38 libplain.la
> -rw-r--r--  1 root root 16384 2006-04-24 13:38 libplain.so
> -rw-r--r--  1 root root 16384 2006-04-24 13:38 libplain.so.2
> -rw-r--r--  1 root root 16384 2006-04-24 13:38 libplain.so.2.0.19
> -rw-r--r--  1 root root 29164 2006-04-24 13:38 libsasldb.a
> -rw-r--r--  1 root root   856 2006-04-24 13:38 libsasldb.la
> -rw-r--r--  1 root root 21288 2006-04-24 13:38 libsasldb.so
> -rw-r--r--  1 root root 21288 2006-04-24 13:38 libsasldb.so.2
> -rw-r--r--  1 root root 21288 2006-04-24 13:38 libsasldb.so.2.0.19
> -rw-r--r--  1 root root 30856 2006-04-24 13:38 libsql.a
> -rw-r--r--  1 root root   895 2006-04-24 13:38 libsql.la
> -rw-r--r--  1 root root 24848 2006-04-24 13:38 libsql.so
> -rw-r--r--  1 root root 24848 2006-04-24 13:38 libsql.so.2
> -rw-r--r--  1 root root 24848 2006-04-24 13:38 libsql.so.2.0.19

OK

> -- content of /etc/postfix/sasl/smtpd.conf --
> 
> #Global parameters
> log_level: 7
> #pwcheck_method: auxprop
> mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5
> #auxiliary Plugin Parameters
> auxprop_plugin: sql
> sql_engine: pgsql
> sql_hostnames: localhost:5436

Ob das mit Port funktioniert...? Ich weiß es nicht.

> sql_database: db_mail
> sql_user: --- replaced ---
> sql_passwd: --- replaced ---
> sql_select: SELECT %p FROM tbl_mailusers WHERE username = '%u' AND userrealm = '%r' AND auth = '1'
> sql_usessl: no

OK

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

Nimm mal den smtpd aus dem chroot. Das macht anfangs vieles einfacher.


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


Soweit sieht alles richtig aus. Wie sieht es denn mit Deiner Datenbank aus?
Sind die Passwörter in der DB gecrypted? Sie müssen in plaintext vorliegen,
damit das Cyrus SASL SQL Plugin funktioniert.

Hat Ubuntu die Tools "sample-server" und "sample-client" oder nur "client" und
"server" vom Cyrus SASL Projekt? Mit denen könntest Du gut testen ohne Postfix
dafür einspannen zu müssen...

p at rick

-- 
Das Postfix-Buch
<http://www.postfix-buch.com>
saslfinger (debugging SMTP AUTH):
<http://postfix.state-of-mind.de/patrick.koetter/saslfinger/>



Mehr Informationen über die Mailingliste Postfixbuch-users