procmail
[Top] [All Lists]

Re: Can I change the subject?

2002-01-26 14:06:47
Stig Brautaset suggested to Pun Kuan Tou,

| Maybe this will do, although I expect the regulars here to come up with
| a one-liner that will do the whole thing more efficiently:
|
| :0 i
| tmp=|formail -Xc"Subject:"
| :0 af
| |formail -I"$tmp"

That will work if you change -Xc to -cX.  It would also be good to use `h'
and not to use `i' on the first recipe and to add `h' alongside `a' and `f'
on the second.  However, yes, it can be done with only one call to formail,
because of the way procmail extracts into MATCH within the head (it changes
the newline of a header continuation into a space):

 :0hfw
 * ^\/Subject:.+
 | formail -I"$MATCH"



_______________________________________________
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>