procmail
[Top] [All Lists]

Re: is there any way

2000-10-06 15:52:45
When I suggested this,

| >  :0Bbfw
| >  * responded successfully$
| >  | grep -v 'responded successfully$'

Dallman Ross asked,

| [It] brings up a question I have about flags.  Why, when we do something
| like this, do we need both a B and a b flag?

Yes.

`B' means apply the condition to the body.  (The default is H unless overrid-
den by a flag or by "var ??" on the condition itself.  Exception: for size
test conditions flags are ignored and the default is HB unless there is a
"var ??" on the condition itself.)  If a line in the head ends "responded
successfully" but no line in the body does, we're not going to bother filter-
ing through grep.  Procmail shouldn't even waste its time examining the head:
for this recipe, we don't care about characteristics of the head.

`b' means apply the action to the body.  (The default is `hb' unless overrid-
den by a flag.)  We certainly don't want to remove all lines from the head
that don't end in "responded successfully"!  Most, likely all, of them would
be deleted!

| And what will allow the message body to be mated back with its headers when
| the filter process is done?

If you filter only the head or only the body, procmail reattaches the output
of the filter to the unfiltered part of the messsage.  The filtering facility
is designed that way.


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