You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@spamassassin.apache.org by Justin Mason <jm...@jmason.org> on 2006/12/29 17:22:11 UTC
Re: accessing scantime from inside a plugin
Gerard Earley writes:
> Hi
> I'm just wondering if there is an easy way to access $scantime or an
> equivalent when inside a plugin?
in 3.2.0, you can hook into spamd's logging hook. Otherwise, use
time(), and compute seconds elapsed since start of scanning...
--j.
Re: accessing scantime from inside a plugin
Posted by Theo Van Dinter <fe...@apache.org>.
On Fri, Dec 29, 2006 at 06:21:34PM +0000, Justin Mason wrote:
> Don't bother trying to access that -- register a hook to be called
> at check_start (I think?) and save your own.
Yeah, check_start and check_end. That's just scan time, and won't include
time to parse the message, etc.
--
Randomly Selected Tagline:
"Human beings have feelings. Didn't your alien leaders teach you that
before they sent you here?" - The Ref
Re: accessing scantime from inside a plugin
Posted by Gerard Earley <ge...@whitecurve.com>.
Justin Mason wrote:
> Gerard Earley writes:
>
>> Hi
>> I'm just wondering if there is an easy way to access $scantime or an
>> equivalent when inside a plugin?
>>
>
> in 3.2.0, you can hook into spamd's logging hook. Otherwise, use
> time(), and compute seconds elapsed since start of scanning...
>
> --j.
>
Well if I could access the $start_time variable I'd simply do
my $scantime = sprintf( "%.1f", time - $start_time );
but I don't know the layout of spamassassin (or perl that well :p )
Any hints? Pls.
Re[2]: accessing scantime from inside a plugin
Posted by Fred Tarasevicius <te...@i-is.com>.
Hello Justin,
Friday, December 29, 2006, 11:22:11 AM, you wrote:
> Gerard Earley writes:
>> Hi
>> I'm just wondering if there is an easy way to access $scantime or an
>> equivalent when inside a plugin?
> in 3.2.0, you can hook into spamd's logging hook. Otherwise, use
> time(), and compute seconds elapsed since start of scanning...
Would having two rules one set at -1000 priority and one set at 1000
priority help out here? Ensure the first rule is run which grabs the
time, then when the last rule ran, grab the time and compare?
On this topic, is there a bounds for what priority can be set to?
Like would -99999999 be valid?
--
Best regards,
Fred mailto:tech2@i-is.com