Harry Putnam <reader(_at_)newsguy(_dot_)com> writes:
I went looking for information on how formail finds the fields
specified in -A -a -i -R -X etc flags.
For example:
If I have a rule that says
|formail -R Message-ID: X-Message-ID:
And a message comes thru with Message-Id: (note the lower case d),
will this rule miss it? Is the first argument after -R from a known
set that formail uses or does it scan the headers looking for what
ever is the content of that argument? Can the first arg be a regex
like: -R Message-[Ii][Dd]:
No need. Formail always does case-insensitive matching on header field
names, as demonstrated by a quick test:
callisto% echo "message-id: foo" | formail -f -R Message-ID: X-Message-ID:
X-Message-ID: foo
callisto%
(The -f option in this example and the one below is just to suppress the
"From " line that formail would otherwise add, as it's not relevant to
the question.)
I found something that looks like it might be part of an answer in man
formail:
What does this mean?
NOTES
When renaming, removing, or extracting fields, partial
fieldnames may be used to specify all fields that start
with the specified value.
Is this just a convoluted and guaranteed to confuse way of saying that
`formail -R Z X-Zappo:' will find all headers starting with Z and
replace them with X-Zappo.
Well, let's give it a try:
callisto% cat message
zed: sldfksd
zebra: sldkfjs
callisto% formail -f -R Z X-Zappo: <message
X-Zappo: sldfksd
X-Zappo: sldkfjs
callisto%
Could I solve the above problem by saying:
formail -R Message X-Save-Msgid:
Or does it mean something else?
Which problem? What did you expect it to mean?
Philip Guenther
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail