These forums are locked and archived, but all topics have been migrated to the new forum. You can search for this topic on the new forum: Search for Delete all mail users data on the new forum.
Hi
Please I would like to delete all users date mail (not accounts) in my virtualmin box.
I using Centos 5 and the default install (default install script).
Once I erased simply the files in the maildir folders and broke the dovecot setup (dovecot cache).
Which is the correct way of doing it?
Thanks in advance.
roberto
Also delete the dovecot cache/index files. ;-)
Dovecot will regenerate its cache files automatically on next login by the user.
--
Check out the forum guidelines!
Thanks for your help, I delete the mail data using:
find /home -type f -mtime $days | xargs rm
This would remove everything over $days days old.
That's remove the dovecot files also.
roberto
Careful with that command -- that won't just delete email, that will delete all user files in /home older than $days.
You may want to have it be more specific about what directories to delete email from -- for example, all the email exists in a directory called "Maildir", you could make sure you're only deleting files from within that.
-Eric