Source: http://codepoets.co.uk/2014/amavis-spamassassin/
Amavis – log spamassassin rulsets and generally more
The default Amavis log file will look something like :
Mar 23 06:48:18 my.server /usr/sbin/amavisd-new[13368]: (13368-03) Passed CLEAN {RelayedInbound}, [client.ip.addr]:37490 [client.ip.addr] -> <someone@local>, Queue-ID: 3FDEC181A06, Message-ID: <c72c5e1d26a048c0af4be75044e1e80e@bazarchic-invitations.com> , mail_id: d-dsS6ecM4vR, Hits: -9.49, size: 34124, queued_as: 80D4118089F, dkim_sd=20132014:bazarchic-invitations.com, 3203 ms
Which isn’t all that useful – especially if you need to know WHY it did (or didn’t) score against SpamAssassin (i.e. WHY was it -9.49).
So, to make Amavis more verbose in logging – so you can see which SpamAssassin tests triggered etc – add to /etc/amavis/conf.d/50-user (debian) –
$log_templ = $log_verbose_templ;
Now you’ll see something more like :
Mar 28 14:33:49 my.server /usr/sbin/amavisd-new[9149]: (09149-05) Passed SPAMMY {RelayedTaggedInbound}, [client.ip.addr]:62696 [client.ip.addr] <some.user@whatever> -> <someone@else.example.com>, Queue-ID: EF4F4180E71, Message-ID: <C46A064E2A2B52469C092EE761AD74602BFCCC@xxxxxx-Exch.xxxxxxx.xxxx>, mail_id: dzG4JS_4jH29, Hits: 6.314, size: 46717, queued_as: BBEB71819B4, Subject: "hello world this is a subject", From: Test_Person_<test@my.domain>, helo=whatever.server, Tests: [HTML_MESSAGE=0.001,LOCAL_SEX=5,URI_HEX=1.313], shortcircuit=no, autolearn=disabled, autolearnscore=6.314, asn=AS57307_188.227.240.0/21, 4714 ms
Now – you can clearly see why it scored 6.314 – without needing to find the mail and read it’s headers.