procmail
[Top] [All Lists]

Re: Formail Field Extraction

2000-06-21 08:53:10
On Wednesday, 21.06.2000 at 10:41 -0400, Bennett Todd wrote:

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.

Yes, of course, good point - that'll teach me to post before properly
engaging my brain ...  :-)

Dave.
-- 
Dave Ewart
ewart(_at_)icrf(_dot_)icnet(_dot_)uk
Computing Manager
ICRF Cancer Epidemiology Unit, Oxford UK

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