Bug 3960 - Spamd is not able to handle multi-user mail
Summary: Spamd is not able to handle multi-user mail
Status: RESOLVED INVALID
Alias: None
Product: Spamassassin
Classification: Unclassified
Component: spamassassin (show other bugs)
Version: 3.0.1
Hardware: Sun Solaris
: P2 major
Target Milestone: Undefined
Assignee: SpamAssassin Developer Mailing List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-08 23:12 UTC by Khalid Waheed
Modified: 2004-11-09 00:45 UTC (History)
0 users



Attachment Type Modified Status Actions Submitter/CLA Status

Note You need to log in before you can comment on or make changes to this bug.
Description Khalid Waheed 2004-11-08 23:12:22 UTC
SA should be able to process a single message with multiple recipients, the
per-user.
SpamAssassin has all sorts of per-user capabilities, including whitelists, rule
weights, and Bayesian filtering.
But all of this stuff is totally useless in some mail servers (e.g. SunOne
messaging server), for the simple reason that being able to process mail for
multiple users simultaneously is an absolutely critical capability, and
SpamAssassin is simply not designed to offer this capability.
Comment 1 Theo Van Dinter 2004-11-09 00:12:02 UTC
There is 100% absolutely no way to do this.  SpamAssassin is a filter that goes
inline (aka: one message in, one message out).  It won't/can't take a single
input message and output separate ones per recipient user -- it doesn't know how
to inject into an MTA nor deliver to a user.  It all has to be done outside
SpamAssassin.
Comment 2 Khalid Waheed 2004-11-09 00:38:37 UTC
This is a real problem, the same message which contains multiple user is
processed for multiple time.
Comment 3 Sidney Markowitz 2004-11-09 01:03:14 UTC
Every mail server system eventually delivers the mail to the individual users.
That's where you put the per-user processing such as SpamAssassin.

Here is a web page describing how to install SpamAssassin in a SunOne system

http://www.aer.com/spamassassin/iplanet_sunone_sa.html

Comment 4 Justin Mason 2004-11-09 09:45:40 UTC
also note that we cannot reasonably "split" scanning into 1 "shared"
global-settings scan and N "per-user" scans, since one of the possible per-user
modifications is to turn off or disable rules. 
Comment 5 Loren Wilton 2004-11-09 22:52:22 UTC
Subject: Re:  Spamd is not able to handle multi-user mail

> also note that we cannot reasonably "split" scanning into 1 "shared"
> global-settings scan and N "per-user" scans, since one of the possible
per-user
> modifications is to turn off or disable rules.

I don't see that that follows.  It is probably true of the current
implementation, but I don't see that it needs to be.

It would be theoretically possible (and I would assume only moderately messy
to change the existing code) to scan all the global rules into a result set
that indicates what rules hit and their scores, then apply the local rules
that can contain more rules and score overrides for global rules.  Obviously
a pristine copy of the global results would be kept so that local rules
could modify copies and not the master result.  Similar in concept to
reloading the user config in spamd on each message change.  The final
results for the message would then be extracted from the final rule results
tree/hash/whatever.

I don't recall any user option to globally disable all global rules, but if
such exists it would be trivial to start from an empty results tree for that
user, rather than from a previously-known global results tree.

Mind you, I'm not arguing for (or against, either) doing group scanning with
separate per-user results.  I'm just suggesting that it should be possible
to split the scanning as far as overriding global results without a huge
amount of effort.  The main trick would be to remember all the rules that
hit, regardless of the apparent score.  The scores can then be overridden
after rule processing.

Comment 6 Theo Van Dinter 2004-11-09 23:15:51 UTC
Subject: Re:  Spamd is not able to handle multi-user mail

On Tue, Nov 09, 2004 at 10:52:23PM -0800, bugzilla-daemon@bugzilla.spamassassin.org wrote:
> I'm just suggesting that it should be possible
> to split the scanning as far as overriding global results without a huge
> amount of effort.

Well, we're off on a tangent now.  The original request was "make one call to
SpamAssassin and have it deal with user configs per recipient" which is
impossible.  There's no way for an inline filter to do that, plain and simple.

Your suggestion is half and half -- you'd be able to make 1 call for
the processing (inline), and then you'd still have to make a call per
user at delivery time to do the rewrite/score generation/autolearning/etc.

Of course there would need some form of temporary store for "this
message hit these rules" -- and then per user Bayes and AWL, let alone
the plethora of other options that effect how rules work, would have to
be dealt with somehow ...

The complexity of all that, with to be honest a negligable (if not
negative) gain (rules are pretty fast, bayes overhead is constant,
net results are cached so the penalty is only taken once anyway) --
just call SpamAssassin per user at delivery.