procmail
[Top] [All Lists]

Re: Formail Field Extraction

2000-06-21 08:48:21
2000-06-21-07:01:00 Dave Ewart:
Not quite sure off-hand how to actually remove a header - perhaps use,
e.g. 

formail -I "Subject: " to remove the subject, i.e. make it blank ...

Ayup. From formail(1):

      -I headerfield
            Same as -i, except that any existing similar fields
            are simply removed.  If headerfield consists only of a
            field-name, it effectively deletes the field.

Just tried it out, works exactly as expected. You probably _don't_
want to use

        formail -I "Subject: "

since that carefully creates a Subject: header (replacing any
already existing one) that contains just a blank. However, if you
use the simpler

        formail -I Subject:

it deletes the Subject: header. Seems that the author of formail
didn't particularly consider the whitespace after the : as part of
the header label.

-Bennett

Attachment: pgpvEBWVnVMYu.pgp
Description: PGP signature

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