Reducing logging

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Reducing logging

@lbutlr
I may have asked this before, but if so I can't find the thread.

I'd like to either reduce the amount that postfix logs or redirect certain events to a secondary log file (that I can put on a shorter rotation than the full mail log).

Is there anyway to redirect, for example, post screen events to a different log file or the warning hostname does not resolve messages?

--
My main job is trying to come up with new and innovative and effective ways to reject even more mail. I'm up to about 97% now.
Reply | Threaded
Open this post in threaded view
|

Re: Reducing logging

Patrick Ben Koetter-2
* LuKreme <[hidden email]>:
> I may have asked this before, but if so I can't find the thread.
>
> I'd like to either reduce the amount that postfix logs or redirect certain events to a secondary log file (that I can put on a shorter rotation than the full mail log).
>
> Is there anyway to redirect, for example, post screen events to a different log file or the warning hostname does not resolve messages?

You'll probably have to use a (more modern) syslog service, e.g. rsyslogd, to
split log by content into multiple files.

p@rick

--
[*] sys4 AG
 
https://sys4.de, +49 (89) 30 90 46 64
Schleißheimer Straße 26/MG,80333 München
 
Sitz der Gesellschaft: München, Amtsgericht München: HRB 199263
Vorstand: Patrick Ben Koetter, Marc Schiffbauer, Wolfgang Stief
Aufsichtsratsvorsitzender: Florian Kirstein
 
Reply | Threaded
Open this post in threaded view
|

Re: Reducing logging

Christian Schmidt
Patrick Ben Koetter, 12.03.2018:
> You'll probably have to use a (more modern) syslog service, e.g. rsyslogd, to
> split log by content into multiple files.

In addition, you could add the option "-o syslog_name=postfix-587" (or
"25") to the corresponding entry in master.cf. This will make postfix
"label" the logfile entries - and maybe enable your syslog service to
direct them into separate files.

Kind Regards,
Christian Schmidt

--
No signature available.


smime.p7s (7K) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Reducing logging

Matus UHLAR - fantomas
>Patrick Ben Koetter, 12.03.2018:
>> You'll probably have to use a (more modern) syslog service, e.g. rsyslogd, to
>> split log by content into multiple files.

On 13.03.18 09:35, Christian Schmidt wrote:
>In addition, you could add the option "-o syslog_name=postfix-587" (or
>"25") to the corresponding entry in master.cf. This will make postfix
>"label" the logfile entries - and maybe enable your syslog service to
>direct them into separate files.

at least on debian, smtpd on submission port (587) has by default:
"-o syslog_name=postfix/submission"

--
Matus UHLAR - fantomas, [hidden email] ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Microsoft dick is soft to do no harm
Reply | Threaded
Open this post in threaded view
|

Re: Reducing logging

@lbutlr
In reply to this post by Christian Schmidt
On Mar 13, 2018, at 02:35, Christian Schmidt <[hidden email]> wrote:
> In addition, you could add the option "-o syslog_name=postfix-587" (or
> "25") to the corresponding entry in master.cf. This will make postfix
> "label" the logfile entries - and maybe enable your syslog service to
> direct them into separate files.

Labeling isn't the issue, I can already grep out the things I don't want, it's just a lot do do whenever I want to get certain information out (just as one example, I want to check for errors and warnings, but I *never* care about the “does not resolve” warnings which will be 90% of the output looking for warnings and errors if I don't specifically grep that out...

In fact, I may simply run a task to strip some things out of the logfiles and put others into other files after the files roll over.

But I’ll take a look at rsyslogd first.

--
My main job is trying to come up with new and innovative and effective ways to reject even more mail. I'm up to about 97% now.