OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
[repost] stacked backends with SASL not working with postfix but with imapd

From: paul kölle (paulsubsignal.org)
Date: Fri Dec 02 2005 - 06:49:19 CST


Hi list,

I am using cyrus-sasl 2.1.21 with postfix 2.2.4 and cyrus-imapd.
Backends are mysql AND sasldb (virtual users in sql, local domain in
sasldb). This is working fine with cyrus-imap (see config below), I
tested with imtest and users in the sql database AND those in sasldb can
authenticate.

However, postfix fails to do the same thing so I wonder if stacked
backends is something the application has to care about (and postfix
doesn't know) or if it SHOULD work in theory with postfix too. (Note:
postfix with one plugin is no problem but the second one in the
"sasl_auxprop_plugin:" parameter never gets asked)

########################
/etc/imapd.conf

sasl_sasldb_path: /etc/sasl2/sasldb2
sasl_pwcheck_method: auxprop
sasl_auxprop_plugin: sql sasldb

sasl_sql_engine: mysql
sasl_mech_list: LOGIN PLAIN CRAM-MD5 DIGEST-MD5 NTLM

sasl_sql_user: imap
sasl_sql_passwd: --------
sasl_sql_database: services
sasl_sql_hostnames: 127.0.0.1
sasl_sql_select: SELECT password FROM mail_account WHERE email = '%u%r'

########################
/etc/sasl2/smtpd.conf:

sasldb_path: /etc/sasl2/sasldb2
pwcheck_method: auxprop
auxprop_plugin: sql sasldb

sql_engine: mysql
mech_list: CRAM-MD5 DIGEST-MD5 NTLM

sql_user: smtp
sql_passwd: ---------
sql_database: services
#sql_hostnames: 127.0.0.1
sql_select: SELECT password FROM mail_account WHERE email = '%u%r'

Note the uncommented sql_hostnames, this is to use socket connection and
should be unrelated. I tried to move the sasl part out of
/etc/imapd.conf and use /etc/sasl2/imapd.conf but this didn't worked at
all (wrong name?).

thanks,
 Paul

[tried to post this to the sasl list (twice),it asks me to authorize, I
do, I get the confirmation..., mail doesn't get posted]