[Mailman-Users] Edit to FAQ 3.11 How do I create a newsletter/announcement/one-way list?

John Bell john.r.bell at cox.net
Sun Jun 3 20:10:42 CEST 2007

In FAQ 3.11 it mentions how to do the following:

Features: Members join by filling in a form on your website (and replying to 
the confirmation email). They will be sent a welcome message that does not 
mention how to post to the list. They will receive your newsletters, with a 
footer that gives simple instructions for unsubscribing. Only authorized 
persons can post to the list (send the newsletters). (Note: For this FAQ we 
are discussing how to setup an announcement list for a band.)

The post assumes that you have access to the command line. I'm website 
owner, and my host has set up the mailman feature, but I can only access the 
HTML admin pages to configure my mailing list. I don't have access to the 
source code or command line features. Like others, I want a one-way 
notification system - only I send messages to folks who want to join my 
mailing list to get news, etc, about my site.

I found a workaround to both HTML and emails, but it's a but sneaky. So here 
is information for whom it may concern, and if appropriate perhaps someone 
could update the FAQ page. If I've done something completely unnessary and 
there's a simpler way to do this please also let me know.


The following is a guide to setting up a newsletter type mailing list 
bypassing all HTML and emails from mailman to subscribers when they 
subscribe and unsubscribe. The only requirement is that you are able to 
create your own CGI scripts. I did this is perl and I assume this is also 
possible with other languages.

First I went through all the options to ensure that a subscribing person 
would not get any email when they subscribed or unsubscribed, or due to 
other events. This is how I set it up (for the version I have, 2.1.9):

All the following I set to no in general options:

 -Send password reminders
- Send monthly password reminders
- Send welcome message to newly subscribed members
- Send goodbye message to members when they are unsubscribed
- Send mail to poster when their posting is held for approval

All the following is set to yes in general options:

- Should the list moderators get immediate notice of new requests, as well 
as daily notices about collected ones
- Should administrator get notices of subscribes and unsubscribes
- Emergency moderation of all list traffic [probably not necessary but I'm 

Under Privacy Options, subscription rules,

- What steps are required for subscription = Require approval
- Is the list moderator's approval required for unsubscription requests?  = 

These last two seemed to stop all emails when subscribing or unsubscribing - 
you as the moderator will get them all. However as you're also the only one 
sending out emails to the list this doesn't matter. Before sending anything, 
process all the requests, then send the message.

The second step is to hide all the mailman HTML. I did this by creating my 
own perl script. On my own HTML page I have a simple form as follows 
(stripping all the formatting):

<form action="/cgi-bin/subscribe.cgi" method="POST">
<input type="text" size="25" name="email">
<input type="radio" name="status" value="subscribe" checked>
<input type="radio" name="status" value="unsubscribe">
<input type="submit" value=" Submit ">

I.e. two parameters - email and status.

The perl script 'subscribe.cgi' then does the following:

If the user wants to subscribe I execute these lines:

 use LWP::Simple; [place at the top of the file]

 $link = "http://[my URL]/mailman/subscribe/[my mailman 
 $webpage = get($link);

And to unsubscribe:

  $link = "http://[my URL]/mailman/options/[my mailman 
  $webpage = get($link);

In other words, the script gets the page - executing the command, and 
instead of displaying the reulting HTML it gets captured by the variable 
$webpage which I can parse to display as I want, or ignore completely and do 
my own thing.

Comments welcome!

----- Original Message ----- 
From: "Mark Sapiro" <msapiro at value.net>
To: "David R Bosso" <dbosso+lists.mailman at lsit.ucsb.edu>; 
<mailman-users at python.org>
Sent: Sunday, June 03, 2007 9:56 AM
Subject: Re: [Mailman-Users] multiple header_filter_rules?

> David R Bosso wrote:
>>Rule 1 is (I thought) Match Return-Path:, only if it's not followed by
>>dbosso at lsit.ucsb.edu.  This should discard for any Return Path but my 
>>address, did you modify it to match yours, or do I have the (?!...) syntax
> My mistake. I didn't really look at the Rule 1 pattern. The pattern is
> correct for what you want and it works. It didn't discard my test
> messages because my test setup uses Exim and Exim's pipe driver
> doesn't add a Return-Path: header, so rule 1 didn't match because
> there was no Return-Path: at all.
> I retested using bin/inject to deliver the messages. A message with
> Return-path: <msapiro at value.net>
> Subject: test
> was discarded by rule 1. A message with
> Return-path: <dbosso at lsit.ucsb.edu>
> Subject: test
> was held by rule 2, so I am still unable to duplicate the problem.
> What's in Mailman's vette log for the discarded message that should be
> held by rule 2?
> If that doesn't offer a clue, I suggest you get
> <http://mailman.svn.sourceforge.net/viewvc/*checkout*/mailman/branches/Release_2_1-maint/mailman/Mailman/Handlers/SpamDetect.py?revision=7750>
> and compare it to your Mailman/Handlers/SpamDetect.py to see if there
> is any difference.
> -- 
> Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
> San Francisco Bay Area, California    better use your sense - B. Dylan
> ------------------------------------------------------
> Mailman-Users mailing list
> Mailman-Users at python.org
> http://mail.python.org/mailman/listinfo/mailman-users
> Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
> Searchable Archives: 
> http://www.mail-archive.com/mailman-users%40python.org/
> Unsubscribe: 
> http://mail.python.org/mailman/options/mailman-users/john.r.bell%40cox.net
> Security Policy: 
> http://www.python.org/cgi-bin/faqw-mm.py?req=show&amp;file=faq01.027.htp 

More information about the Mailman-Users mailing list