Re: log rotation, one process doesn't know about it
Hello, On Sat, 21 Oct 2006, Zbigniew Szalbot wrote: 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. What I had to do to make it work was to remove log_path = /var/log/exim/mainlog from Dovecot configuration file leaving syslog_facility = mail intact. Now Dovecot and exim happily write to /var/log/exim/mainlog Thank you for your suggestions! -- Zbigniew Szalbot ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: log rotation, one process doesn't know about it
On Sat, 21 Oct 2006 09:33:34 +0200 (CEST) Zbigniew Szalbot [EMAIL PROTECTED] 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 ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: log rotation, one process doesn't know about it
Hello, On Sat, 21 Oct 2006, Bill Moran wrote: 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. As FBSD is still new to me, I am trying to understand what it would involve. Exim is configured to log to /var/log/exim/mainlog. In the newsyslog.conf I have /var/log/exim/mainlog mailnull:mail 640 60 * @T00 ZC Does it mean exim uses syslogd? It is not obvious to me. If it does, how can I do the same with dovecot? In dovecot.conf I have the path pointing to /var/log/exim/mainlog. If I want to use syslogd, do I have to write to /var/log/maillog? I want to get it right using the first solution. Thank you very much for your patience with me! -- Zbigniew Szalbot ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: log rotation, one process doesn't know about it
In response to Zbigniew Szalbot [EMAIL PROTECTED]: Hello, On Sat, 21 Oct 2006, Bill Moran wrote: 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. As FBSD is still new to me, I am trying to understand what it would involve. Exim is configured to log to /var/log/exim/mainlog. In the newsyslog.conf I have /var/log/exim/mainlog mailnull:mail 640 60 * @T00 ZC Does it mean exim uses syslogd? It is not obvious to me. If it does, how can I do the same with dovecot? In dovecot.conf I have the path pointing to /var/log/exim/mainlog. If I want to use syslogd, do I have to write to /var/log/maillog? I want to get it right using the first solution. Thank you very much for your patience with me! You're asking all the wrong questions. Take a step back and do a little reading, it's not really hard once you know what order to go in. First, read the man pages for syslogd and syslog.conf. The high-level explanation is that syslogd accepts messages from many places and handles them according to its configuration. syslogd and newsyslog are two different programs, despite the similarities in their names, they are independent. Next, research the program logger, which is a simple tool to send messages to syslogd. Experiment a bit to get a feel for how messages are being handled, and gain an understanding of facilities and levels. From there, both Dovecot and Exim will both have configuration parameters to tell them _how_ to log. Looking at my Dovecot config, I didn't have to change anything to have it log to syslogd with facility mail. I don't use Exim, so I can't speak to the details of its config. If you have specific questions, post to the list. -- Bill Moran Collaborative Fusion Inc. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to [EMAIL PROTECTED]