Getting Cyrus to auth with MySQL

Nils Vogels nivo at yuckfou.org
Sun Apr 4 18:21:54 EDT 2004


Hi There,

I am working on migrating my setup from unix uid authentication using 
saslauthd and getpwent method to MySQL setup, using auxprop.

My current imapd.conf on this lists the following relevant entries:

sasl_minimum_layer: 0
sasl_pwcheck_method: saslauthd auxprop
sasl_auxprop_plugin: sql
sql_user: user
sql_passwd: s3cr3t
sql_hostnames: localhost
sql_database: cyrus
sql_statement: select clearpw from credentials where user='%u'
sql_verbose: yes

However, this gives me a rather odd message in my syslog when I try to 
authenticate with a user that exists only in the MySQL db, and not as a 
unix uid:

Apr  5 00:15:21 imhotep imap[15956]: accepted connection
Apr  5 00:15:29 imhotep imap[15956]: could not find auxprop plugin, was 
searching for 'sql'
Apr  5 00:15:29 imhotep imap[15956]: could not find auxprop plugin, was 
searching for 'sql'
Apr  5 00:15:29 imhotep saslauthd[56765]: do_auth         : auth 
failure: [user=small] [service=imap] [realm=] [mech=getpwent] 
[reason=Unknown]
Apr  5 00:15:29 imhotep imap[15956]: could not find auxprop plugin, was 
searching for 'sql'
Apr  5 00:15:29 imhotep imap[15956]: could not find auxprop plugin, was 
searching for 'sql'
Apr  5 00:15:29 imhotep imap[15956]: badlogin: lists.on-drugz.net 
[192.168.2.5] plaintext small SASL(-13): user not found: checkpass failed

This would seem to imply, that auxprop is not configured for usage with 
the sql plugin, however, Postfix is working fine with this smtpd.conf:

pwcheck_method: saslauthd auxprop
mech_list: plain login cram-md5 digest-md5
auxprop_plugin: sql
auth_mech: login
sql_engine: mysql
sql_user: user
sql_passwd: s3cr3t
sql_hostnames: localhost
sql_database: cyrus
sql_statement: SELECT clearpw FROM credentials WHERE user = '%u'

I am rather stumped, can someone please give me a reason why this setup 
would not work for Cyrus, but would work for Postfix ?

Gr,

Nils.

-- 
Simple guidelines to happiness:
Work like you don't need the money,
love like your heart has never been broken and 
dance like no one can see you.
---
Home Page: http://asg.web.cmu.edu/cyrus
Wiki/FAQ: http://cyruswiki.andrew.cmu.edu
List Archives/Info: http://asg.web.cmu.edu/cyrus/mailing-list.html




More information about the Info-cyrus mailing list