Update of /cvsroot/mailman/mailman/Mailman
In directory usw-pr-cvs1:/tmp/cvs-serv14570/Mailman
Modified Files:
ListAdmin.py
Log Message:
GetAdminEmail() eradication campaign.
__handlepost(), __refuse(): Send messages from the -bounces address so
that errors will get bounce processed.
__refuse(): In the refuse.txt, use the -owner address as the
%(adminaddr)s expansion so that when the human acts on this message,
they'll contact a human without going through the bounce processor.
_UpdateRecords(): This is will be used in bin/update to canonicalize
all the request.db records. Specifically, the SUBSCRIPTION records
will always be of length 6 and the HELDMSG records will also always be
6. For shorter records, provide reasonable defaults.
Index: ListAdmin.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/ListAdmin.py,v
retrieving revision 2.32
retrieving revision 2.33
diff -C2 -d -r2.32 -r2.33
*** ListAdmin.py 15 Mar 2002 03:42:52 -0000 2.32
--- ListAdmin.py 26 Mar 2002 20:44:05 -0000 2.33
***************
*** 307,311 ****
try:
fmsg = Message.UserNotification(
! addr, self.GetAdminEmail(),
_('Forward of moderated message'),
copy, lang)
--- 307,311 ----
try:
fmsg = Message.UserNotification(
! addr, self.GetBouncesEmail(),
_('Forward of moderated message'),
copy, lang)
***************
*** 456,460 ****
# to his/her language choice, if they are a member. Otherwise use the
# list's preferred language.
- adminaddr = self.GetAdminEmail()
realname = self.real_name
if lang is None:
--- 456,459 ----
***************
*** 465,469 ****
'request' : request,
'reason' : comment,
! 'adminaddr': adminaddr,
}, lang=lang, mlist=self)
otrans = i18n.get_translation()
--- 464,468 ----
'request' : request,
'reason' : comment,
! 'adminaddr': self.GetOwnerEmail(),
}, lang=lang, mlist=self)
otrans = i18n.get_translation()
***************
*** 480,485 ****
finally:
i18n.set_translation(otrans)
! msg = Message.UserNotification(recip, adminaddr, subject, text, lang)
msg.send(self)
--- 479,527 ----
finally:
i18n.set_translation(otrans)
! msg = Message.UserNotification(recip, self.GetBouncesEmail(),
! subject, text, lang)
msg.send(self)
+
+ def _UpdateRecords(self):
+ # Subscription records have changed since MM2.0.x. In that family,
+ # the records were of length 4, containing the request time, the
+ # address, the password, and the digest flag. In MM2.1a2, they grew
+ # an additional language parameter at the end. In MM2.1a4, they grew
+ # a fullname slot after the address. This semi-public method is used
+ # by the update script to coerce all subscription records to the
+ # latest MM2.1 format.
+ #
+ # Held message records have historically either 5 or 6 items too.
+ # These always include the requests time, the sender, subject, default
+ # rejection reason, and message text. When of length 6, it also
+ # includes the message metadata dictionary on the end of the tuple.
+ self.__opendb()
+ for id, (type, info) in self.__db.items():
+ if type == SUBSCRIPTION:
+ if len(info) == 4:
+ # pre-2.1a2 compatibility
+ when, addr, passwd, digest = info
+ fullname = ''
+ lang = mlist.preferred_language
+ elif len(info) == 5:
+ # pre-2.1a4 compatibility
+ when, addr, passwd, digest, lang = info
+ fullname = ''
+ else:
+ assert len(info) == 6, 'Unknown subscription record layout'
+ continue
+ # Here's the new layout
+ self.__db[id] = when, addr, fullname, passwd, digest, lang
+ elif type == HELDMSG:
+ if len(info) == 5:
+ when, sender, subject, reason, text = info
+ msgdata = {}
+ else:
+ assert len(info) == 6, 'Unknown held msg record layout'
+ continue
+ # Here's the new layout
+ self.__db[id] = when, sender, subject, reason, text, msgdata
+ # All done
+ self.__closedb()
_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-checkins