From owner-freebsd-questions@FreeBSD.ORG Sat Oct 21 13:55:12 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4ABF916A492 for ; Sat, 21 Oct 2006 13:55:12 +0000 (UTC) (envelope-from wmoran@collaborativefusion.com) Received: from mx00.pub.collaborativefusion.com (mx00.pub.collaborativefusion.com [206.210.89.199]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9845B43D46 for ; Sat, 21 Oct 2006 13:55:07 +0000 (GMT) (envelope-from wmoran@collaborativefusion.com) Received: from localhost (pr40.pitbpa0.pub.collaborativefusion.com [206.210.89.202]) (AUTH: LOGIN wmoran, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Sat, 21 Oct 2006 09:55:03 -0400 id 0005641D.453A26B7.00012F77 Date: Sat, 21 Oct 2006 09:56:26 -0400 From: Bill Moran To: Zbigniew Szalbot Message-Id: <20061021095626.72171da9.wmoran@collaborativefusion.com> In-Reply-To: <20061021091555.O30081@192.168.11.51> References: <20061021091555.O30081@192.168.11.51> Organization: Collaborative Fusion X-Mailer: Sylpheed version 2.2.7 (GTK+ 2.8.20; i386-portbld-freebsd6.1) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: log rotation, one process doesn't know about it X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 21 Oct 2006 13:55:12 -0000 On Sat, 21 Oct 2006 09:33:34 +0200 (CEST) Zbigniew Szalbot 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