From owner-freebsd-questions@FreeBSD.ORG Sun Jun 3 13:06:20 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 7213316A41F for ; Sun, 3 Jun 2007 13:06:20 +0000 (UTC) (envelope-from lacoste@univ-paris12.fr) Received: from smtp23.orange.fr (smtp23.orange.fr [193.252.22.126]) by mx1.freebsd.org (Postfix) with ESMTP id 3782D13C455 for ; Sun, 3 Jun 2007 13:06:20 +0000 (UTC) (envelope-from lacoste@univ-paris12.fr) Received: from me-wanadoo.net (localhost [127.0.0.1]) by mwinf2323.orange.fr (SMTP Server) with ESMTP id DC5997000096; Sun, 3 Jun 2007 15:06:18 +0200 (CEST) Received: from [192.168.1.24] (ASte-Genev-Bois-151-1-84-181.w86-212.abo.wanadoo.fr [86.212.169.181]) by mwinf2323.orange.fr (SMTP Server) with ESMTP id AFC837000094; Sun, 3 Jun 2007 15:06:18 +0200 (CEST) X-ME-UUID: 20070603130618720.AFC837000094@mwinf2323.orange.fr From: Thierry Lacoste To: freebsd-questions@freebsd.org Date: Sun, 3 Jun 2007 15:05:03 +0200 User-Agent: KMail/1.9.5 References: <200705312221.23108.lacoste@univ-paris12.fr> <4662AD92.8080106@vindaloo.com> In-Reply-To: <4662AD92.8080106@vindaloo.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200706031505.04290.lacoste@univ-paris12.fr> Cc: Christopher Hilton 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 13:06:20 -0000 On Sunday 03 June 2007 14:01, Christopher Hilton wrote: > 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. AFAICS the Maildir/ format implies that mails are delivered to the home directory of the users. On the mail server the home diretory is NFS-mounted read-only just to be able to see the .forward files. Users are required to use only pops to read their mail (qpopper is on the mail server) and I wanted to avoid unnecessary network traffic: from the mail server to the NFS server upon mail receipt and in the other way when readind mail with pops. Regards, Thierry.