From owner-freebsd-questions@FreeBSD.ORG Tue Sep 27 06:12:43 2005 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 2897016A420 for ; Tue, 27 Sep 2005 06:12:43 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from rosebud.otenet.gr (rosebud.otenet.gr [195.170.0.94]) by mx1.FreeBSD.org (Postfix) with ESMTP id F081543D53 for ; Tue, 27 Sep 2005 06:12:39 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from flame.pc (aris.bedc.ondsl.gr [62.103.39.226]) by rosebud.otenet.gr (8.13.4/8.13.4/Debian-1) with SMTP id j8R6Cb4Z006764; Tue, 27 Sep 2005 09:12:37 +0300 Received: from flame.pc (flame [127.0.0.1]) by flame.pc (8.13.4/8.13.4) with ESMTP id j8R6C34J000998; Tue, 27 Sep 2005 09:12:03 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from keramida@localhost) by flame.pc (8.13.4/8.13.4/Submit) id j8R6C3LQ000997; Tue, 27 Sep 2005 09:12:03 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Tue, 27 Sep 2005 09:12:03 +0300 From: Giorgos Keramidas To: Brian Josefsen Message-ID: <20050927061203.GB895@flame.pc> References: <20050927044348.GA56726@wasd.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050927044348.GA56726@wasd.dk> Cc: freebsd-questions@freebsd.org Subject: Re: using procmail rules to handle old maildir 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: Tue, 27 Sep 2005 06:12:43 -0000 On 2005-09-27 06:43, Brian Josefsen wrote: > Hello all > > I don't know if it's appropriate to ask this question here, but now i'll > give it a try. > > I've set up postfix on a new box with maildir support, and i've been > using procmail to deliver all my mail, so i now have the rules i've always > missed. > > Then i've taken a tarball from the vhosting environment from the old > server, so i have now a Maildir that i use, with all my new mail in it, > and another Maildir with all the old mail. > > Now i would like to sort all my old mail using the procmail rules i have > now, it could be as easy as: > cd oldmaildir > procmail < find . -type f -exec echo {} \; > > but procmail don't delete the mail from the old maildir, and since there > is ~9k mail, i would hate to first filter all of it, and then go > manually through all of it again. > > Anyone out there with any idea to solve this would be highly appreciated > as i depend on "quick" access to old mail. > > FreeBSD 5.4, latest procmail, mutt zsh. AFAIK, procmail cannot filter Maildir/ files. You'll have to convert the old Maildir/ to UNIX mbox format. Then you can use formail and procmail to filter it all through your current .procmailrc rules: $ formail -s procmail < oldmail.mbox That should take care of it all :) Then you can delete oldmail.mbox