Remove data from all email accounts


We have a server which have 100,000 email account at diff. host we would like to remove all emails accounts data from each emails but dont want to delete email account is there any command for it.


Tahir Atique



Do you mean delete their email messages without deleting the mail accounts?

YEs is there any option plz confirm

No, there's no current option to remove all the email data without deleting the accounts.

To delete the email, you'd need to delete the contents of the $HOME/Maildir/ directory.

One way to do that would be to write a script which looped over all the accounts whose email you'd like to delete, and have that script remove the contents of that users Maildir directory.

If you have such kind of script please tell me