Comment 34 for bug 875440

Revision history for this message
Dario Nuevo (dn-n) wrote :

I could resolve the issue in my particular setup.. Not with new packages (I'm still having installed the latest oneiric packages), just with configuration changes. In my case it's working again..

Just to clarify, I have a Postfix SMTP -> Sasl -> Mysql setup, and updated from 11.04 to 11.10 - after that I experienced this error.

First, I reinstalled libsasl2-modules-sql (don't know if that's necessary)..

Then I changed /etc/postfix/sasl/smtpd.conf as follows:

root@node:/etc/postfix/sasl# diff -u smtpd.conf~ smtpd.conf
--- smtpd.conf~ 2011-11-27 11:06:36.000000000 +0100
+++ smtpd.conf 2012-01-12 10:07:02.000000000 +0100
@@ -1,9 +1,10 @@
 pwcheck_method: saslauthd
-mech_list: plain login
+mech_list: plain login pam
 allow_plaintext: true
-auxprop_plugin: mysql
+auxprop_plugin: sql
+sql_engine: mysql
 sql_hostnames: 127.0.0.1
 sql_user: [REMOVED]
 sql_passwd: [REMOVED]
 sql_database: ispconfig
-sql_select: select password from mail_user where email = '%u'
+sql_select: select password from mail_user where login = '%u@%r'

What changed in the upgrade?
- The auxprop plugin name changed from "mysql" to "sql" (it's generic now)
- The new parameter "sql_engine" needs to be set with your engine (in my case mysql)
- The select query has to be changed *maybe* - it seems usernames like "<email address hidden>" are now automatically split up. Before this version %u contained the whole username, now the part after "@" in the username is defined in %r

So maybe the creator of this bug and other people like me just forgot to make the appropiate changes in the smtpd.conf?

Or maybe - again - I'm missing the point of this bug. But it seems you *can* have mysql based smtp auth with the current oneiric packages - it's working in my case..