procmail
[Top] [All Lists]

Re: Recovering Number of Lines or Size of Mail

1999-04-13 11:40:22
Hello Philip,

"PG" == Philip Guenther <guenther(_at_)gac(_dot_)edu> writes:

PG> Ralph SOBEK <sobek(_at_)irit(_dot_)fr> writes:
"LH" == Lars Hecking <lhecking(_at_)nmrc(_dot_)ucc(_dot_)ie> writes:
LH> :0BH
LH> * 1^1 ^.*$
LH> { }
LH> LINES=$=

LH> The condition line adds 1 (one) to the score for every line in header and
LH> body. $= contains the score of the last recipe. man procmailsc for details.

Thanks a lot!  Looks okay.  But to the Procmail Guru's, how costly is
it to run this scoring recipe?  It looks expensive to me!!  Maybe less
expensive than piping the message to `wc -l', but still expensive.

PG> Well, it's O(n), if that's any reassurance.

I would prefer O(k), k = constant, since I may recover this info for a
couple of thousands of e-mails...  Since procmail has it internally,
would it be too awful to pass the value along to a recipe?

        --Ralph