userdb lookup not possible with only userdb prefetch

Yves Goergen nospam.list at unclassified.de
Sun Dec 7 11:04:06 UTC 2014


Am 07.12.2014 um 00:56 schrieb Alexander Dalloz:
> You did fulfill the requzirements for prefetch to work documented in the
> wiki?
>
> http://wiki2.dovecot.org/UserDatabase/Prefetch

Ehm, this is my SQL configuration 'dovecot-sql.conf.ext':

> driver = mysql
> connect = host=**** user=**** password=**** dbname=****
> default_pass_scheme = PLAIN
> password_query = \
>   SELECT \
>     local AS username, domain, clearpass AS password, \
>     concat(maildir, '/home') AS home, maildir AS mail \
>   FROM mailusers \
>   WHERE local = '%n' AND domain = '%d' AND forward = '' AND NOT locked

Now that I've found the page you gave me (didn't see it before, but I 
must say that wiki is not easily readable, pretty confusing) I think the 
column names must be different.

Instead of: username, domain, password, home, mail
Should I return: username, domain, password, userdb_home, userdb_mail?

And what does that comment in the example mean? "# The userdb below is 
used only by lda." Should I use only userdb:driver=prefetch, or should I 
include a separate userdb section as if I wouldn't use prefetch? Again, 
confusing. Why does it have to be two separate queries at all? Just use 
one and take what you get. If some required column is missing and the 
value isn't set in the configuration, you can still throw an error.

-- 
Yves Goergen
http://unclassified.de
http://dev.unclassified.de


More information about the dovecot mailing list