Update of /cvsroot/mailman/mailman/Mailman/Handlers
In directory usw-pr-cvs1:/tmp/cvs-serv5011

Modified Files:
        Hold.py 
Log Message:
hold_for_approval(): We want the admin notification message to appear
to come from the list owner to avoid any unnecessary bounce
processing.

Also, and more importantly, set the message's metadata "tomoderators"
flag so that the admin notification message will be sent to both the
list owners and the list moderators.


Index: Hold.py
===================================================================
RCS file: /cvsroot/mailman/mailman/Mailman/Handlers/Hold.py,v
retrieving revision 2.6
retrieving revision 2.7
diff -C2 -r2.6 -r2.7
*** Hold.py     2001/05/18 20:27:04     2.6
--- Hold.py     2001/05/31 17:30:41     2.7
***************
*** 224,227 ****
--- 224,228 ----
      listname = mlist.real_name
      sender = msg.get_sender()
+     owneraddr = mlist.GetOwnerEmail()
      adminaddr = mlist.GetAdminEmail()
      # We need to send both the reason and the rejection notice through the
***************
*** 245,248 ****
--- 246,252 ----
      # we need to play some i18n games here.  Since the current language
      # context ought to be set up for the user, let's craft his message first.
+     #
+     # This message should appear to come from <list>-admin so as to handle any
+     # bounce processing that might be needed.
      if not fromusenet and not mlist.dont_respond_to_post_requests:
          lang = msgdata.get('lang', mlist.GetPreferredLanguage(sender))
***************
*** 253,257 ****
                        charset=Utils.GetCharSet(lang))
          msg.send(mlist)
!     # Now the message for the administrator
      if mlist.admin_immed_notify:
          # Now let's temporarily set the language context to that which the
--- 257,263 ----
                        charset=Utils.GetCharSet(lang))
          msg.send(mlist)
!     # Now the message for the list owners.  Be sure to include the list
!     # moderators in this message.  This one should appear to come from
!     # <list>-owner since we really don't need to do bounce processing on it.
      if mlist.admin_immed_notify:
          # Now let's temporarily set the language context to that which the
***************
*** 267,275 ****
              # craft the admin notification message and deliver it
              subject = _('%(listname)s post from %(sender)s requires approval')
!             msg = Message.UserNotification(adminaddr, adminaddr, subject,
!             text)
              msg.addheader('Content-Type', 'text/plain',
                            charset=Utils.GetCharSet(lang))
!             msg.send(mlist)
          finally:
              i18n.set_translation(otranslation)
--- 273,280 ----
              # craft the admin notification message and deliver it
              subject = _('%(listname)s post from %(sender)s requires approval')
!             msg = Message.UserNotification(owneraddr, owneraddr, subject, text)
              msg.addheader('Content-Type', 'text/plain',
                            charset=Utils.GetCharSet(lang))
!             msg.send(mlist, **{'tomoderators': 1})
          finally:
              i18n.set_translation(otranslation)


_______________________________________________
Mailman-checkins mailing list
[EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/mailman-checkins

Reply via email to