Archiv verlassen und diese Seite im Standarddesign anzeigen : sasl problem
Hallo,
ich habe auf meinem Server postfix nach dem Howto von OliverH eingerichtet, habe nun aber leider das Problem, dass die smtp-Authentifikation nur per LOGIN bzw. PLAIN funktioniert, nicht aber mit cram-md5,digest-md5.
Ein kleiner Auszug aus mail.log:
Sep 25 22:20:07 ibutho postfix/smtpd[3146]: connect from e10*25.a*sl.a*le[85*.*.25]
Sep 25 22:20:10 ibutho postfix/smtpd[3146]: warning: SASL authentication failure: no secret in database
Sep 25 22:20:10 ibutho postfix/smtpd[3146]: warning: e*17[5*3*.25]: SASL DIGEST-MD5 authentication failed: authentication failure
Kann mir evtl. jemand helfen die Authentifikation zum Laufen zu bekommen?
Falls Auszüge aus Konfigurations-/Logdateien gebraucht werden, einfach was sagen, dann schreib ich sie hier rein.
Vielen Dank für eure Hilfe!
Falls Auszüge aus Konfigurations-/Logdateien gebraucht werden, einfach was sagen, dann schreib ich sie hier rein.
Selbstverständlich!
Greeez Oli
Okay, damit habe ich gerechnet. Ich bin mir nicht sicher, welche benötigt werden, deshalb einfach mal die main.cf von postfix (wurde von mir etwas angepasst anhand eines Konfigurationsbeispiels auf rootforum.de):
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
allow_percent_hack = no
biff = no
disable_vrfy_command = yes
append_dot_mydomain = no
delay_warning_time = 4h
home_mailbox = .maildir/
mailbox_size_limit = 1610612736
message_size_limit = 31457280
masquerade_exceptions = root
inet_interfaces = all
mynetworks = 127.0.0.0/8
mynetworks_style = host
mydestination = $myhostname, $mydomain, localhost
mydomain = ibutho.de
myhostname = mail.ibutho.de
myorigin = $mydomain
# receive_override_options = no_address_mappings
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
virtual_alias_maps = hash:/etc/postfix/virtual_alias
virtual_alias_domains = /etc/postfix/virtual_domains
recipient_delimiter = +
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_security_options = noanonymous
# smtpd_sasl_local_domain = $myhostname
smtpd_delay_reject = yes
smtpd_helo_required = yes
strict_rfc821_envelopes = yes
smtpd_client_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_unknown_client_hostname,
permit
smtpd_data_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_pipelining,
permit
smtpd_helo_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_invalid_helo_hostname,
reject_non_fqdn_helo_hostname,
# reject_unknown_helo_hostname,
permit
smtpd_recipient_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_invalid_hostname,
reject_non_fqdn_hostname,
reject_non_fqdn_recipient,
reject_unknown_recipient_domain,
check_recipient_mx_access cidr:/etc/postfix/mx_access,
reject_unauth_destination,
check_recipient_access pcre:/etc/postfix/recipient_checks.pcre,
check_policy_service inet:127.0.0.1:12525,
permit
smtpd_sender_restrictions =
permit_mynetworks,
permit_sasl_authenticated,
reject_non_fqdn_sender,
reject_unknown_sender_domain,
permit
# TLS support
#smtpd_tls_auth_only = yes
#smtpd_tls_CAfile = /etc/postfix/ssl/demoCA/cacert.pem
#smtpd_tls_cert_file = /etc/postfix/ssl/server-crt.pem
#smtpd_tls_dh1024_param_file = /etc/postfix/ssl/dh_1024.pem
#smtpd_tls_dh512_param_file = /etc/postfix/ssl/dh_512.pem
#smtpd_tls_key_file = /etc/postfix/ssl/server-key.pem
#smtpd_tls_session_cache_database = btree:/var/run/smtpd_tls_session_cache
#smtpd_tls_security_level = may
#smtpd_use_tls = yes
Die smtpd.conf aus dem Ordner /etc/postfix/sasl/:
pwcheck_method: saslauthd
mech_list: digest-md5 cram-md5 login plain
autotransition:true
saslauthd_path: /var/run/saslauthd/mux
Und die Datei /etc/default/saslauthd:
#
# Settings for saslauthd daemon
#
# Should saslauthd run automatically on startup? (default: no)
START=yes
# Which authentication mechanisms should saslauthd use? (default: pam)
#
# Available options in this Debian package:
# getpwent -- use the getpwent() library function
# kerberos5 -- use Kerberos 5
# pam -- use PAM
# rimap -- use a remote IMAP server
# shadow -- use the local shadow password file
# sasldb -- use the local sasldb database file
# ldap -- use LDAP (configuration is in /etc/saslauthd.conf)
#
# Only one option may be used at a time. See the saslauthd man page
# for more information.
#
# Example: MECHANISMS="pam"
MECHANISMS="pam"
# Additional options for this mechanism. (default: none)
# See the saslauthd man page for information about mech-specific options.
MECH_OPTIONS=""
# How many saslauthd processes should we run? (default: 5)
# A value of 0 will fork a new process for each connection.
THREADS=5
# Other options (default: -c)
# See the saslauthd man page for information about these options.
#
# Example for postfix users: "-c -m /var/spool/postfix/var/run/saslauthd"
# Note: See /usr/share/doc/sasl2-bin/README.Debian
OPTIONS="-c -m /var/spool/postfix/var/run/saslauthd"
Ahja, es handelt sich um einen Debian Etch Server.
Versuche mal in der smtpd.conf.
pwcheck_method:auxprop
Und ist das die einzige smtpd.conf im System? Was sagt den:
find / -name smtpd.conf -type f
Greeez Oli
Versuche mal in der smtpd.conf.
pwcheck_method:auxprop
Hat leider nichts gebracht.
Und ist das die einzige smtpd.conf im System? Was sagt den:
find / -name smtpd.conf -type f
find gibt folgendes zurück:
/etc/postfix/sasl/smtpd.conf
Sieht so aus, als gäbe es nur diese eine.
Ich verstehe sowieso nicht, warum saslauthd sich auf sasldb2 bezieht. In der /etc/default/saslauthd steht ja, dass es PAM benutzen soll.
Das Passwort hast du mit saslpasswd2 für den Benutzer angelegt?
Wird der Benutzer bei sasldblistusers2 mit gelistet?
Also zuerst stand da nichts drin. Ich habe nun mit saslpasswd2 -c johker meinen Benutzer angelegt, doch es sieht auch nicht besser aus.
mail.log:
Sep 25 23:01:17 ibutho postfix/smtpd[21771]: connect from e179253025.adsl.alicedsl.de[85.179.253.25]
Sep 25 23:01:20 ibutho postfix/smtpd[21771]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Sep 25 23:01:20 ibutho postfix/smtpd[21771]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Sep 25 23:01:20 ibutho postfix/smtpd[21771]: warning: SASL authentication failure: no secret in database
Sep 25 23:01:20 ibutho postfix/smtpd[21771]: warning: e179253025.adsl.alicedsl.de[85.179.253.25]: SASL CRAM-MD5 authentication failed: authentication failure
Sep 25 23:01:22 ibutho postfix/smtpd[21771]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Sep 25 23:01:22 ibutho postfix/smtpd[21771]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Sep 25 23:01:22 ibutho postfix/smtpd[21771]: warning: SASL authentication failure: no secret in database
Sep 25 23:01:22 ibutho postfix/smtpd[21771]: warning: e179253025.adsl.alicedsl.de[85.179.253.25]: SASL CRAM-MD5 authentication failed: authentication failure
Sep 25 23:01:23 ibutho postfix/smtpd[21771]: disconnect from e179253025.adsl.alicedsl.de[85.179.253.25]
Hast du danach auch saslauthd und postfix neugestartet?
Welche Distribution wird den verwendet?
ja, habe ich.
edit: Distribution ist Debian Etch
Sep 25 23:01:22 ibutho postfix/smtpd[21771]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Finde ich jetzt merkwürdig. /etc/sasldb2 scheint nicht zu existieren
Mache es mal so:
saslpasswd2 -c johker -f /etc/sasldb2
Existiert vieleicht noch eine /var/spool/postfix/etc/sasldb2 ?
Wenn ja dann lass das vorige aus #10 und erstelle einen Link von /etc/sasldb2 nach /var/spool/postfix/etc/sasldb2
ln -s /var/spool/postfix/etc/sasldb2 /etc/sasldb2
Die Datei "/var/spool/postfix/etc/sasldb2" existierte bei mir nicht. Ich habe nun auf "/etc/sasldb2" gelinkt, doch das hat auch nichts gebracht.
Neue Fehlermeldung in mail.log:
Sep 25 23:21:23 ibutho postfix/smtpd[13685]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: Too many levels of symbolic links
Ich darf wohl nicht von außerhalb des chroot-Käfigs nach drinnen linken, wenn ich das richtig interpretiere.
Nochmal kurz für mein Verständis:
wenn ich in der "/etc/default/saslauthd"
MECHANISMS="pam"
einstelle, dann sollte er diese sasldb2 doch gar nicht verwenden oder nicht? Auf diesem Mailserver gibt es 7 Benutzerkonten und jeder kann auf seine Mails mit seinem Benutzernamen und Passwort zugreifen, wobei jeder Benutzer natürlich mehrere Mailadressen haben kann.
Wenn nun bei MECHANISMS pam eingestellt ist, sollte saslauthd doch über pam prüfen, ob Benutzername und Passwort zusammenpassen, oder nicht?
Die Fehlermeldung hat sich aber geändert und zwar heisst sie jetzt
Too many levels of symbolic links
vorher
No such file or directory
Ich vermute es gibt mehrere sasldb`s in deinen System.
Suche mal danach:
find / -name sasldb2 -type f
find / -name sasldb2 -type f:
/etc/sasldb2
Nochmal kurz für mein Verständis:
wenn ich in der "/etc/default/saslauthd"
MECHANISMS="pam"
einstelle, dann sollte er diese sasldb2 doch gar nicht verwenden oder nicht? Auf diesem Mailserver gibt es 7 Benutzerkonten und jeder kann auf seine Mails mit seinem Benutzernamen und Passwort zugreifen, wobei jeder Benutzer natürlich mehrere Mailadressen haben kann.
Wenn nun bei MECHANISMS pam eingestellt ist, sollte saslauthd doch über pam prüfen, ob Benutzername und Passwort zusammenpassen, oder nicht?
Normalerweise schon , aber Du kannst ja mal
MECHANISMS="pam shadow"
versuchen.
Und nicht vergessen ein /etc/init.d/saslauthd restart danach auszuführen.
saslauthd versucht immer noch auf diese sasldb2 zuzugreifen...
Sep 25 23:36:19 ibutho postfix/smtpd[1598]: warning: SASL authentication failure: no secret in database
Sep 25 23:36:24 ibutho postfix/smtpd[1598]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: Too many levels of symbolic links
Ich verstehe es nicht. Naja, ich geh' nun erst mal schlafen. Vielen Dank für deine Hilfe bis jetzt! Ich werde es dann morgen wieder weiter versuchen. Falls noch jemand Ideen hat, bitte her damit :)
Hallo Ihr,
ich habe leider selbiges Problem das ich mit saslauthd keine PAM Authentifizierung hinbekomme. :-(
Unter Etch scheint es, dass Postfix alle Mechanismen die unter /usr/lib/sasl2 liegen anzieht. Ich habe alle nicht benötigten libs mal weg kopiert, dann wurden diese Mechanismen nicht mehr angezogen.
Da Postfix bei Debian defaultmäßig in einer chroot-Umgebung läuft, muss bei Verwendung der sasldb2 diese auch in den jail kopiert werden.
cp /etc/sasldb2 /var/spool/postfix/etc
Achtung! Postfix sollte das Recht haben diese Datei zu lesen.
----
Dies löst allerdings noch nicht das Problem mit dem MechTyp PAM.
Hat wer schon eine Lösung für dieses Problem?
Möchte nämlich ungern 2 Passwort listen pflegen, vorallem wenn die User ihr Passwort mal ändern, bekommt es die sasldb2 nicht mit.
Ich hatte es nach folgendem HowTo probiert, jedoch leider ohne erfolg.
http://www.howtoforge.com/perfect_setup_debian_etch_p5
----
Über eine funktionieren Lösung würden sich bestimmt mehr Leute freuen.
Bis denne
Lino
PS: Symolische Links in eine Jail gehen aus Sicherheitsgründen nicht - ein Hardlink hat aber auch nicht geholfen - Bleibt nur ein cp
das mit der sasldb2 könntest du lösen, indem du das init-script von postfix änderst und in zeile ~59 die sasldb2 zu den zu kopierenden dateien hinzufügst.
aber das löst nicht das problem mit pam, das ich auch immer noch hab.
ausgerechnet SASL(2) :rolleyes: (Das macht keinen Spass)
Sep 25 23:36:24 ibutho postfix/smtpd[1598]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: Too many levels of symbolic links
Mach mal bitte ein ls -ld /etc/sasldb2 , bzw file /etc/sasldb2 und auf den
Rest. Fuer mich sieht das so aus als ob du den Symlink nicht richtig gelegt
hast?
Sep 25 23:36:19 ibutho postfix/smtpd[1598]: warning: SASL authentication failure: no secret in database
Hier wuerde ich mal ein strings auf die database machen und nachsehen
ob da ueberhaupt die Passwoerter drinstehen.
Mach mal bitte ein ls -ld /etc/sasldb2 , bzw file /etc/sasldb2 und auf den
Rest. Fuer mich sieht das so aus als ob du den Symlink nicht richtig gelegt
hast?
Lies mal #11 (http://www.linuxforen.de/forums/showpost.php?p=1576798&postcount=11) und #12 (http://www.linuxforen.de/forums/showpost.php?p=1576801&postcount=12)
Hier wuerde ich mal ein strings auf die database machen und nachsehen
ob da ueberhaupt die Passwoerter drinstehen.
Und einmal #6 (http://www.linuxforen.de/forums/showpost.php?p=1576792&postcount=6) und #7 (http://www.linuxforen.de/forums/showpost.php?p=1576793&postcount=7) .
Und einmal #6 (http://www.linuxforen.de/forums/showpost.php?p=1576792&postcount=6) und #7 (http://www.linuxforen.de/forums/showpost.php?p=1576793&postcount=7) .
Sorry, erhm :rolleyes: hatte ich ueberlesen.
@TE Wie sieht es denn jetzt aus? Schon Fortschritte?
Hallo,
leider nein. Ich lasse nun über das init-Script von postfix die sasldb2 in den chroot-Käfig verschieben, aber das brachte auch keine Besserung.
Wie gesagt, ich will eine Authentifizierung über pam oder die shadow-Datei, nicht über die sasldb2. Leider kapiert das sasl nicht, obwohl es in der /etc/default/saslauthd und in der /etc/postfix/sasl/smtpd.conf so eingestellt ist.
Was seit dem letzten Mal noch verändert wurde ist, dass die Authentifizierung nun verschlüsselt über TLS/SSL erfolgen kann.
Hier ein Auszug aus der mail.log:
Sep 30 09:30:26 ibutho imapd-ssl: LOGIN, user=johker, ip=[::ffff:85.179.242.77], protocol=IMAP
Sep 30 09:31:08 ibutho postfix/smtpd[18205]: connect from e179242077.adsl.alicedsl.de[85.179.242.77]
Sep 30 09:31:08 ibutho postfix/smtpd[18205]: setting up TLS connection from e179242077.adsl.alicedsl.de[85.179.242.77]
Sep 30 09:31:08 ibutho postfix/smtpd[18205]: TLS connection established from e179242077.adsl.alicedsl.de[85.179.242.77]: TLSv1 with cipher RC4-MD5 (128/128 bits)
Sep 30 09:31:12 ibutho postfix/smtpd[18205]: warning: SASL authentication failure: no secret in database
Sep 30 09:31:12 ibutho postfix/smtpd[18205]: warning: e179242077.adsl.alicedsl.de[85.179.242.77]: SASL CRAM-MD5 authentication failed: authentication failure
Sep 30 09:31:15 ibutho postfix/smtpd[18205]: warning: SASL authentication failure: no secret in database
Sep 30 09:31:15 ibutho postfix/smtpd[18205]: warning: e179242077.adsl.alicedsl.de[85.179.242.77]: SASL CRAM-MD5 authentication failed: authentication failure
Powered by vBulletin® Version 4.2.5 Copyright ©2024 Adduco Digital e.K. und vBulletin Solutions, Inc. Alle Rechte vorbehalten.