Sometimes it is calming to watch your server logs scroll by, mh, a wonky IP wants to ssh into my box, oh a new email is coming in, hehe no spammer, this email is going to be rejected.. But some log entries are just an annoyance. Oh, my email client is logging in again and out.. and in again. Let’s get rid of these. I use syslog-ng for all logging porposes so I will only focus on its configuration possibilities.
I have 3 main logfiles, boring cron output, all things mail and everything else.
1 2 3
Settings for dovecot dovecot login/logout messages:
And as a second example of useless log entries I want to eradicate log entries by monit which tests if my sshd is still running in its every cycle.
As cron is fine and boring, no filtering here
That’s basically it. Now the only thing left to do is telling syslog-ng where to put all these precious log entries.
1 2 3
Restart your syslog-ng and enjoy the silence.