2

Whenever I'm trying to connect to my Dovecot IMAP server, it gives me a message that the authentication was failed. This message is from the /var/log/mail.log file:

Feb  7 15:22:17 celestine dovecot: imap-login: Disconnected (auth failed, 1 attempts in 2 secs): user=<celestine>, method=PLAIN, rip=::1, lip=::1, TLS, session=<QsPvvtbx5AAAAAAAAAAAAAAAAAAAAAAB>

I tried connecting with the Roundcube webmail program, bit in the IMAP log it says the following:

[07-Feb-2014 15:22:15 -0500]: [A4F2] S: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN] Dovecot ready.
[07-Feb-2014 15:22:15 -0500]: [A4F2] C: A0001 ID ("name" "Roundcube" "version" "0.9.5" "php" "5.4.4-14+deb7u7" "os" "Linux" "command" "/")
[07-Feb-2014 15:22:15 -0500]: [A4F2] S: * ID NIL
[07-Feb-2014 15:22:15 -0500]: [A4F2] S: A0001 OK ID completed.
[07-Feb-2014 15:22:15 -0500]: [A4F2] C: A0002 AUTHENTICATE PLAIN AGNlbGVzdGluZQAxMDA5OTU=
[07-Feb-2014 15:22:17 -0500]: [A4F2] S: A0002 NO [AUTHENTICATIONFAILED] Authentication failed.

If I try to connect with another program, it also won't work.

I have SSL enabled so my IMAP server is running on port 993. The following is my /etc/dovecot/dovecot.conf:

disable_plaintext_auth = no
mail_privileged_group = mail
mail_location = mbox:~/mail:INBOX=/var/mail/%u
userdb {
  driver = passwd
}
passdb {
  driver = passwd
}

protocols = "imap"

protocol imap {
  mail_plugins = " autocreate"
}
plugin {
  autocreate = Trash
  autocreate2 = Sent
  autosubscribe = Trash
  autosubscribe2 = Sent
}

service auth {
  unix_listener /var/spool/postfix/private/auth {
    group = postfix
    mode = 0660
    user = postfix
  }
}

ssl = required
ssl_cert = </etc/ssl/localcerts/mail.pem
ssl_key = </etc/ssl/localcerts/mail.key

I'm using Debian Squeeze with Postfix installed.

2
  • Is celestine your login and 100995 actually your password? It should be working.
    – MikeyB
    Feb 7, 2014 at 21:05
  • That's what I thought too, I assume that the IMAP user is the same as the UNIX user?
    – dengsn
    Feb 7, 2014 at 22:14

3 Answers 3

7

Firstly I assume that user celestine (with password 100995) is set up correctly in your system (simply check if a login is successful with no further errors / warnings).

According to your dovecot.conf, you set up your server authentication process using Lookup databases with passwd. That's fine as User Database, but with passwd as Password Database you can't get the user's password on Debian, as stated in the official Dovecot documentation:

hxxp://wiki2.dovecot.org/AuthDatabase/Passwd :

Most commonly used as a user database. Many systems use shadow passwords nowadays so it doesn't usually work as a password database.

You can work around this problem with

passdb {
  driver = shadow
}

Another possiblity would be using passdb with Passwd-file, but I recommend you set up your Dovecot authenticate system using PAM.

Good luck, Megodin

1
  • I'm now using PAM and it actually worked! I didn't know the solution to this was so easy, thanks!
    – dengsn
    Feb 21, 2014 at 19:59
0

I found that my imap server changes all entered usernames to lowercase, and thus there was no user named the name it thought I had written. I made an all lower-case user and it worked fine.

0

Please check CPHulk Brute Force Protection >> History Reports and click on remove blocks and reports, it will fix this issue.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .