Subject: Re: auxprop+MySQL+Cyrus imapd -> duplicate SQL queries?
From: Simon Loader (simon at surf dot org dot uk)
Date: Mon Dec 30 2002 - 12:28:58 EST
> I try to use Cyrus imapd 2.1.11 with Cyrus SASL 2.1.10 and the MySQL
> auxprop module. I want to use simple authentication on a plain POP3
> connection. For this I have the following in my imapd.conf:
> allowplaintext: yes
> sasl_minimum_layer: 0
> sasl_pwcheck_method: auxprop
> sasl_auxprop_plugin: mysql
> sasl_mysql_user: cyrus
> sasl_mysql_passwd: secret
> sasl_mysql_hostnames: localhost
> sasl_mysql_database: cyrus
> sasl_mysql_statement: select plain from passwd where username='%u'
> sasl_mysql_verbose: yes
> But now I see in the auth log that there seem to be two queries:
> As you can see there are two identical queries. But what does SASL
> mean by userPassword and cmusaslsecretPLAIN?
In short yes.
Sasl can be used to get all sorts of information hence (aux properties).
In order to allow the mysql plugin to do anything you may want it
generates a query per property required (%p been replaced if I remeber
correctly). Prehaps it should compare the last query and not do it if it
is the same ? Im doing the LDAP auxprop at the moment (almost done) Ill
have a look maybe later but probably not till Im back in the UK.
-- Simon Loader