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

2005-06-13 Thread Jim Tittsler
On Jun 9, 2005, at 01:52, Mark Sapiro wrote:

> 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,

Thanks Mark!  I've made that change as well as finally patching the  
help for accept_these_nonmembers.  The revised version of the patch  
is in the SourceForge patch tracker:
  


-- 
Jim Tittsler http://www.OnJapan.net/  GPG: 0x01159DB6
Python Starship  http://Starship.Python.net/crew/jwt/
Mailman IRC  irc://irc.freenode.net/#mailman


--
Mailman-Users mailing list
Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp


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

2005-06-08 Thread Mark Sapiro
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 <[EMAIL PROTECTED]>   The highway is for gamblers,
San Francisco Bay Area, Californiabetter use your sense - B. Dylan

--
Mailman-Users mailing list
Mailman-Users@python.org
http://mail.python.org/mailman/listinfo/mailman-users
Mailman FAQ: http://www.python.org/cgi-bin/faqw-mm.py
Searchable Archives: http://www.mail-archive.com/mailman-users%40python.org/
Unsubscribe: 
http://mail.python.org/mailman/options/mailman-users/archive%40jab.org

Security Policy: 
http://www.python.org/cgi-bin/faqw-mm.py?req=show&file=faq01.027.htp