Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 12 Feb 1998 16:53:05 +1000
From:      Stephen McKay <syssgm@dtir.qld.gov.au>
To:        Nate Williams <nate@mt.sri.com>
Cc:        chat@FreeBSD.ORG, syssgm@dtir.qld.gov.au
Subject:   Re: Unsubscribe trailers (Was Re: cvs commit...) md5 
Message-ID:  <199802120653.QAA05569@troll.dtir.qld.gov.au>
In-Reply-To: <199802120555.WAA02981@mt.sri.com> from Nate Williams at "Wed, 11 Feb 1998 22:55:33 -0700"
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>

next in thread | previous in thread | raw e-mail | index | archive | help
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



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