Dovecot login is slow

Mitocariu Emilian mitocariu.emilian at gmail.com
Wed Jun 7 16:34:43 EEST 2017


Hi,

I have an Ubuntu 16.04 server with dovecot 2.2.22 configured as an imap
server with an LDAP backend for authentication. This is the output of
"dovecot -n":
# 2.2.22 (fe789d2): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.13 (7b14904)
# OS: Linux 4.4.0-77-generic x86_64 Ubuntu 16.04.2 LTS
auth_debug_passwords = yes
mail_gid = vmail
mail_location = maildir:~/
mail_privileged_group = mail
mail_uid = vmail
namespace inbox {
  inbox = yes
  location =
  mailbox Drafts {
    special_use = \Drafts
  }
  mailbox Junk {
    special_use = \Junk
  }
  mailbox Sent {
    special_use = \Sent
  }
  mailbox "Sent Messages" {
    special_use = \Sent
  }
  mailbox Trash {
    special_use = \Trash
  }
  prefix =
}
passdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  driver = ldap
}
protocols = imap lmtp
service auth {
  unix_listener /var/spool/postfix/private/auth {
    mode = 0666
  }
}
service lmtp {
  unix_listener /var/spool/postfix/private/dovecot-lmtp {
    group = postfix
    mode = 0600
    user = postfix
  }
}
ssl_cert = </path/to/my/cert
ssl_key = </path/to/my/key
userdb {
  args = /etc/dovecot/dovecot-ldap.conf.ext
  default_fields = home=/var/mail/vmail/%n
  driver = ldap
}

The problem i'm having is that when i try to login it takes more than 10
seconds, making my webmail very slow. For testing i login to imap like this
"openssl s_client -connect localhost:993" and sometimes i get this message
"* OK Waiting for authentication master process to respond..". I saw at
other people, one of the problem was because they didn't disabled pam
authentication when using another backend (like ldap or sql), but i already
did that.

Does anyone know what could cause such long login times and how to fix it?


More information about the dovecot mailing list