On Thu, 2014-08-28 at 11:08 +0200, Reindl Harald wrote: > is it somehow possible to get line-breaks in the > report headers to have them better readable?
SA inserts line-breaks by default, to keep headers below 80 chars wide. > report_safe 0 > clear_headers > add_header spam Flag _YESNO_ > add_header all Status _YESNO_, score=_SCORE_/_REQD_, tests=_TESTS_, > report=_REPORT_ > on the shell it looks like this What you get in the shell is precisely what SA returns -- to the shell or any other calling process. Any reformatting or re-flow of multiline headers has been done by other tools. > X-Spam-Status: No, score=4.3/5.0, > tests=ADVANCE_FEE_4_NEW,ADVANCE_FEE_4_NEW_MONEY,ADVANCE_FEE_5_NEW,ADVANCE_FEE_5_NEW_MONEY,ALL_TRUSTED,BAYES_99,BAYES_999,DEAR_SOMETHING,DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,LOTS_OF_MONEY,T_MONEY_PERCENT,URG_BIZ, > report= > * -2.0 ALL_TRUSTED Passed through trusted hosts only via SMTP > * 3.5 BAYES_99 BODY: Bayes spam probability is 99 to 100% > * [score: 1.0000] That long _TESTS_ string without line-breaks is due to the very long _REPORT_ in that header. If you add a dedicated Report header, the Status header and its list of tests will be wrapped appropriately, too. FWIW, SA even generates the Report header by default with your setting of report_safe 0. Not in your case, because you chose to clear_headers and manually define almost identical versions to the default headers. -- 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; }}}