From owner-freebsd-questions@FreeBSD.ORG Sun Jun 3 15:20:37 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 0EC3116A469 for ; Sun, 3 Jun 2007 15:20:37 +0000 (UTC) (envelope-from mnslinky@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.179]) by mx1.freebsd.org (Postfix) with ESMTP id A835913C45A for ; Sun, 3 Jun 2007 15:20:36 +0000 (UTC) (envelope-from mnslinky@gmail.com) Received: by py-out-1112.google.com with SMTP id a29so1952673pyi for ; Sun, 03 Jun 2007 08:20:36 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=MKHqzTvCYp2yCaBPcdKzjZo68uvhv98QIK5IZtW9Ogqeap79j6dGmV/vEjJwAXaoEYYjnB8BFLpE50eFi+lj0+My/Do1eTzpv5TWIaXzx7A0UMz8fdedXk3n9UOCcLagAcs9jd+zaZCgv/hD3SxX2B6htJUFUW1o3Z6xZvCyJHI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:in-reply-to:references:mime-version:content-type:message-id:cc:content-transfer-encoding:from:subject:date:to:x-mailer; b=B0990rlfOpXcOSADlB/2GOx/uwNnZ2kwWZtfMuenWZMgnuZfvxxpcEqxXlGBb5gz9cYwKyzZqORuUR2j7AZZdbL8p8eaQnjq1/MyS/JEDZBnXMrIpeXc4s1QRB0U8B0TEN6olY1YKfhvPm5RXHAwW1d2CoM8IEpn0e6FtKqNzjM= Received: by 10.35.99.14 with SMTP id b14mr6594032pym.1180884035984; Sun, 03 Jun 2007 08:20:35 -0700 (PDT) Received: from ?192.168.1.2? ( [209.240.66.157]) by mx.google.com with ESMTP id v15sm2617646pyh.2007.06.03.08.20.35; Sun, 03 Jun 2007 08:20:35 -0700 (PDT) In-Reply-To: <200706031505.04290.lacoste@univ-paris12.fr> References: <200705312221.23108.lacoste@univ-paris12.fr> <4662AD92.8080106@vindaloo.com> <200706031505.04290.lacoste@univ-paris12.fr> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: Content-Transfer-Encoding: 7bit From: Eric Crist Date: Sun, 3 Jun 2007 10:20:32 -0500 To: Thierry Lacoste X-Mailer: Apple Mail (2.752.3) Cc: Christopher Hilton , 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 15:20:37 -0000 On Jun 3, 2007, at 8:05 AMJun 3, 2007, Thierry Lacoste wrote: > 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. > That's not true. My particular mail system saves to a mail-specific directory, under /usr/local. Not in the user's home directory. If you're worried about disk space, try enabling quotas in your postfix configuration. There's a great postfix how to at www.purplehat.org to help you set all this up. Personally, I don't try to tell users what email they can have, I just limit their space - they'll decide what's important and what's not. However, maildir is the way to go if you want to search for delete certain mail. HTH.