Frequently Asked Question

Dovecot
Last Updated 6 days ago

Dovecot (and optionally VirtualMin)

Sometimes its necessary to purge old email from mailboxes given a period of time. This is most likely to remove old Spam or Deleted email but more importantly it can be used to enforce Quota's of INBOX.

This can simply be done with a shell command using doveadm

doveadm -v expunge -u someone.somedomain mailbox INBOX SAVEDBEFORE 52W

Here we're going to delete INBOX messages older than 52 weeks from someone.somedomain (or someone@somdomain depending on your configuration).

You can easily hack this around to delete from mailbox Spam for example.

Finally, you can PURGE (permenantly delete) everything that's been expurged using the command

doveadm purge -u someone.somdomain

(or someone@somdomain depending on configuration)

This is a fairly final process so its worth testing it out on a junk mailbox first to make sure you've got everything working before throwing it live. Just sayin is all.

This website relies on temporary cookies to function, but no personal data is ever stored in the cookies.
OK
Powered by GEN UK CLEAN GREEN ENERGY

Loading ...