unsubscribe one user from many lists
Hi Mailmen and -women,
I'd like to administrate some ~20 email lists of a team of people working together via mailman. Once a user leaves the team, I should unsubscribe this user from all lists that he's on. How do I do this without having to click through 20 web interfaces?
First I thought, hey, I simply send an unsubscribe email, just like the subscribe email. Well, that doesn't work though, since unsubscription always requires the user password, which I don't have of course. So I searched around and found this thread:
http://mail.python.org/pipermail/mailman-users/2004-July/037815.html
about exactly this. Now, that suggests a global change by patching a python script. But since the mail server I'm using is actually for a whole institute, the administrator probably has little interest to globally change his Mailman/Commands/cmd_unsubscribe.py just because of my 20 mailing lists, in particular since some of his other lists may be more security sensitive than mine. In addition, if I try to patch this file rather than having some patch from somebody who actually knows python ;-) he probably won't like it anyway...
So I continued searching and stumbled across the possibility of doing this via wget:
http://mail.python.org/pipermail/mailman-users/2004-December/041214.html
and
http://mail.python.org/pipermail/mailman-users/2004-December/041220.html
Wow, that would be fantastic! :-) I could simply shell script that, not even worrying whether the user is subscribed to all 20 lists and just batch-unsubscribe (if the user wouldn't be on a given list, nothing would happen, so that's OK) Now, I'm not super sure I got the command line right, this is what I tried:
wget --post-data="adminpw=foobar&unsubscribees=me@somewhere.edu" http://serveraddress/mailman/admin/mailinglistname/members/members/remove
and I also tried to directly enter
into my browser. In both cases what I got back was:
<head><title>Bug in Mailman version 2.1.9</title></head> <body bgcolor=#ffffff><h2>Bug in Mailman version 2.1.9</h2> <p><h3>We're sorry, we hit a bug!</h3>
<p>Please inform the webmaster for this site of this problem. Printing of traceback and other system information has been explicitly inhibited, but the webmaster can find this information in the Mailman error logs.
and now I'm lost :-\ Can somebody help me? How can I unsubscribe a given user from a couple of mailing lists at the same time without having to go through the clumsy web interface for each of the mailing lists?
Your help is greatly appreciated - thank you very much!
Kind regards, Rafael
Rafael Lang wrote:
Now, I'm not super sure I got the command line right, this is what I tried:
wget --post-data="adminpw=foobar&unsubscribees=me@somewhere.edu" http://serveraddress/mailman/admin/mailinglistname/members/members/remove
and I also tried to directly enter
into my browser. In both cases what I got back was:
<head><title>Bug in Mailman version 2.1.9</title></head> <body bgcolor=#ffffff><h2>Bug in Mailman version 2.1.9</h2> <p><h3>We're sorry, we hit a bug!</h3>
<p>Please inform the webmaster for this site of this problem. Printing of traceback and other system information has been explicitly inhibited, but the webmaster can find this information in the Mailman error logs.
and now I'm lost :-\ Can somebody help me? How can I unsubscribe a given user from a couple of mailing lists at the same time without having to go through the clumsy web interface for each of the mailing lists?
It appears that you don't have command line access to Mailman, so the obvious
bin/remove_members --fromall user@example.com
isn't something you can do. That probably also means you don't have access to Mailman's error log to provide the traceback, however, I can say what the issue might be. Your URLs are wrong. There should not be two occurrences of /members in the URL. The 'bug' however is that the script assumes there are values for the check boxes on the form. Thus, you need something like
wget --post-data="adminpw=foobar&send_unsub_notifications_to_list_owner=0&send_unsub_ack_to_this_batch=0&unsubscribees=me@somewhere.edu" http://serveraddress/mailman/admin/mailinglistname/members/remove
or
-- Mark Sapiro mark@msapiro.net The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hi Mark,
doh - a simple typo on my end, you're right! So I now use wget for both (batch) subscription and unsubscription, this works like a charm.
Very nice. Thank you very much!
Cheers, Rafael
On 05/16/2012 02:47 AM, Mark Sapiro wrote:
Rafael Lang wrote:
Now, I'm not super sure I got the command line right, this is what I tried:
wget --post-data="adminpw=foobar&unsubscribees=me@somewhere.edu" http://serveraddress/mailman/admin/mailinglistname/members/members/remove
and I also tried to directly enter
into my browser. In both cases what I got back was:
<head><title>Bug in Mailman version 2.1.9</title></head> <body bgcolor=#ffffff><h2>Bug in Mailman version 2.1.9</h2> <p><h3>We're sorry, we hit a bug!</h3>
<p>Please inform the webmaster for this site of this problem. Printing of traceback and other system information has been explicitly inhibited, but the webmaster can find this information in the Mailman error logs.
and now I'm lost :-\ Can somebody help me? How can I unsubscribe a given user from a couple of mailing lists at the same time without having to go through the clumsy web interface for each of the mailing lists?
It appears that you don't have command line access to Mailman, so the obvious
bin/remove_members --fromall user@example.com
isn't something you can do. That probably also means you don't have access to Mailman's error log to provide the traceback, however, I can say what the issue might be. Your URLs are wrong. There should not be two occurrences of /members in the URL. The 'bug' however is that the script assumes there are values for the check boxes on the form. Thus, you need something like
wget --post-data="adminpw=foobar&send_unsub_notifications_to_list_owner=0&send_unsub_ack_to_this_batch=0&unsubscribees=me@somewhere.edu" http://serveraddress/mailman/admin/mailinglistname/members/remove
or
participants (2)
-
Mark Sapiro
-
Rafael Lang