[Dovecot] Password query returned multiple matches

Arne K. Haaje arne at drlinux.no
Thu Sep 1 13:56:12 EEST 2011


Wednesday 31. August 2011 11.44.03 skrev Simon Brereton :
> > -----Original Message-----
> > From: Timo Sirainen [mailto:tss at iki.fi]
> > 
> > On 31.8.2011, at 18.19, Simon Brereton wrote:
> > > Aug 30 22:41:45 mail dovecot: auth-worker(default):
> > sql(sbrereton at domain.co.uk,64.88.168.84): Password query returned
> > multiple matches
> > ..
> > 
> > > password_query = SELECT EmailAdd AS user, Password AS password,
> > 
> > concat('/var/spool/mail/virtual/',MailDirLoc) as userdb_home, 999 as
> > userdb_uid, 115 as userdb_gid FROM MailAccounts WHERE Username='%u'
> > AND active = '1';
> > 
> > > Since the EmailAdd is unique I don't see how it can return multiple
> > 
> > matches.
> > 
> > You're querying with Username, not with EmailAdd, and apparently
> > there are multiple rows where Username='sbrereton at domain.co.uk'.
> 
> Well, what do you know - there are two Usernames that at the same!  I have
> no idea how that happened.

You could change or add the index for Username column to UNIQUE. That will 
ensure it does not happen again :)

Arne

-- 
Arne K. Haaje - Dr Linux
http://www.drlinux.no/  ::: arne at drlinux.no
LinkedIn: http://no.linkedin.com/pub/arne-haaje/27/189/bb


More information about the dovecot mailing list