diff options
Diffstat (limited to 'Mailman/queue')
| -rw-r--r-- | Mailman/queue/command.py | 4 | ||||
| -rw-r--r-- | Mailman/queue/outgoing.py | 17 | ||||
| -rw-r--r-- | Mailman/queue/pipeline.py | 4 |
3 files changed, 12 insertions, 13 deletions
diff --git a/Mailman/queue/command.py b/Mailman/queue/command.py index 8217acad6..a0db2f776 100644 --- a/Mailman/queue/command.py +++ b/Mailman/queue/command.py @@ -33,7 +33,6 @@ from email.MIMEText import MIMEText from Mailman import Message from Mailman import Utils -from Mailman.Handlers import Replybot from Mailman.app.replybot import autorespond_to_sender from Mailman.configuration import config from Mailman.i18n import _ @@ -206,7 +205,8 @@ class CommandRunner(Runner): return False # Do replybot for commands mlist.Load() - Replybot.process(mlist, msg, msgdata) + replybot = config.handlers['replybot'] + replybot.process(mlist, msg, msgdata) if mlist.autorespond_requests == 1: log.info('replied and discard') # w/discard diff --git a/Mailman/queue/outgoing.py b/Mailman/queue/outgoing.py index 09572ba9b..a3d60f0a0 100644 --- a/Mailman/queue/outgoing.py +++ b/Mailman/queue/outgoing.py @@ -46,14 +46,13 @@ class OutgoingRunner(Runner, BounceMixin): Runner.__init__(self, slice, numslices) BounceMixin.__init__(self) # We look this function up only at startup time - modname = 'Mailman.Handlers.' + config.DELIVERY_MODULE - mod = __import__(modname) - self._func = getattr(sys.modules[modname], 'process') + handler = config.handlers[config.DELIVERY_MODULE] + self._func = handler.process # This prevents smtp server connection problems from filling up the # error log. It gets reset if the message was successfully sent, and # set if there was a socket.error. - self.__logged = False - self.__retryq = Switchboard(config.RETRYQUEUE_DIR) + self._logged = False + self._retryq = Switchboard(config.RETRYQUEUE_DIR) def _dispose(self, mlist, msg, msgdata): # See if we should retry delivery of this message again. @@ -69,7 +68,7 @@ class OutgoingRunner(Runner, BounceMixin): if pid <> os.getpid(): log.error('child process leaked thru: %s', modname) os._exit(1) - self.__logged = False + self._logged = False except socket.error: # There was a problem connecting to the SMTP server. Log this # once, but crank up our sleep time so we don't fill the error @@ -78,10 +77,10 @@ class OutgoingRunner(Runner, BounceMixin): if port == 0: port = 'smtp' # Log this just once. - if not self.__logged: + if not self._logged: log.error('Cannot connect to SMTP server %s on port %s', config.SMTPHOST, port) - self.__logged = True + self._logged = True return True except Errors.SomeRecipientsFailed, e: # Handle local rejects of probe messages differently. @@ -120,7 +119,7 @@ class OutgoingRunner(Runner, BounceMixin): msgdata['last_recip_count'] = len(recips) msgdata['deliver_until'] = deliver_until msgdata['recips'] = recips - self.__retryq.enqueue(msg, msgdata) + self._retryq.enqueue(msg, msgdata) # We've successfully completed handling of this message return False diff --git a/Mailman/queue/pipeline.py b/Mailman/queue/pipeline.py index 14bfea56c..47c2f9e6f 100644 --- a/Mailman/queue/pipeline.py +++ b/Mailman/queue/pipeline.py @@ -22,9 +22,9 @@ through the 'preparation pipeline'. This pipeline adds, deletes and modifies headers, calculates message recipients, and more. """ -from Mailman.app.pipeline import process +from Mailman.app.pipelines import process from Mailman.configuration import config -from Mailman.queue import runner +from Mailman.queue import Runner |
