dovecot passwdfile

 

 

 

10-auth.conf <- auth-passwdfile.conf.ext

!include auth-system.conf.ext

# auth-passwdfile.conf.ext

passdb {
  driver = passwd-file
  args = scheme=CRYPT username_format=%u /etc/dovecot/users
}

userdb {
  driver = passwd-file
  args = username_format=%u /etc/dovecot/users
}

 * compatible with a normal /etc/passwd file

 
Passwd-file args

scheme=<s>

Password format:

password: Assume CRYPT password scheme. (Default)
{SCHEME}password: The password is in the given scheme.
password[13]: libpam-passwd file compatible format for CRYPT scheme.
password[34]: libpam-passwd file compatible format for MD5 scheme.

username_format=<s>

user@domain

%u      full username
%n      only "user" in the file, set this to

chmod 400 file-with-encrypted-passwords
chown dovecot file-with-encrypted-passwords

user:{plain}password
user2:{plain}password2

==========================

/etc/dovecot/dovecot.conf

!include_try /etc/dovecot/local.conf

/etc/dovecot/local.conf

passdb {
  driver = passwd-file
  args = username_format=%u /etc/dovecot/users.cf
}

userdb {
  driver = passwd-file
  args = username_format=%u /etc/dovecot/users.cf
}

/etc/dovecot/users.cf

user1:{plain}password1
user2:{plain}password2

doveadm reload

doveadm user user1

doveadm auth user1

Creative Commons license icon Creative Commons license icon