Hello! We've had this same thing happening on our dovecot install. Now and then the imap server stops accepting connections because of the number of imap-login processes. The process_limit for imap-login is set to 1024. Restarting dovecot clears it up for a while.
I turned on verbose_proctitle, and found that the stale processes all say "pre-login". The start times all coincide with an invalid login attempt to the IMAP server. We are using LDAP as our userdb. We are using dovecot-imapd version 1:2.3.13+dfsg1-2 on Debian bullseye. We also had this same thing happen years ago with a similar setup. I never got around to investigating it as much, so I don't know if it's exactly the same, but it did show a bunch of extra imap-login processes, and we would clear it up by restarting dovecot. Should I file a bug report? Thanks! Chad.
