Portal Home > Knowledgebase > Articles Database > Deleting All Email From Mailbox


Deleting All Email From Mailbox




Posted by danielj, 12-29-2007, 10:46 AM
Hi I am running cpanel and am trying to delete all mail from one certain mailbox. What is the command for doing this? I thought it was this: # cd /home/USER/mail/ # echo > inbox However that does not seem to work? Thanks in advance.

Posted by fbroce, 12-29-2007, 10:57 AM
I don't know about cpanel but the command line way to do it is: cd /var/mail/ cat /dev/null > user The other paths may be correct in your setup.

Posted by Vinayak_Sharma, 12-29-2007, 11:48 AM
Or install http://www.configserver.com/cp/cmm.html (free) and it will make your life quite easy managing emails on WHM/cPanel server.

Posted by ServerSurgeon George, 12-29-2007, 12:19 PM
did you convert mail to the MailDir format? If it's MailDir then you need to remove all files under: /home/USER/mail/cur /home/USER/mail/new /home/USER/mail/tmp

Posted by bear, 12-29-2007, 02:54 PM
It was (in the old mbox format) echo -n > inbox



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read
what are [loop1] ect.. (Views: 794)
PHP Defunct (Views: 794)


Language:

LoadingRetrieving latest tweet...

Back to Top Copyright © 2018 DC International LLC. - All Rights Reserved.