This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.

passwd-file

This file is compatible with regular /etc/passwd and a password file used by libpam-pwdfile. It's in the following format:

user:password:uid:gid:(gecos):home:(shell):extra_fields

For password database, it's enough to have only user and password fields. For user database, you need to set also uid and gid and preferably home (see VirtualUsers).

extra_fields is a space-separated list of key=value pairs which can be used to set various settings, for example you can override default_mail_env setting by giving mail=mbox:~/mail.

The password field can be in three formats:

Here's an example file for used by passdb:

user:{PLAIN}password

Or for passdb and userdb:

user:{plain}pass:1000:1000::/home/user::mail=maildir:~/Maildir allow_nets=192.168.0.0/24