Date: Sat, 29 Apr 2000 17:35:55 -0700 From: Gregory Sutter <gsutter@zer0.org> To: Michael Chin-Yuan Wu <keichii@peorth.iteration.net> Cc: freebsd-chat@FreeBSD.ORG Subject: Re: Procmail Filter for FreeBSD Mailing Lists and such Message-ID: <20000429173555.B60402@azazel.zer0.org> In-Reply-To: <Pine.BSF.4.21.0004282112250.30997-200000@peorth.iteration.net>; from keichii@peorth.iteration.net on Fri, Apr 28, 2000 at 09:18:40PM -0500 References: <Pine.BSF.4.21.0004282112250.30997-200000@peorth.iteration.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2000-04-28 21:18 -0500, Michael Chin-Yuan Wu <keichii@peorth.iteration.net> wrote:
> I think this is about as tight a filter as I can get it to be.
> This filter delivers the lists to your designated Mail dir and
> into different mailboxes for each list. I did not make it a
> complete filter for freebsd-*, but you should be able to modify it
> to your taste. :)
Using a separate recipe for each list isn't the fastest or shortest
way. Here are excerpts from my filter set:
=====
PMDIR=$HOME/.procmail
FROM="((X-)?(((Envelope-)?Sender|(Apparently-|Resent-)?From)|Reply-To|Return-Path):(.*\<)?)"
BSDLISTS="(advocacy|announce|arch|chat|current|cvs-committers|doc|emulation|hackers|hardware|ipfw|isp|jobs|mobile|mozilla|net|ports|ppc|qa|questions|security|small|smp|stable)"
# this recipe grabs all doc commits and duplicates them in a mailbox
# of their own. (I like to keep track.)
:0 c
* $ ^${FROM}freebsd.org
* ^Sender:[ ]*owner-(freebsd-)?cvs-(all|committers)
* ^Subject:[ ]*cvs commit: doc/
| formail -i "X-Fkey: freebsd-doc-commit" >> freebsd/doc-commit
:0
* $ ^${FROM}freebsd.org
{
# create a cache, so that crossposted messages only show up once.
:0 Wh : freebsd.lock
| formail -D 32768 $PMDIR/freebsd.cache
# segregate ports commits from cvs-all. put them in ports.
:0 :
* ^Subject:[ ]*cvs commit: ports/
| formail -i "X-Fkey: freebsd-ports-commit" >> freebsd/ports
# sort all the rest.
:0
* $ ^Sender:[ ]*owner-(freebsd-)?\/$BSDLISTS
| formail -i "X-Fkey: freebsd-$MATCH" >> freebsd/$MATCH
}
=====
Greg
--
Gregory S. Sutter Black holes were created
mailto:gsutter@zer0.org when God divided by zero.
http://www.zer0.org/~gsutter/
PGP DSS public key 0x40AE3052
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000429173555.B60402>
