On May 3, 2012, at 7:23 PM, Steve wrote:

>> 
>>> 
>>> Below the untested code but I think it should work:
>>> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>> if /^X\-DSPAM\-Confidence\:\s+/
>>> /^X\-DSPAM\-Confidence\:\s+(0\.[7-9]\d+)$/   DISCARD DSPAM confidence
>> ${1} greater than 0.700
>>> endif
>>> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
>>> 
>> 
>> Thank you I'll give that a try. 
>> 
> Be very careful with the code from above. It will trigger as soon as the 
> confidence is equal or above 0.700 and below 0.999 but it does not check the 
> classification it self. So it will trigger for the class SPAM and for the 
> class INNOCENT. What you really want is to trigger only for the class SPAM, 
> BLACKLISTED, BLOCKLISTED and VIRUS.

Which means that unless the reading I've been doing is wrong, I won't be able 
to accomplish this within Postfix.  Postfix header checks can not be combined, 
so I can't do if the matching logic I'm thinking about, if the class is SPAM 
and the Confidence is greater than X.

Part of me thinks the best place for this is the final delivery server, but in 
my scenario my customers may want the ability to not have messages with high 
confidence even delivered into their network.  I guess I could route those 
customers through a custom policy service which could do the logic and discard 
accordingly. 


> 
> While writing you the response I realized that I am not handling the case 
> where the confidence could be 1.000 (aka 100%).
> 
> So the above should be changed to:
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> if /^X\-DSPAM\-Confidence\:\s+/
> /^X\-DSPAM\-Confidence\:\s+(0\.[7-9]\d+|1\.000)$/   DISCARD DSPAM confidence 
> ${1} greater than 0.700
> endif
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
> 

Good point, thank you.


-Chad

Reply via email to