When logging into webmail you are unable to read mail:
IMAP error reported by server
INTERNAL ERROR
Could not load message from server
You will see this in the /var/log/maillog:
Feb 10 06:41:40 www0 dovecot: service=imap, user=user@example.com, ip=[203.0.113.1]. Fatal: master: service(imap): child 10671 returned error 83 (Out of memory (service imap { vsz_limit=512 MB }, you may need to increase it) - set CORE_OUTOFMEM=1 environment to get core dump)
In this example the size of the file /var/qmail/mailnames/example.com/user/Maildir/dovecot.index.cache is more than the default "vsz_limit" value:
ls -lah /var/qmail/mailnames/example.com/user/Maildir/dovecot.index.cache
-rw------- 1 popuser popuser 750M Feb 27 11:21 /var/qmail/mailnames/example.com/user/Maildir/dovecot.index.cache
You can check if any of your mailbox dovecot.index.cache files are larger than the limit of 512MB using the command below. It will list them all sorted by the smallest to largest (in bytes):
find /var/qmail/mailnames/ -type f -name dovecot.index.cache -exec ls -al {} \; | sort -k 5 -n
To raise the limit create the file: /etc/dovecot/conf.d/zzz_custom.conf and raise it so its higher than the largest index from the command above. Example:
service imap {
vsz_limit = 1024MB
}
Restart dovecot:
systemctl restart dovecot