procmail
[Top] [All Lists]

Re: Catching first time posters to procmail

1997-08-06 07:52:00

Gregory Sutter <gsutter(_at_)spitfire(_dot_)ecsel(_dot_)psu(_dot_)edu> wrote:
Well, being tired of spam sent to the list, I've set up a filter before I  
send them to my procmail folder

Why not just INCLUDERC your junk mail filter before the recipe that
checks for list mail?  That seems much simpler than a dedicated
listkeeping filter for the procmail list. 

Many of my spam tests would not work well for mailing lists. (I
dislike Bcc's; stuff sent to usenet addresses not in reply format,
etc, etc.) I have recently split my suspicious/spam tests into
three groups. 

First is duplicate checking, which includes finding invalid
message IDs, and some fun metrics with my hashd program. Not
super effective on normal mail, killer on moderator alias mail.
My empty message-ID test killed that recent spam.

(Next I handle all my forwarding and scripts, including the
moderated group stuff.)

Then I have "pre-list" filtering, copy included below.

(Then my lists get sorted to their proper places.)

Finally my rest of it filtering, largely unchanged from the copy
from <URL:http://www.netusa.net/~eli/filtering.html>, save that
some of the stuff got moved into pre-list.

:r ~/dot/procmail/rc.pre-list

   # Some global spam filtering

      # iemmc.org is a group run by spammers
      :0:
      * ^X-Advertisement:.*\.iemmc\.
      $MAILDIR/spam-output

      # UIDL is apparently a Unique IDentifier Label for POP. Only POP
      # mail readers should add it, but a bunch of spammers do. (Apparently
      # this causes problems for POP clients which try to reply....)
      # spam-output is a very high predjudice mailbox.
      :0:
      * ^X-UIDL: .
      $MAILDIR/spam-output

      :0:
      * ^X-(Mailer|Sender):.*(MassE-Mail|netmailer|\<rime\>|Floodgate|\
              Extractor|Cold Fusion|Ready Aim)
      $MAILDIR/untagged

   # Other filtering to apply to all mail

      # Deal with people who cannot unsubscribe quietly, save those
      # subscribed to my quotes list (This is in need of repair.)
      :0
      * ^Subject: *(Re: *)?(pl[easz]+ *)?((un)?sub?sc(ri|ir)be|remove) *\
                  (me|now)?!* *$
      * ! ^X-To:(_dot_)*quote(_dot_)*(_at_)qz
      {
        # Allow some space for a sig
        :0:
        * $ `sed -e '1,/^$/d' | wc -c`^0
        * -500^0
        $HOME/notes/junk-mail
      }

      # Bloody lynx error messages. They appear often on the lynx-dev list.
      :0:
      * ^Subject: .*Lynx Error in .*://
      $MAILDIR/junk-mail

   # Modification filtering (non-delivering)

      # Filter "Re[5]:"/"Re^3:" and the like out of Subject:
      :0fh
      *  ^Subject: *((Re: ?)*Re[[^]|Re: *Re:)
      | perl -pe 's/^subject:\s*(re[][^\d]*:\s*)+/X-Subject: scrubbed\nSubject: 
Re: /i;'

      # Experimental scoring. Doesn't redirect mail, just adds a new header
      # with the score it received. Slow.
      :0B
      * $ `jmdigest -`^0
      { }

      score=$=

      :0fhw
      * score ?? ^^[1-9]
      | formail -A"JMDigest-Score: bad $score"

      :0Efhw
      | formail -A"JMDigest-Score: good $score"

Elijah
------
I /dev/null dupes, no need to CC list posts.  It is not my responsibility to
prove to you my mail is not spam, if mail to you bounces it will not be resent.

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