On Wed, 2003-10-01 at 23:32, Sam Varshavchik wrote:
Eduardo Roldan writes:
I think that the conditional functions (the ones you only use in the IF
statement) proposed by cour...@asfast.net shold be in maildrop because
in a tyipical filter these are evaluated each time a message is
Define "typical filter". To me a typical filter means: depending on the
message's contents, deliver to this folder, or that folder. Or, perhaps,
discard the message; or maybe forward it.
A typical filter does what you say. I agree. The point is this: if your
filter does an evaluation don't based in the content of a message, there
is a high probability that you are checking the existence of a file or
directory. This is a personal view, maybe I'am wrong. The most famous
example is the Maildir autocreation filter.
After thinking a moment I acknowledge you are right. The cases are very
rare and can be done without checking the existence of a file or
One stupid case:
1- I want to open a gdbm file. If it not exist copy one preinitialized
by the administrator with some key:value pairs. How I do this without
doing two gdbmopen calls or exec /bin/test one time?
Anyway a isdir() statement could make happy the Maildir autocreation
These things can be accomplished entirely by the existing facilities in
maildrop. When you start doing things like checking if an external file
exists, creating or removing directories, I think you're getting beyond what
a typical mail filter does.
Thanks for your time. I'am a lame now, not /bin/test.