Re: [exim] per user spamassassin setup

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: W B Hacker
Ημερομηνία:  
Προς: exim users
Αντικείμενο: Re: [exim] per user spamassassin setup
Stuart Gall wrote:
> On 20 Oct 2006, at 06:10, Chris Purves wrote:
>
>
>>Is there a way to have exim call spamassassin with the user to whom
>>the e-mail is sent?
>>
>>I understand that "spam = $local_part" won't work for an acl, but that
>>is essentially what I would like to be able to do.
>>
>>What is the best way to do this?
>
>
> We were discussing this, albeit in relation to postmaster, about a
> week ago.
> You need to set up acl variables in the rcpt acl for the user reject/
> warn spam levels and then use them in the data acl
> There is however a big problem. The data-acl and hence spam scanning
> is only run once per message, but the rcpt acl is run for each
> recipient.
>
> So the above only works if there is one recipient, if there is more
> than one then you must decide on a policy, either the most
> restrictive or most promiscuous setting must be used (up to the
> system policies)
> And there in you are stuffed, because your abusers will conveniently
> not understand the issue and complain whatever policy you adopt.
>
> At the moment I have a working setup whith just two levels.
>     1) Reject any thing above 5
>     2) warn above 5 reject over 10

>
> Users can chose, but if the mail goes to a user in group A and CC to
> a user in group B the group A rules apply.
>
> but with a bit more work you could set per user warn and reject levels
>
>
>
>>--
>>Take care,
>>Chris
>>


Without getting into the more contentious part of per-user rejection *action*
(DSN messages), the above 'threshold' can at least be made more specific:

Where acl_m(x) is the 'min' we wish to derive from the current batch of recipients:

Enter acl_smtp_rcpt with, for example, a system-max threshold (10?) in acl_m(x).

At the head of acl_smpt_rcpt:

set acl_m(x) = ${eval:$acl_m(x)}

So as to preserve the result of the previous pass.

======

For each pass, pull the recipient's threshold into, for example, acl_m(y) from
wherever you are storing it.

Compare acl_m(y) - current recipient threshold,

with $acl_m(x) lowest threshold seen previously,

and set acl_m(x) to the lower value.

This preserves the 'min' value of that specific batch of recipients, rather than
forcing use of system-wide defaults.

HTH,

Bill