Servus Leute,
hab nen Postfix mit MySQL, Courier-Imap, TLS, Amavis und Spamassasin aufgesetzt. Postfix funktioniert prima mit allem, nur nicht mit SASL.
Ich kann also vom Client keine Mails verschicken, weil ich mich nicht authentifizieren kann. Normalerweise sollte er in der MySQL DB nach dem User/Passwort schaun, aber ich bekomme immer diese Fehlermeldung:
Code:
Dec 1 11:56:53 clumsy postfix/smtpd[4768]: connect from lord_clumsy.No1LC[192.168.1.100]
Dec 1 11:56:57 clumsy postfix/smtpd[4768]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Dec 1 11:56:57 clumsy postfix/smtpd[4768]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Dec 1 11:56:57 clumsy postfix/smtpd[4768]: warning: SASL authentication failure: no secret in database
Dec 1 11:56:57 clumsy postfix/smtpd[4768]: warning: lord_clumsy.No1LC[192.168.1.100]: SASL CRAM-MD5 authentication failed
Dec 1 11:56:57 clumsy postfix/smtpd[4768]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Dec 1 11:56:57 clumsy postfix/smtpd[4768]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Dec 1 11:56:57 clumsy postfix/smtpd[4768]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Dec 1 11:56:57 clumsy postfix/smtpd[4768]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Dec 1 11:56:57 clumsy postfix/smtpd[4768]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Dec 1 11:56:57 clumsy postfix/smtpd[4768]: warning: SASL authentication failure: Password verification failed
Dec 1 11:56:57 clumsy postfix/smtpd[4768]: warning: lord_clumsy.No1LC[192.168.1.100]: SASL PLAIN authentication failed
Dec 1 11:56:57 clumsy postfix/smtpd[4768]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Dec 1 11:56:57 clumsy postfix/smtpd[4768]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Dec 1 11:56:57 clumsy postfix/smtpd[4768]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Dec 1 11:56:57 clumsy postfix/smtpd[4768]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Dec 1 11:56:57 clumsy postfix/smtpd[4768]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Dec 1 11:56:57 clumsy postfix/smtpd[4768]: warning: SASL authentication problem: unable to open Berkeley db /etc/sasldb2: No such file or directory
Dec 1 11:56:57 clumsy postfix/smtpd[4768]: warning: lord_clumsy.No1LC[192.168.1.100]: SASL LOGIN authentication failed
Ich hab mich durch haufenweise Howtos und Mailinglisten gewälzt bis heut nacht um 4 aber hat nix gebracht. Grundsätzlich bin ich aber nach diesem Tutorial von workaround.org vorgegangen:
http://workaround.org/articles/ispma...index.shtml.de
Hier meine Configfiles:
/etc/postfix/main.cf (postconf -n):
Code:
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = amavis:[127.0.0.1]:10024
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
delay_warning_time = 4
home_mailbox = Maildir/
html_directory = /usr/share/doc/postfix-2.1.4/html
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = localhost
mydomain = clumsy.is-a-geek.net
myhostname = clumsy.is-a-geek.net
mynetworks = 192.168.1.0/24
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.1.4/README_FILES
receive_override_options = no_address_mappings
relay_domains = $mydestination
relayhost = mail.arcor.de
sample_directory = /usr/share/doc/postfix-2.1.4/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_loglevel = 2
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
unknown_local_recipient_reject_code = 450
virtual_alias_maps = mysql:/etc/postfix/mysql-virtual_forwardings.cf mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_gid_maps = static:5000
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_uid_maps = static:5000
/etc/postfix/master.cf
Code:
# Postfix master process configuration file. For details on the format
# of the file, see the Postfix master(5) manual page.
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
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
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - n - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 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/local/bin/maildrop -d ${recipient}
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
old-cyrus unix - n n - - pipe
flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
cyrus unix - n n - - pipe
user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# 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=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
#### für Amavis #####
amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
127.0.0.1:10025 inet n - - - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
-o smtpd_bind_address=127.0.0.1
/etc/postfix/sasl/smtpd.conf
Code:
pwcheck_method: auxprop
auxprop_plugin: sql
mech_list: plain login
#cram-md5 digest-md5
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: provider_admin
sql_passwd: xxxxxxxx
sql_database: provider
sql_select: select password from users where email='%u@%r'
log_level: 7
/etc/conf.d/saslauthd
Code:
#auskommentiertes original, geht mit keiner der beiden Zeilen...
#SASLAUTHD_OPTS="-m /var/state/saslauthd -a pam"
SASLAUTHD_OPTS="-m /var/state/saslauthd/mux -a pam"
/etc/authlib/authdaemonrc
Code:
authmodulelist="authpam authmysql"
#authmodulelistorig="authuserdb authpam authpwd authshadow authpgsql authldap authmysql authcustom authpipe"
authmodulelistorig="authcustom authcram authuserdb authldap authpgsql authpam authmysql"
daemons=5
authdaemonvar=/var/spool/authdaemon
DEBUG_LOGIN=0
DEFAULTOPTIONS=""
LOGGEROPTS=""
SQL Zugriff funktioniert immer, nur nich bei SMTP-AUTH. Mails empfangen, lesen usw geht.
Hier noch die Ausgebe von telnet localhost 25
Code:
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
220 clumsy.is-a-geek.net ESMTP Postfix
ehlo blabla.de
250-clumsy.is-a-geek.net
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-STARTTLS
250-AUTH LOGIN PLAIN GSSAPI OTP DIGEST-MD5 CRAM-MD5
250-AUTH=LOGIN PLAIN GSSAPI OTP DIGEST-MD5 CRAM-MD5
250 8BITMIME
Hoffe, ihr könnt mir helfen, ich bin absolut verzweifelt, weil ich nicht weiterkomme. Ist deprimierend, wenn man Studen und Tage mit demselben Problem kämpft.
Danke, dass Ihr euch die Zeit für mich nehmt :-)
Viele Grüsse,
clumsy
Lesezeichen