diff options
Diffstat (limited to '')
-rw-r--r-- | Mailman/Message.py | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/Mailman/Message.py b/Mailman/Message.py index 0edc3c31..5d68e7ef 100644 --- a/Mailman/Message.py +++ b/Mailman/Message.py @@ -1,4 +1,4 @@ -# Copyright (C) 1998-2012 by the Free Software Foundation, Inc. +# Copyright (C) 1998-2014 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 @@ -284,8 +284,13 @@ class UserNotification(Message): # UserNotifications are typically for admin messages, and for messages # other than list explosions. Send these out as Precedence: bulk, but # don't override an existing Precedence: header. + # Also, if the message is To: the list-owner address, set Precedence: + # list. See note below in OwnerNotification. if not (self.has_key('precedence') or noprecedence): - self['Precedence'] = 'bulk' + if self.get('to') == mlist.GetOwnerEmail(): + self['Precedence'] = 'list' + else: + self['Precedence'] = 'bulk' self._enqueue(mlist, **_kws) def _enqueue(self, mlist, **_kws): @@ -311,14 +316,19 @@ class OwnerNotification(UserNotification): recips.extend(mlist.moderator) # We have to set the owner to the site's -bounces address, otherwise # we'll get a mail loop if an owner's address bounces. - sender = mlist.getListAddress('bounces') + sender = Utils.get_site_email(mlist.host_name, 'bounces') lang = mlist.preferred_language UserNotification.__init__(self, recips, sender, subject, text, lang) # Hack the To header to look like it's going to the -owner address del self['to'] self['To'] = mlist.GetOwnerEmail() self._sender = sender - self.envsender = sender + # User notifications are normally sent with Precedence: bulk. This + # is appropriate as they can be backscatter of rejected spam. + # Owner notifications are not backscatter and are perhaps more + # important than 'bulk' so give them Precedence: list by default. + # (LP: #1313146) + self['Precedence'] = 'list' def _enqueue(self, mlist, **_kws): # Not imported at module scope to avoid import loop |