Redundant database query?

Ken Murchison ken at oceana.com
Thu Oct 28 16:53:43 EDT 2004


Patrick Gibson wrote:

> I've got cyrus-imapd 2.2.8 setup to authenticate via a MySQL database. 
> I've enabled logging on the database while I'm setting things up, and 
> I've noticed that when I login, Cyrus runs the same query twice:
> 
>    47 Connect     cyrus at localhost on RETRIX_TRANSITION
>    47 Query       START TRANSACTION
>    47 Query       select PASSWORD from USER_ACCOUNTS where 
> USERNAME='patrick'
>    47 Query       select PASSWORD from USER_ACCOUNTS where 
> USERNAME='patrick'
>    47 Query       COMMIT
> 
> Any idea as to why this would be happening?

What does your sql_select option look like?  What SASL mechanism 
generated this query.

My guess is that SASL is trying to fetch both userPassword and a legacy 
mech-specific secret (e.g. cmusaslsecretDIGEST-MD5), but since you 
apparently aren't using the %p variable in your sql_select option 
(you've hardcoded the property as "PASSWORD", the same column gets 
selected twice.

-- 
Kenneth Murchison     Oceana Matrix Ltd.
Software Engineer     21 Princeton Place
716-662-8973 x26      Orchard Park, NY 14127
--PGP Public Key--    http://www.oceana.com/~ken/ksm.pgp
---
Cyrus Home Page: http://asg.web.cmu.edu/cyrus
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