From owner-freebsd-stable@FreeBSD.ORG Tue May 29 21:41:11 2007 Return-Path: X-Original-To: stable@freebsd.org Delivered-To: freebsd-stable@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C115C16A400; Tue, 29 May 2007 21:41:11 +0000 (UTC) (envelope-from drosih@rpi.edu) Received: from smtp6.server.rpi.edu (smtp6.server.rpi.edu [128.113.2.226]) by mx1.freebsd.org (Postfix) with ESMTP id 70ED813C448; Tue, 29 May 2007 21:41:11 +0000 (UTC) (envelope-from drosih@rpi.edu) Received: from [128.113.24.47] (gilead.netel.rpi.edu [128.113.24.47]) by smtp6.server.rpi.edu (8.13.1/8.13.1) with ESMTP id l4TKQmUu001202; Tue, 29 May 2007 16:26:49 -0400 Mime-Version: 1.0 Message-Id: In-Reply-To: <20070528110858.GA1656@titan.klemm.apsfilter.org> References: <20070528110858.GA1656@titan.klemm.apsfilter.org> Date: Tue, 29 May 2007 16:26:47 -0400 To: Andreas Klemm , stable@freebsd.org From: Garance A Drosihn Content-Type: text/plain; charset="us-ascii" ; format="flowed" X-RPI-SA-Score: undef - spam scanning disabled X-CanItPRO-Stream: default X-Canit-Stats-ID: Bayes signature not available X-Scanned-By: CanIt (www . roaringpenguin . com) on 128.113.2.226 Cc: Subject: Re: 6.2: maillog grows, newsyslog's misbehaving ? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 May 2007 21:41:11 -0000 At 1:08 PM +0200 5/28/07, Andreas Klemm wrote: >Hi, > >discovered that the maillog file on my freebsd Desktop >grows and grows (now at 50MB). > >According to the newsyslog.conf file it should be trimmed >every night at midnight. > >/var/log/maillog 640 7 * @T00 JC > >Is it a prerequisite, that the system then runs 24x7 so >that the newsyslog default settings work ? As mentioned in the man page for newsyslog.conf : If a time is specified, the log file will only be trimmed if newsyslog(8) is run within one hour of the specified time. You could force a rotate by running newsyslog yourself: /usr/sbin/newsyslog -F /var/log/maillog but that would be a one-time fix. There is a startup file for newsyslog in /etc/rc.d which runs the program one-time at startup. You could set an alternate value for the variable 'newsyslog_flags' in your /etc/rc.conf file, and use that to do the checks you want at startup. This would probably mean creating a duplicate newsyslog.conf file. So, to answer your question: Yes, the default settings for newsyslog.conf do assume that your system is running 24x7. -- Garance Alistair Drosehn = gad@gilead.netel.rpi.edu Senior Systems Programmer or gad@freebsd.org Rensselaer Polytechnic Institute or drosih@rpi.edu