Automatically Clean Emails
-
Hello
I would like to empty my mailboxes.
Is there a way to automatically remove old emails ? If not is there a way to manually remove all the emails easily ?
I have 100+ mailboxes so complicated to connect to each one to empty every month
Thanks
Tristan
-
@tgatellier You can use
doveadm expunge
. There is no UI for this, so you have to SSH and run this like so:docker exec -ti mail doveadm -D expunge -u mail@domain.com mailbox Sent savedbefore 1w
The above deletes all mails in the Sent folder that were saved more than 1 week ago.
See https://doc.dovecot.org/3.0/man/doveadm-expunge.1/ and https://doc.dovecot.org/3.0/man/doveadm-search-query.7/#man-7-doveadm-search-query
-
This post is deleted!
-
@tgatellier totally agree, I discussed in a previous post: need some UI to cleanup all trashed email from ALL mailboxes, or have feature like Gmail or similars 30 days delete after trash
-
Thanks for command line will use it and tell you, but an UI feature will be better for my non tech team
-