RE: [exim] build a router that discard spam at spamassassin …

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Herb Martin
Dátum:  
Címzett: exim-users
Tárgy: RE: [exim] build a router that discard spam at spamassassin score level, help
> Trying to write a router that will discard spam over a
> score of 10.
>     Since SpamAssassin is told to write spam header at a level of 5
>     Ive also introduced a custom header that marks just the 
> score in my local.cf

>
> add_header spam HiScore _SCORE_
>
>     then in my exim config file
> I add this route after the spamcheck route

>
> dropspam:
>         driver = manualroute
>         condition = "${if >{$h_X-Spam-HiScore:}{10} {1}{0}}"
>         route_list = "* localhost byname"
>         transport = devnull
>         verify = false

>
> but it appears to do nothing..
>
> I do get the HiScore Header in my spam emails.


How about just doing it at the DATA ACL?

Set "HIGH_SPAM_SCORE", and put this in the Data ACL,
watch it a bit (reject log) and then change "warn" to "deny".

warn message = X-HighSpam: Message exceeded spam score threshhold.
   condition = ${if <{$message_size}{MAX_SPAM_SIZE}{1}{0}}
        spam = herbm:true/defer_ok
   condition = ${if >{$spam_score_int}{HIGH_SPAM_SCORE}{1}{0}}
    logwrite = :reject: H=$sender_fullhost F=$sender_address \
          R=$header_to: High spam will be deleted [$spam_score_int]. 


I use this for placing a header and sorting it to a
different 'Spam-Catch' user/directory, but this can
be used to DENY or sort into a directory where it is
just deleted instead of reviewed.

--
Herb Martin