Jump to content

Mail delete in Qmail

From TetraWiki
Revision as of 10:51, 18 February 2013 by Subhash (talk | contribs) (Created page with "==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 ...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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.