HOWTO Deal With Spam as a Mailman List Owner

Posted on     2 minute read

× This article was imported from this blog's previous content management system (WordPress), and may have errors in formatting and functionality. If you find these errors are a significant barrier to understanding the article, please let me know.

Dealing with SPAM e-mail is a real hassle. Dealing with SPAM e-mail as a mailing list owner is an even bigger hassle. Here are some tips for dealing with SPAM e-mail on mailing lists using the Mailman software package.

The Symptoms

Unless you are making your users as well as yourself miserable, you've probably set the "Action to take for postings from non-members for which no explicit action is defined" to "Hold". I believe this is the default setting for new lists.

[caption id="attachment_399" align="alignnone" width="500" caption="Hold Nonmember setting in Mailing list administration, Privacy Options, Sender filters"]\ Privacy Options -> Sender filters" title="hold-nonmember" width="500" height="28" class="size-full wp-image-399" />[/caption] 

This will hold all of the messages sent by non-members -- all of those spamy e-mail addresses -- to a queue on the Mailman server. You'll receive a notification that a message is being held for you:

As list administrator, your authorization is requested for the following mailing list posting:
  List:    mailingListName@mailingListHost
  From:    spam-email-address
  Subject: :)
  Reason:  Post by non-member to a members-only list
At your convenience, visit:
to approve or deny the request.

You'll also get a message once a day telling you that these messages are being held and insisting that you do something about it.

The mailingListName@mailingListHost mailing list has 3 request(s) waiting for your consideration at:
Please attend to this at your earliest convenience.  This notice of pending requests, if any, will be sent out daily.

A Solution

This isn't an ideal solution, but it at least lets you ignore the vast majority of these messages confidently knowing that -- unless your mailing list is unlucky enough to be hit daily by spam -- eventually the daily prodding messages will go away. The key is to set the "Discard held messages older than this number of days" to some reasonable number:

[caption id="attachment_400" align="alignnone" width="500" caption="Discard Messages setting in Mailing list options, General options"]\ General options" title="discard-messages" width="500" height="60" class="size-full wp-image-400" />[/caption] 

I use "4" in that field: two days to cover weekends plus a two day grace period. For a message that is errantly caught in the queue (because it was too large, was sent by a subscriber who's email address changed, or other reason), I now have four days to release it. If I do nothing, the message disappears from the hold queue after that time, and I get this final e-mail message:

From:    mailingListName-bounces@mailingListHost
Subject: mailingListName moderator request check result
Date:    July 16, 2008 8:00:08 AM EDT
To:      mailingListName-owner@mailingListHost
Notice: 1 old request(s) automatically expired.

Customize these instructions

This posting contains a fragment of JavaScript that allows you to customize the instructions above. If you are the owner of a Mailman mailing list, enter in the hostname of your Mailman host and the name of the list below, select Customize, and links will appear under the two images above that will take you to that setting on your list.

Note that this JavaScript probably doesn't work in feed readers, but you can make it work by viewing this post on the DLTJ site.

The text was modified to update a link from to on December 30th, 2010.