Tales from the Gryphon

Debian list spam reporting the Gnus way

  • Edit this page
  • RecentChanges
  • History
  • Preferences
  • 3 comments
Tales from the Gryphon

Relevant Links

  • New key
  • GPG key
  • PGP key
  • Policy

Categories(91)

  • Books(29)
    • Action(3)
    • Classics(1)
    • Espionage(9)
    • Fantasy(10)
    • Fiction(1)
    • Sci-Fi(5)
  • Debian(8)
    • Official(2)
  • Software(26)
    • Arch(1)
    • Git(4)
    • Packaging(7)
    • Debian(9)
    • IkiWiki(2)
    • Security(3)
  • Movies(5)
  • SysAdmin(1)
  • Spam(10)
  • Travel(2)
  • Miscellaneous(7)

Archives

← 2010
Months
Jan Feb Mar Apr May Jun
Jul Aug Sep Oct Nov Dec
← September
Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30    

Indices

  • 2004
    • 05
    • 06
    • 07
    • 10
    • 11
  • 2005
    • 03
    • 05
    • 06
  • 2006
    • 01
    • 08
    • 12
  • 2007
    • 01
    • 08
    • 11
    • 12
  • 2008
    • 01
    • 04
    • 05
    • 06
  • 2009
    • 02
    • 03
    • 04
    • 05
  • 2010
    • 03
    • 08

My Books:
Widget_logo


Valid XHTML 1.1 Valid CSS! Linux Counter #69681 RSS Valid Ikiwiki hacker emblem

Manoj's hackergotchi
Tuesday 05 May
2009
Debian list spam reporting the Gnus way
[
  • spam :: 
]

License: GPL

So, recently our email overlords graciously provided means for us minions to help them in their toils and help clean up the spammish clutter in the mailing lists by helping report the spam. And the provided us with a dead simple means of reporting such spam to them. Now, us folks who knoweth that there is but one editor, the true editor, and its, err, proponent is RMS, use Gnus to follow the emacs mailing lists, either directly, or through gmane. There are plenty of examples out there showing how to automate reporting spam to gmane, so I won’t bore y’all with the details. Here I only show how one serves our list overlords, and smite the spam at the same time.

Some background, from the Gnus info page. I’ll try to keep it brief. There is far more functionality present if you read the documentation, but you can see that for yourself.

The Spam package provides Gnus with a centralized mechanism for detecting and filtering spam. It filters new mail, and processes messages according to whether they are spam or ham. There are two “contact points” between the Spam package and the rest of Gnus: checking new mail for spam, and leaving a group.

Checking new mail for spam is done in one of two ways: while splitting incoming mail, or when you enter a group. Identifying spam messages is only half of the Spam package’s job. The second half comes into play whenever you exit a group buffer. At this point, the Spam package does several things: it can add the contents of the ham or spam message to the dictionary of the filtering software, and it can report mail to various places using different protocols.

All this is very plugin and modular. The advantage is, that you can use various plugin front ends to identify spam and ham, or mark messages as you go through a group, and when you exit the group, spam is reported, ham and spam messages are copied to special destinations for future training of your filter. Since you inspect the marks put into the group buffer as you read the messages, there is a human involved in the processing, but as much as possible can be automated away. Do read the info page on the Spam package in Gnus, it is edifying.

Anyway, here is a snippet from my etc/emacs/news/gnusrc.el file, which can help automate the tedium of reporting spam. This is perhaps more like how Gnus does things than having to press a special key for every spam, and which does nothing to help train your filter.

    1  (add-to-list
    2   'gnus-parameters
    3   '("^nnml:\\(debian-.*\\)$"
    4           (to-address . "\\1@lists.debian.org")
    5           (to-list . "\\1@lists.debian.org")
    6           (admin-address . "\\1-request@lists.debian.org")
    7           (spam-autodetect . t)
    8           (spam-autodetect-methods spam-use-gmane-xref spam-use-hashcash spam-use-BBDB)
    9           (spam-process '(spam spam-use-resend))
   10           (spam-report-resend-to . "report-listspam@lists.debian.org")
   11           (subscribed . t)
   12           (total-expire . t)
   13           ))

Manoj

Comments

RSS Atom
Reporting spam to Gmane

There are plenty of examples out there showing how to automate reporting spam to gmane, so I won’t bore y’all with the details.

Could you at least link to some that you recommend?

Comment by bignose [whitetree.org] — in the wee hours of Wednesday night, May 7th, 2009
Gmane spam reporting

In any recent Gnus package, the info node: “Info: (gnus)Spam Package Configuration Examples” has information about adding to gnus-parameters:

  ("^gmane\\."
      (spam-process (gnus-group-spam-exit-processor-report-gmane)))

I use the following in my gnus rc file (in addition to the debian related stuff above):

 (setq gnus-spam-autodetect-methods
      '(
        ("^gmane\\." . (spam-use-blacklist
                        spam-use-BBDB spam-use-hashcash
                        spam-use-gmane-xref))
         ("^nntp+news\\.gmane\\.org" . (spam-use-blacklist
                         spam-use-BBDB
                         spam-use-gmane-xref))
         (".*" . (spam-use-blacklist spam-use-hashcash
                  spam-use-BBDB))
         ))

 (setq gnus-spam-autodetect '(("^nntp.*" . t)
                              ("^gmane\\." .t)
                              ("^nnml:\\(debian-.*\\)$" . t)))

 (setq gnus-spam-process-newsgroups
       '(("^nntp\\+news\\.gmane\\.org" 
          ((spam spam-use-gmane)
           (spam spam-use-blacklist)
           ))
         ("^gmane\\."
          ((spam spam-use-gmane)
           (spam spam-use-blacklist)
           ))
         (".*" 
         ((spam spam-use-blacklist)
          ))
        ))

Comment by srivasta [openid.golden-gryphon.com] — in the wee hours of Thursday night, May 8th, 2009
Missing group parameter <-> variable

In order to set “spam-report-resend-to” from a group parameter, you’ll need to add the following to .gnus.el:

(add-to-list ‘gnus-newsgroup-variables ‘spam-report-resend-to)

…then it works

Comment by ssm [launchpad.net] — in the wee hours of Tuesday night, June 24th, 2009

Add a comment

Webmaster <webmaster@golden-gryphon.com>
Last commit: in the wee hours of Monday night, May 5th, 2009

License: GPL

Last edited in the wee hours of Monday night, May 5th, 2009