[Logwatch] amavisd-new and logwatch

MrC lists-logwatch at cappella.us
Thu Jan 11 13:21:14 MST 2007

> -----Original Message-----
> Subject: [Logwatch] amavisd-new and logwatch
> I am not a Perl programmer at all but, would like to be. I 
> have a quick question about the amavis service. I see that 
> the $Towards variable grabs the email address of the person 
> getting the email. Can I somehow make this a static entry? Or 
> can I delete out all info I don't want before it is emailed? 
> I want to send a logwatch report to each of my users like the 
> example below with ONLY their stats and the total results at 
> the top. I am using the 1.34 version of amavis on logwatch 
> version 5.2.2 on a Debian box with Postfix MTA
>      326            Scanned
>      123 (37.73%)   Clean passed
>        6 ( 1.84%)   Malware blocked
>       18 ( 5.52%)   Spam passed
>      178 (54.60%)   Spam blocked
>        1 ( 0.31%)   Bad headers passed


You won't want to try to change the Towards variable, as it is captured
line-by-line.  You would have to instead filter out from your maillog the
lines you don't want, saving those that you want into a temporary logfile,
and then process them with logwatch.  Alternatively, you could create a
simple script that does the filtering, and add a line to the amavis conf
file to run your script (eg. *FilterOutUsers).  I think that setting an
environment variable that your script uses (eg. the desired email address)
would work.  You might need to update your logwatch version to do this.  See
the HOWTO-Customize-LogWatch in the recent versions of logwatch.


Ps. When I return from vacation next week, I have an update to the amavis
service that will provide a couple nice changes.

More information about the Logwatch mailing list