[PLUG] automatic mailbox pruning?

Terry Griffin griffint at pobox.com
Fri Feb 3 21:19:15 UTC 2006


> I'm having a hard time framing this question in a way to get helpful
> results from freshmeat or google. Either an answer or ... something to
> help with the 'framing' would be useful.
>
> The problem is that we've several users with very large email mailbox
> files on an older sendmail server. I want to automatically remove old
> messages (say, older than a month), so the mail file stays 'relevant.'  If
> it were a Maildir like on our qmail server, the solution would be
> relatively trivial (using find, delete messages older than a month).
>
> I don't see a way to disable "leave messages on server," which would solve
> half of the problem. Could I run a mutt script to remove them? Is there an
> easier way?
>
> I don't want to bounce messages, which would happen with a quota solution.
>  Patching sendmail on this server is an option, but "upgrading to qmail"
> isn't, at the moment (my credibility has taken a hit with the qmail issues
> lately).
>

There's a utility called archmbox that might do what you want.
(http://adc-archmbox.sourceforge.net/). You'd have to set up a
cron job to run it periodically. I use it this way to automatically
prune spam quarantine folders.

WARNING: archmbox is implemented in perl, and some of the perl modules
it uses have behaviors that are dependent on your LANG setting. I find
for example that if LANG is set to en_US.UTF-8 (a typical default) them
archmbox has difficulty parsing mail boxes, in particular when those
mail boxes have non-English email as you might find in a spam quarantine
folders. I find I can avoid trouble if I do this before running archmbox:

   export LANG=en_US

Terry





More information about the PLUG mailing list