Re: [exim] different spam levels on Spam Assassin

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Jonathan Gilpin
Date:  
À: exim users
Sujet: Re: [exim] different spam levels on Spam Assassin
Thanks Peter,

This was helpful, I'd also not come across vexim before... The other
examples provided by people suggested using the acl's but I've not
seen any examples of how to call spam assasin in ACL's or how to
handle mails which are being sent to multiple recipients that way..
Or is the acl's parsed each time for each recipient?

I looked through the vexim config but I'm still stuck because I can't
see how spam assassin is called and how the variable $spam_score and
$spam_score_int is set in exim...could someone help me out with this
one?

Jonathan


On 30 Sep 2009, at 20:25, Peter Velan wrote:

> am 30.09.2009 17:23 schrieb Jonathan Gilpin:
>> Is it possible to have different users have different spam levels in
>> spam assasin when using Exim?
>>
>> Ie: is it possible to have a director or transport get a value from
>> the SQL database and compare this against the spam score? To decide
>> if
>> the message should be put in the spam folder or dumped to devnull or
>> left alone in the inbox?
>>
>> I'd like to avoid having lots of different databases and tables...
>> and
>> also want users to be able to change their SQL in a webpage...
>>
>> Can anyone help with this?
>
> The following logic is derived from "vexim"
> <http://silverwraith.com/vexim/>:
>
> --- in "acl_check_content":
>
> # Run spamassassin, mark with "X-Spam-Score:" and
> # "X-Spam-Report:" headers
> #
> warn message = X-Spam-Score: $spam_score ($spam_bar)
> condition = ${if < {$message_size}{750k} }
> spam = 100:true
> #
> warn message = X-Spam-Report: $spam_report
> condition = ${if < {$message_size}{750k} }
>
> --- in router section:
>
> # Compare "$spam_score_int" (= spamassassin's score * 10) against
> # value from database. The query depends on receivers domain and
> # local_part.
> #
> # structure of `usertable`:
> # --------------+----------------
> #  column       |  value example
> # --------------+----------------
> # `domain`      | 'example.tld'
> # `localpart`   | 'username'
> # `spamcheck`   | 'yes '
> # `refusev`     |  5
> #
> spam_router:
>  driver = accept
>  transport = spam_transport
>  condition = \
>    ${if > \
>      {$spam_score_int} \
>      {${lookup mysql{ \
>        SELECT `refusev` * 10 FROM `usertable` \
>        WHERE `domain` = '${quote_mysql:$domain}' \
>        AND `localpart` = '${quote_mysql:$local_part}' \
>        AND `spamcheck` = 'yes' \
>        AND `refusev` > 0 \
>      } {$value}fail} } \
>    }
>  unseen

>
> --- in transport section:
>
> # put spam messages into a quarantine folders
> #
> spam_transport:
> driver = appendfile
> envelope_to_add
> return_path_add
> delivery_date_add
> mode = 0600
> maildir_format = false
> mailstore_format = false
> create_directory = true
> maildir_use_size_file = false
> directory = /path_to_spamquarantine/$domain/$local_part
> user = 100
> group = 100
> debug_print = true
>
>
> HTH,
> Peter
>
> --
> ## List details at http://lists.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://wiki.exim.org/