I suggest to spend some time reading the relevant documentation. In particular the M::SA::Conf and AutoLearnThreshold docs.
http://spamassassin.apache.org/doc/ On Sat, 2014-05-24 at 22:12 -0700, Ian Zimmerman wrote: > > So, now I am really confused. I think I did everything right in > > user_prefs: > > tflags INVALID_DATE autolearn_force tflags are part of the Privileged Settings (see section in M::SA::Conf docs). For security and efficiency reasons, these are not allowed in user_prefs, unless allow_user_rules is enabled. (Just for completeness, dunno if you enabled it.) > > Nonetheless: > > > > X-Spam-Score: 6.9 > > X-Spam-Tests: BAYES_99=3.5,BAYES_999=0.2,HTML_FONT_LOW_CONTRAST=0.001, > > HTML_MESSAGE=0.001,MIME_HTML_ONLY=0.723,RDNS_NONE=0.793,SPF_PASS=-0.001, > > T_REMOTE_IMAGE=0.01,URIBL_BLACK=1.7 > > X-Spam-Autolearn: no autolearn_force=no As RW already pointed out quoting the AutoLearnThreshold man page, the score taken for the decision to auto-learn is not the same as the overall score shown above. To prevent Bayes self-feeding, (a) the Bayesian rules themselves are ignored, and (b) the respective non-Bayes score-set is used. The latter often (but not necessarily) results in higher scores per rule. However 6.9 -3,7 for BAYES_* rules is likely to not exceed the threshold even when using the respective non-Bayes score-set. > And here's a case where it doesn't autolearn ham (same user_prefs as above): > > X-Spam-Status: No > X-Spam-Level: > X-Spam-Score: -2.7 > X-Spam-Tests: > BAYES_00=-1.9,DKIM_SIGNED=0.1,DKIM_VALID=-0.1,DKIM_VALID_AU=-0.1, > FREEMAIL_FORGED_FROMDOMAIN=0.001,FREEMAIL_FROM=0.001, > > HEADER_FROM_DIFFERENT_DOMAINS=0.001,HTML_MESSAGE=0.001,RCVD_IN_DNSWL_LOW=-0.7, > RCVD_IN_MSPIKE_H2=-0.001,SPF_PASS=-0.001 > X-Spam-Autolearn: no autolearn_force=no > > The documentation certainly doesn't say anything like the 3/3 and force > mechanism is in place for ham. So this _should_ autolearn. Right? Right?? No. At no point does the documentation suggest autolearn_force would work with ham. The AutoLearnThreshold doc mentions this option only in the context of the spam threshold, and the M::SA::Conf doc is even more clear about it. autolearn_force The test will be subject to less stringent autolearn thresholds. Normally, SpamAssassin will require 3 points from the header and 3 points from the body to be auto-learned as spam. This option keeps the threshold at 6 points total but changes it to have no regard to the source of the points. Moreover, that message did *not* trigger any of the rules you set tflags autolearn_force for. Thus, even regardless of the actual score and it being not spam, that message would never be considered autolearn_force. -- char *t="\10pse\0r\0dtu\0.@ghno\x4e\xc8\x79\xf4\xab\x51\x8a\x10\xf4\xf4\xc4"; main(){ char h,m=h=*t++,*x=t+2*h,c,i,l=*x,s=0; for (i=0;i<l;i++){ i%8? c<<=1: (c=*++x); c&128 && (s+=h); if (!(h>>=1)||!t[s+h]){ putchar(t[s]);h=m;s=0; }}}