Hallo!
Ich bin schon mal froh, dass ich postfix für mehrere relayhost konfiguriert habe und die verschiedenen Benutzer aus der Kommandozeile mit mail Emails verschicken können. Sogar GMX nimmt die Mails an!
Jetzt möchte ich aber auch aus beliebigen Email-Clients heraus Mails verschicken können, und habe dazu den smtpd von postfix konfiguriert. Problem hierbei ist der Anmeldevorgang. Ich wollte die Authentifizierung über die sasldb machen.
Da ich mich jetzt schon mehrere Tage mit diesem einen Problem beschäftige und langsam den Wald vor lauter Bäumen nicht mehr sehe, hoffe ich, dass es nur ein einfacher Fehler ist, der schnell zu beseitigen ist!
Fehler:
SASL authentication failed: authentication failure
Egal, ob ich's "per Hand" über telnet mit AUTH PLAIN versuche, oder über Evolution mit Anmelden, CRAM-MD5, usw.
In der mail.log finden sich genauere Infos:
Nov 22 14:12:45 ubuntu-server postfix/smtpd[3870]: connect from localhost[127.0.0.1] Nov 22 14:13:28 ubuntu-server postfix/smtpd[3870]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory Nov 22 14:13:28 ubuntu-server postfix/smtpd[3870]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory Nov 22 14:13:28 ubuntu-server postfix/smtpd[3870]: warning: SASL authentication failure: Password verification failed Nov 22 14:13:28 ubuntu-server postfix/smtpd[3870]: warning: localhost[127.0.0.1]: SASL PLAIN authentication failed: authentication failure Nov 22 14:13:30 ubuntu-server postfix/smtpd[3870]: disconnect from localhost[127.0.0.1]
Jetzt könnte man meinen, es gäbe die /etc/sasldb2 nicht, ABER:
ls -l sasldb2 -rw-rw-rw- 1 postfix nogroup 12288 2006-11-22 14:11 sasldb2
Und sie wurde natürlich auch mit saslpasswd2 gefüllt.
Installiert ist:
postfix-tls (2.3.3-1)
libdb4.3
und so ziemlich alles von sasl2-bin bis libsasl2-modules
Ist vielleicht die falsche Berkeley DB installiert?
Noch ein Fehler, mit dem ich gar nichts anfangen kann aus der auth.log:
Nov 22 13:46:01 ubuntu-server postfix/smtpd[3634]: OTP unavailable because can't read/write key database /etc/opiekeys: No such file or directory
Die Datei gab es wirklich nicht, und ich hab einfach mal versucht, die sasl2db nach opiekeys zu kopieren, hat aber auch nichts geändert. Was ist den OTP überhaupt? Darüber habe ich noch nichts gelesen.
Und noch meine Config:
/etc/postfix/master.cf:
# # Postfix master process configuration file. For details on the format # of the file, see the master(5) manual page (command: "man 5 master"). # # ========================================================================== # service type private unpriv chroot wakeup maxproc command + args # (yes) (yes) (yes) (never) (100) # ========================================================================== smtp inet n - - - - smtpd #submission inet n - - - - smtpd # -o smtpd_enforce_tls=yes # -o smtpd_sasl_auth_enable=yes # -o smtpd_client_restrictions=permit_sasl_authenticated,reject #smtps inet n - - - - smtpd # -o smtpd_tls_wrappermode=yes # -o smtpd_sasl_auth_enable=yes # -o smtpd_client_restrictions=permit_sasl_authenticated,reject #628 inet n - - - - qmqpd pickup fifo n - - 60 1 pickup cleanup unix n - - - 0 cleanup qmgr fifo n - n 300 1 qmgr #qmgr fifo n - - 300 1 oqmgr tlsmgr unix - - - 1000? 1 tlsmgr rewrite unix - - - - - trivial-rewrite bounce unix - - - - 0 bounce defer unix - - - - 0 bounce trace unix - - - - 0 bounce verify unix - - - - 1 verify flush unix n - - 1000? 0 flush proxymap unix - - n - - proxymap smtp unix - - - - - smtp # When relaying mail as backup MX, disable fallback_relay to avoid MX loops relay unix - - - - - smtp -o fallback_relay= # -o smtp_helo_timeout=5 -o smtp_connect_timeout=5 showq unix n - - - - showq error unix - - - - - error discard unix - - - - - discard local unix - n n - - local virtual unix - n n - - virtual lmtp unix - - - - - lmtp anvil unix - - - - 1 anvil scache unix - - - - 1 scache # # ==================================================================== # Interfaces to non-Postfix software. Be sure to examine the manual # pages of the non-Postfix software to find out what options it wants. # # Many of the following services use the Postfix pipe(8) delivery # agent. See the pipe(8) man page for information about ${recipient} # and other message envelope options. # ==================================================================== # # maildrop. See the Postfix MAILDROP_README file for details. # Also specify in main.cf: maildrop_destination_recipient_limit=1 # maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient} # # See the Postfix UUCP_README file for configuration details. # uucp unix - n n - - pipe flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient) # # Other external delivery methods. # 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=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient scalemail-backend unix - n n - 2 pipe flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension} mailman unix - n n - - pipe flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py ${nexthop} ${user}
Da smtp wie man sieht nicht im chroot läuft, muss ich doch auch nichts nach /var/spool/postfix kopieren, oder?
/etc/postfix/main.cf:
... # Ausgehend sender_dependent_relayhost_maps = hash:/etc/postfix/relaymaps sender_dependent_authentication = yes smtp_sasl_auth_enable = yes smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd smtp_sasl_type = cyrus smtp_sasl_security_options = noanonymous canonical_maps = hash:/etc/postfix/canonical # Eingehend smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous smtpd_sasl_receipient_restrictions = permit_sasl_authenticated, permit_mynetworks smtpd_sasl_local_domain = broken_sasl_auth_clients = yes
/etc/postfix/sasl/smtpd.conf:
pwcheck_method: auxprop
Hab irgendwo im Netz gelesen, für sasl2 müsste es /etc/postfix/sasl2/smtpd.conf sein, hab's einfach kopiert, dass es beides gibt, aber hat auch nichts gebracht. Auch alle Module (die lib...) hab ich ins Verzeichnis von smtpd.conf geschoben, hat aber auch nichts verändert.
Nur wenn ich hier saslauthd als Methode angebe, muss dieser daemon auch gestartet werden, oder? Ich hab's für alles fälle mal mit und mal ohne Probiert, geht trotzdem nicht.
Ich hoffe, dass mir jemand helfen kann! Wenn noch mehr logs oder conf dateien benötigt werden, poste ich sie gern auch noch!!
Danke schon mal an alle!!
Gruß, bluba