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

Henrik K hege at hege.li
Fri Jul 19 16:10:36 CEST 2019


On Fri, Jul 19, 2019 at 02:55:02PM +0100, Dominic Raferd wrote:
> On Fri, 19 Jul 2019 at 14:06, mabi <[1]mabi at protonmail.ch> wrote:
> 
>     Hello,
> 
>     I would like to log the typical X-Spam-Status mail header which gets added
>     by SpamAssassin to a mail into the amavis log file in order to track the
>     rules and their scores which gets triggered by ham and spam mails.
> 
>     Is this somehow possible with Amavis?
> 
> 
> The X-Spam-Status header is added by Amavis itself. With postfix (and
> postfix-pcre) you could log it thus (untested):

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.



More information about the amavis-users mailing list