procmail
[Top] [All Lists]

Re: Editing incoming data - a technique check

2001-12-25 10:32:16
"Tim Luoma" <luomat(_at_)peak(_dot_)org> writes:

I'm adding the mbox From line and want to rewrite the Xref line if it
is present.  I'm not entirely sure the Xref line is always present bu
wasn't sure how to work a test into the procmail rules.

Not really rewrite Xref but capture it and put it under a different
header.

This will put the Xref header into the X-Save-Xref header ONLY if Xref is 
present

It is just a filtering recipe, not a delivery recipe, which can be done 
afterwards

:0fhw
* ^Xref: \/.*
| formail -I"X-Save-Xref: $MATCH"

My spec was that the recipe add a `From ' header to each message as
well.  If a message comes thru without as Xref header if will bypass
this filter and therefor receive no `From ' header... correct?

So one still needs something extra to get the `From ' header.  Such as
another filter thru a `formail' pipe. Or am I missing the boat here.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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