diff options
| author | Barry Warsaw | 2008-12-26 09:04:33 -0500 |
|---|---|---|
| committer | Barry Warsaw | 2008-12-26 09:04:33 -0500 |
| commit | 1ffa4c74935a56a3c5de736fab052e33e4ab3d38 (patch) | |
| tree | e44781f9de6e2ab284990000c08772664e999a5f /mailman/queue/outgoing.py | |
| parent | b8e68e7577aa12e0e355aabe2845981f0d73e3b5 (diff) | |
| download | mailman-1ffa4c74935a56a3c5de736fab052e33e4ab3d38.tar.gz mailman-1ffa4c74935a56a3c5de736fab052e33e4ab3d38.tar.zst mailman-1ffa4c74935a56a3c5de736fab052e33e4ab3d38.zip | |
Diffstat (limited to 'mailman/queue/outgoing.py')
| -rw-r--r-- | mailman/queue/outgoing.py | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/mailman/queue/outgoing.py b/mailman/queue/outgoing.py index 9eb287e6b..2043d8bc8 100644 --- a/mailman/queue/outgoing.py +++ b/mailman/queue/outgoing.py @@ -26,6 +26,7 @@ import logging from datetime import datetime +from mailman import Defaults from mailman import Message from mailman.config import config from mailman.core import errors @@ -41,19 +42,19 @@ log = logging.getLogger('mailman.error') class OutgoingRunner(Runner, BounceMixin): - QDIR = config.OUTQUEUE_DIR + """The outgoing queue runner.""" def __init__(self, slice=None, numslices=1): Runner.__init__(self, slice, numslices) BounceMixin.__init__(self) # We look this function up only at startup time - handler = config.handlers[config.DELIVERY_MODULE] + handler = config.handlers[Defaults.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._retryq = config.switchboards['retry'] def _dispose(self, mlist, msg, msgdata): # See if we should retry delivery of this message again. @@ -73,13 +74,13 @@ class OutgoingRunner(Runner, BounceMixin): # 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 # log. - port = config.SMTPPORT + port = int(config.mta.port) if port == 0: port = 'smtp' # Log this just once. if not self._logged: log.error('Cannot connect to SMTP server %s on port %s', - config.SMTPHOST, port) + config.mta.host, port) self._logged = True return True except errors.SomeRecipientsFailed, e: @@ -115,7 +116,7 @@ class OutgoingRunner(Runner, BounceMixin): return False else: # Keep trying to delivery this message for a while - deliver_until = now + config.DELIVERY_RETRY_PERIOD + deliver_until = now + Defaults.DELIVERY_RETRY_PERIOD msgdata['last_recip_count'] = len(recips) msgdata['deliver_until'] = deliver_until msgdata['recips'] = recips |
