Hello

>>
>> 2. In Spamassassin I need compare if _SCORE_ > kill_spam_score
>>   then add header X_Spam_Remove  or X_Spam_Kill
> 
> while this is possible, there's no useful use for this.
> There are already middleware programs between SA and various MTAs
> - amavisd-new, sa-exim...
> seems exim has content scanning extension...
> 
> 
>> 3. In exim make router that check if X_Spam_Kill exists and
>>   move mail to /dev/null.
> 
> you should reject the mail instead. see the programs above.


I used earlier appeal directly by Exim SA support, during acl_check_data.
For example:
deny
        condition = ${if >{$spam_score_int}{160}{1}{0}}
        spam = spamd:true


If I'm not mistaken, this solution does NOT support UserPref settings ???
Especially if the incoming message is addressed to a few people.


By using a router, with
spamcheck:
    no_verify
    driver         = accept
    condition      = ${if and {\
                    {eq {$authenticated_id}{}}\
                    {!eq {$received_protocol}{spam-scanned}}\
                     {<{$message_size}{250k}}\
                       } }
    headers_remove =
X-Spam-Flag:X-Spam-Report:X-Spam-Status:X-Spam-Level:X-Spam-Checker-Version
    transport = spam_check



and transport with pipe
spam_check:
    driver            = pipe
    command           = /usr/local/sbin/exim -oMr spam-scanned -bS
    use_bsmtp
    transport_filter  = /usr/local/bin/spamc -U
/var/run/spamd/spamd.socket -u $local_part@$domain
    home_directory    = /tmp
    current_directory = /tmp


each recipient can have its own rules and its own SA score.
So next my other router detect is
{def:h_X-Spam-Flag:}\
{eq {$h_X-Spam-Flag:}{YES}}\

and by SPAM transport move messages to user SPAM folder.


Best Regards.

Reply via email to