At 20:05 2005-04-18 +0300, Udi Mottelo wrote:
Does procmail count the size of the message every time
that I use "<" or ">"? or it saves the number somewhere?
I have more then 5 recipes that start with:
* < 5000000
Now, I wander if it's silly to do so. Any idea?
If you refer to the source, you could determine this for sure:
procmail.c "filled" is the length of the mail.
It's set to "0" when procmail starts. The variable is used during reading
I see multiple references in pipes.c (which would be used during filter
operations, and during initial reading, since procmail is bringing the
message in via STDIN) where the address of the variable is used, meaning
the value can be changed by the function. Without getting intimate with
review of the functions, that would support that a filter operation
recomputes it (as it should). I see no independant counting function anywhere.
If you were concerned, you could set a flag:
* < 5000000
then use that flag in place of the check:
* MSGSIZEL5M ?? yes
# do something
Now, in THIS case, that's unnecessary, but in other checks - an external
program, or some more involved logic, doing a check once and putting the
result in a variable would streamline things.
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
procmail mailing list Procmail homepage: http://www.procmail.org/