From owner-freebsd-questions@FreeBSD.ORG Sat Oct 21 14:51:30 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 706D616A415 for ; Sat, 21 Oct 2006 14:51:30 +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 3ADCC43D45 for ; Sat, 21 Oct 2006 14:51:29 +0000 (GMT) (envelope-from wmoran@collaborativefusion.com) Received: from collaborativefusion.com (mx01.pub.collaborativefusion.com [206.210.89.201]) (TLS: TLSv1/SSLv3,256bits,AES256-SHA) by wingspan with esmtp; Sat, 21 Oct 2006 10:51:28 -0400 id 0005641D.453A33F0.00013274 Received: from Internal Mail-Server (206.210.89.202) by mx01 (envelope-from wmoran@collaborativefusion.com) with AES256-SHA encrypted SMTP; 21 Oct 2006 10:46:01 -0400 Date: Sat, 21 Oct 2006 10:51:27 -0400 From: Bill Moran To: Zbigniew Szalbot Message-Id: <20061021105127.b424bcfb.wmoran@collaborativefusion.com> In-Reply-To: <20061021160140.X39264@192.168.11.51> References: <20061021091555.O30081@192.168.11.51> <20061021095626.72171da9.wmoran@collaborativefusion.com> <20061021160140.X39264@192.168.11.51> Organization: Collaborative Fusion X-Mailer: Sylpheed version 2.2.9 (GTK+ 2.10.6; 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 14:51:30 -0000 In response to Zbigniew Szalbot : > 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.