procmail
[Top] [All Lists]

Re: Handling N-way discussions

2000-08-22 23:01:05
Zhiliang Hu <hu(_at_)genome(_dot_)ansci(_dot_)iastate(_dot_)edu> writes:

man page on Procmailrc says:

 f    Consider the pipe as a filter.

Does it mean it will pass on the mail after the recipe - an
anolog of "c" option but different in that "c" passes a mail
"as is" and "f" passes it after processing? ... Just in case
I may loss mails ...

Not at all.  Normally, when procmail processes an action, it starts the
program designated by the action and feeds the message into it.  If the
action 'succeeds' then procmail is done, and stops processing the
rcfile.  If it fails then procmail keeps processing the rcfile.

The 'c' flag tells procmail to _always_ keep on processing the rcfile,
even when the action succeeds.  You thus have effectivly delivered a
'copy' of the message.  It also you to make further decisions based on
that recipe's success.

The 'f' flag on the otherhand tells procmail that this action is
supposed to change (filter) the message.  To do this, procmail starts
the designated program and then feeds in the current message while
capturing the action's output.  If the action succeeds then whatever the
action outputs becomes the 'current message' for the rest of the
rcfile.

Note that while the 'f' flag does keep procmail from stopping at that
recipe, it does so only because there would otherwise be no reason to
change the message.  That is, why bother changing procmail's idea of the
current message if you're just going to stop processing?


I'll admit that one sentence description of the 'f' flag is not the
clearest.  If someone has a better suggestion for what to put as the
description there on the procmailrc(5) manpage, please email me.


Philip Guenther

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