Mark Sapiro wrote:

>Mark Sapiro wrote:
>>
>>The problem is the upper case letters in the domain. This shouldn't
>>happen, but there may be a mailman bug. I don't see a problem in the
>>code, but there may be.
>
>
>I can duplicate the problem. I'll work up a patch. In the mean time,
>don't try to specify a new address with upper case in the domain.


The problem occurred in bin/clone_member if the new address had an all
lower case local part and some upper case in the domain.

Attached is a patch to OldStyleMemberships.py which fixes this problem
and one other. The other fix is if this is a straight address change,
preserve the members delivery status if it is disabled by admin or by
user, but not if it is by bounce.

This patch will be in Mailman 2.1.10 and 2.2.

-- 
Mark Sapiro <[EMAIL PROTECTED]>       The highway is for gamblers,
San Francisco Bay Area, California    better use your sense - B. Dylan

Index: OldStyleMemberships.py
===================================================================
--- OldStyleMemberships.py      (revision 8160)
+++ OldStyleMemberships.py      (working copy)
@@ -1,4 +1,4 @@
-# Copyright (C) 2001-2003 by the Free Software Foundation, Inc.
+# Copyright (C) 2001-2007 by the Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or
 # modify it under the terms of the GNU General Public License
@@ -12,7 +12,8 @@
 #
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 
USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+# USA.
 
 """Old style Mailman membership adaptor.
 
@@ -201,7 +202,7 @@
             value = 0
         else:
             value = member
-            member = member.lower()
+        member = member.lower()
         if digest:
             self.__mlist.digest_members[member] = value
         else:
@@ -243,6 +244,8 @@
         password = self.__mlist.passwords.get(memberkey,
                                               Utils.MakeRandomPassword())
         lang = self.getMemberLanguage(memberkey)
+        delivery = self.__mlist.delivery_status.get(member.lower(),
+                                              (MemberAdaptor.ENABLED,0))
         # First, possibly delete the old member
         if not nodelete:
             self.removeMember(memberkey)
@@ -252,6 +255,11 @@
         # Set the entire options bitfield
         if flags:
             self.__mlist.user_options[newaddress.lower()] = flags
+        # If this is a straightforward address change, i.e. nodelete = 0,
+        # preserve the delivery status and time if BYUSER or BYADMIN
+        if delivery[0] in (MemberAdaptor.BYUSER, MemberAdaptor.BYADMIN)\
+          and not nodelete:
+            self.__mlist.delivery_status[newaddress.lower()] = delivery
 
     def setMemberPassword(self, memberkey, password):
         assert self.__mlist.Locked()
------------------------------------------------------
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&amp;file=faq01.027.htp

Reply via email to