procmail
[Top] [All Lists]

Re: subscribe

1997-05-30 00:07:00
On Thu, 29 May 97 23:12 EDT,
process(_at_)qz(_dot_)little-neck(_dot_)ny(_dot_)us (Eli the Bearded) wrote:
So quoting added 16 bytes, do people think 500 is a better number than
300 in this? I was thinking four lines at 80 chars max, plus a small
buffer for other body content such as "subscribe", list name, and the
address to use. And, I don't want to kill folllowups like this one.

I gave up on the size criterion because these sometimes come with huge
headers and huge un-signature .signatures (i.e. without the "-- "
delimiter). I have just gathered Subject lines and hope one day to
have all the possible mutations in that recipe ...

# Deal with people who cannot unsubscribe quietly, save for those
# subscribed to my quotes list (which I do by hand)
:0
* ^Subject: *(Re: *)?(please *)?((un)?subsc(ri|ir)be|remove) *(me|now)?!* *$
* ! ^TO(_dot_)*quote(_dot_)*(_at_)qz
{
  # Check for small body, allowing some space for a sig

  :0B
  * < 300
  $HOME/notes/untagged
}

(Oh, "unsubscirbe" is good. I'll add it.) Here's what I'm doing:

    # procmail/unsubscribe.rc
    # Sat Apr  5 15:10:25 1997 (broke this out of $HOME/.procmailrc)
    #
    # $Id: unsubscribe.rc,v 1.7 1997/05/20 16:10:55 reriksso Exp $
    #
# Editor's comment: Indented for readability. The quoted string
# will have to be flush against the left margin so unindent this
# four spaces before use.

    UNSUBSCRIBE="[      ]*((pl(e(ez|as)e?|s)|(help( me)?|how do( (you|I)|es))\
    .*[         ]+)?\
    ((un)?sub?s?cr?i(be|ption)|(get|sign)( me | )?off|cancel sub|\
    remove( +[^ ]+(_at_)[^ ]+\.[^ ]+|$)))"


    :0:
    * ! ^FROM_MAILER
    * $ ^Subject: (uncl:? ?)?($UNSUBSCRIBE)$
    scratch/unsubscribe

    :0:
    * ! ^FROM_MAILER
    * <2000
    * $ ^Subject: $UNSUBSCRIBE
    scratch/unsubscribe

    # Idiot spelling errors in broadcast unsubscribes!
    :0BD:       # D == case sensitive, B == scan message body
    * ! ^FROM_MAILER
    * <2000
    * ^(UNSUB?SCR?IBE|SIGN ?OFF|REMOVE)
    scratch/unsubscribe

    # More idiots
    :0B:
    * ! ^FROM_MAILER
    * <1600
    * $ ^$UNSUBSCRIBE
    scratch/unsubscribe

    # No subject line
    :0HB:       # H == scan header (for no Subject); B == scan message body
    * ! ^FROM_MAILER
    * <2000
    * !^Subject: .*
    * $ $UNSUBSCRIBE
    scratch/unsubscribe

The first one catches the vast majority so the subsequent ones have
not gone through much testing after the first one became efficient
enough. Like I said, the size criteria are basically something I have
given up on using effectively -- I started out with fairly low values
but kept having to bump it upward. 
  (Some of the older recipes trace back to the old days when I had to
get by with Procmail v2.something and didn't know too much about
writing decent recipes. Don't hold them against me :-)

I don't know what the "uncl:" is for -- that was the first one to slip
through in a long time so I just added it. (Recent tweaks have mostly
been to reduce mismatches. I don't get many nowadays.) And the
uppercase stuff is idiosyncratic on some listservs -- I used to be on
one list where folks were +really+ clueless about electronic mail
(DTP-related) but they were generally not typing uppercase except in
listserv commands. (Dat 'puter won't take lowercase now will it.)

/* era */

.obDelenda: The list server should be filtering these for us so we
wouldn't have to.

-- 
Defin-i-t-e-ly. Sep-a-r-a-te. Gram-m-a-r.  <http://www.iki.fi/~era/>
 * Enjoy receiving spam? Register at <http://www.iki.fi/~era/spam.html>

<Prev in Thread] Current Thread [Next in Thread>