Dave,

> I'm not talking about the addition of
> headers to messages, I'm talking about the logging (to syslog,
> in my case) of each message as amavisd processes it.

The list of SpamAssassin test names which triggered
is available in macro %T, which can be added to a logging
template (or to notifications template). In a default log
template by the end of file 'amavisd' it is commented out,
the line in question (appears twice in a template) is:

[? %#T ||, Tests: \[[%T|,]\]]#

You may either modify the default template in file 'amavisd',
or assign (in amavisd.conf) a replacement multiline template
to a variable $log_templ, see example in amavisd.conf-sample.

Here below is the relevant section from a file 'amavisd':


# ==========================================================================
# This text section governs how a main per-message amavisd-new log entry is
# formed (config variable $log_templ). An empty text will prevent a log entry,
# multi-line text will produce several log entries, one for each nonempty line.
# Syntax is explained in the README.customize file.
[?%#D|#|Passed #
[? [:ccat|major] |OTHER|CLEAN|MTA-BLOCKED|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"]]|/]#
#[? [:header_field|Subject] ||, Subject: [:dquote|[:header_field|Subject]]]#
#[? [:header_field|From]    ||, From: [:uquote|[:header_field|From]]]#
#[? [:useragent|name]   ||, [:useragent|name]: [:uquote|[:useragent|body]]]#
#[? %#T ||, Tests: \[[%T|,]\]]#
#[:supplementary_info|SCTYPE|, shortcircuit=%%s]#
#[:supplementary_info|AUTOLEARN|, autolearn=%%s]#
, %y ms#
]
[?%#O|#|Blocked #
[? [:ccat|major|blocking] |#
OTHER|CLEAN|MTA-BLOCKED|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#
#, smtp_resp: [:smtp_response]#
#[? [:header_field|Subject] ||, Subject: [:dquote|[:header_field|Subject]]]#
#[? [:header_field|From]    ||, From: [:uquote|[:header_field|From]]]#
#[? [:useragent|name]   ||, [:useragent|name]: [:uquote|[:useragent|body]]]#
#[? %#T ||, Tests: \[[%T|,]\]]#
#[:supplementary_info|SCTYPE|, shortcircuit=%%s]#
#[:supplementary_info|AUTOLEARN|, autolearn=%%s]#
, %y ms#
]


  Mark

-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to