[Dovecot] Authentication Failure (newbie)

Danny Gorton danny at bushidosoftware.com
Sun Jun 8 06:40:04 UTC 2014


I'm am learning about running a mail server and I set up a brand new 
Ubuntu 14.04 server with postfix and dovecot.  I had some initial 
problems with dovecot not starting, and then with not having proper 
permissions/access to the various directories and files and pipes, etc, 
and in the process starting to learn how this thing works.

After searching in web-land I seem to have overcome those issues and 
dovecot and postfix both start and accept connections now 

However when I check to see if I can authenticate I get Authentication 
Failed.  At the time of these login attempts there are no messages added 
to syslog or mail.log, dovecot log entries are below.

Note I redacted my test user and password values to 'xxxxx', and my 
domain value to 'domain.com'.  Also I'm testing with my plain text 
password, but I've tried using AUTH PLAIN <base64 encoded uid/pwd>.  I 
have also tried the setup with a default auth domain, and I've tried 
authenticating with and without the domain name as part of the user 
name, with the same results.  I added the debug settings and 
disable_plaintext_auth = no to try to solve this issue.

Here is my test command set:

xxxxx at apacweb:~$ sudo doveadm user xxxxx
field   valueuserdb lookup: user xxxxx doesn't exist

and :

xxxxx at apacweb:~$ telnet localhost 110
Trying ::1...
Connected to localhost.
Escape character is '^]'.
+OK Dovecot (Ubuntu) ready.
user xxxxx
pass xxxxx
-ERR [AUTH] Authentication failed.

Here is a cut from the dovecot log:

2014-06-08 01:22:10 auth: Error: passwd-file(xxxxx): stat(uid=vmail 
gid=vmail home=/home/vmail//xxxxx /etc/dovecot/users) failed: Address 
family not supported by protocol

I figure this is the root cause of this issue and the solution to it is 
supposedly to tell dovecot to not listen on IPv6 (listen = *), but I did 
that and it didn't help (see config).

Here is a cut from the dovecot.info log:

2014-06-08 00:16:25 auth: Debug: auth client connected (pid=3131)

2014-06-08 01:22:10 auth: Debug: Loading modules from directory: 
2014-06-08 01:22:10 auth: Debug: Read auth token secret from 
2014-06-08 01:22:10 auth: Debug: passwd-file /etc/dovecot/passwd: Read 1 
users in 0 secs
2014-06-08 01:22:10 auth: Debug: master in: USER        1       xxxxx 
2014-06-08 01:22:10 auth: Debug: userdb out: NOTFOUND   1

Here is my dovecot config:

# 2.2.9: /etc/dovecot/dovecot.conf
# OS: Linux 3.13.0-24-generic x86_64 Ubuntu 14.04 LTS ext4
auth_debug = yes
auth_debug_passwords = yes
auth_mechanisms = plain cram-md5
auth_verbose = yes
base_dir = /var/run/dovecot/
disable_plaintext_auth = no
info_log_path = /var/log/dovecot.info
listen = *
log_path = /var/log/dovecot
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_location = maildir:/home/vmail/%d/%n/Maildir
passdb {
   args = /etc/dovecot/passwd
   driver = passwd-file
protocols = imap pop3
service auth {
   executable = /usr/lib/dovecot/auth
   unix_listener /var/spool/postfix/private/auth-client {
     group = postfix
     mode = 0666
     user = postfix
   unix_listener auth-userdb {
     group = postfix
     mode = 0777
     user = postfix
   user = vmail
service imap-login {
   chroot = login
   executable = /usr/lib/dovecot/imap-login
   user = dovecot
service imap {
   executable = /usr/lib/dovecot/imap
service pop3-login {
   chroot = login
   executable = /usr/lib/dovecot/pop3-login
   inet_listener pop3 {
     address = *
     port = 110
   inet_listener pop3s {
     address = *
     port = 995
   user = dovecot
service pop3 {
   executable = /usr/lib/dovecot/pop3
ssl = required
ssl_cert = </etc/ssl/certs/smtpd.crt
ssl_key = </etc/ssl/private/smtpd.key
userdb {
   args = uid=vmail gid=vmail home=/home/vmail/%d/%n /etc/dovecot/users
   driver = passwd-file
valid_chroot_dirs = /var/spool/vmail
protocol pop3 {
   pop3_uidl_format = %08Xu%08Xv

I'm sure I've done something stupid, but after thrashing about for some 
days I haven't been able to figure out what it is.


More information about the dovecot mailing list