Re: Postfix + SASL ohne MySQL
Steffen Kuntoff schrieb:
Hallo,
Hi!.
Ich wollte Postfix mit smtp-auth ohne MySQL unter Debian 3.1 (Sarge)
einrichten.
Meine Vorgehensweise:
apt-get install postfix-tls sasl2-bin libsasl2 libsasl2-modules
Ist bei dir die sasl2-bin dabei?:
ii postfix 2.1.5-9 A high-performance mail transport agent
ii postfix-pcre 2.1.5-9 PCRE map support for Postfix
ii postfix-tls 2.1.5-9 TLS and SASL support for Postfix
ii libsasl2 2.1.19-1.5 Authentication abstraction library
ii libsasl2-modul 2.1.19-1.5 Pluggable Authentication Modules for SASL
ii sasl2-bin 2.1.19-1.5 Programs for manipulating the SASL
users dat
/etc/postfix/main.cf angepasst:
poste mal postconf -n ...
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated, reject_unauth_destination
/etc/postfix/sasl/ smtpd.conf erstellt mit folgendem Inhalt:
pwcheck_method: saslauthd
mech_list: PLAIN LOGIN
saslauthd_path: /var/run/saslauthd/mux
autotransition:true
was ist das: autotransition, woher hast du den Parameter?.
sieht gut aus:
cat /etc/postfix/sasl/smtpd.conf
#created by mh following LINUX E-MAIL
pwcheck_method: saslauthd
log_level:7
#valid list for saslauthd
mech_list: PLAIN LOGIN
#pfad zur saslauthd angeben:
saslauthd_path: /var/run/saslauthd/mux
Unter /etc/pam.d/ ein File smtp erstellen mit folgendem Inhalt und in
die Postfix Umgebung kopiert:
das wäre mir neu und habe ich nicht gebraucht ...
ist das aus einem howto?, afaik überflüssig ...
auth required /lib/security/pam_unix_auth.so
account required /lib/security/pam_unix_acct.so
password required /lib/security/pam_unix_passwd.so
session required /lib/security/pam_unix_session.so
Das gibt es bei mir ebenso nicht!.:
mkdir /var/spool/postfix/etc/pam.d
cp /etc/pam.d/smtp /var/spool/postfix/etc/pam.d/
Anmerkung:
bei mir gibt es noch eine:
/var/spool/postfix/etc/sasldb2
-rw-r--r-- 1 root sasl 12288 Oct 26 12:17 /var/spool/postfix/etc/sasldb2
in der das Passwort und user im Klartext steht ...
mkdir -p /var/spool/postfix/var/run
cd /var/run
mv saslauthd/ /var/spool/postfix/var/run
ln -s /var/spool/postfix/var/run/saslauthd/ saslauthd
Jup:
srwxrwxrwx 1 root root 0 Nov 26 16:13 mux
-rw------- 1 root root 0 Nov 26 16:13 mux.accept
-rw------- 1 root root 4 Nov 26 16:13 saslauthd.pid
/etc/default/saslauthd:
START=yes
MECHANISMS="pam"
Sieht bei mir so aus:
cat /etc/default/saslauthd
# This needs to be uncommented before saslauthd will be run automatically
START=yes
# You must specify the authentication mechanisms you wish to use.
# This defaults to "pam" for PAM support, but may also include
# "shadow" or "sasldb", like this:
MECHANISMS="shadow"
PARAMS="-m /var/spool/postfix/var/run/saslauthd"
PWDIR="/var/spool/postfix/var/run/saslauthd"
PIDFILE="/var/spool/postfix/var/run/${NAME}/saslauthd.pid"
adduser postfix sasl
/etc/init.d/saslauthd start
/etc/init.d/postfix reload
Leider erhalte ich folgenden Output in der mail.info
[...]
Apr 7 22:03:32 myserver postfix/smtpd[15983]: smtpd_sasl_authenticate:
uncoded challenge: Password:
Apr 7 22:03:32 myserver postfix/smtpd[15983]: > meineip: 334 UGF....
Das ist nicht gut, diese Meldungen bringt er immer wenn
username/passwort unbekannt, bzw. authent. komplett scheitert.
Apr 7 22:03:32 myserver postfix/smtpd[15983]: < meineip: czNj.....
Apr 7 22:03:32 myserver postfix/smtpd[15983]: smtpd_sasl_authenticate:
decoded response: xxxx
Apr 7 22:03:32 myserver postfix/smtpd[15983]: warning: SASL
authentication problem: unknown password verifier
Apr 7 22:03:32 myserver postfix/smtpd[15983]: warning: meineip: SASL
LOGIN authentication failed
Apr 7 22:03:32 myserver postfix/smtpd[15983]: > meineip: 535 Error:
authentication failed
Dabei ist in meinen Augen wohl das "warning: SASL authentication
problem: unknown password verifier" das Problem. habe auch schon
intensiv recherchiert, aber es hat nichts gebracht...
Dein Fokus sollte eindeutig auf sasl/Authentifizierung liegen ...
Du hattest den saslauthd -d (debug gestartet)?, dann wird das Klumpp
gesprächiger ...
Vielleicht kann jemand weiterhelfen, irgendwie gibt es wohl eine
Möglichkeit ein "make" nicht komplett durchzuführen, einen kleinen
Trick: Die SASL-Sourcen besorgen, dann ein make und ein make depends
aber kein! make install oder so ähnlich dann hat man die
testsaslauth-Programme mit denen kann man dann die Authentifizierung testen.
Jup. Eindeutig ein SASL-Problem.
Grüsse & hth, wenn nicht melde dich einfach ...
MH
Anm.: ich setze zusätzlich courier-imap ein....
mein postconf -n
address_verify_map = btree:/var/spool/postfix/verified_senders
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
content_filter = amavisd-new:[127.0.0.1]:10024
delay_warning_time = 4h
disable_vrfy_command = yes
home_mailbox = Maildir/
inet_interfaces = all
mailbox_size_limit = 0
mime_header_checks = pcre:/etc/postfix/mime_header_checks
mydestination = $mydomain, $myhostname
mydomain = linuxrocks.dyndns.org
myhostname = hermes.linuxrocks.dyndns.org
mynetworks = 127.0.0.0/8
myorigin = $mydomain
recipient_delimiter = +
relayhost =
Das:
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_data_restrictions = reject_multi_recipient_bounce
smtpd_error_sleep_time = 5s
smtpd_hard_error_limit = 15
smtpd_helo_required = yes
und das permit_sasl ...
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_hostname, reject_non_fqdn_sender, reject_non_fqdn_recipient, reject_unauth_destination, reject_unauth_pipelining, reject_invalid_hostname, check_helo_access pcre:/etc/postfix/helo_checks check_sender_mx_access cidr:/etc/postfix/bogus_mx reject_rbl_client relays.ordb.org check_recipient_access hash:/etc/postfix/roleaccount_exceptions, reject_rhsbl_sender dsn.rfc-ignorant.org reject_unknown_sender_domain reject_unverified_sender permit
und das:
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
und das:
smtpd_sasl_security_options = noanonymous
smtpd_soft_error_limit = 5
unverified_sender_reject_code = 550
sollten die für dich relevanten Teile sein.
Reply to: