From owner-freebsd-ports@FreeBSD.ORG Mon Sep 26 09:27:05 2011 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 405F51065670 for ; Mon, 26 Sep 2011 09:27:05 +0000 (UTC) (envelope-from conrads@cox.net) Received: from eastrmfepo202.cox.net (eastrmfepo202.cox.net [68.230.241.217]) by mx1.freebsd.org (Postfix) with ESMTP id D52588FC08 for ; Mon, 26 Sep 2011 09:27:04 +0000 (UTC) Received: from eastrmimpo109.cox.net ([68.230.241.222]) by eastrmfepo202.cox.net (InterMail vM.8.01.04.00 201-2260-137-20101110) with ESMTP id <20110926092659.WMBS14088.eastrmfepo202.cox.net@eastrmimpo109.cox.net>; Mon, 26 Sep 2011 05:26:59 -0400 Received: from serene.no-ip.org ([172.18.52.4]) by eastrmimpo109.cox.net with bizsmtp id dMSx1h00B05SVJc02MSyqA; Mon, 26 Sep 2011 05:26:58 -0400 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-RefID: str=0001.0A020204.4E804562.00C4,ss=1,re=0.000,fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=1.1 cv=6rx5rrop0B/3XsMRrR1KrzZMeFjRjT2p3ZIkrGo5W8Y= c=1 sm=1 a=a6EHAwk3pj8A:10 a=G8Uczd0VNMoA:10 a=kj9zAlcOel0A:10 a=HjEgb3SSAAAA:8 a=6I5d2MoRAAAA:8 a=kviXuzpPAAAA:8 a=8786Un6sgAkQhKjbQpYA:9 a=YqhbVhxfW_Lrgrxc8EMA:7 a=CjuIK1q_8ugA:10 a=__daLkwkpeoA:10 a=4vB-4DCPJfMA:10 a=UaX1woSWE4/tG05bAFg+xw==:117 X-CM-Score: 0.00 Authentication-Results: cox.net; none Received: from cox.net (localhost [127.0.0.1]) by serene.no-ip.org (8.14.5/8.14.5) with ESMTP id p8Q9Qv8O043754; Mon, 26 Sep 2011 04:26:57 -0500 (CDT) (envelope-from conrads@cox.net) Date: Mon, 26 Sep 2011 04:26:52 -0500 From: "Conrad J. Sabatier" To: "Matthew D. Fuller" Message-ID: <20110926042652.1db4798a@cox.net> In-Reply-To: <20110926084516.GL14862@over-yonder.net> References: <20110926024350.4e881c1b@cox.net> <20110926084516.GL14862@over-yonder.net> X-Mailer: Claws Mail 3.7.10 (GTK+ 2.24.6; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Warren Block , ports@freebsd.org Subject: Re: Replacing procmail with maildrop X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2011 09:27:05 -0000 On Mon, 26 Sep 2011 03:45:17 -0500 "Matthew D. Fuller" wrote: > On Mon, Sep 26, 2011 at 02:43:50AM -0500 I heard the voice of > Conrad J. Sabatier, and lo! it spake thus: > > > > I'm just wondering, though, if you could offer any advice on how to > > convert something like the following procmail recipe I use for my > > FreeBSD mailing lists. > > I work off the envelope sender, but you can adapt it. Maildrop gives > you subexpression matches. > > if($RETPATH =~ /^ to $MBOXDIR/f-$MATCH1 > > (of course, the cvs list ends up having to be special cased) > > > So you'd just match the List-ID header similarly, something like > > if(/^List-ID: freebsd-([a-z]+).freebsd.org/) > to FreeBSD/$MATCH1 > > (totally untested of course...) Oh, I see now! So the match result on the parenthesized subexpression will, in fact, be exactly what I'm looking for already. No more need to "manually" strip away all the unwanted stuff with sed, as I was doing for procmail. No need for [re]formail, either. Neat-o! :-) Thanks again. -- Conrad J. Sabatier conrads@cox.net