Dovecot does not start on MacOS 12.01
I've been happily running Dovecot on my Mac for many years (installed via Homebrew). After upgrading to Monterey (MacOS 12.01), it no longer starts:
$ sw_vers ProductName: macOS ProductVersion: 12.0.1 BuildVersion: 21A559
$ uname -a Darwin dfelicia-mac 21.1.0 Darwin Kernel Version 21.1.0: Wed Oct 13 17:33:23 PDT 2021; root:xnu-8019.41.5~1/RELEASE_X86_64 x86_64
$ sudo dovecot -F Oct 27 10:11:18 service(log): Fatal: setrlimit(RLIMIT_DATA, 268435456): Invalid argument
$ mount /dev/disk1s2s1 on / (apfs, sealed, local, read-only, journaled) devfs on /dev (devfs, local, nobrowse) /dev/disk1s5 on /System/Volumes/VM (apfs, local, noexec, journaled, noatime, nobrowse) /dev/disk1s3 on /System/Volumes/Preboot (apfs, local, journaled, nobrowse) /dev/disk1s6 on /System/Volumes/Update (apfs, local, journaled, nobrowse) /dev/disk1s1 on /System/Volumes/Data (apfs, local, journaled, nobrowse)
$ sudo dovecot -n
2.3.16 (7e2e900c1a): /usr/local/etc/dovecot/dovecot.conf
Pigeonhole version 0.5.16 (09c29328)
OS: Darwin 21.1.0 x86_64 apfs
Hostname: dfelicia-mac
default_internal_group = mail default_internal_user = _dovecot default_login_user = _dovenull first_valid_uid = 100 listen = 127.0.0.1 log_path = /var/log/dovecot.log mail_location = maildir:/usr/local/var/mail/%u 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 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 { args = login driver = pam } protocols = imap service imap-login { inet_listener imap { address = 127.0.0.1 port = 143 } inet_listener imaps { address = 127.0.0.1 ssl = no } } ssl = no userdb { driver = passwd }
$ ulimit -Ha core file size (blocks, -c) unlimited data seg size (kbytes, -d) unlimited file size (blocks, -f) unlimited max locked memory (kbytes, -l) unlimited max memory size (kbytes, -m) unlimited open files (-n) unlimited pipe size (512 bytes, -p) 1 stack size (kbytes, -s) 65532 cpu time (seconds, -t) unlimited max user processes (-u) 2784 virtual memory (kbytes, -v) unlimited
Same issue in 2.3.17
dovecot-2.3.17.tar.gz: ./configure --prefix=/usr/local/Cellar/dovecot/2.3.17 --libexecdir=/usr/local/Cellar/dovecot/2.3.17/libexec --sysconfdir=/usr/local/etc --localstatedir=/usr make install
dovecot-2.3-pigeonhole-0.5.17.tar.gz: ./configure --with-dovecot=/usr/local/Cellar/dovecot/2.3.17/lib/dovecot --prefix=/usr/local/Cellar/dovecot/2.3.17 make make install
sudo /usr/local/opt/dovecot/sbin/dovecot -F Warning: fd limit (ulimit -n) is lower than required under max. load (256 < 1000), because of default_client_limit Oct 28 12:08:48 service(log): Fatal: setrlimit(RLIMIT_DATA, 268435456): Invalid argument
Different:
Nov 01 08:44:36 master: Error: service(imap-login): command startup failed, throttling for 8.000 secs Nov 01 08:44:36 imap-login: Fatal: master: service(imap-login): child 17371 returned error 89 (Fatal failure)
On Mon, 1 Nov 2021 14:55:25 +0200, Aki Tuomi said:
I think this is happening because MacOS no longer supports RLIMIT_DATA.
I just tried on macOS 12.1 beta and getrlimit(RLIMIT_DATA) gives RLIM_INFINITY for both current and max (and so does my macOS 10.14 box).
On Monterey, using setrlimit() to reduce 'current' works for large numbers, but does return error for low numbers. On my hardware at least, it starts to return error around 419 GB.
Sean
participants (3)
-
Aki Tuomi
-
Don Feliciano
-
Sean McBride