<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Hi,</p>
    <p>We have growing imap-login processes until we reach the max
      processes.<br>
    </p>
    <p>This occurs when a particular user have a login error due to our
      LDAP misconfiguration:</p>
    <p>---<br>
      <font face="monospace">Mar  4 14:59:33 hera dovecot[2226963]:
        auth: Error:
        plain(john.doe,XX.XX.XX.XX,<13C0eBP2354lqXpO>): user not
        found from any userdbs                Â <br>
        Mar  4 14:59:33 hera dovecot[2226963]: imap: Error: auth-master:
        login: request [1001652225]: Login auth request failed:
        Authenticated user not found from <br>
        userdb, auth lookup id=1001652225 (auth connected 2 msecs ago,
        request took 1 msecs, client-pid=2235348
        client-id=1)                                      Â <br>
        Mar  4 14:59:33 hera dovecot[2226963]: imap-login: Internal
        login failure (pid=2235348 id=1): user=<ohn.doe>,
        method=PLAIN, rip=XX.XX.XX.XX, lip=18<br>
        5.233.100.1, mpid=2235359, TLS, session=<13C0eBP2354lqXpO><br>
        ---</font><br>
    </p>
    <p>The origin of is issue is when <span
        style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">passdb finds
          the user and userdb not.</span> The result is imap-login
        processes with no timeout growing until we reach the max
        processes.</span></p>
    <ul>
      <li>OS version</li>
    </ul>
    <p>Debian stable - Bullseye</p>
    <ul>
      <li>Dovecot version<br>
      </li>
    </ul>
    <p><span style="font-family:monospace"><span
          style="color:#000000;background-color:#ffffff;">dpkg -l |grep
          dovecot
        </span><br>
        ii Â dovecot-antispam Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 2.0+20171229-1+b7
        Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â amd64 Â Â Â Â Â Â Â Dovecot plugins for training
        spam filters
        <br>
        ii Â dovecot-common Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1:2.1.7-7+deb7u1
        Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â all Â Â Â Â Â Â Â Â Â Transitional package for
        dovecot
        <br>
        ii Â dovecot-core Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1:2.3.13+dfsg1-2+deb11u1
        Â Â Â Â Â Â Â Â Â Â Â Â Â amd64 Â Â Â Â Â Â Â secure POP3/IMAP server - core files
        <br>
        ii Â dovecot-core-dbgsym Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1:2.3.13+dfsg1-2+deb11u1
        Â Â Â Â Â Â Â Â Â Â Â Â Â amd64 Â Â Â Â Â Â Â debug symbols for dovecot-core
        <br>
        ii Â dovecot-imapd Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1:2.3.13+dfsg1-2+deb11u1
        Â Â Â Â Â Â Â Â Â Â Â Â Â amd64 Â Â Â Â Â Â Â secure POP3/IMAP server - IMAP daemon
        <br>
        ii Â dovecot-imapd-dbgsym Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1:2.3.13+dfsg1-2+deb11u1
        Â Â Â Â Â Â Â Â Â Â Â Â Â amd64 Â Â Â Â Â Â Â debug symbols for dovecot-imapd
        <br>
        ii Â dovecot-ldap Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1:2.3.13+dfsg1-2+deb11u1
        Â Â Â Â Â Â Â Â Â Â Â Â Â amd64 Â Â Â Â Â Â Â secure POP3/IMAP server - LDAP support
        <br>
        ii Â dovecot-managesieved Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1:2.3.13+dfsg1-2+deb11u1
        Â Â Â Â Â Â Â Â Â Â Â Â Â amd64 Â Â Â Â Â Â Â secure POP3/IMAP server - ManageSieve
        server
        <br>
        ii Â dovecot-mysql Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1:2.3.13+dfsg1-2+deb11u1
        Â Â Â Â Â Â Â Â Â Â Â Â Â amd64 Â Â Â Â Â Â Â secure POP3/IMAP server - MySQL
        support
        <br>
        ii Â dovecot-pop3d Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1:2.3.13+dfsg1-2+deb11u1
        Â Â Â Â Â Â Â Â Â Â Â Â Â amd64 Â Â Â Â Â Â Â secure POP3/IMAP server - POP3 daemon
        <br>
        ii Â dovecot-sieve Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 1:2.3.13+dfsg1-2+deb11u1
        Â Â Â Â Â Â Â Â Â Â Â Â Â amd64 Â Â Â Â Â Â Â secure POP3/IMAP server - Sieve
        filters support<br>
        <br>
      </span></p>
    <ul>
      <li><span style="font-family:monospace"><span
            style="color:#000000;background-color:#ffffff;">doveconf -n<br>
          </span></span></li>
    </ul>
    <p><span style="font-family:monospace">---<br>
        # 2.3.13 (89f716dc2): /etc/dovecot/dovecot.conf
        <br>
        # Pigeonhole version 0.5.13 (cdd19fe3)
        <br>
        doveconf: Warning: service auth { client_limit=1000 } is lower
        than required under max. load (4096)
        <br>
        doveconf: Warning: service anvil { client_limit=1000 } is lower
        than required under max. load (4099)
        <br>
        # OS: Linux 5.10.0-21-cloud-amd64 x86_64 Debian 11.6 ext4
        <br>
        # Hostname: XXX<br>
        auth_mechanisms = plain login
        <br>
        default_process_limit = 1024
        <br>
        first_valid_gid = 8
        <br>
        first_valid_uid = 109
        <br>
        last_valid_gid = 8
        <br>
        last_valid_uid = 109
        <br>
        login_greeting = XXX listening.
        <br>
        mail_access_groups = mail
        <br>
        mail_gid = 8
        <br>
        mail_location = maildir:/srv/vmail/%d/%n
        <br>
        mail_privileged_group = mail
        <br>
        mail_uid = 109
        <br>
        managesieve_notify_capability = mailto
        <br>
        managesieve_sieve_capability = fileinto reject envelope
        encoded-character vacation subaddress comparator-i;ascii-numeric
        relational regex imap4flags copy i<br>
        nclude variables body enotify environment mailbox date index
        ihave duplicate mime foreverypart extracttext imapflags notify
        imapsieve vnd.dovecot.imapsieve<br>
        vnd.dovecot.filter
        <br>
        namespace inbox {
        <br>
        Â inbox = yes
        <br>
        Â location = Â <br>
        Â mailbox Drafts {
        <br>
        Â Â Â special_use = \Drafts
        <br>
        Â }
        <br>
        Â mailbox Junk {
        <br>
        Â Â Â special_use = \Junk
        <br>
        Â }
        <br>
        Â mailbox Sent {
        <br>
        Â Â Â special_use = \Sent
        <br>
        Â }
        <br>
        Â mailbox "Sent Messages" {
        <br>
        Â Â Â special_use = \Sent
        <br>
        Â }
        <br>
        Â mailbox Trash {
        <br>
        Â Â Â special_use = \Trash
        <br>
        Â }
        <br>
        Â prefix = Â <br>
        }
        <br>
        passdb {
        <br>
        Â args = /etc/dovecot/dovecot-ldap.conf
        <br>
        Â driver = ldap
        <br>
        }
        <br>
        passdb {
        <br>
        Â args = /etc/dovecot/dovecot-ldap-girondix.conf
        <br>
        Â driver = ldap
        <br>
        }
        <br>
        passdb {
        <br>
        Â args = /etc/dovecot/dovecot-oauth2.conf.ext
        <br>
        Â driver = oauth2
        <br>
        Â mechanisms = xoauth2 oauthbearer
        <br>
        }
        <br>
        plugin {
        <br>
        Â quota_rule = *:storage=100M
        <br>
        Â quota_rule2 = Trash:storage=10%%
        <br>
        Â recipient_delimiter = +
        <br>
        Â sieve = /srv/vmail/%d/%n/dovecot.sieve
        <br>
        Â sieve_default = /var/lib/dovecot/sieve/default.sieve
        <br>
        Â sieve_dir = /srv/vmail/%d/%n/sieve
        <br>
        Â sieve_extensions = +notify +imapflags +vnd.dovecot.filter
        <br>
        Â sieve_filter_bin_dir = /usr/lib/dovecot/sieve-filter
        <br>
        Â sieve_global_extensions = +vnd.dovecot.pipe
        <br>
        Â sieve_max_script_size = 1M
        <br>
        Â sieve_pipe_bin_dir = /etc/dovecot/sieve
        <br>
        Â sieve_pipe_socket_dir = sieve-pipe
        <br>
        Â sieve_plugins = sieve_imapsieve sieve_extprograms
        <br>
        Â sieve_redirect_envelope_from = orig_recipient
        <br>
        }
        <br>
        protocols = imap pop3 sieve
        <br>
        service auth {
        <br>
        Â unix_listener /var/spool/postfix/private/auth {
        <br>
        Â Â Â group = mail
        <br>
        Â Â Â mode = 0600
        <br>
        Â Â Â user = postfix
        <br>
        Â }
        <br>
        Â unix_listener auth-master {
        <br>
        Â Â Â group = mail
        <br>
        Â Â Â mode = 0660
        <br>
        Â Â Â user = vmail
        <br>
        Â }
        <br>
        Â unix_listener auth-userdb {
        <br>
        Â Â Â group = mail
        <br>
        Â Â Â mode = 0600
        <br>
        Â Â Â user = vmail
        <br>
        Â }
        <br>
        }
        <br>
        service imap-login {
        <br>
        Â inet_listener imap {
        <br>
        Â Â Â port = 0
        <br>
        Â }
        <br>
        }
        <br>
        service imap {
        <br>
        Â vsz_limit = 1 G
        <br>
        }
        <br>
        service lmtp {
        <br>
        Â executable = lmtp -L
        <br>
        Â process_min_avail = 2
        <br>
        }
        <br>
        service pop3-login {
        <br>
        Â inet_listener pop3 {
        <br>
        Â Â Â port = 0
        <br>
        Â }
        <br>
        }
        <br>
        ssl_cert = </srv/letsencrypt/pem/mail.aquilenet.fr.pem
        <br>
        ssl_client_ca_dir = /etc/ssl/certs
        <br>
        ssl_dh = # hidden, use -P to show it
        <br>
        ssl_key = # hidden, use -P to show it
        <br>
        userdb {
        <br>
        Â args = /etc/dovecot/dovecot-ldap.conf
        <br>
        Â driver = ldap
        <br>
        }
        <br>
        userdb {
        <br>
        Â args = /etc/dovecot/dovecot-ldap-girondix.conf
        <br>
        Â driver = ldap
        <br>
        }
        <br>
        protocol lmtp {
        <br>
        Â auth_username_format = %n
        <br>
        Â info_log_path = /var/log/dovecot-lmtp.log
        <br>
        Â mail_plugins = " sieve"
        <br>
        }
        <br>
        protocol lda {
        <br>
        Â mail_plugins = " mailbox_alias sieve"
        <br>
        }
        <br>
        protocol imap {
        <br>
        Â imap_client_workarounds = delay-newmail tb-extra-mailbox-sep
        <br>
        Â imap_idle_notify_interval = 30 secs
        <br>
        Â mail_max_userip_connections = 50
        <br>
        Â mail_plugins = quota Â mailbox_alias imap_quota
        <br>
        }
        <br>
        protocol pop3 {
        <br>
        Â mail_plugins = quota mailbox_alias acl
        <br>
        Â pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
        <br>
        }</span><br>
      <span style="font-family:monospace"><span
          style="font-family:monospace">---</span></span><span
        style="font-family:monospace"></span></p>
  </body>
</html>