Ok, so I changed in /etc/z-push/imap.conf.php
define('IMAP_EXCLUDED_FOLDERS', 'dovecot.sieve|Archiv|Mailing');
to
define('IMAP_EXCLUDED_FOLDERS', 'dovecot.sieve');
or
define('IMAP_EXCLUDED_FOLDERS', '');
Obviously, z-push.log is much larger now, as it (within a second) works through all folders. But after that second, nothing happens, then I get an error on my phone that e-mails could not be received, as the connection with the server has failed. And minutes later, there is the old error in the log again:
08/12/2017 18:42:51 [ 3138] [FATAL] [user@domain.com] Fatal error: /usr/share/z-push/backend/imap/imap.php:2344 - Allowed memory size of 1073741824 bytes exhausted (tried to allocate 4096 bytes) (1)
Other symptoms are also the same, i.e. long running dovecot-imap (high CPU consumption) and apache2 (high memory consumption) threads on the machine.