Re: [Exim] Spam detection

Page principale
Supprimer ce message
Répondre à ce message
Auteur: James P. Roberts
Date:  
À: Eric Renfro, exim-users
Sujet: Re: [Exim] Spam detection
> # When to scan a message
> # - it isn't already flagged as spam
> # - it isn't already scanned
> condition = "${if and { {!def:h_X-Spam-Flag:} {!eq
> {$received_protocol}{spam-scanned}}} {1}{0}}"


This is extremely minor, I am sure, but I believe it will require
slightly fewer CPU cycles, and function logically identically, if you
re-write that as:

condition = "${if or { {def:h_X-Spam-Flag:} {eq
{$received_protocol}{spam-scanned}}} {0}{1}}"

Note: "and" is replaced by "or," both logical nots ("!") are removed,
and the {0} and {1} are reversed. This is just the application of the
logical formula:

    not(X) and not(Y) = not(X or Y).


I hope this is helpful.

Regards,
Jim Roberts
Punster Productions, Inc.