Romer Ventura wrote:> Hello,
>
> My storage is running low and i was wondering what would be the best
> and easy way of deleting everything within the "deleted" and
> "expunged" folders for every user...?
>
> My mail resides in: /srv/mail/vmail/MYDOMAIN.COM/<users>/Maildir/
>
> Thanks..!
You can probably just delete everything in the respective maildir
folders (.../<users>/Maildir/[.Deleted|.Expunged]) on the file system
for each user without trouble. I've personally just wiped entire maildir
folders before (in a development environment) without a noticeable problem.
I've just executed (with dovecot running):
rm -rf cur/ new/ *.index*
on the inbox of a user on a development server, then logged in with IMAP
and dovecot re-created the necessary files and folders, no errors in the
logs. I'd still test it on a fake account on your server to how your
version of dovecot behaves before committing to this action.
Also, your users might not be too happy with you if you wipe their
deleted mail, but that's between you and them. The deleted items folder
is synonymous to "My Personal Email Archive" for most of our users.