Remove all Mail from all addresses on an account

From brokenpoet.org wiki

This is pretty straight-forward. You simply go into the users main mail directory (ie: /home/user/mail) and run this command. It looks for anything that is a series of numbers followed by a period followed by more numbers followed by the test 'mbox' - like this:


1156930467.000029.mbox:2,'


Anyway, here is the script - careful - it will removal ALL mail, not just the Catch-All mail:


for mail in $(find -type f | awk '/[0-9]*\.[0-9]*\.mbox/');do rm -vf $mail;done
Personal tools