[Dovecot] Variable %h not recognized in userdb_mail (passwd-file)

Michal Soltys nozo at ziu.info
Wed Mar 14 15:36:24 EET 2007


As in subject, if you for instance create a simple passwd-file with:

test at domain.tld:{plain}pass:20000:10::/home/regular/.test::userdb_mail=maildir:%h/maildir

Dovecot (rc23 & 27) will expand %h to empty string, and try to make a 
directory under /

Mar 14 14:25:28 rasengan dovecot: IMAP(test at domain.tld): 
mkdir(/maildir/cur) failed: Permission denied
Mar 14 14:25:28 rasengan dovecot: IMAP(test at domain.tld): 
mkdir(/maildir/.Trash/cur) failed: Permission denied
...

If tilde is used instead of %h, the expansion works properly.

While checking it, I tested other variables (putting aside
craziness of using some of them), so summing it up - h,w,i,a,b don't 
work, all the other ones do.

In case %h is not actually intended to work in passwd-files, some wiki 
examples would have to be adjusted.



More information about the dovecot mailing list