diff options
| author | bwarsaw | 1999-11-24 21:26:07 +0000 |
|---|---|---|
| committer | bwarsaw | 1999-11-24 21:26:07 +0000 |
| commit | e3d0091180d424afb6449f791bf315a3ca929174 (patch) | |
| tree | f84bc85624b53af0706034523cd341efd90c45bd | |
| parent | 90585066cac0eae163096f9e60e866940ab8d90b (diff) | |
| download | mailman-e3d0091180d424afb6449f791bf315a3ca929174.tar.gz mailman-e3d0091180d424afb6449f791bf315a3ca929174.tar.zst mailman-e3d0091180d424afb6449f791bf315a3ca929174.zip | |
Convert message delivery to pipeline architecture by using
HandlerAPI.DeliverToUser() for fast track delivery of the
notification messages.
| -rw-r--r-- | Mailman/Bouncer.py | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/Mailman/Bouncer.py b/Mailman/Bouncer.py index 5b5ee33cf..8ae7f06ca 100644 --- a/Mailman/Bouncer.py +++ b/Mailman/Bouncer.py @@ -29,6 +29,10 @@ import Utils import mm_cfg import Errors +from Mailman import Message +from Mailman.Handlers import HandlerAPI + + class Bouncer: def InitVars(self): # Not configurable... @@ -245,17 +249,15 @@ class Bouncer: if negative: negative = string.upper(negative) - self.SendTextToUser( - subject = "%s member %s bouncing - %s%s" - % (self.real_name, addr, negative, did), - recipient = recipient, - sender = mm_cfg.MAILMAN_OWNER, - add_headers = [ - "Errors-To: %s" % mm_cfg.MAILMAN_OWNER, - "MIME-version: 1.0", - "Content-type: multipart/mixed;" - ' boundary="%s"' % boundary], - text = text) + # send the bounce message + msg = Message.UserNotification( + recipient, mm_cfg.MAILMAN_OWNER, + '%s member %s bouncing - %s%s' % (self.real_name, addr, + negative, did), + text) + msg['MIME-Version'] = '1.0' + msg['Content-Type'] = 'multipart/mixed; boundary="%s"' % boundary + HandlerAPI.DeliverToUser(self, msg) def DisableBouncingAddress(self, addr): """Disable delivery for bouncing user address. |
