[syslog-ng] rewrite log messages

Matt Cuttler mcuttler at bnl.gov
Sun Jan 6 02:59:25 CET 2008


M. Braun syslog-ng wrote:
> Hi,
>
> is there a way to make syslog-ng rewrite a log message before it is
> written to disk, e.g.
> to remove all sender and recipient fields the mail server did log?
>   

Are you sure that you want/need to do all of that rewriting work within 
syslog-ng? There are tons of tools you can run *after the fact* to strip 
out characters or fields in a text/log file.

That being said, you can probably use "syslog-ng-anon",  a 3rd party 
patch to syslog-ng, that will strip out IP addresses (or anything else 
using regular expressions).

The patch has been mentioned, at least once before, on this mailing list.

-Matt Cuttler



More information about the syslog-ng mailing list