MailScanner logwatch script
Ugo Bellavance
ugob at camo-route.com
Fri Jul 28 18:56:48 IST 2006
Denis Beauchemin wrote:
> Tony Stocker a écrit :
>> Hello All,
>>
>> I'm getting a lot of things listed under "Unmatched Entries" with the
>> logwatch script for MailScanner. They fall into a couple of
>> categories:
>> ...
>>
>> Does anyone have any ideas how to tune things so this stuff doesn't
>> end up in there? There are a lot of entry types here so I'm loathe to
>> rewrite the mailscanner logwatch script and I'm not even sure how to
>> write a filter for what I called the "Message conversion" entries that
>> wouldn't catch everything.
>>
>>
> The script is in /etc/log.d/scripts/services/mailscanner and is a
> standard Perl script. I modify them every time they don't catch the
> things that annoy me. At the beginning of the script there is a loop
> that just tosses lines away:
> ( $ThisLine =~ m/Message .+ added TNEF contents/ ) or
> ( $ThisLine =~ m/Content Checks: Detected and will convert HTML/
> ) ) {
> # We don't care about these
In version 7+, this is done in the ignore.conf file. Easier on upgrades...
>
> Just add your own patterns BEFORE the last line:
> ( $ThisLine =~ m/Message .+ added TNEF contents/ ) or
> ( $ThisLine =~ m/this is my first patterm match/ ) or
> ( $ThisLine =~ m/this is my second patterm match/ ) or
> ( $ThisLine =~ m/Content Checks: Detected and will convert HTML/
> ) ) {
> # We don't care about these
>
> If you want the script to count some lines you'll have to look further
> down in the script and copy the behaviour of some other pattern match.
> Then you also have to add a block to print out the totals you counted.
> It's really simple.
True, it is rather simple.
>
> Denis
>
More information about the MailScanner
mailing list