This is a discussion on Re: [AMaViS-user] Amavisd-new extend logging within the Amavis User forums, part of the Anti-Spam and Anti-Virus Related Forums category; Oliver, > i want to log the subjects auf spammails in amavisd.log, how can i do that > ? Im ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Oliver,
> i want to log the subjects auf spammails in amavisd.log, how can i do that > ? Im not very experienced with perl, could someone post some code to do > this ? There is a macro %j which expands to a Subject, and can be used in the log template ($log_templ) or in templates for notifications. One way to include it in the log entry is to remove the leading # in the line: #[? %j ||, Subject: "%j"]# near the end of the file amavisd (two instances). Another would be to uncomment and use the multiline assignment to $log_templ, such as shown in the amavisd.conf-sample, e.g.: $log_templ = ' [?%#D|#|Passed # [? [?%#V|1] |INFECTED (%V)|# [? [?%#F|1] |BANNED (%F)|# [? [? %2|1] |SPAM|# [? [?%#X|1] |BAD-HEADER|CLEAN]]]]# , [? %p ||%p ][?%a||[?%l||LOCAL ]\[%a\] ][?%e||\[%e\] ]<%o> -> [%D|,]# [? %q ||, quarantine: %q]# [? %Q ||, Queue-ID: %Q]# [? %m ||, Message-ID: %m]# [? %r ||, Resent-Message-ID: %r]# , mail_id: %i# , Hits: %c# #, size: %z# [? %j ||, Subject: "%j"]# #[? %#T ||, Tests: \[[%T|,]]\]# , %y ms# ] [?%#O|#|Blocked # [? [?%#V|1] |INFECTED (%V)|# [? [?%#F|1] |BANNED (%F)|# [? [? %2|1] |SPAM|# [? [?%#X|1] |BAD-HEADER|CLEAN]]]]# , [? %p ||%p ][?%a||[?%l||LOCAL ]\[%a\] ][?%e||\[%e\] ]<%o> -> [%O|,]# [? %q ||, quarantine: %q]# [? %Q ||, Queue-ID: %Q]# [? %m ||, Message-ID: %m]# [? %r ||, Resent-Message-ID: %r]# , mail_id: %i# , Hits: %c# #, size: %z# [? %j ||, Subject: "%j"]# #[? %#T ||, Tests: \[[%T|,]]\]# , %y ms# ]'; and place that somewhere into your amavisd.conf. Mark ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf _______________________________________________ AMaViS-user mailing list AMaViS-user@lists.sourceforge.net https://lists.sourceforge.net/lists/...fo/amavis-user AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3 AMaViS-HowTos:http://www.amavis.org/howto/ |