Jump to content

Mail delete in Qmail: Difference between revisions

From TetraWiki
Line 24: Line 24:
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 {} \;

Revision as of 11:11, 18 February 2013

Objective

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 {} \;