>From the procmail list, this is a rather complete explanation of
locking which crossed this morning ...
---------- Forwarded message ----------
Date: Sun, 22 Apr 2001 23:46:08 -0700
From: Andrew Edelstein <andrew@pure-chaos.com>
To: procmail@informatik.rwth-aachen.de
Subject: Re: Locking
On Sun, Apr 22, 2001 at 12:56:27AM -0400, Paul M Foster wrote:
> Alrighty, then I don't know what a filter is. I would have assumed that
> anything is a filter when email is piped to it. It seems by your answer
> that a "filter" would be something which is "non-delivery". According
> to the man page, that's only things which 1) give the email back to
> procmail for handling, 2) start a nesting block, or 3) recipes that use
> the "c" flag. Is this correct? If so, some of the FAQ stuff I've seen
> seems incorrect. Often when formail is used, the "f" flag is also used.
> And if you don't want to make formail output disappear, you have to dump
> it back on the spool or give it back to procmail (which would, of
> course, make it non-delivery).
There have been a couple of answers given already that give a pretty good idea
what a "filter" is in a procmail context, but I wanted to jump in and clarify
a little bit, from someone else who has in the past been confused by the usage
of that word and is not a programmer.
The main thing is non-delivery option 1) above. The external process doesn't
"give the mail back" to procmail, rather procmail waits to see if the external
process succeeds, terminating if it does (after some cleanup), and continuing
processing the mail if the external process fails. If you imagine this in
plain English dialog, it goes something like this:
(Success)
Procmail: External process, here is a piece of data for you. I'll wait to see
if you can do something with it.
External process: Got it. I've done my thing.
Procmail: Great. Cleaning up and terminating.
(Failure)
Procmail: External process, here is a piece of data for you. I'll wait to see
if you can do something with this.
External process: Failure (or technically, non-zero exit status)
Procmail: Hm, guess that external process couldn't do anything with the data I
gave it. I'll have to figure out what to do with my copy.
Whereas with the filter flag it's more like:
Procmail: External process, here is a piece of data for you. Do you're thing
and give me some data back.
External process: Thanks. I'm done now. Here's some data for you.
Procmail: Got it.
And Procmail then takes the new data received from the external process and
proceeds with the next rule.
In the first instance, procmail keeps a the message for itself, passing a copy
to the external process. If the external process passes back a zero exit
status, procmail throws away it's copy and terminates.
In the second case, procmail hands the message off to the external process,
which then hands something back to procmail. What actually gets handed back as
far as procmail doesn't have to even remotely resemble what it last saw, as
long as it is still recognizable as a piece of email.
-- Andrew Edelstein http://andrew.pure-chaos.comA third factor is the not uncommon attitude on the part of upper management that because a project must be completed by a certain date, therefore it can and will be completed by that date, and information to the contrary is not welcome. Pitfalls of Object-Oriented Development Chapter 3 _______________________________________________ procmail mailing list procmail@lists.RWTH-Aachen.DE http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:38:32 EDT