Mail delete in Qmail: Difference between revisions
Appearance
No edit summary |
|||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
[[category:Qmail]] | |||
==Objective== | ==Objective== | ||
| Line 24: | Line 27: | ||
Or | Or | ||
find /home/vpopmail/domains/jbindia.co.in/harish.kumar/Maildir/* -mtime +5 -exec rm {} \; | find /home/vpopmail/domains/jbindia.co.in/harish.kumar/Maildir/* -mtime +5 -exec rm {} \; | ||
Latest revision as of 11:13, 18 February 2013
Objective[edit]
Sometimes we need to remove mail from mail box in Qmail for/till date. For example I have mail box containing 100G size.I want to remove all mails except leave last 10 days mails.
Just run a command with careful.
find /path/to/files* -mtime +5 -exec rm {} \;
find ------------> command
/path/to/files* -> path of your file
-mtime ---------> command
+5 -------------> leave 5 day mails from current date & remove rest of the mails
rm {} \; -------> files remove command.
Example
find /home/vmail/tetrain.com/subhash/Maildir/* -mtime +5 -exec rm {} \;
Or
find /home/vpopmail/domains/jbindia.co.in/harish.kumar/Maildir/* -mtime +5 -exec rm {} \;