[Mailman-Users] listinclusion patch (was: Messages not delivered *RESOLVED*)

Mark Sapiro msapiro at value.net
Wed Jun 8 18:52:10 CEST 2005


Robert Haack wrote:
>
>I setup another copy of Mailman on a different server and created all of 
>the exact same test lists I had on my live server.  However on this 
>server I did not install Jim Tittsler's patch to allow another list to 
>post to a list.  I just copied the users who could post to the list into 
>the "Addresses that should be accepted".  I created a quick and dirty 
>program to send emails to all of the lists as different user names.  
>After running 30 tests I had no problems with any messages getting 
>lost.  So today I changed all of my test lists on my live server so that 
>they no longer use a list name to verify who can post to the list.  I 
>just took their names and pasted them in.  I ran another 30 tests and 
>again had no problem.  So to me it seems to be this patch that caused my 
>problems and the patch works great if a user only posts to a single 
>list, but if they post to multiple lists then that's when the problem 
>arose for me.

I think I see the problem with the listinclusion patch. It locks the
@list list and doesn't unlock it. I don't see a need to lock the list,
so I suggest changing the following piece of the patch

+        elif are.startswith('@'):
+	    try:
+	        mother = MailList(are[1:])
+	        if mother.members.has_key(sender):
+	            return 1
+            except Errors.MMUnknownListError:
+                syslog('error', 'filter references non-existent list
%s',
+                        are[1:])

to

+        elif are.startswith('@'):
+	    try:
+	        mother = MailList(are[1:], lock=0)
+	        if mother.members.has_key(sender):
+	            return 1
+            except Errors.MMUnknownListError:
+                syslog('error', 'filter references non-existent list
%s',
+                        are[1:])



>So now I have another question.  Is there some way that I can 
>automatically add a name to the "List of non-member addresses whose 
>postings should be automatically accepted?"  For us this list changes on 
>a regular basis and I'd hate to have to go through our 20+ lists and 
>update them all manually?

You could create a shell script that would use bin/list_members to
build a file of addresses for the accept_these_nonmembers list, even
sorting and dropping dups from it, then use awk or sed or ? to turn it
into input for bin/config_list and run config_list.

You might want to make the above change to the patch and try it on your
test system first.

--
Mark Sapiro <msapiro at value.net>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan




More information about the Mailman-Users mailing list