procmail
[Top] [All Lists]

formail question

2002-04-23 10:26:58
Hi!

        I ran into a problem with formail v3.22, and maybe formail is
missing an argument that deletes ONE particular header and its value,
e.g., the line (extended as it may be).

        If I have header lines as follows:

X-foobar: value1
X-foobar: value2
X-foobar: value3
X-foobar: value4

how do I just delete "X-foobar: value3"?

formail -I X-foobar:  

deletes *all* such headers, and

formail -I "X-foobar: value3"       

deletes all and just appends "X-foobar: value3"!

The following just looks like overkill:

:0
* ()\/X-foobar: ..*
{
    HDR = $MATCH
}

...

:0 fhw
| (formail -X "" | sed "/$LINE/d")

which effectively _only_ kills the X-foobar: header that was previously
matched, leaving the others intact.

Any suggestions?

Thanks,

        --Ralph

Dr. Ralph P. Sobek                Disclaimer: The above ruminations are my own.
Ralph.Sobek @ irit.fr                                     http://www.sobek.org/
sobek @ irit.fr                   Wi-Fi:  http://www.irit.fr/~Ralph.Sobek/wifi
Ph:(+33)[0]561556356   FAX:(+33)[0]561556847   http://www.irit.fr/~Ralph.Sobek/
===============================================================================
Why can't Bush, and Colin Powell, stop Ariel Sharon's violent aggression? Why?
  SPAMMERS Beware: http://www.irit.fr/~Ralph.Sobek/welcome.shtml#Mail-Warning
_______________________________________________
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>