Michael, > Hi, I'm using amavisd-new-2.4.3-15 and used it with log_level=1. > But now I want to log which rules where hit for a message, so I want > log_level=2, which logs the SPAM-TAG line with all points. > > But now I get a lot of bulk messages I don't want. Most annoying is > "extra modules loaded:" which occupies 3 lines every time. So > > 1) can I have log_level 1 with just SPAM-TAG logged? > 2) if not, can I remove "extra modules loaded" from being logged. I'd > prefer 1), as there are too many other entries also on log_level 2.
You'd have to change the log level (the first argument of a call to do_log() ) of the affected messages, e.g.: do_log(1, "extra modules loaded: %s", -> do_log(3, "extra modules loaded: %s", and/or: do_log(2, "SPAM-TAG, %s -> %s, %s", ... --> do_log(1, "SPAM-TAG, %s -> %s, %s", ... But perhaps the cleanest solution is to include the list of tests hit into the main log entry, so you may uncoment (remove the first '#') in the following line (there are two such lines) by the end of file amavisd: #[? %#T ||, Tests: \[[%T|,]\]]# or assign a replacement log template in your amavisd.conf, e.g.: $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]# [~[: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]# [? %#T ||, Tests: \[[%T|,]\]]# , %y ms# ] EOD Mark ------------------------------------------------------------------------------ Crystal Reports - New Free Runtime and 30 Day Trial Check out the new simplified licensing option that enables unlimited royalty-free distribution of the report engine for externally facing server and web deployment. http://p.sf.net/sfu/businessobjects _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/