External mail attachments storage cleanup

Alexander Moisseev moiseev at mezonplus.ru
Wed Jun 29 16:10:28 UTC 2016


On 29.06.2016 13:06, Николай Мананков wrote:
>  Hi!
>
> Thanks it worked! But only when I have a specific user instead wldcard (i mean -u *@example.org).  Now I think I need to write a script that searches for users in the domain , and starts each of them this command . And apparently it is necessary to add to the cron job..
>

Hi,

The script:
doveadm-expunge - iterates over passwd-file databases, expunges messages in Junk and Trash folders and purges mailboxes for every user.
https://github.com/moisseev/doveadm-tools/blob/master/bin/doveadm-expunge

The crontab entry:
5       4       *       *       *       /usr/local/bin/doveadm-expunge



More information about the dovecot mailing list