My /var/log/maillog was getting pretty big because of lots of testing and re-configuring I've been doing lately with both Dovecot and Postfix. I figured just remove /var/log/maillog and it would be re-created. It wasn't--not by Dovecot, not by Postfix. I had to manually create a new one, put one character in it, save it, properly secure it with chmod, and then Dovecot (and postfix) messages got written to it. This can't possibly be the proper procedure to clear maillog messages ... can it?
On Sat, 13 Jun 2015 15:15:07 +0300, you wrote:
Look into logrotate, and turn off your debugging stuff.
I actually did look at logrotate, but since I'm nobody's big understander of what's in there, I didn't change anything until I learn more about what's in logrotate.d/syslog and other things.
On 2015-06-13 14:00, Steve Matzura wrote:
Logrotate is your friend for this task.
touch $logfile and chmod would have been enough, i think.
The other way would be to restart your syslog daemon to let it recreate the missing logfile, thats what my logrotate does after rotating the logfile.
- christian
participants (3)
-
Christian Kivalo
-
Muzaffer Tolga Ozses
-
Steve Matzura