[Mailman-Developers] unsubscription-approval

Troy Morrison troy@akropolys.com
Mon, 5 Jun 2000 18:55:41 -0700 (PDT)

| The other patch is a very rudementary Archive access restriction: We send a
| lot of private information over the lists, and it wouldn't do for someone
| from, say, a competing company to guess an employee's mailman password and
| thus gain access to the list archives. However, I do want to use mailman
| password checking for the archives, so I can't use a 'public' archive with a
| normal .htaccess restriction.

I could be completely missing the point of this, but I run a small list,
mostly for friends and such, where the subscribers wanted archives, but
didn't want 'public' archives.  I wanted MIME/attachment support.  I
started out using pipermail/Mailman's archives, but didn't like them (and
this was back when they were CPU intensive too), so I switch to an
external archiver.

I'm using qmail, so I created an "archives" user, and gave him a
".qmail-default" file like:

|preline /usr/local/bin/hypermail [ ... ]
|preline cat >> ./$DEFAULT-`date +"%m-%Y" && exit 0

And then I subscribe "archives-<listname>" to each list.

Anyway, the point that's specifically relevant to what Thomas said was
that I wanted these decidedly non-Mailman archives to be accessible to
subscribers only via their list password.  So I hacked up this (probably
very ugly -- I didn't know Python and really still don't) script to
generate my .htaccess files in a cron job:

---------8< snip 8<------------
#!/usr/bin/env python

import sys, whrandom, crypt

sys.path.insert(0, '/home/mailman');
from Mailman import MailList, Utils;

passwdfile=open('/home/archives/public_html/list1/.htpasswd', 'w')
list1=MailList.MailList('list1', lock=0)
generator = whrandom.whrandom()

for x in list1.passwords.keys():
	pw = list1.passwords[x]
	passwdcrypt = crypt.crypt(pw, "L1")
	passwdfile.write(x + ":" + passwdcrypt + "\n")


# <repeat for each list>

---------8< snip 8<------------

There is a delay between when someone subscribes or changes their password
and the corresponding update to the archives password file, which is
probably not the best thing, but I've just made sure that everyone is
aware of the delay.

So, anyway, I just thought that the idea might be useful to others using