mbox-prune
mbox-prune --days XX file...
This program will remove emails older than the specified number of days from the mbox files given on the command line.
A simple cleaning of a spam folder:
mbox-prune --verbose --days 15 ~/mail/spam
For the adventurous on a small system (wildcards expansion limitations):
mbox-prune --verbose --days 30 /var/mail/*
To prune a ``spam'' folder in each users home directory:
find /home -maxdepth 2 -type f -name spam -print0 | xargs -0 -r mbox-prune --verbose --days 30
If this program exits with a zero exit status and the correct output is on standard output. Nothing else should be printed to standard output.
This program will exit with a non-zero exit status if there was a fatal error. Both fatal and non-fatal errors will cause output on standard error.
Mark Suter <suter@humbug.org.au>
Copyright (C) 2003 Mark Suter <suter@humbug.org.au>
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA or from the following webpage.
http://www.gnu.org/licenses/gpl.txt