Subject: Dovecot 2.4.5 on macOS 27 ARM64: anvil panic with imap-login pid=-1
I am testing Dovecot 2.4.5 on macOS 27 (Darwin 27.0.0), ARM64/Apple Silicon, migrating a working Dovecot 2.3.21.1 installation. IMAP itself appears to be functioning correctly. Authentication succeeds using CRAM-MD5, the userdb resolves the expected uid/gid/home, Maildir is opened correctly, and Roundcube can see all folders and messages. LMTP delivery also works. However, under multiple IMAP connections I repeatedly see anvil receive an imap-login connection with pid=-1: anvil: Warning: conn unix:anvil (uid=0): Handshake with duplicate service=imap-login pid=-1 - replacing the old connection
This can then lead to: anvil: Panic: file anvil-connection.c: line 837: unreached anvil: Fatal: master: service(anvil): child ... killed with signal 6
followed by: anvil: Error: connect limit: disconnection for unknown (pid=..., user=testuser@example.com, service=imap, ...)
With mail_debug=yes, the IMAP process itself looks healthy immediately around the failure. For example: Debug: Effective uid=350, gid=350, home=/private/var/mail/example.com/testuser@example.com
Debug: Namespace inbox: type=private, prefix=, sep=/,
inbox=yes, hidden=no, list=yes, subscriptions=yes
Debug: maildir++:
root=/private/var/mail/example.com/testuser@example.com/Maildir,
inbox=/private/var/mail/example.com/testuser@example.com/Maildir
Apple Mail successfully establishes TLS and authenticates: imap-login: Info: Logged in: user=<testuser@example.com>, method=CRAM-MD5, rip=192.0.2.10, lip=192.0.2.20, TLS
Dovecot's own mailbox tools confirm that the mailboxes and messages exist: # doveadm mailbox list -u testuser@example.com -s Sent Drafts Archive Trash Junk
# doveadm mailbox status -u testuser@example.com \
messages uidvalidity uidnext INBOX Sent
Sent messages=1
INBOX messages=7
I initially experimented with disabling the anvil-auth-penalty listener, but reverted that. The problem also occurs with the stock/default Dovecot 2.4.5 anvil configuration: service anvil { executable = anvil process_limit = 1 process_min_avail = 1
unix_listener anvil {
group = $SET:default_internal_group
mode = 0660
}
unix_listener anvil-auth-penalty {
group = $SET:default_internal_group
mode = 0660
type = penalty
}
unix_listener anvil-connect-limit {
group = $SET:default_internal_group
mode = 0660
type = connect-limit
}
}
The effective default is currently: mail_max_userip_connections = 10
Dovecot 2.3.21.1 on the same ARM64 Mac, using the same users/Maildirs, does not exhibit this problem. The particularly suspicious part seems to be the imap-login pid=-1 registration immediately preceding the anvil failure. Is this a known 2.4.x issue on macOS/ARM64, and is there a supported way in 2.4.5 to disable anvil connection tracking as a workaround while retaining IMAP service? I can provide the complete doveconf -n, full backtrace, and additional debug logging if useful.