On S?bado 29 Octubre 2011 04:03:41 sean darcy escribi?:> I have a virtual user test1.
>
> cat /etc/dovecot/users
> test1@<mydomain>:{PLAIN}test1pass:504:504::/home/vmail/%d/%n
> catchall@<mydomain>:{PLAIN}password:504:504::/home/vmail/%d/%n
>
@<mydomain>:{PLAIN}password:504:504::/home/vmail/<mydomain>/catchall
> test1 at example.com:{PLAIN}test1pass:504:504::/home/vmail/%d/%n
>
> ls /home/vmail/%d/%n/mail
> cur dovecot.index.cache dovecot.index.log dovecot-uidlist
> dovecot-uidvalidity dovecot-uidvalidity.4eab20a7 new tmp
>
> and mail to test1@<mydomain> goes into this %d/%n folder. In fact
> dovecot created the folder - at least I didn't.
>
> from dovecot-info.log
>
> Oct 28 17:43:11 auth: Debug: master in: USER 4
test1@<mydomain>
> service=lmtp
> Oct 28 17:43:11 auth: Debug: passwd(test1@<mydomain>): lookup
> Oct 28 17:43:11 auth: Info: passwd(test1@<mydomain>): unknown user
> Oct 28 17:43:11 auth: Debug: passwd-file(test1@<mydomain>): lookup:
> user=test1@<mydomain> file=/etc/dovecot/users
> Oct 28 17:43:11 auth: Debug: master out: USER 4
test1@<mydomain>
> uid=504 gid=504 home=/home/vmail/%d/%n
> Oct 28 17:43:11 lmtp(4533, test1@<mydomain>): Info:
> l6DnLacgq061EQAABoXEcA: msgid=<4EAB21EC.9070905 at gmail.com>: saved
mail
> to INBOX
>
> I would have expected dovecot to expand this to
> /home/vmail/<mydomain>/test1.
>
> Or are the %u %d variables only expanded in certain files?
I had this same misunderstanding few days ago (in my case using ldap, but it
doesn't matter). The usage of variables makes sense when used in generic
values (e.g. mail_location), but not when used in a per-user db, and so
they're not expanded in that cases.
So: when adding a new entry in your passdb file, you should write actual
values instead of variables. Usually it's really easy.
HTH
--
Joseba Torre. Vicegerencia de TICs, ?rea de Explotaci?n