[Dovecot] Dovecot extremely slow!

Patricio Rojo pato at oan.cl
Thu Sep 26 17:47:44 EEST 2013

Thanks all for the quick and knowledgeable replies!

More details on my system:
* Debian 7.1 server hosting many daemons which do not show any slow 
behavior at all (apache, postfix, nfs, autofs, ssh, ...), nor is it slow 
to run any application for test (no resource intensive application is 
run routinely on this machine due to its low  4Gb RAM, in any case)
* /home partition nfs mounted from a remote firewalled QNAP NAS server 
(TS-869U-RP), which also serves other machines (RAID-5 setup with 
currently no bad disks). When logging in as user in any of those 
machines including the dovecot server, I notice no delay (remember that 
dovecot hangs for 60 or more seconds). Also, the inbox hangs as often as 
the imap folders, but the former is found on local disk on /var/mail.
* user authentification using ldap with a daemon hosted on a different 
server than dovecot's (and firewalled from the outside)
* the logs files give no warnings or errors other than the typical 
failed connection attempts from chinese or so hackers.  I do however, 
find the following lines in mail.log every once in a while:

Sep 26 11:02:20 wasabi dovecot: imap(pato): Disconnected: Disconnected in IDLE in=8017978 out=490892

Sep 26 11:02:21 wasabi dovecot: imap-login: Login: user=<pato>, method=PLAIN, rip=, lip=, mpid=3964, TLS, session\


Sep 26 11:03:23 wasabi dovecot: imap-login: Disconnected (no auth attempts in 1 secs): user=<>, rip=, lip=, TLS, \


Sep 26 11:03:26 wasabi dovecot: imap-login: Login: user=<pato>, method=PLAIN, rip=, lip=, mpid=3973, TLS, session\


Sep 26 11:05:00 wasabi dovecot: imap(pato): Disconnected: Disconnected in IDLE in=1205 out=28366

note how it receives a 'user=<>' from the same ip it received a valid 
user a minute ago (and this is the timescale of my problem).
* When the problem started I did a lot of rather simultaneous changes to 
my system (change the hardware of my dovecot's host, moved the ldap 
daemon from the dovecot machine to a firewalled machine, installed the 
QNAP NAS, updated CA certificate ...), so it is hard to pinpoint the 
cause of this.  Every other daemon is working as good as it was before, 
* 'doveconf -n' output is below.

Thank you very much!!


PS: Please warn me if any of the information I have given can be used to 
exploit my system. I have tried to be very careful with this

# 2.1.7: /etc/dovecot/dovecot.conf
# OS: Linux 3.2.0-4-amd64 x86_64 Debian 7.1
mail_location = mbox:~/mail:INBOX=/var/mail/%u
mail_privileged_group = mail
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 {
   driver = pam
protocols = " imap"
service auth {
   inet_listener {
     port = 12345
   unix_listener /var/spool/postfix/private/auth {
     group = postfix
     mode = 0666
     user = postfix
ssl_cert = </etc/dovecot/wasabi.imap.crt
ssl_key = </etc/dovecot/private/wasabi.imap.nopwd.key
userdb {
   driver = passwd

More information about the dovecot mailing list