Spam-tag log line

Mark Martinec Mark.Martinec+amavis at ijs.si
Wed Jan 25 19:35:13 CET 2012


Stefan,

> I see the following line in my log file:  
> 
> amavis[2289]: (02289-01) Passed SPAM {RelayedTaggedInternal}, MYUSERS LOCAL
> [AAA.BBB.CCC.DDD]:33070 [AAA.BBB.CCC.DDD] <user at example.com> ->
> <user at example.com>, mail_id: 6zDKWrW4tK3Q, Hits: 5.864, size: 213,
> queued_as: C8A205FD60, 10581 ms  
> 
> The Source IP is listed in @mynetworks and the recipient domain is listed in
> @local_domains_maps and $sa_tag_level_deflt  = -999.0.  
> 
> But there is no Spam-tag line. Now I'm wondering under which circumstances
> amavisd is logging the Spam-tag line?  
> 
> This is amavisd-new 2.7.0  

If you are referring to X-Spam-Status, X-Spam-Level, X-Spam-Flag and
X-Spam-Score header fields, these should be there like you said: when
recipient matches @local_domains_maps and spam score is above
$sa_tag_level_deflt, or $sa_tag_level_deflt is undefined.

If you are referring to a debug log line "Spam-tag, ...", it is now logged
at log level 3 starting with 2.7.0.  Previously it was a "SPAM-TAG, ...",
logged at level 2. I suggest not to bother with this debug line.
If you need SpamAssassin test results in the log, this can be achieved
by uncommenting the line, i.e. changing:

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

into a:

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

in the main log template (twice), or assigning a customized log template
to $log_templ, e.g. (in amavisd.conf):

$log_templ = <<'EOD';
[?%#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]]#
[~[:remote_mta_smtp_response]|["^$"]||[", queued_as: "]]\
[remote_mta_smtp_response|[~%x|["queued as ([0-9A-Za-z]+)$"]|["%1"]|["%0"]]|/]#
#, Subject: [:dquote|[:mime2utf8|[:header_field|Subject]|100|1]]#
#, From: [:uquote|[:mime2utf8|[:header_field|From]|100|1]]#
[? %#T ||, Tests: \[[%T|,]\]]#
[? [:dkim|sig_sd]    ||, dkim_sd=[:dkim|sig_sd]]#
[? [:dkim|newsig_sd] ||, dkim_new=[:dkim|newsig_sd]]#
, %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]]#
#, Subject: [:dquote|[:mime2utf8|[:header_field|Subject]|100|1]]#
#, From: [:uquote|[:mime2utf8|[:header_field|From]|100|1]]#
[? %#T ||, Tests: \[[%T|,]\]]#
[? [:dkim|sig_sd]    ||, dkim_sd=[:dkim|sig_sd]]#
[? [:dkim|newsig_sd] ||, dkim_new=[:dkim|newsig_sd]]#
, %y ms#
]
EOD



  Mark


More information about the amavis-users mailing list