From owner-freebsd-chat Wed Feb 11 22:56:58 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA16115 for chat-outgoing; Wed, 11 Feb 1998 22:56:58 -0800 (PST) (envelope-from owner-freebsd-chat@FreeBSD.ORG) Received: from ren.dtir.qld.gov.au (firewall-user@ns.dtir.qld.gov.au [203.108.138.66]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA16103 for ; Wed, 11 Feb 1998 22:56:51 -0800 (PST) (envelope-from syssgm@dtir.qld.gov.au) Received: by ren.dtir.qld.gov.au; id QAA10349; Thu, 12 Feb 1998 16:57:49 +1000 (EST) Received: from ogre.dtir.qld.gov.au(167.123.8.3) by ren.dtir.qld.gov.au via smap (3.2) id xma010345; Thu, 12 Feb 98 16:57:21 +1000 Received: from troll.dtir.qld.gov.au (troll.dtir.qld.gov.au [167.123.8.1]) by ogre.dtir.qld.gov.au (8.8.7/8.8.7) with ESMTP id QAA07580; Thu, 12 Feb 1998 16:53:09 +1000 (EST) Received: from localhost (syssgm@localhost) by troll.dtir.qld.gov.au (8.8.5/8.8.5) with SMTP id QAA05569; Thu, 12 Feb 1998 16:53:05 +1000 (EST) Message-Id: <199802120653.QAA05569@troll.dtir.qld.gov.au> X-Authentication-Warning: troll.dtir.qld.gov.au: syssgm@localhost didn't use HELO protocol To: Nate Williams cc: chat@FreeBSD.ORG, syssgm@dtir.qld.gov.au Subject: Re: Unsubscribe trailers (Was Re: cvs commit...) md5 References: <199802080232.SAA20916@freefall.freebsd.org> <199802081842.NAA05129@khavrinen.lcs.mit.edu> <199802081904.MAA18581@mt.sri.com> <199802120534.PAA03752@ogre.dtir.qld.gov.au> <199802120555.WAA02981@mt.sri.com> In-Reply-To: <199802120555.WAA02981@mt.sri.com> from Nate Williams at "Wed, 11 Feb 1998 22:55:33 -0700" Date: Thu, 12 Feb 1998 16:53:05 +1000 From: Stephen McKay Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Wednesday, 11th February 1998, Nate Williams wrote: >> This junk quickly drove me to distraction, so now I filter those lines out >> of each message. It is relatively easy if you are already running procmail. > >Inquiring minds want to know. :) Well, I actually have an awk script that mangles the headers and posts each message to a local news group (not forwarded anywhere). So, the unsubscribe filter is only a little tweak to that. My script already buffers the entire body just to get the number to put in the Lines: field. But it shouldn't be hard to build your own little awk or perl script and put it in your .procmailrc, like: :0 w * ^From owner-freebsd-hackers | guff_filter | rcvstore +hackers This assumes you are using MH (the world's greatest mail reader). The snip of awk that does the deed is: function trim_hack(n, lines, group) { if (lines[n-2] !~ /^$/) return n if (lines[n-1] !~ /^To Unsubscribe: send mail to majordomo@FreeBSD\.org$/) return n if (lines[n] !~ "^with \"unsubscribe (freebsd-)?" group "\" in the body of the message$") return n return n - 3 } Make of this what you will. :-) >ps. If you've subscribed to the FreeBSD mailing list and *don't* use >procmail, then you may as well just unsubsribe cause you'll never catch >up. :) I never actually catch up! I scan the recent topics and dive in when I can. Expire takes care of the rest. I wouldn't have time to read any code if I read all the lists. All the politics and scuffles are entertaining for a while, but I'm really in it for the low level bit shuffling. ;-) Stephen. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe chat" in the body of the message