Hi everyone,
I’m running Nextcloud using Nextcloud All-in-One (AIO, Docker) and I’m facing a persistent issue with the Mail app.
Problem:
The Mail app keeps throwing the following error repeatedly in the logs:
Horde_Mime_Exception: Message size exceeds maximum permitted
What I already tried:
- Increased PHP limits inside nextcloud-aio-nextcloud container:
- memory_limit = 2G
- upload_max_filesize = 2G
- post_max_size = 2G
- max_execution_time = 3600
- Restarted the container and verified via
php -i(values are applied correctly) - Set Mail app limit:
php occ config:app:set mail max_message_size --value=50 - Restarted Nextcloud again
Current behavior:
- The error still appears in
nextcloud.log - It seems the Mail app keeps trying to parse an existing large email
- CLI commands like
mail:account:listare not available in my setup mail:account:debugrequires an account-id, but there is no clear way to list account IDs via occ
Questions:
- What is the recommended way to identify the specific email (UID / folder) that causes Horde_Mime_Exception?
- Is there an official way to list mail account IDs via occ in current Mail app versions?
- Should lowering
mail max_message_sizeskip already-existing large emails automatically, or is manual intervention required? - Is deleting / moving the large email from the IMAP server the only supported fix?
Environment:
- Nextcloud: AIO (Docker)
- Mail app: enabled (default AIO version)
- PHP-FPM inside container
- Database: PostgreSQL (AIO)
Any guidance from maintainers or users who faced the same issue would be greatly appreciated.
Thanks in advance!

