PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : Postfix-TLS und SASL klappt nicht



Urbanus
22.07.04, 00:41
Ich habe auf meinem Debian Router postfix-tls und sasl2-bin inklusive libsasl2-modules installiert und wollte nun TLS für Postfix aktivieren. Die main.cf sieht wie folgt aus:


# see /usr/share/postfix/main.cf.dist for a commented, fuller
# version of this file.

# Do not change these directory settings - they are critical to Postfix
# operation.
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
program_directory = /usr/lib/postfix

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
setgid_group = postdrop
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no
myhostname = m23s18.vlinux.de
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = m23s18.vlinux.de, localhost.vlinux.de, localhost
relayhost =
mynetworks = 127.0.0.0/8
relay_domains = $mydomain
mailbox_command = procmail -a "$EXTENSION"
mailbox_transport = procmail
mailbox_size_limit = 0
recipient_delimiter = +

# SMTP Auth mit SASL und PAM
smtp_sasl_auth_enable = no
smtp_sasl_security_options = noanonymous
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
smtpd_tls_auth_only = yes
smtpd_sasl_auth_enable = yes
smtpd_sasl2_auth_enable = yes
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated,
check_recipient_maps,
reject_unauth_destination,
permit_auth_destination
broken_sasl_auth_clients = yes
smtpd_helo_restrictions = reject_invalid_hostname, permit
smtpd_helo_required = yes
smtpd_sender_restrictions = reject_unknown_sender_domain, permit
disable_vrfy_command = yes

# TLS
smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt
smtpd_tls_key_file = /etc/ssl/certs/smtpd.key
smtpd_use_tls = yes
# nicht zwingend für localhost, da dann fetchmail nicht mehr tut
smtpd_enforce_tls = no

Unter /etc/postfix/sasl/ liegt die Datei smtpd.auth:


pwcheck_method: saslauthd
mech_list: plain login

saslauthd ist gestartet und scheint zu laufen (zumindest sagt "ps aux | grep saslauthd" das. Trotzdem bekomme ich immer wieder folgende Fehlermeldung:


Jul 21 22:26:42 server postfix/smtpd[25282]: connect from client[10.0.0.2]
Jul 21 22:26:47 server postfix/smtpd[25282]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Jul 21 22:26:47 server postfix/smtpd[25282]: warning: SASL authentication failure: Password verification failed
Jul 21 22:26:47 server postfix/smtpd[25282]: warning: client[10.0.0.2]: SASL PLAIN authentication failed
Jul 21 22:26:47 server postfix/smtpd[25282]: warning: SASL authentication failure: cannot connect to saslauthd server: No such file or directory
Jul 21 22:26:47 server postfix/smtpd[25282]: warning: client[10.0.0.2]: SASL LOGIN authentication failed
Jul 21 22:26:49 server postfix/smtpd[25282]: lost connection after AUTH from client[10.0.0.2]
Jul 21 22:26:49 server postfix/smtpd[25282]: disconnect from client[10.0.0.2]

Ich habe mit Google schon alles mögliche abgesucht, aber noch keine Lösung gefunden. Vielleicht hat ja hier jemand eine Idee?

CYP
22.07.04, 08:39
hast du denn auch die sasl db erzeugt ?

saslpasswd2 userid

sieht nämlich so aus als wäre die nicht da
cannot connect to saslauthd server: No such file or directory

aber damit kann ich dir nicht weiterhelfen
ich nutze

pwcheck_method:saslauthd
mech_list: kerberos5 gssapi

ich musste die config dateien auch unter /etc/sasl2/smtpd.conf
ablegen -> nicht unter /etc/postfix

Urbanus
22.07.04, 09:56
Ein sasldblistusers2 gibt mir folgendes aus:


cyrus@server: userPassword
thomas@server: userPassword

Das sieht für mich so aus, als ob alles passt.

Ich habe schon versucht die smtpd.conf unter /usr/lib/sasl2 abzulegen, das hat aber auch nix gebracht :confused:

dermichel
22.07.04, 11:37
pwcheck_method: saslauthd
mech_list: plain login


fuer plain login brauchst du als methode "AUXPROP" - da hab ich auch lang rumgedoktort, bis die leute mit ihrem sch...oenen outlook ueber meinen server mit smtpd_auth versenden konnten. der saslauthd muss natuerlich laufen...

Urbanus
22.07.04, 12:32
Nachdem ich den Mechanismus auf auxprop geändert habe, sagt das syslog folgendes:


warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory

Die Datei ist aber vorhanden. Was mich wundert ist, dass ein "cat /etc/sasldb2" als root die Passwörter *im Klartext* anzeigt?! Gehört das so oder muss ich das Teil noch irgendwie hashen?

Urbanus
12.08.04, 18:30
So, nachdem ich eben ein bisschen Zeit hatte und im Web gebuddelt habe, hier eine Anleitung, wie man Postfix mit SMTP-AUTH, TLS und SASL zum Laufen bringt:
http://www.debianforum.de/forum/viewtopic.php?t=18805
Viel Erfolg!