cyrus-sasl2 mysql postfix freebsd problem

David Newman dnewman at networktest.com
Sun Jan 8 11:54:22 EST 2006


> Please turn on Verbose-Logging in your MySQL-Server. Check if the Query
> arrives at the SQL-Server.

Yes, the query does seem to be reaching MySQL:

                       2 Connect     postfix at localhost on mail
                       2 Query       START TRANSACTION
                       2 Query       SELECT userPassword FROM users WHERE 
username='test' AND userrealm ='petacchi.int.networktest.com' AND auth = 
'1'
                       2 Query       SELECT cmusaslsecretPLAIN FROM users 
WHERE username='test' AND userrealm ='petacchi.int.networktest.com' AND 
auth = '1'
                       2 Query       COMMIT
                       2 Quit

This was just MySQL and cyrus-sasl2 alone, no postfix involved (see ps. 
note below). I also tried this without the userrealm parameter (even 
though the userrealm is set as above), but again no jojy.

Here's my smtpd.conf (which is in /usr/local/lib/sasl2 and symlinked to 
/usr/lib/sasl2):

log_level: 3
pwcheck_method: auxprop
mech_list: PLAIN LOGIN
auxprop_plugin: sql
sql_user: ---changed---
sql_passwd: ---changed---
sql_hostnames: localhost
sql_database: mail
sql_select: SELECT %p FROM users WHERE username='%u' AND userrealm='%r' 
AND auth = '1'
sql_engine: mysql
sql_usessl: no

A query run inside MySQL is successful.

Thanks in advance for clues as to how to get cyrus-sasl2 and MySQL to work 
together.

dn

ps. The above was run with the cyrus client and server test tools. They 
are included with the FreeBSD port, in the 
/usr/ports/security/cyrus-sasl2/work/cyrus-sasl-2.x.y/sample directory. 
The trick to using them is *not* to run "make clean" after installing the 
port.

Here's the output from the client:

test[0]test[0]testpass
authentication failed

and the server:

recv: {18}
test[0]test[0]testpass
starting SASL negotiation: authentication failureclosing connection


More information about the Cyrus-sasl mailing list