Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am migrating my companies intranet from a OS X server to an Ubuntu 12.04 server. We use a flat file to store user names and passwords hashs. This file is used by Apache and Dovecot to authenticate users. The Ubuntu server is running Dovecot 2.0 while the OS X server is running Dovecot 1.2.

I have already migrated WebDav which uses Apache for authentication. Authentication works. I'm in the process of migrating our Prosody server which uses Dovecot for authentiation. Dovecot is up and running, but when I test authentication using either telnet a login username password or doveadm sudo doveadm auth username, I get dovecot: auth: passwd-file(username): unknown user

dovecot: auth: Debug: client out: FAIL#0111#011user=username in my log file.

I can use sudo dovecot user username to perform a user lookup and it will return the user's info. I can generate a password hash locally and Dovecot will authenticate the test password just fine.

Edit: The scheme is set at CRYPT which is the default aways.

Edit the second: Here's what I have in auth-passwdfile.conf.ext:

# Authentication for passwd-file users. Included from auth.conf.
# passwd-like file with specified location.
# <doc/wiki/AuthDatabase.PasswdFile.txt>

passdb {
  driver = passwd-file
  args = scheme=CRYPT username_format=%u /srv/auth/passwd/passwd.intranet

userdb {
  driver = passwd-file
  args = username_format=%u /srv/auth/passwd/passwd.intranet

How the password file looks:

share|improve this question
Have you tried MD5, or CRAM-MD5? – NickW Nov 5 '13 at 9:33
Yes I have tried MD5 and CRAM-MD5. Both do not work. – Ironlenny Nov 5 '13 at 22:07

Dovecot supports several password encryption schemes. Some require plain text passwords to be exchanged. Dovecot 2.0 prefixes passwords with the scheme such as {SSHA256}. You can specify a default scheme when you specify the file.

I found I needed to specify the auth_username_format when I upgraded. Configurations like the following may help.

mechanisms = plain login
# passwd-like file with specified location
passdb passwd-file {
    args = scheme=plain-md5 /etc/dovecot/passwd.md5
share|improve this answer
None of that helps me. – Ironlenny Nov 8 '13 at 23:41
up vote 0 down vote accepted

My problem was the password file formatting. It was where it should have been The extra colons demarcate empty fields that Dovecot expects to be there. I guess the new version of Dovecot is pickier than the old one.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.