Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 26 Sep 2011 04:30:45 -0500
From:      "Conrad J. Sabatier" <conrads@cox.net>
To:        "Matthew D. Fuller" <fullermd@over-yonder.net>
Cc:        freebsd-ports@FreeBSD.org
Subject:   Re: Replacing procmail with maildrop
Message-ID:  <20110926043045.06efd35b@cox.net>
In-Reply-To: <20110926091601.GM14862@over-yonder.net>
References:  <alpine.BSF.2.00.1109251513240.63569@wonkity.com> <20110926024350.4e881c1b@cox.net> <20110926084516.GL14862@over-yonder.net> <20110926040731.52dc8bc2@cox.net> <20110926091601.GM14862@over-yonder.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 26 Sep 2011 04:16:01 -0500
"Matthew D. Fuller" <fullermd@over-yonder.net> 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/>.*$//' \
> >>                         -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110926043045.06efd35b>