X-Spam-Status to log
Patrick Ben Koetter
p at sys4.de
Fri Apr 22 21:49:13 CEST 2016
* İhsan Doğan <ihsan at dogan.ch>:
> Hello,
>
> Is it possible to add the X-Spam-Status additionally to the amavis log line?
Try this:
$log_templ = '
[?%#D||Passed #
[? [:ccat|major] |#
OTHER|CLEAN|MTA-BLOCKED|OVERSIZED|BAD-HEADER-[:ccat|minor]|SPAMMY|SPAM|\
UNCHECKED|BANNED (%F)|INFECTED (%V)] {[:actions_performed]}#
, [? %p ||%p ][?%a||[?%l||LOCAL ][:client_addr_port] ][?%e||\[%e\] ]%s -> [%D|,]#
[? %q ||, quarantine: %q]#
[? %Q ||, Queue-ID: %Q]#
[? %m ||, Message-ID: %m]#
[? %r ||, Resent-Message-ID: %r]#
[? %i ||, mail_id: %i]#
, Hits: [:SCORE]#
, size: %z#
[? [:partition_tag] ||, pt: [:partition_tag]]#
[? %#T ||, Tests: \[[%T|,]\]]#
, %y ms#
]
[?%#O|#|Blocked #
[? [:ccat|major|blocking] |#
OTHER|CLEAN|MTA-BLOCKED|OVERSIZED|BAD-HEADER-[:ccat|minor]|SPAMMY|SPAM|\
UNCHECKED|BANNED (%F)|INFECTED (%V)] {[:actions_performed]}#
, [? %p ||%p ][?%a||[?%l||LOCAL ][:client_addr_port] ][?%e||\[%e\] ]%s -> [%O|,]#
[? %q ||, quarantine: %q]#
[? %Q ||, Queue-ID: %Q]#
[? %m ||, Message-ID: %m]#
[? %r ||, Resent-Message-ID: %r]#
[? %i ||, mail_id: %i]#
, Hits: [:SCORE]#
, size: %z#
[? [:partition_tag] ||, pt: [:partition_tag]]#
[? %#T ||, Tests: \[[%T|,]\]]#
, %y ms#
]';
You should see something like this in your log:
Apr 22 04:45:18 echo amavis[27999]: (27999-03) Passed CLEAN {AcceptedInbound}, AM.PDP-SOCK [69.163.254.50] [209.85.213.66] <sender at example.com> -> <recipient at sys4.de>, Queue-ID: 3qrg2j0YzSzyxg, Message-ID: <CAPBvRV9BwoPFYH-MSpiac3Qjr2Hjfxsj_nkYM-d_XMmx9HM3iA at example.com>, mail_id: xHpF37B1Ok2D, Hits: 0.313, size: 13196, Tests: [DKIM_ADSP_CUSTOM_MED=0.001,DKIM_SIGNED=0.1,FREEMAIL_FORGED_FROMDOMAIN=0.199,FREEMAIL_FROM=0.001,HEADER_FROM_DIFFERENT_DOMAINS=0.001,HTML_MESSAGE=0.001,T_DKIM_INVALID=0.01], 891 ms
p at rick
--
[*] sys4 AG
https://sys4.de, +49 (89) 30 90 46 64
Franziskanerstraße 15, 81669 München
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer
Aufsichtsratsvorsitzender: Florian Kirstein
More information about the amavis-users
mailing list