poifgh wrote: > I am trying to understand inner workings of spam assassin and would be great > if someone can answer my questions. I have read online documentation but > there are still some questions left unanswered or I am not sure about. >
I'm not an expert, just a long-time user, but I can give you some basic answers. > As far as I understand, the default configuration of spamassassin processes > emails in this fashion > > DNSBL Tests ---> RAW Body Tests ---> Bayesian Learning --> AWL > > [Is the sequence right? I know for sure AWL comes in last, what about > Bayesian learning and RAW Body tests' order? Did I miss any module?] > As I understand it, quite a bit of this is done in parallel. In particular, the DNS based tests are fired off first and then other tests are run while waiting for the response. In any case, unless you are playing with the shortcut features, all rules are run for every message, so does it really matter what order they are in? > Why do we need Bayesian learning in presence of RAW body tests? > > Mails which have very high or very low score are fed to bayesian learning. > Since we are confident about them being HAM or SPAM what do we want to learn > from them - The regex filters have identified that the mail is a spam (say), > what additional does bayesian learning achieve? Does it learn other words in > the spam mail (say words surrounding obfuscated term) in hope of matching > them in future emails? Or am I understanding it completely different? > For auto-learning, the high and low scoring messages are fed to Bayes. However, for an optimal setup, you should manually train Bayes on as much of your (verified) ham and spam as possible. The more of your mail stream Bayes sees, the better the results will be. Your description of Bayes is pretty close. It breaks down the message into "tokens" (words and character sequences) and then keeps track of how likely each of those tokens is to appear in either a ham or spam message. When a new message comes in, Bayes breaks it into tokens and then scores it depending on which tokens were found in the message. -- Bowie.
