From owner-freebsd-questions@FreeBSD.ORG Sun Jun 3 12:01:26 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id D4B7516A400 for ; Sun, 3 Jun 2007 12:01:26 +0000 (UTC) (envelope-from chris@vindaloo.com) Received: from corellia.vindaloo.com (corellia.vindaloo.com [64.51.148.100]) by mx1.freebsd.org (Postfix) with ESMTP id AB30013C484 for ; Sun, 3 Jun 2007 12:01:26 +0000 (UTC) (envelope-from chris@vindaloo.com) Received: from [172.24.145.69] (endor.vindaloo.com [172.24.145.69]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by corellia.vindaloo.com (Postfix) with ESMTP id C5E415CB4; Sun, 3 Jun 2007 08:01:25 -0400 (EDT) Message-ID: <4662AD92.8080106@vindaloo.com> Date: Sun, 03 Jun 2007 08:01:22 -0400 From: Christopher Hilton User-Agent: Thunderbird 1.5.0.12 (Macintosh/20070509) MIME-Version: 1.0 To: Thierry Lacoste References: <200705312221.23108.lacoste@univ-paris12.fr> In-Reply-To: <200705312221.23108.lacoste@univ-paris12.fr> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-questions@freebsd.org Subject: Re: deleting old mails 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: Sun, 03 Jun 2007 12:01:26 -0000 Thierry Lacoste wrote: > I'm running a postfix server on FreeBSD 6.1 and I'd like to have > a cronjob which deletes old mails from mboxes in /var/mail. > > I tried mail/archivemail but it cannot create it's lock file > in /var/mail because it runs as the user owning the mailbox > on which it operates. > > I also tried mail/archmbox but I'm wondering if it is safe > to use it while postfix is running. Quoting the manual: > > A few words about locking. There has been a discussion about archmbox > handles file locking. The answer is simple: no mailbox is ever locked. > The reason behind this behavior is that I want archmbox to be as least > invasive as possible, so other kind of checks are performed to ensure > that no data is lost (mailbox has changed/mailbox is in use by another > program). I will surely add some locking mechanism in the future. > > Any help would be appreciated. > Have you consider using Maildir/ format instead? A switch to Maildir/ format would allow you to use the "find" program to weed out your mailbox and locking is not an issue. -- Chris -- __o "All I was doing was trying to get home from work." _`\<,_ -Rosa Parks ___(*)/_(*)___________________________________________________________ Christopher Sean Hilton pgp key: D0957A2D/f5 30 0a e1 55 76 9b 1f 47 0b 07 e9 75 0e 14