[Postfixbuch-users] trotz SMTPAUTH keine sichere Authentifikation
Mark Riemann
divejbba at gmx.de
Mi Nov 3 20:50:47 CET 2004
Patrick Ben Koetter schrieb:
> Ich habe noch Ideen, aber sie drehen sich im Moment mehr darum wie ich
> Dich dazu kriegen kann mal die Karten auf den Tisch zu legen, denn diese
> ganze Aktion hier scheint mir mächtig verfahren und unklar und mich
> beschleicht das Gefühl, das Deine Vorgehensweise beim Debuggen erheblich
> dazu beiträgt...
Stell mir Fragen und ich beantworte sie nach bestem Wissen und Gewissen.
Vielleicht erst einmal zu meiner Motivation (Vorsicht, das wird
alles ein bisschen länger):
Ich habe mit einem Freund einen kleinen root-Server (FC1). Ich teile
mir die Kosten mit ihm. Da wir beide irgendwie das Gefühl haben, dass
wir sendmail nicht wirklich verstehen und es andere Mailer gibt, haben
wir uns postfix auserkoren. Installiert ist das Ding ja schnell. Aber
wie bekomme ich denn PF denn dazu nur für mich zu relayen. Antwort
SMTP-AUTH incl. TLS. Und das möglichst so, dass Passwörter nicht
mitgesnifft werden können. Also bin ich erstaml los und habe die Kosten
nicht gescheut und mir das Postfix-Buch von Peter Heinlein gekauft und
gelesen UND angefangen mein PF zu konfigurieren. Das hatte ich vor
einiger Zeit hier schon einmal geschrieben. Anfangs habe ich alles auf
einmal versucht, aber da wurde ich darauf hingewiesen, dass man PF erst
einmal mit SMTP-AUTH hinkriegen soll, bevor man an TLS denken kann.
Zurück zur Motivation. Was ich (wir) wollen ist ein richtiger
eigener Mailserver über den wir Mails versenden können und empfangen
können. Nicht Mehr und auch nicht Weniger. Und da wir nicht als
OpenRelay Mails für Andere verschicken wollen, dachten wir an ein PF mit
SMTP-AUTH und TLS, damit die Daten verschlüsselt übertragen werden können.
> Also fangen wir mal ganz von vorne an.
>
> 1. Du willst SMTP AUTH anbieten
> 2. Du willst als Datenquelle in der die usernamen und passwords sind
> einen IMAP Server benützen.
Hmm, das weiß ich nicht genau (weil ich nicht weiß, ob es das ist, was
Du meinst). Ich will keine eigene Datenbank pflegen für Mails (also kein
sasldb(2)). Ich will nur, das die User relayen fürfen, welche einen
Account haben. Möchte allerdings wiederum nicht PF erlauben auf
/etc/shadow zuzugreifen. Was ich haben würde wollen ist, dass ein
Programm die Authentifizierung übernimmt, in dem es einfach schaut, ob
es den User mit dem dazugeh. Passwort gibt (bspw. durch Einwahl mit den
übergebenen Daten).
> 3. Du willst Postfix dazu benützen.
Jepp ...
> Ja? Wenn ich was falsch genannt habe, dann korrigiere mich bitte, denn
> sonst sind wir komplett auf dem falschen Weg.
>
> Bitte lade die aktuelle Version 0.9.8 von saslfinger herunter,
> installiere sie und schicke den Output zusammen mit den antworten auf
> die Fragen oben als Antwort.
hab ich gemacht. Das Ergebnis habe ich als Attachement der Mail
hinzugefügt (weil es der Lesbarkeit dieser Mail ja nicht gerade
zuträglich ist, wenn ich den Output hier einfüge). Ich hoffe, dass das
erlaubt ist und nicht herausgefiltert wird.
> Karma. Ich muß ein schlimmer Mensch im letzten Leben gewesen sein...
Na diesmal bist Du kein schlimmer Mensch. Schade, denn das heißt, wir
müssen auf Dich im nächsten Leben verzichten.
MfG
Mark
-------------- nächster Teil --------------
saslfinger - postfix Cyrus sasl configuration Mi Nov 3 20:45:18 CET 2004
version: 0.9.8
mode: server-side SMTP AUTH
-- basics --
Postfix: 2.1.3
System: Fedora Core release 1 (Yarrow)
-- smtpd is linked to --
libsasl2.so.2 => /usr/lib/libsasl2.so.2 (0x4001a000)
-- active SMTP AUTH and TLS parameters for smtpd --
broken_sasl_auth_clients = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_auth_only = no
-- listing of /usr/lib/sasl --
insgesamt 351
drwxr-xr-x 2 root root 2048 Jun 28 10:59 .
drwxr-xr-x 29 root root 16384 Okt 25 20:01 ..
-rw-r--r-- 1 root root 4722 Okt 23 2003 libanonymous.a
-rwxr-xr-x 1 root root 833 Okt 23 2003 libanonymous.la
-rwxr-xr-x 1 root root 5936 Okt 23 2003 libanonymous.so
-rwxr-xr-x 1 root root 5936 Okt 23 2003 libanonymous.so.1
-rwxr-xr-x 1 root root 5936 Okt 23 2003 libanonymous.so.1.0.17
-rw-r--r-- 1 root root 10786 Okt 23 2003 libcrammd5.a
-rwxr-xr-x 1 root root 819 Okt 23 2003 libcrammd5.la
-rwxr-xr-x 1 root root 10884 Okt 23 2003 libcrammd5.so
-rwxr-xr-x 1 root root 10884 Okt 23 2003 libcrammd5.so.1
-rwxr-xr-x 1 root root 10884 Okt 23 2003 libcrammd5.so.1.0.19
-rw-r--r-- 1 root root 35752 Okt 23 2003 libdigestmd5.a
-rwxr-xr-x 1 root root 842 Okt 23 2003 libdigestmd5.la
-rwxr-xr-x 1 root root 30696 Okt 23 2003 libdigestmd5.so
-rwxr-xr-x 1 root root 30696 Okt 23 2003 libdigestmd5.so.0
-rwxr-xr-x 1 root root 30696 Okt 23 2003 libdigestmd5.so.0.0.20
-rw-r--r-- 1 root root 12502 Okt 23 2003 libgssapiv2.a
-rwxr-xr-x 1 root root 868 Okt 23 2003 libgssapiv2.la
-rwxr-xr-x 1 root root 13040 Okt 23 2003 libgssapiv2.so
-rwxr-xr-x 1 root root 13040 Okt 23 2003 libgssapiv2.so.1
-rwxr-xr-x 1 root root 13040 Okt 23 2003 libgssapiv2.so.1.0.19
-rw-r--r-- 1 root root 7426 Okt 23 2003 liblogin.a
-rwxr-xr-x 1 root root 817 Okt 23 2003 liblogin.la
-rwxr-xr-x 1 root root 8180 Okt 23 2003 liblogin.so
-rwxr-xr-x 1 root root 8180 Okt 23 2003 liblogin.so.0
-rwxr-xr-x 1 root root 8180 Okt 23 2003 liblogin.so.0.0.7
-rw-r--r-- 1 root root 6978 Okt 23 2003 libplain.a
-rwxr-xr-x 1 root root 819 Okt 23 2003 libplain.la
-rwxr-xr-x 1 root root 7868 Okt 23 2003 libplain.so
-rwxr-xr-x 1 root root 7868 Okt 23 2003 libplain.so.1
-rwxr-xr-x 1 root root 7868 Okt 23 2003 libplain.so.1.0.16
-- listing of /usr/lib/sasl2 --
insgesamt 2400
drwxr-xr-x 2 root root 2048 Nov 3 16:43 .
drwxr-xr-x 3 root root 2048 Okt 25 19:56 ..
-rwxr-xr-x 1 root root 695 Okt 25 19:56 libanonymous.la
-rwxr-xr-x 1 root root 87968 Okt 25 19:56 libanonymous.so
-rwxr-xr-x 1 root root 87968 Okt 25 19:56 libanonymous.so.2
-rwxr-xr-x 1 root root 87968 Okt 25 19:56 libanonymous.so.2.0.19
-rwxr-xr-x 1 root root 683 Okt 25 19:56 libcrammd5.la
-rwxr-xr-x 1 root root 91372 Okt 25 19:56 libcrammd5.so
-rwxr-xr-x 1 root root 91372 Okt 25 19:56 libcrammd5.so.2
-rwxr-xr-x 1 root root 91372 Okt 25 19:56 libcrammd5.so.2.0.19
-rwxr-xr-x 1 root root 713 Okt 25 19:56 libdigestmd5.la
-rwxr-xr-x 1 root root 137104 Okt 25 19:56 libdigestmd5.so
-rwxr-xr-x 1 root root 137104 Okt 25 19:56 libdigestmd5.so.2
-rwxr-xr-x 1 root root 137104 Okt 25 19:56 libdigestmd5.so.2.0.19
-rwxr-xr-x 1 root root 749 Okt 25 19:56 libgssapiv2.la
-rwxr-xr-x 1 root root 102095 Okt 25 19:56 libgssapiv2.so
-rwxr-xr-x 1 root root 102095 Okt 25 19:56 libgssapiv2.so.2
-rwxr-xr-x 1 root root 102095 Okt 25 19:56 libgssapiv2.so.2.0.19
-rwxr-xr-x 1 root root 668 Okt 25 19:56 libotp.la
-rwxr-xr-x 1 root root 153472 Okt 25 19:56 libotp.so
-rwxr-xr-x 1 root root 153472 Okt 25 19:56 libotp.so.2
-rwxr-xr-x 1 root root 153472 Okt 25 19:56 libotp.so.2.0.19
-rwxr-xr-x 1 root root 679 Okt 25 19:56 libplain.la
-rwxr-xr-x 1 root root 86954 Okt 25 19:56 libplain.so
-rwxr-xr-x 1 root root 86954 Okt 25 19:56 libplain.so.2
-rwxr-xr-x 1 root root 86954 Okt 25 19:56 libplain.so.2.0.19
-rwxr-xr-x 1 root root 704 Okt 25 19:56 libsasldb.la
-rwxr-xr-x 1 root root 146804 Okt 25 19:56 libsasldb.so
-rwxr-xr-x 1 root root 146804 Okt 25 19:56 libsasldb.so.2
-rwxr-xr-x 1 root root 146804 Okt 25 19:56 libsasldb.so.2.0.19
-rw-r--r-- 1 root root 670 Nov 3 16:43 smtpd.conf
-- listing of /usr/local/lib/sasl2 --
insgesamt 2400
drwxr-xr-x 2 root root 2048 Nov 3 16:43 .
drwxr-xr-x 3 root root 2048 Okt 25 19:56 ..
-rwxr-xr-x 1 root root 695 Okt 25 19:56 libanonymous.la
-rwxr-xr-x 1 root root 87968 Okt 25 19:56 libanonymous.so
-rwxr-xr-x 1 root root 87968 Okt 25 19:56 libanonymous.so.2
-rwxr-xr-x 1 root root 87968 Okt 25 19:56 libanonymous.so.2.0.19
-rwxr-xr-x 1 root root 683 Okt 25 19:56 libcrammd5.la
-rwxr-xr-x 1 root root 91372 Okt 25 19:56 libcrammd5.so
-rwxr-xr-x 1 root root 91372 Okt 25 19:56 libcrammd5.so.2
-rwxr-xr-x 1 root root 91372 Okt 25 19:56 libcrammd5.so.2.0.19
-rwxr-xr-x 1 root root 713 Okt 25 19:56 libdigestmd5.la
-rwxr-xr-x 1 root root 137104 Okt 25 19:56 libdigestmd5.so
-rwxr-xr-x 1 root root 137104 Okt 25 19:56 libdigestmd5.so.2
-rwxr-xr-x 1 root root 137104 Okt 25 19:56 libdigestmd5.so.2.0.19
-rwxr-xr-x 1 root root 749 Okt 25 19:56 libgssapiv2.la
-rwxr-xr-x 1 root root 102095 Okt 25 19:56 libgssapiv2.so
-rwxr-xr-x 1 root root 102095 Okt 25 19:56 libgssapiv2.so.2
-rwxr-xr-x 1 root root 102095 Okt 25 19:56 libgssapiv2.so.2.0.19
-rwxr-xr-x 1 root root 668 Okt 25 19:56 libotp.la
-rwxr-xr-x 1 root root 153472 Okt 25 19:56 libotp.so
-rwxr-xr-x 1 root root 153472 Okt 25 19:56 libotp.so.2
-rwxr-xr-x 1 root root 153472 Okt 25 19:56 libotp.so.2.0.19
-rwxr-xr-x 1 root root 679 Okt 25 19:56 libplain.la
-rwxr-xr-x 1 root root 86954 Okt 25 19:56 libplain.so
-rwxr-xr-x 1 root root 86954 Okt 25 19:56 libplain.so.2
-rwxr-xr-x 1 root root 86954 Okt 25 19:56 libplain.so.2.0.19
-rwxr-xr-x 1 root root 704 Okt 25 19:56 libsasldb.la
-rwxr-xr-x 1 root root 146804 Okt 25 19:56 libsasldb.so
-rwxr-xr-x 1 root root 146804 Okt 25 19:56 libsasldb.so.2
-rwxr-xr-x 1 root root 146804 Okt 25 19:56 libsasldb.so.2.0.19
-rw-r--r-- 1 root root 670 Nov 3 16:43 smtpd.conf
-- mechanisms on localhost --
250-AUTH PLAIN
250-AUTH=PLAIN
-- content of /usr/lib/sasl2/smtpd.conf --
# Check mit SASL Datenbank
# pwcheck_method: sasldb
# pwcheck_method: pam Hier wird PAM benutzt; hiermit lassen sich Anmeldungen über LDAP, RADIUS oder NIS durchführen
# pwcheck_method: shadow Es wird die Datei /etc/shadow gelesen. Problematisch da der Postfix-User Leserechte auf die Datei braucht
# pwcheck_method: sasldb SASL benutzt seine eigene Datenbank
# pwcheck_method: pwcheck Eine alternative zum Lesen der /etc/shadow. Hier wird ein pwcheck helper daemon benutzt
# pwcheck_method: kerberos_v4 Authentifizierung mit Kerberos
# Check übernimmt saslauthd
pwcheck_method: saslauthd
saslauthd_path: /var/state/saslauthd
mech_list: PLAIN LOGIN
log_level: 3
-- content of /usr/local/lib/sasl2/smtpd.conf --
# Check mit SASL Datenbank
# pwcheck_method: sasldb
# pwcheck_method: pam Hier wird PAM benutzt; hiermit lassen sich Anmeldungen über LDAP, RADIUS oder NIS durchführen
# pwcheck_method: shadow Es wird die Datei /etc/shadow gelesen. Problematisch da der Postfix-User Leserechte auf die Datei braucht
# pwcheck_method: sasldb SASL benutzt seine eigene Datenbank
# pwcheck_method: pwcheck Eine alternative zum Lesen der /etc/shadow. Hier wird ein pwcheck helper daemon benutzt
# pwcheck_method: kerberos_v4 Authentifizierung mit Kerberos
# Check übernimmt saslauthd
pwcheck_method: saslauthd
saslauthd_path: /var/state/saslauthd
mech_list: PLAIN LOGIN
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 - n - - smtpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
rewrite unix - - n - - trivial-rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
showq unix n - n - - showq
error unix - - n - - 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}
old-cyrus unix - n n - - pipe
flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
cyrus unix - n n - - pipe
user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail.postfix ($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=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
-- end of saslfinger output --
Mehr Informationen über die Mailingliste Postfixbuch-users