Mailman as a bulk mailer – imported member managment tips

I have 20000 email subscribers for two email lists (cjobs and ucjobs). These were all imported into our new Mailman service.
I had a few settings I needed to change to accommodate using Mailman as a bulk mailer. And it’s going pretty well.
First there were normal things like pre-pending the default email subject, updating the list name and bounce protocols, making sure no-one can post to the list except the one authorized user (bulk moderate every user).
That was easy.

But then there’s a default setting where any list member can view all the other members of the list… not good.
First I updated the html docs, removing the relevant info.
Then I needed update all the users; but there’s no bulk operation for that.
Instead there’s a Member Mgmt screen with columns of check boxes. CheckBoxMate to the rescue…
Almost; Mailman displays a max of 30 members at a time… (20000 / 30 = ouch), that’s a lot of clicking and dragging.

So I wrote a bookmarklet that checks all the boxes in specific columns. That worked great. I preset it to check cols 4 and 7 (there was another setting I wanted to change for copying the poster for every email sent). It also submits the form so all I have to do is open +/- 680 pages and cilck the bookmarklet… still ouch.
A glimpse of the script

So I used another bookmarklet which opens all the selected links for cjobs. 0-9 and a-z first “Are you sure you want to open 32 links in a new window”
Do you want to open 30 selected links in a new window?

Repeat for ucjobs.

Luckily I have new windows set to open in a new tabs. So now I have 60+ new tabs open! Hooray for 8GB of Ram!

Then I started from the back, opening all the paginated results for ‘Z’ with the ‘open selected links’ bookmarklet and then clicked the ‘Check Some Boxes” bookmarklet for each of those tabs.

Clickity clickity click.

3 hours later I was 1/2 way done.

Here’s the bookmarklet code:
<a href="javascript:(function(){/*%20%20*%20This%20bookmarklet%20is%20for%20checking%20all%20the%20boxes%20in%20specific%20columns%20of%20the%20mailman%20member%20config%20page.%20*//*%20Settings%20for%20checkboxesInCol*/theColList='4,7';/*Which%20check%20box%20columns%20do%20you%20with%20to%20affect?*/toAlert=false;saveForm=true;confirmUncheck=true;/*Use%20this%20to%20be%20alerted%20if%20boxes%20will%20be%20un-checked*/function%20checkboxesInCol(list,toAlert,saveForm,confirmUncheck){affectAll=true;checkBoxColumnArr=new%20Array;if(list!=''){affectAll=false;checkBoxColumnArr=list.split(',');}trs=document.getElementsByTagName('tr');/*console.log('trs.length:%20'+trs.length);*/for(i=0;i<trs.length;i++){var%20elLength=trs[i].getElementsByTagName('input').length;for(j=0;j<elLength;j++){var%20type=trs[i].getElementsByTagName('input')[j].type;if(type=='checkbox'){/*console.log('type:%20'+type);console.log('affectAll:%20'+affectAll);*/if(affectAll){if(trs[i].getElementsByTagName('input')[j].checked){console.log('Form%20element%20in%20position%20'+j+'%20is%20of%20type%20checkbox%20and%20is%20checked.');}else{console.log('Form%20element%20in%20position%20'+j+'%20is%20of%20type%20checkbox%20and%20is%20not%20checked.');}/*end%20if*/}else{/*not%20affectAll*//*console.log('checkBoxColumnArr.length:%20'+checkBoxColumnArr.length);*/for(k=0;kCheckCols Mailman Submit

 * This bookmarklet is for checking all the boxes in specific columns of the mailman member config page.
/* Settings for checkboxesInCol*/
theColList='4,7';/*Which check box columns do you with to affect?*/
confirmUncheck=true;/*Use this to be alerted if boxes will be un-checked*/

function checkboxesInCol(list,toAlert,saveForm,confirmUncheck){
	checkBoxColumnArr = new Array;
  if(list != ""){
  	checkBoxColumnArr = list.split(',');

  trs = document.getElementsByTagName('tr');
  /*console.log('trs.length: '+trs.length);*/
  for(i=0;i<trs.length;i++) {
    var elLength = trs[i].getElementsByTagName('input').length;

    for (j=0; j<elLength; j++)
      var type = trs[i].getElementsByTagName('input')[j].type;
			if (type=="checkbox"){
				console.log('type: '+type);
				console.log('affectAll: '+affectAll);
					if (trs[i].getElementsByTagName('input')[j].checked){
						console.log("Form element in position " + j + " is of type checkbox and is checked.");
					}	else {
						console.log("Form element in position " + j + " is of type checkbox and is not checked.");
					}/*end if*/
				}else{ /*not affectAll*/
					/*console.log('checkBoxColumnArr.length: '+checkBoxColumnArr.length);*/
					for (k=0; k<checkBoxColumnArr.length; k++)
						if (j == checkBoxColumnArr[k]){
								if(confirmUncheck && confirm("Check box in position " + j + " of row " + i + " is checked. Do you want to uncheck?")){
									trs[i].getElementsByTagName('input')[j].checked = false;
								/*console.log("Form element in position " + j + " is of type checkbox and is un-checked and will be checked");*/
								trs[i].getElementsByTagName('input')[j].checked = true;
							}/*end if*/
						}/*end if*/
					}/*end for*/
				}/*end affectAll */
			}/*end if checkbox*/
    }/*end for*/
  }/*end for*/
	if(saveForm) {
	if(toAlert){ alert('Done'); }
}/*end checkboxesInCol*/

Update 5-7-12
In retrospect, this may have just been an interesting exercise. In reviewing the MailMan settings I found a “Membership exposure” section that migth override the individual Member Management permissions.
Initially I had set the “Who can view subscription list?” to “List admin only” but I’m still not clear which setting overrides which.
"membership exposure" settings
So, better safe than sorry. I suppose.

Leave a Comment