Date: Mon, 26 Sep 2011 04:26:52 -0500 From: "Conrad J. Sabatier" <conrads@cox.net> To: "Matthew D. Fuller" <fullermd@over-yonder.net> Cc: Warren Block <wblock@wonkity.com>, ports@freebsd.org Subject: Re: Replacing procmail with maildrop Message-ID: <20110926042652.1db4798a@cox.net> In-Reply-To: <20110926084516.GL14862@over-yonder.net> References: <alpine.BSF.2.00.1109251513240.63569@wonkity.com> <20110926024350.4e881c1b@cox.net> <20110926084516.GL14862@over-yonder.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 26 Sep 2011 03:45:17 -0500 "Matthew D. Fuller" <fullermd@over-yonder.net> 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 =~ /^<owner-freebsd-([^@]+)/) > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110926042652.1db4798a>