shutdown_clients has no effect on doveadm stop

Roland Rosenfeld rrosenfeld at netcologne.de
Tue Jun 14 15:02:17 UTC 2016


I try to restart dovecot 2.2.24 (for changing limits) without killing
all IMAP and POP3 sessions.

dovecot(1) tells me:
       When shutdown_clients is set to no, existing sessions will continue  to
       use  the  old settings, after a dovecot reload.  Also all sessions will
       keep alive after a dovecot stop.
       By default all active sessions will be shut down.

According to my "dovecot -n" (see below), I have set
"shutdown_clients=no", so "doveadm stop" should keep my open
sessions.

But if I try this out with a simple telnet to port 143 during
"doveadm stop", I see the following:

$ telnet imap 143
Connected to imap.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE AUTH=PLAIN AUTH=LOGIN] Dovecot ready.
a login user at example.com XXXXX
a OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE QUOTA ACL RIGHTS=texk] Logged in
* BYE Server shutting down.
Connection closed by foreign host.

The "BYE Server shutting down." happens exactly at the time, when I
press return after "doveadm stop", "systemctl stop dovecot", or
"systemctl restart dovecot" in the other shell.  Only
"systemctl reload dovecot" keeps the open sessions healthy.

So it seems that either the man page is wrong, or shutdown_clients=no
has no effect after dovecot stop...

Greetings
Roland


dovecot -n

# 2.2.24 (a82c823): /etc/dovecot/dovecot.conf
# Pigeonhole version 0.4.14 (099a97c)
# OS: Linux 3.16.0-4-amd64 x86_64 Debian 8.5 
auth_cache_negative_ttl = 5 mins
auth_cache_size = 100 M
auth_cache_ttl = 15 mins
auth_default_realm = netcologne.de
auth_master_user_separator = *
auth_mechanisms = plain login
auth_verbose = yes
dict {
  acl = mysql:/etc/dovecot/dovecot-dict-sql.conf
}
disable_plaintext_auth = no
listen = *
log_timestamp = "%Y-%m-%d %H:%M:%S "
mail_fsync = always
mail_gid = 999
mail_location = maildir:~/mail
mail_plugins = acl quota zlib
mail_uid = 999
managesieve_notify_capability = mailto
managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date index ihave duplicate mime foreverypart extracttext imapflags
mmap_disable = yes
namespace {
  list = children
  location = maildir:%%h/mail:INDEX=~/mail/shared/%%u
  prefix = shared/%%u/
  separator = /
  subscriptions = no
  type = shared
}
namespace inbox {
  inbox = yes
  location = 
  prefix = 
  separator = /
  type = private
}
passdb {
  args = /etc/dovecot/passwd.master
  driver = passwd-file
  master = yes
  pass = yes
}
passdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
plugin {
  acl = vfile
  acl_shared_dict = proxy::acl
  quota = maildir
  sieve = ~/.dovecot.sieve
  sieve_dir = ~/mail/sieve
  sieve_extensions = +imapflags
  zlib_save = gz
}
pop3_no_flag_updates = yes
pop3_uidl_format = %v.%u
protocols = imap pop3 sieve
service auth {
  unix_listener auth-master {
    group = vmail
    mode = 0600
    user = vmail
  }
}
service dict {
  unix_listener dict {
    group = vmail
    mode = 0600
    user = vmail
  }
}
service imap {
  process_limit = 4000
}
service managesieve-login {
  inet_listener sieve {
    port = 4190
  }
}
service managesieve {
  process_limit = 100
}
service pop3 {
  process_limit = 1000
}
shutdown_clients = no
ssl = no
syslog_facility = local2
userdb {
  args = /etc/dovecot/dovecot-sql.conf
  driver = sql
}
verbose_proctitle = yes
protocol imap {
  mail_max_userip_connections = 10
  mail_plugins = acl quota zlib imap_quota imap_acl
}
protocol pop3 {
  mail_plugins = acl quota zlib
}


More information about the dovecot mailing list