Date: Mon, 26 Sep 2011 02:43:50 -0500 From: "Conrad J. Sabatier" <conrads@cox.net> To: Warren Block <wblock@wonkity.com> Cc: ports@freebsd.org Subject: Re: Replacing procmail with maildrop Message-ID: <20110926024350.4e881c1b@cox.net> In-Reply-To: <alpine.BSF.2.00.1109251513240.63569@wonkity.com> References: <alpine.BSF.2.00.1109251513240.63569@wonkity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 25 Sep 2011 22:01:13 -0600 (MDT) Warren Block <wblock@wonkity.com> wrote: > Recent discussion here about the desirability of replacing procmail > finally convinced me to switch to maildrop. It turned out to be > relatively painless. I took some notes that may be helpful for > others considering the change: > > http://www.wonkity.com/~wblock/docs/html/maildrop.html Thank you for that! I've been reluctant to switch from procmail to anything else just yet (although I know I'll have to do so eventually, if this port is going to be expired), but these tips you've provided certainly will help. 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 like to store my FreeBSD lists each under a separate MH folder under $MAILDIR/FreeBSD, so the following recipe strips off everything outside the angle brackets in the List-Id header (including the brackets themselves, of course), and then the trailing ".freebsd.org" and leading "freebsd-" and from the actual list name, to derive the correct folder name. So, for instance. the list name "freebsd-ports.freebsd.org" winds up as the folder name "ports". One problem is, without procmail's "formail" utility, how to extract and strip the List-Id header. Does maildrop include a tool similar to formail? Also, can one define a custom "to" command, in order to use the nmh "rcvstore" command? I've included only the parts of my .procmailrc needed to provide a clear picture of what's going on: # Path to executables from the nmh package NMH_PATH=/usr/local/libexec/nmh # Make sure everything we need is here PATH=/bin:/usr/bin:/usr/local/bin:${NMH_PATH} # Probably not necessary, but doesn't hurt either MAILDIR=${HOME}/Mail SHELL=/bin/sh # the nmh command to store mail into a folder STORE=rcvstore # extension to use for lockfiles LOCKEXT=.lock # recipe for FreeBSD lists :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} } Thanks in advance for any help! -- Conrad J. Sabatier conrads@cox.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110926024350.4e881c1b>