Re: Patch for Dovecot
"Stefan Jakobs" <[email protected]>
| Newsgroups | gmane.comp.log.logwatch.devel |
|---|---|
| Message-ID | <[email protected]> |
Willi Mann:
> Hello Stefan,
>
> Stefan Jakobs wrote:
> > Brian Masney:
> >> I am using Logwatch 7.4.0+svn20111221rev79-1ubuntu1 that came with
> >
> > I don't think that is a proper fix.
> > I added a customized *RemovedHeaders command to dovecot's service
> > configuration. This makes the "Headers to remove" section customizable by
> > the user.
>
> I think you can revert the changes in revision 142 because the feature that
> the user needs is already there. The patch that the user submitted is
> against an old revision (revision 79 + maybe some patches by me).
>
> in revision 141:
> $ThisLine =~ s/^\w{3} .\d \d\d:\d\d:\d\d (?:[^\s:]* |)//;
>
> the patch by the user:
> - $ThisLine =~ s/^\w{3} .\d \d\d:\d\d:\d\d //;
> + $ThisLine =~ s/^\w{3} .\d \d\d:\d\d:\d\d\s*[\w\d_-]*\s*//;
>
> So the user's patch essentially removes the hostname. Unfortunately, there
> are cases where the hostname occurs and cases where it does not occur.
> However, the word after the timestamp and the optionally occuring hostname
> always contains a double colon (':'), such that the regex in 141 which
> removes the "token" after the timestamp if it does not contain a double
> colon should work for the user.
Actually I kept your changes (and the regex from rev141). I only moved the
"remove the timestamp" function to the place where it belongs: the service
configuration file with the RemoveHeaders shared script. I hope that this
change makes it easier to port logwatch's default configuration to a
distribution or user specific configuration.
If I did this right the dovecot report should work as before.
> WM
Best regards
Stefan
------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite
It's a free troubleshooting tool designed for production
Get down to code-level detail for bottlenecks, with <2% overhead.
Download for free and get started troubleshooting in minutes.
http://p.sf.net/sfu/appdyn_d2d_ap2