Log SpamAsssassin X-Spam-Status (rules and scores) into amavis log file

Henrik K hege at hege.li
Fri Jul 19 17:16:54 CEST 2019


On Fri, Jul 19, 2019 at 03:02:21PM +0000, mabi wrote:
> ????????????????????? Original Message ?????????????????????
> On Friday, July 19, 2019 4:10 PM, Henrik K <hege at hege.li> wrote:
> 
> > There zero need to do any postfix hacks.
> >
> > Simply use amavis $log_level = 2 and it will log all rules hit along with
> > some useful timing info etc.
> 
> Nice one, thanks! For now I don't see any detailed SA spam scores so I suppose this only works when the mail is tagged as SPAM?

You should see header_edits_for_quar: line for any message, I even doubled checked amavisd code, it is log_level 2. :-)

Jul 19 18:14:32 xxx amavis[25182]: (25182-04) header_edits_for_quar:
<xxx at xxx.com> -> <xxx at xxx.com>, No, score=-207.5 tag=x
tag2=7 kill=10 tests=[BAYES_00=-7, POSTPALS_RELAY24=-0.5,
RCVD_IN_DNSWL_NONE=-0.0001, SHORTCIRCUIT=0.0001,
USER_IN_DKIM_WHITELIST=-100, USER_IN_SPF_WHITELIST=-100] autolearn=disabled

(Yes it's very hard to find these things in documentation, some not at all..)



More information about the amavis-users mailing list