[Dovecot] Deleting everything left from lazy expunge
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..!
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.
on 5-20-2009 7:26 AM J.P. Trosclair spake the following:
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.
I also have that problem with users. I try and tell them that a trashcan is not a storage container, but unless you set a policy and enforce it, you really can't change their minds.
Max, suggested this: find -type d -name 'expunged' | xargs rm -rf
works swimmingly...
Thanks everyone.
On May 20, 2009, at 8:50 AM, 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..!
participants (3)
-
J.P. Trosclair
-
Romer Ventura
-
Scott Silva