procmail
[Top] [All Lists]

Re: Checking if a header exists

2008-12-03 10:58:25
At 08:39 2008-12-03 -0700, his gooey kreminess wrote:
:0fw
| formail -i"Status: RO"-i"X-Kreme: NO"

Make sure there's whitespace between the closing quotes of the first argument and the second. Otherwise, you're likely to end up with the second header just being part of the first (and with a -i in there to boot).

I'll betcha that fixes your problem.

however, the header isn't getting added.  I'm pretty sure I've seen
that syntax of adding multiple headers before (although all the
example I can find are using -I instead of -I; but that shouldn't
matter, should it?) but something must be wrong.

The casing has to do with whether any existing header is preserved by renaming, or if it is simply replaced. -a, -A, -i, -I all perform a similar function (adding headers), but they handle the presence of existing headers in different ways. -i should be fine in your instance.

---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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