Frank Church escribió:
It turns out that using prefetch with dovecot lda required a user_query in dovecot/sql.conf I fixed it by adding this query to dovecot/sql.conf
user_query = SELECT concat('/var/vmail/', maildir) as home, 601 as uid, 12 as gid FROM mailbox WHERE username = '%u' AND active = '1'
This resulted in a new mailbox /var/vmail/domain.com/user@domain.com being created when although /var/vmail/domain.com/user already exists and is what the query returns
Your user_query is not returning a mail column so it falls back to mail_location setting.
It seems that prior to that when the query was failing the mail was properly delivered somehow by dovecot, but fixing it created a new problem.
It appears that the mail_location = maildir:/var/vmail/%d/%u in dovecot.conf could be related as %u is user@domain.com
As in your setup home and mail are the same, you could also use: mail_location = maildir:%h
Regards,
Angel Marin http://anmar.eu.org/