[Mailman-Users] Post by non-member to a members-only list

Jon Carnes jonc at haht.com
Tue Nov 27 21:00:11 CET 2001

This script should get you what you want...  The example uses the list

#  Autosend a message to non-list folks who email "mylist"
#    The message is stored in the file ~mailman/join_mylist.msg
#    it asks them to join the list - or join their secondary email
#    addresses to the list and use the 'no mail' option.
FROM="mylist-admin at mydomain.com"
cd ~mailman/data
MSGS="`ls heldmsg-mylist*`"
for i in "$MSGS"
  TO="`grep From: $i |head -1 |awk '{print $2}' `"
  SUBJ="`grep -i subject: $i |head -1 |cut -f2- -d: `"
  mail -s "RE: $SUBJ" $TO  < ~mailman/join_mylist.msg
  rm $i
#  The messages have all been responded to and deleted but
#   Mailman also puts a small copy in a database in the list's
#   directory in a database called request.db.  This assumes
#   that you have made a copy of "request.db" while empty
#   and called the empty one "orig.request.db"
cp ~mailman/lists/mylist/orig.request.db ~mailman/lists/mylist/request.db

# end of script.

Now put this script in the crontab for the user "mailman" and run it hourly
at 59 minutes past the hour:
  59 * * * *    ~mailman/bin/join_mylist_script

For this to work, you need to do a bit of preperation.  Mainly, you need to
clear out any waiting requests for the list, and then make a copy of the
file request.db in the lists directory.

Request.db is used by the web-interface to display bits of held messages on
the admindb page that used for dealing with "Pending Administrative
Requests".  If you don't blank out this file every now and then, it will
continue to grow as Mailman tucks bits and peices of incoming held messages
into it.  My solution is to simply copy a blank version of the file over the
current version every hour.  So now everything is self maintaining.

Note: if your list enforces a size limitation, then folks will also get this
message when they send too large a message.  You might want to include that
as a possible reason for the rejection...

HtH - Jon Carnes

----- Original Message -----
From: "Bill Moseley" <moseleymm at hank.org>
To: <mailman-users at python.org>
Sent: Tuesday, November 27, 2001 12:49 PM
Subject: [Mailman-Users] Post by non-member to a members-only list

> I checked the FAQ, and the other faqw-mm
> I'm looking for a way to just bounce non-member posts, saying that they
> not a member and they need to subscribe if they want to post.  These don't
> need admin action.
> The problem with the current setup is people post (often from a different
> email address), get a message back saying their message is awaiting
> approval, and then subscribe (or change email addresses) and resend.  Then
> the admin approves and there is a duplicate message.
> Speaking of which, it would be a nice feature for subscribers to setup
> aliases so they can post from different accounts, but it looks like they
> are posting from their main email address.  This is good for people that
> post from work or home with different addresses.
> Bill Moseley
> mailto:moseley at hank.org
> ------------------------------------------------------
> Mailman-Users maillist  -  Mailman-Users at python.org
> http://mail.python.org/mailman/listinfo/mailman-users

More information about the Mailman-Users mailing list