[Dovecot] extra fields with "passwd" userdb

Timo Sirainen tss at iki.fi
Mon Dec 13 15:05:18 EET 2010


On Fri, 2010-12-10 at 15:07 -0700, Willie Gillespie wrote:
> > Thanks for the reply, although I am not sure you understand the
> > question. I know what I need to do, I just don't know how (syntax to use
> > in the dovecot configuration file) to change the mail_location on a
> > per-user basis with the "passwd" userdb backend.
> 
> I am no Dovecot expert, but maybe you could add a passwd-file userdb 
> alongside your regular userdb.

Yeah, something like that has to be done.

> Then for the users you want to test with:
> user:password-ignored--will-use-passdb-instead:1000:1000::/home/user::userdb_mail=mdbox:~/Maildir

Yep. Either only the non-default users or just clone the
entire /etc/passwd there. You could write a small script that updates
it, preserving the extra fields.

> The thing I'm not sure about is which order you should list your userdb 
> sections in the config file such that "passwd-file" takes precedence 
> over "passwd".

userdb passwd-file {} just needs to be above userdb passwd {} in config
file. If user isn't found from passwd-file then it's looked up from
passwd next.



More information about the dovecot mailing list