[Postfixbuch-users] Probleme mit SASL2 und MySQL

Robert Walter Robert.Walter at hofmeir.net
Do Aug 5 15:38:42 CEST 2004


Hallo,

ich schaffe es nicht, SASL2 in Verbindung mit MySQL zum laufen zu 
kriegen. In allen Suchergebnissen (Google & Co) stand, dass es so gehn 
müßte, aber das tut es leider nicht.

Das Problem ist das der smtpd scheinbar nicht zu MySQL connecten mag, 
wieso auch immer.

Hier ein paar Angaben zu meiner Konfiguration & den Logfiles:

/var/log/mail
---------
Aug  5 15:19:20 s6 postfix/smtpd[11545]: warning: SASL authentication 
failure: Password verification failed
Aug  5 15:19:20 s6 postfix/smtpd[11545]: warning: unknown[212.223.18.3]: 
SASL PLAIN authentication failed
Aug  5 15:19:20 s6 postfix/smtpd[11545]: warning: unknown[212.223.18.3]: 
SASL LOGIN authentication failed


/usr/local/lib/sasl2/smtpd.conf
---------
pwcheck_method: auxdrop
auxprop_plugin: mysql login plain crammd6 digestmd5
mech_list: PLAIN LOGIN
mysql_user: postfix
mysql_passwd: <daspasswort>
mysql_hostnames: localhost
mysql_database: postfix
mysql_statement: SELECT clear FROM postfix_users WHERE email = '%u@%r'
mysql_verbose: yes

/etc/postfix/main.cf
---------
queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
content_filter=smtp-amavis:[127.0.0.1]:10024
myhostname = <server>
mydomain = <hauptdomain>
myorigin = $mydomain
mydestination = $transport_maps
relay_domains = $relay_domains
home_mailbox = Maildir/
local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname
relay_recipient_maps = $relay_recipient_maps
unknown_local_recipient_reject_code = 550
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = permit_sasl_authenticated, 
permit_mynetworks, reject_unauth_destination
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,
           check_recipient_access mysql:/etc/postfix/mysql-recipient.cf, 
reject_unauth_destination, permit
smtpd_sender_restrictions = check_sender_access 
mysql:/etc/postfix/mysql-sender.cf
smtpd_client_restrictions = check_client_access 
mysql:/etc/postfix/mysql-client.cf
alias_maps = mysql:/etc/postfix/mysql-aliases.cf
relocated_maps = mysql:/etc/postfix/mysql-relocated.cf
transport_maps = mysql:/etc/postfix/mysql-transport.cf
virtual_maps = mysql:/etc/postfix/mysql-virtual.cf
virtual_mailbox_base = /home/vmail
virtual_mailbox_maps = mysql:/etc/postfix/mysql-virtual-maps.cf
virtual_uid_maps = mysql:/etc/postfix/mysql-virtual-uid.cf
virtual_gid_maps = mysql:/etc/postfix/mysql-virtual-gid.cf
relay_domains = mysql:/etc/postfix/mysql-relay.cf
relay_recipient_maps = mysql:/etc/postfix/mysql-relay-maps.cf
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
html_directory = no
setgid_group = postdrop
manpage_directory = /usr/local/man
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq

Postfix Kompilierbefehl:
------------
make makefiles 'CCARGS=-DHAS_MYSQL \
-I/usr/include/mysql -DUSE_SASL_AUTH \
-I/usr/local/include/sasl -I/usr/include' 'AUXLIBS=-L/usr/lib \
-lmysqlclient -lz -lm -L/usr/local/lib -lsasl2 -L/usr/lib'

SASL2 Configure:
---------------
export CPPFLAGS="-I/usr/include/mysql"
./configure \
--enable-anon \
--enable-plain \
--enable-login \
--disable-krb4 \
--disable-otp \
--disable-cram \
--disable-digest \
--with-mysql=/usr/lib \
--without-pam \
--without-saslauthd \
--without-pwcheck \
--with-dblib=berkeley \
--with-bdb-libdir=/usr/lib \
--with-bdb-incdir=/usr/include \
--with-plugindir=/usr/local/lib/sasl2

In den MySQL Logfiles ist kein Connect zusehen, wenn ich versuche eine 
E-Mail zuschicken.

Ich hoffe ihr könnt mir helfen.

Falls jemand eine Idee hat oder weiss, wie ich an genauere Fehler 
herrankommen kann, bitte ich Ihn zu Antworten.

Vielen Dank & mit freundlichen Grüßen

Robert Walter



Mehr Informationen über die Mailingliste Postfixbuch-users