6 Nov
2024
6 Nov
'24
2:51 p.m.
I have just moved from cyrus-imap to dovecot. In cyrus I had an automatic purge of messages marked as deleted with a cron job:
/usr/lib/cyrus-imapd/cyr_expire -E 1 -X 7 -D 7
-E = Expire Days -X = Expunge days
What is the equivalent in doveadm?
doveadm expunge -A DELETED BEFORE 1w
Is there any equivalent to expire messages marked as deleted? I can't remember why I have it as I set up Cyrus so long ago.
I also delete from deleted (INBOX.trash) anything older than a year. In Cyrus, it is run from an event in the configuration:
trashPurge cmd="ipurge -s -X -f -d 365 user/*/Trash" at=0104
I would be happy to run it from cron, so does this work:
doveadm expunge -A mailbox INBOX.trash SENTBEFORE 52w
Except I get:
doveadm(nobody): Error: mkdir(/nonexistent/.Maildir) failed:
Permission denied (euid=65534(nobody) egid=65534(nogroup))
I can run it for the individual users but not -A.
Nick