Non-Existent Log File

Christian Kivalo ml+dovecot at valo.at
Sat Jun 13 12:20:06 UTC 2015


On 2015-06-13 14:00, Steve Matzura wrote:
> 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.

Logrotate is your friend for this task.

> 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?

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


More information about the dovecot mailing list