How do I delete all emails from a Maildir without destroying stuff logs and index?

link|improve this question
1  
-1 Poorly worded question and did no research – Nixphoe Jun 24 '11 at 4:37
feedback

2 Answers

I might be wrong, but I'm pretty sure within the Maildir you can simply delete all files. Log files should be in /var/log/ and indexes you normally want to blow away if you are deleting all the emails. A new index should be created and it will be empty, this operation will be fast.

find <maildirpath> -type f -delete

Am I missing something? You can also google for maildir cleanup scripts that are more sophisticated.

link|improve this answer
feedback
  1. Open the folder with your favorite mail client.

  2. Use whatever shortcuts said client requires for 'select all'.

  3. Choose "delete".

  4. Done.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.