log rotation, one process doesn't know about it
Bill Moran
wmoran at collaborativefusion.com
Sat Oct 21 13:55:12 UTC 2006
On Sat, 21 Oct 2006 09:33:34 +0200 (CEST)
Zbigniew Szalbot <zbyszek at szalbot.homedns.org> wrote:
> Hello,
>
> I have set up dovecot to log its data to the same log as exim does. This
> works fine till midnight when it comes to log rotation. Then exim still
> logs to its log but dovecot ignores it.
>
> Now, I have done the homework, found that there is newsyslog.conf and read
> about flags. And I have the following entry in this file:
>
> /var/log/exim/mainlog mailnull:mail 640 60 * @T00 ZC
>
> I used to have a flag ZN but I read that the N flag actually makes syslogd
> ignore to inform other processes about a new file being rotated.
>
> So I removed it and left only Z, restarted syslogd, but no joy after
> midnight. I then added C out of sheer dispair but dovecot still ignores
> the new log after midnight.
>
> Could anyone suggest what I should do in order to make this work as
> intended?
Do one of the following:
1) Configure both exim and dovecot to log through syslog with the same
facility. Then configure syslogd to put that facility in the file
you want.
2) Put exim and dovecot log data in seperate files and configure
newsyslog to rotate both of those files. If dovecot needs restarted
in order to handle log rotation, be sure to put dovecot's PID file in
the last column.
Personally, I do #1 -- all my mail programs log to /var/log/maillog, but
either will work.
--
Bill Moran
Potential Technologies
http://www.potentialtech.com
More information about the freebsd-questions
mailing list