procmail
[Top] [All Lists]

Adding a new header and then some.

1999-10-25 15:35:46
Hi,
I was wondering how to get procmail to add an extra field in the header of
each of the mail it triggers? It should add the line "X-List: foo" to the
header.

A psuedo procmailrc:

VERBOSE=off
MAILDIR=$HOME/mail
PMDIR=$HOME/.procmail
LOGFILE=$PMDIR/log
SHELL=/bin/sh
DATESTAMP=`date +"%m%y"`

:0:
* ^To:(_dot_)*port-alpha(_at_)NetBSD(_dot_)ORG
1) Add "X-List: port-alpha" field to the header.
2) Save it to the port-alpha.$DATESTAMP folder in my $MAILDIR.
3) Pipe a copy of the complete message to an external mailprocessing
   program called "foo" on stdout.

[..]
Lots of other similar mailinglist recipes. 

:0:
(Normal mail that should be delivered to my default inbox.)
1) Add "X-List: inbox" field to the header.
2) Save it to my $DEFAULT inbox.
3) Pipe a copy of the complete message to the external program.


Anyone want to show me how simple this is to accomplish? :)

-- 
Jörgen Pehrson  jp(_at_)spektr(_dot_)eu(_dot_)org  http://spektr.eu.org/~jp/
-----------------------------------------------------------
"Bill Gates and Richard Stallman Meet in Airport; Thousands
Killed in Resulting Explosion. News at 11."

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