Hello, I've configured MySQL authentication as follows. -- divecot-sql.conf -- driver = mysql connect = host=localhost dbname=postfix user=myuser password=mypass default_pass_scheme = PLAIN password_query = SELECT password FROM mailbox WHERE username = '%u' user_query = SELECT CONCAT('/var/vmail/', maildir, 'Maildir') AS home, '1234' AS uid, '1234' AS gid FROM mailbox WHERE username = '%u' -- dovecot.conf -- passdb sql { args = /usr/local/etc/dovecot-sql.conf } userdb sql { args = /usr/local/etc/dovecot-sql.conf } And both access (IMAP) and delivery (LDA) work correctly. Now I want to setup prefetching to reduce SQL queries, so I did -- dovecot-sql.conf -- driver = mysql connect = host=localhost dbname=postfix user=myuser password=mypass default_pass_scheme = PLAIN password_query = SELECT password, CONCAT('/var/vmail/', maildir, 'Maildir') AS userdb_home, '1234' AS userdb_uid, '1234' AS userdb_gid FROM mailbox WHERE username = '%u' -- dovecot.conf -- passdb sql { args = /usr/local/etc/dovecot-sql.conf } userdb prefetch { } Dovecot mail access (IMAP) works correctly, but when the LDA tries to deliver mail I get: May 11 16:25:00 ns1 dovecot: auth(default): prefetch(luca at example.com): passdb didn't return userdb entries May 11 16:25:00 ns1 postfix/pipe[11040]: 21E31847BC: to=<luca at example.com>, relay=dovecot, delay=0, status=bounced (user unknown) thanks -- Luca Corti PGP Key ID 1F38C091 BOFH excuse of the moment: user to computer ration too low.
Timo Sirainen
2006-May-12 19:06 UTC
[Dovecot] userdb prefetch not working with dovecot LDA?
On Thu, 2006-05-11 at 16:43 +0200, Luca Corti wrote:> Dovecot mail access (IMAP) works correctly, but when the LDA tries to > deliver mail I get: > > May 11 16:25:00 ns1 dovecot: auth(default): prefetch(luca at example.com): > passdb didn't return userdb entries > May 11 16:25:00 ns1 postfix/pipe[11040]: 21E31847BC: > to=<luca at example.com>, relay=dovecot, delay=0, status=bounced (user > unknown)I think the best way to fix this is just to add userdb sql after the userdb prefetch. Then with imap/pop3 it stops at prefetch, but with lda it should continue to sql userdb. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 191 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20060512/38d8a8a4/attachment.bin>