SA Bugzilla – Bug 3960
Spamd is not able to handle multi-user mail
Last modified: 2004-11-09 00:45:40 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.
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.
This is a real problem, the same message which contains multiple user is processed for multiple time.
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
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.
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.
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.