Neil Blakey-Milner on Mon, 3 Apr 2000 11:52:45 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [CLUG-Tech] procmail


On Mon 2000-04-03 (11:30), Thomas Andrews wrote:
> How do you get procmail (?) to re-mail all messages in a mailbox - say using
> cron ? In other words, behave just like a .forward except that it's done some
> time after the mail has arrived.
> 
> At the moment I'm using elm to "bounce" the messages one-by-one :P

Attached find refilter.sh, which refilters all mail in a specific
mailbox through procmail, so as to achieve the effect you can get in
Outlook to reapply filters to messages in an existing mailbox.

Usage is:
  refilter.sh Mailboxname [ alternativeprocmailrc ]

Simply make a procmail rc file which takes any message and fowards it to
a specific address.

This script cats the existing mailbox to /tmp/something, and then
clears the file.  There is probably a much easier and faster way
of doing it, but I had a reason for this at the time, I think.
The result is that you "lose" the contents of the mailbox, but it
makes sense in the context of the use of this script.

Neil
-- 
Neil Blakey-Milner
nbm@xxxxxxxxxxxxxx

Attachment: refilter.sh
Description: Bourne shell script