Nicolas Fertig wrote:
> Hello,
> 
> I try to set different score in a custom plugin.
> The goal is to get this working with one call like below:
> 
> Content of file "my_plugin.cf"
> --------------------------------------------
> full MY_PLUGIN eval:check_my_method()
> describe CTASD Commtouch(TM)  AntiSpam and AntiVirus detection
> add_header all Ctasd-Ver _CTASDCPVER_
> add_header all Ctasd-Vod _CTASDVOD_
> add_header all Ctasd-Flag _CTASDFLAGS_
> add_header all Ctasd-ID _CTASDID_
> add_header all Ctasd-Result _CTASDRES_
> --------------------------------------------
> 
> It is possible?
> 

Yes, see AWL as an example, but I don't think thats what you really want
to do.
> 
> Why one call?
> 
> Because this plugin use a commercial software (Commtouch,
> http://commtouch.com) and this software return different result
> depanding of the mail (spam, bulk, virus, suspected, unknow) and I want
> to set different score without to call this software 4 time for a single
> message.
> 

On the first call you cache the result and subsequent calls can just
look to see if the values are already cached and return true/false based
on that.  Have the same call for each rule and just pass in what you
want to check for.  See something like SPF.pm or DKIM.pm for an example.

Michael

Reply via email to