0

I installed Postfix, Dovecot, Roundcube, Postfixadmin on Amazon EC2 Linux.

I configured Postfix, Dovecot, Roundcube and Postfixadmin one-by-one, and I can create new mailbox via Postfixadmin. However, I cannot login the newly created mailbox via Roundcube. The Roundcube log shows:

IMAP Error: Login failed for info@domain.com from 11.22.33.44. AUTHENTICATE PLAIN: Authentication failed. in /var/www/html/roundcube/program/lib/Roundcube/rcube_imap.php on line 193 (POST /roundcube/?_task=login&_action=login)

And for the /var/log/maillog, it shows:

ip-172-31-13-226 dovecot: imap-login: Disconnected (auth failed, 1 attempts in 4 secs): user=, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured, session=

The Dovecot Config is changed as follow ( /etc/dovecot/dovecot.conf ) :

protocols = imap lmtp
dict {
}
!include conf.d/*.conf
!include_try local.conf

And for conf.d/10-mail.conf :

mail_location = maildir:~/Maildir
namespace inbox {
}
mbox_write_locks = fcntl

And for conf.d/10-master.conf :

service imap-login {
  inet_listener imap {
  }
  inet_listener imaps {
  }
}
service pop3-login {
  inet_listener pop3 {
  }
  inet_listener pop3s {
  }
}
service lmtp {
  unix_listener lmtp {
  }
}
service imap {
}
service pop3 {
}
service auth {
  unix_listener auth-userdb {
    user = postfix
    group = postfix
  }
}
service auth-worker {
}
service dict {
  unix_listener dict {
  }
}

for conf.d/10-auth.conf :

disable_plaintext_auth = no
!include auth-system.conf.ext

Last, for conf.d/auth-system.conf.ext :

passdb {
  driver = pam
}
userdb {
  driver = passwd
}

So, what did I config wrong that leads to login failure?


After enabling auth_debug = yes and auth_verbose = yes, here is the log shown in /var/log/maillog:

May 31 02:43:30 ip-11-22-33-44 dovecot: auth: Debug: Loading modules from directory: /usr/lib64/dovecot/auth
May 31 02:43:30 ip-11-22-33-44 dovecot: auth: Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
May 31 02:43:30 ip-11-22-33-44 dovecot: auth: Debug: Read auth token secret from /var/run/dovecot/auth-token-secret.dat
May 31 02:43:30 ip-11-22-33-44 dovecot: auth: Debug: auth client connected (pid=12671)
May 31 02:43:30 ip-11-22-33-44 dovecot: auth: Debug: client in: AUTH#0111#011PLAIN#011service=imap#011secured#011session=2vyhVho0cgB/AAAB#011lip=127.0.0.1#011rip=127.0.0.1#011lport=143#011rport=49266#011resp=<hidden>
May 31 02:43:30 ip-11-22-33-44 dovecot: auth-worker(12673): Debug: Loading modules from directory: /usr/lib64/dovecot/auth
May 31 02:43:30 ip-11-22-33-44 dovecot: auth-worker(12673): Debug: Module loaded: /usr/lib64/dovecot/auth/libdriver_sqlite.so
May 31 02:43:30 ip-11-22-33-44 dovecot: auth-worker(12673): Debug: pam(info@domain.com,127.0.0.1): lookup service=dovecot
May 31 02:43:30 ip-11-22-33-44 dovecot: auth-worker(12673): Debug: pam(info@domain.com,127.0.0.1): #1/1 style=1 msg=Password: 
May 31 02:43:32 ip-11-22-33-44 dovecot: auth-worker(12673): pam(info@domain.com,127.0.0.1): unknown user
May 31 02:43:34 ip-11-22-33-44 dovecot: auth: Debug: client passdb out: FAIL#0111#011user=info@domain.com
May 31 02:43:34 ip-11-22-33-44 dovecot: imap-login: Disconnected (auth failed, 1 attempts in 4 secs): user=<info@domain.com>, method=PLAIN, rip=127.0.0.1, lip=127.0.0.1, secured, session=<2vyhVho0cgB/AAAB>

"Unknown User" error occurred. Seems Dovecot / Roundcube are not reading the same user database. How can I make sure they read the same user database?

  • Does this !include mean that include is commented out? – NickW May 27 '16 at 9:18
  • no. !include means including the files if they exist. Commenting out starts with #. See this – Raptor May 27 '16 at 9:28
  • Try to enable auth_debug=yes. See wiki2.dovecot.org/Logging – masegaloeh May 30 '16 at 19:54
  • Added the debug message in question, can you please help? thanks. – Raptor May 31 '16 at 2:48
  • So passdb { driver = pam }, the user name should be info (without @domain.com). – Taichi Yanagiya May 31 '16 at 16:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.