[Dovecot] using passwd userdb with sql passdb

Timo Sirainen tss at iki.fi
Sat Mar 14 01:26:39 EET 2009


On Fri, 2009-03-13 at 16:18 -0700, Shane W wrote:
> The problem may be the shane@ bit.  If I delete the sql
> entry, the lookup just shows 'shane'.  I'm not loging in
> with @ but my query does use the username,domain syntax for
> instances of virtual users which don't use passwd userdb:
> select username,domain,password from users
> WHERE username = '%n' AND domain = '%d'

Does the domain field contain an empty string instead of NULL? If so, I
think the behavior is correct. Maybe change the query to:

where username = '%n' and (domain = '%d' or ('%d' = '' and domain is null))

And change all the domain='' to domain=NULL.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20090313/a31f8214/attachment.bin 


More information about the dovecot mailing list