procmail
[Top] [All Lists]

Re: archive old mail (formail?)

1997-03-26 23:32:12
Well, I seem to have solved my own problem.  Thanks to a message posted
by 
Philip Kizer <pckizer(_at_)tamu(_dot_)edu>, I now know what c-client uses as a
specification for mh-style mailboxes.  Briefly:

You can point pine to an mh folder by using '#mh/folder'.  This will
also work when requesting a folder from the imap server distributed with
the imap-4.1.BETA distribution (from the University of Washington
folks).  That is, if you're connected to the server, then:

  A001 SELECT #mh/inbox

will select your mh inbox folder.

This means that:

(a) I can have procmail filter mail into mh mailfolders and still use
pine locally, and an IMAP client remotely, to access them.

(b) I can use mh commands to manipulate the mailboxes; my personal
favorite, used on the folders receiving the bulk of my log mail:

  rmm `pick +log_folder -before -5`

To get rid of messages more than 5 days old.  This was my primary
motivation for moving to mh -- the log files tend to grow much too fast
if left to their own devices.  That rmm command can be stuck in a
crontab and executed nightly for automatic mail management.

The pick command is very flexible, and can select messages based on both
date and regular expression matches (arbitrary header fields or full
message).  I know some folks on this list have been working on a similar
solution; if you're willing to put a little time into setting things up,
this works nicely.

-- Lars

---
Lars Kellogg-Stedman * lars(_at_)bu(_dot_)edu * (617)353-8277
Boston University Office of Information Technology

<Prev in Thread] Current Thread [Next in Thread>