From owner-freebsd-ports@FreeBSD.ORG Mon Sep 26 09:31:00 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 506DC1065673 for ; Mon, 26 Sep 2011 09:31:00 +0000 (UTC) (envelope-from conrads@cox.net) Received: from eastrmfepo201.cox.net (eastrmfepo201.cox.net [68.230.241.216]) by mx1.freebsd.org (Postfix) with ESMTP id ACE088FC13 for ; Mon, 26 Sep 2011 09:30:59 +0000 (UTC) Received: from eastrmimpo03.cox.net ([68.1.16.126]) by eastrmfepo201.cox.net (InterMail vM.8.01.04.00 201-2260-137-20101110) with ESMTP id <20110926093053.UJLY12561.eastrmfepo201.cox.net@eastrmimpo03.cox.net>; Mon, 26 Sep 2011 05:30:53 -0400 Received: from serene.no-ip.org ([98.164.86.236]) by eastrmimpo03.cox.net with bizsmtp id dMWt1h00355wwzE02MWtwv; Mon, 26 Sep 2011 05:30:53 -0400 X-CT-Class: Clean X-CT-Score: 0.00 X-CT-RefID: str=0001.0A020208.4E80464D.00A8,ss=1,re=0.000,fgs=0 X-CT-Spam: 0 X-Authority-Analysis: v=1.1 cv=ASjpOCvEPoSfhuYnpalwTqAN2s78hBywh12H8bbbxwo= c=1 sm=1 a=a6EHAwk3pj8A:10 a=G8Uczd0VNMoA:10 a=kj9zAlcOel0A:10 a=uAbGmPAyUfLL1M3oYAsfuA==:17 a=HjEgb3SSAAAA:8 a=6I5d2MoRAAAA:8 a=kviXuzpPAAAA:8 a=lXwJijANNNL0VVC3Ph0A:9 a=CjuIK1q_8ugA:10 a=__daLkwkpeoA:10 a=SV7veod9ZcQA:10 a=4vB-4DCPJfMA:10 a=uAbGmPAyUfLL1M3oYAsfuA==: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 p8Q9Up38074016; Mon, 26 Sep 2011 04:30:51 -0500 (CDT) (envelope-from conrads@cox.net) Date: Mon, 26 Sep 2011 04:30:45 -0500 From: "Conrad J. Sabatier" To: "Matthew D. Fuller" Message-ID: <20110926043045.06efd35b@cox.net> In-Reply-To: <20110926091601.GM14862@over-yonder.net> References: <20110926024350.4e881c1b@cox.net> <20110926084516.GL14862@over-yonder.net> <20110926040731.52dc8bc2@cox.net> <20110926091601.GM14862@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: freebsd-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:31:00 -0000 On Mon, 26 Sep 2011 04:16:01 -0500 "Matthew D. Fuller" wrote: > On Mon, Sep 26, 2011 at 04:07:31AM -0500 I heard the voice of > Conrad J. Sabatier, and lo! it spake thus: > > > > OK, I'm starting to get a little better of an idea of what to do. > > My main concern so far has been the ability to nest a set of > > commands within a recipe the way procmail allows. > > Well, it's C-like; you can put braces around the body of the if and > have however much you want inside there. > > > > I don't want to use the full list name as it appears in the List-Id > > header, but a simpler, pared down version of it. This was fairly > > easy to do in procmail; I just have to work out the correct syntax > > for doing it with maildrop. > > What I had there > > > > if(/^List-ID: freebsd-([a-z]+).freebsd.org/) > > > to FreeBSD/$MATCH1 > > should give you (mod bugs in my top-of-my-head'ing of course) the same > sorta result as your > > >> :0 > >> * ^List-Id:.*freebsd.org > >> { > >> ListId=`formail -c -x List-Id: | \ > >> sed -e 's/^.*.*$//' \ > >> -e 's/\.freebsd\.org//' \ > >> -e 's/^freebsd-//'` > >> > >> :0:FreeBSD$LOCKEXT > >> | $STORE +FreeBSD/${ListId} > >> } > > in that it winds up in FreeBSD/[the stuff between "freebsd-" and > ".freebsd.org"]. Except without forking off a bunch of external > programs, just to pull out a piece of a header :p Yes, I realized that just moments after my last reply. Somehow that went right over my head at first. :-) I like this already! Thanks again. Conrad -- Conrad J. Sabatier conrads@cox.net