Re: [exim] Per-User SpamAssassin config

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Nigel Wade
Ημερομηνία:  
Προς: Exim users list
Αντικείμενο: Re: [exim] Per-User SpamAssassin config
Richard Hobbs wrote:
> Hello,
>
> OK, 'strings /usr/sbin/exim4 | grep spam' produces the following result:
>
> rejected. Refusing MAIL FROM:<> does not help fight spam, disregards
>
> I guess exiscan is included in my exim build by default given the
> information mentions previously, but I don't know how to find out if I'm
> running heavy or light exim...
>
> I presume this is what I need to do from this point on:
>
> - Find out if I'm running exim heavy or not, and if not, run it.
>
> - Once exim heavy is running (and exiscan is therefore enabled) I need to
> setup the ACL stuff to allow exim to run spamassassin, but only if the
> user's preferences exist.


The problem with running per-user spam checking in an ACL is that you need
to restrict messages to single recipients. This is wasteful of bandwidth
both for you and the sending MTA when messages are originally sent with
multiple recipients - the message has to be resent for each recipient. This
applies to all messages, whether any of the recipients want spam checking or
not.

The only way to avoid this is to have only one set of preferences, for all
users, and only allow them to be turned on or off. That way you can get away
with receiving just one message, scan it once (for all users) and then only
act on the results of the scan if the recipient has spam scanning turned on.
You should also not reject messages at SMTP time in this case as messages
destined for users who don't want spam control might be rejected.

>
> - I then need to create some user preferences for particular people.
>
> Also, as I may have said before, spamd is running with the following
> options:
>
> --create-prefs --max-children 5 --helper-home-dir -d
> --pidfile=/var/run/spamd.pid
>
> Is this correct considering some people don't want spam checking to be done
> at all? I'm looking at the create-prefs bit...


No, there's no need for SA to create preferences.

>
> Thanks again people... For some reason I'm finding this really complicated!
> Surely it's just a case of telling exim to put each email into spamd, and
> then telling spamd to check for preferences and spamcheck accordingly,
> right?


No, spamd doesn't check for user preferences, it runs with the default
preferences, and *adds* user preferences if they exist. Also, if you scan
only once for a message with multiple recipients, whos user preferences are
you going to use? What if some of those recipients don't want spam control?

I think the only way to have per-user preferences, where each user can fully
control their preferences, is to scan during transport because it's only at
this stage that each recipient can be handled differently.


-- 
Nigel Wade, System Administrator, Space Plasma Physics Group,
             University of Leicester, Leicester, LE1 7RH, UK
E-mail :    nmw@???
Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555