[TriLUG] mbox cleanup
jason at monsterjam.org
jason at monsterjam.org
Mon Dec 4 16:38:04 EST 2006
not sure about mbox, but I currently do exactly this same thing with Maildir mailboxes in a cron job.
#!/bin/sh
find /home/luser/Maildir/cur/* -mtime +14 -exec rm {} \; ; done
find /home/luser/Maildir/new/* -mtime +14 -exec rm {} \; ; done
deletes emails older than 14 days old.
if youre procmailing the mail, you can set procmail to write to Maildir format.
Jason
On Mon, Dec 04, 2006 at
04:12:10PM -0500, Brian Henning
wrote:
> Hi Gang,
> What's a quick and easy command-line (i.e. cron-able) tool to take an
> mbox file and delete messages received prior to a given date?
>
> The idea is to clean out our two spam-catching mailboxes so that they
> only hold, say, the past two months' worth of activity.
>
> Thanks!
> ~Brian
>
> --
> ----------------
> Brian A. Henning
> strutmasters.com
> 336.597.2397x238
> ----------------
> --
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> TriLUG Organizational FAQ : http://trilug.org/faq/
> TriLUG Member Services FAQ : http://members.trilug.org/services_faq/
--
================================================
| Jason Welsh jason at monsterjam.org |
| http://monsterjam.org DSS PGP: 0x5E30CC98 |
| gpg key: http://monsterjam.org/gpg/ |
================================================
More information about the TriLUG
mailing list