procmail
[Top] [All Lists]

Re: Determining a message's size in Procmail

2006-12-10 16:18:16
Michael J Wise schreef:
Ruud H.G. van Tol:
Michael J Wise:

Cute Hack, thanks.
How processor intensive is it?

Virtually none I suppose, since it is only using standard procmail
functionality.

If it were a big message, I'd expect it would require some amount of
time to compute 1+1+1+1+...

So you have checked the source and found out that that is the way in
which procmail does that? I don't think so.

<quote src="procmailsc(5)">
  Weighted length conditions
       If the length of the actual mail is M then:

              * w^x  > L

       will generate an additional score of:

                         x
                  /  M  \
              w * | --- |
                  \  L  /
</quote>

So if w = 1, x = 1, L = 1, then the extra score is 1*(length/1)^1  =
length. So no hack involved.


"There Should Be A Better Way..."[tm]

You could have your MTA give the size to "procmail -a" via a
parameter, but that would only be an advantage if the MTA has the
size available.

But procmail already knows the size.
It writes it out with the abstract....

So why should there be a better way?

-- 
Groet, Ruud (so so so so so)


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail