Replacing procmail with maildrop

Conrad J. Sabatier conrads at cox.net
Mon Sep 26 09:07:44 UTC 2011


On Mon, 26 Sep 2011 03:45:17 -0500
"Matthew D. Fuller" <fullermd at 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...)

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.  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.

I see now that the maildrop package includes a formail-like equivalent,
"reformail", so that's good news.  Looks like it won't be all that
difficult at all, really, to convert my existing recipes.  Will just
have to spend some more time familiarizing myself with the maildrop rc
file format/syntax and getting used to the differences between it
and procmail.

Thanks!

-- 
Conrad J. Sabatier
conrads at cox.net


More information about the freebsd-ports mailing list