Add SpamAssassin details in logs ?
Nuno Fernandes
npf-mlists at eurotux.com
Mon Feb 8 18:11:50 CET 2016
Hello,
My log has:
Feb 8 17:08:36 server amavis[413]: (00413-16) Passed CLEAN, CLAMAV
[CLIENT_IP] [CLIENT_IP] <1234 at sender.com> -> <1234 at recipient.com>, Queue-ID:
5706926182, Message-ID: <XXXX at YYYY>, mail_id: wSkQOggr2TuM, Hits: 3.693, size:
7681, queued_as: 841FD26189, Tests:
[XXXXX=1.5,FREEMAIL_ENVFROM_END_DIGIT=0.1,FREEMAIL_FROM=0.001,FREEMAIL_REPLYTO_END_DIGIT=0.1,HTML_IMAGE_ONLY_24=1.282,HTML_MESSAGE=0.001,JAVAMAILER=0.001,RCVD_IN_DNSWL_NONE=-0.0001,RCVD_IN_MSPIKE_H2=-0.002,SPF_HELO_PASS=-0.001,T_NO_XMAILER=0.001,T_REMOTE_IMAGE=0.01,URIBL_SC_SWINOG=0.7],
2093 ms
If this is what you want, all you need to do is to add the following snippet
to the amavis conf:
$log_templ = <<'EOD';
[?%#D|#|Passed #
[? [:ccat_maj] |OTHER|CLEAN|TEMPFAIL|OVERSIZED|BAD-HEADER|SPAMMY|SPAM|\
UNCHECKED|BANNED (%F)|INFECTED (%V)]#
, [? %p ||%p ][?%a||[?%l||LOCAL ]\[%a\] ][?%e||\[%e\] ]%s -> [%D|,]#
[? %q ||, quarantine: %q]#
[? %Q ||, Queue-ID: %Q]#
[? %m ||, Message-ID: %m]#
[? %r ||, Resent-Message-ID: %r]#
, mail_id: %i#
, Hits: [:SCORE]#
, size: %z#
[~[:remote_mta_smtp_response]|["^$"]||[", queued_as: "]]\
[remote_mta_smtp_response|[~%x|["queued as ([0-9A-Z]+)$"]|["%1"]|["%0"]]|/]#
[? %#T ||, Tests: \[[%T|,]\]]#
, %y ms#
]
[?%#O|#|Blocked #
[? [:ccat_maj] |OTHER|CLEAN|TEMPFAIL|OVERSIZED|BAD-HEADER|SPAMMY|SPAM|\
UNCHECKED|BANNED (%F)|INFECTED (%V)]#
, [? %p ||%p ][?%a||[?%l||LOCAL ]\[%a\] ][?%e||\[%e\] ]%s -> [%O|,]#
[? %q ||, quarantine: %q]#
[? %Q ||, Queue-ID: %Q]#
[? %m ||, Message-ID: %m]#
[? %r ||, Resent-Message-ID: %r]#
, mail_id: %i#
, Hits: [:SCORE]#
, size: %z#
[? %#T ||, Tests: \[[%T|,]\]]#
, %y ms#
]
EOD
Best regards,
Nuno Fernandes
More information about the amavis-users
mailing list