On Tue, 2009-06-30 at 21:57 +0100, John Horne wrote: > I am currently reconfiguring SA, and have set report_safe to 0. Our > 'required' score is 8, and I have also configured: > > clear_report_template > report "Score=_SCORE_ tests=_TESTS_ autolearn=_AUTOLEARN_"
The report option does not affect the template used for the Report header, but the verbatim, mortal user readable form used in the plain text part of the wrapping mail with report_safe 1. While it actually matches the given header, I don't think you can change the header with that. ;) (Or I've missed a template that will be substituted with the given report option lines.) > However, as far as I can tell, the X-Spam-Report header gets added to > ham mail as well as spam. For example: > > X-spam-report: Score=-6.9 > tests=BAYES_00,DCC_CHECK,RCVD_IN_DNSWL_HI autolearn=ham That is not a standard SA header. Actually, there's quite a lot fishy about that. First of all, SA is incapable of adding it -- all SA generated headers start with X-Spam- (note the uppercase S, since I assume you actually copy-n-pasted it). So something else (your glue, Amavis?) added it? In that case the SA add_header options are likely futile, and instead you should configure your glue. Also, that actually looks like a SA Status header (customized), minus a leading YesNo and a trailing version. So either this is your glue responsible, or you got some custom add_header options in your cf files. Oh, any typo'd the snippet. ;) A Status header by default tersely lists all tests hit, similar to the above. A Report header lists all tests hit including score, description and meta info. > (taken from a received message; line wrapped be me). I have no problem > with the header being added, and in fact that is what I wanted. However, > I am a bit confused because the man page says it should only be added > for spam mail. > > Can someone clarify what is going on please. Is there anything I need to > do to the config to ensure that the above report is added to all mail > (despite is seeming to happen anyway)? Since your glue appears to add its own headers instead of stock SA ones, you should look there. As far as SA itself is concerned, the Status header (similar to the above) will be added by default anyway. A verbose Report header added to add mail should be doable with something like this: add_header all Report _REPORT_ See the add_header option in the docs [1], Basic Message Tagging Options section. Also see the Template Tags section. guenther [1] http://spamassassin.apache.org/full/3.2.x/doc/Mail_SpamAssassin_Conf.html -- char *t="\10pse\0r\0dtu...@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; }}}