Redirecting email to a script
Cameron Simpson
cs at zip.com.au
Mon Dec 13 02:19:34 UTC 2004
On 12:21 12 Dec 2004, Robert Canary <phantom at ohiocounty.net> wrote:
| Thanks. So procmail is the key here to allot of
| issues I guesss. Hmmm, I could have allot of fun
| with this.
Indeed. But for just filing most messages it's complicated and tedious.
So see this:
http://freshmeat.net/projects/cats2procmailrc/
which is a filter to general procmailrcs for the simple cases; you can
still plug in raw procmail for complicated things. However, most "file
this list traffic to folder X" rules are simple one-test boilerplate.
So my cats2procmailrc rule for this list is:
unix RH-List redhat-list at redhat.com
which generated this procmail clause:
: 0
* ^(to|cc|bcc):.*\<redhat-list at redhat\.com\>
{
:0whf
| formail -f -A 'X-Label: RH-List'
: 0
unix/
}
That and a makefile lets me file most stuff with a single line rule.
Handy.
Disclaimer: yeah, I wrote this.
Cheers,
--
Cameron Simpson <cs at zip.com.au> DoD#743
http://www.cskk.ezoshosting.com/cs/
1993 Explorer - Cage? Hell, it's a prison. - Will Hartung vfr750 at netcom.com
More information about the redhat-list
mailing list