Re: [AMaViS-user] Amavisd-new extend logging

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 ...


Go Back   Usenet Forums > Anti-Spam and Anti-Virus Related Forums > Amavis User

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 08-03-2005
Mark Martinec
 
Posts: n/a
Default Re: [AMaViS-user] Amavisd-new extend logging

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/
Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:14 AM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0