aboutsummaryrefslogtreecommitdiffstats
path: root/Mailman
diff options
context:
space:
mode:
Diffstat (limited to 'Mailman')
-rwxr-xr-xMailman/Queue/OutgoingRunner.py8
-rw-r--r--Mailman/Queue/RetryRunner.py7
2 files changed, 9 insertions, 6 deletions
diff --git a/Mailman/Queue/OutgoingRunner.py b/Mailman/Queue/OutgoingRunner.py
index 0a204e66..86d26808 100755
--- a/Mailman/Queue/OutgoingRunner.py
+++ b/Mailman/Queue/OutgoingRunner.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2000-2017 by the Free Software Foundation, Inc.
+# Copyright (C) 2000-2018 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
@@ -122,12 +122,12 @@ class OutgoingRunner(Runner, BounceMixin):
# disposition?
if now > deliver_until:
return False
- # We're going to retry, but not too soon.
- deliver_after = now + mm_cfg.DELIVERY_RETRY_WAIT
- msgdata['deliver_after'] = deliver_after
else:
# Keep trying to delivery this message for a while
deliver_until = now + mm_cfg.DELIVERY_RETRY_PERIOD
+ # Don't retry delivery too soon.
+ deliver_after = now + mm_cfg.DELIVERY_RETRY_WAIT
+ msgdata['deliver_after'] = deliver_after
msgdata['last_recip_count'] = len(recips)
msgdata['deliver_until'] = deliver_until
msgdata['recips'] = recips
diff --git a/Mailman/Queue/RetryRunner.py b/Mailman/Queue/RetryRunner.py
index 66244253..49aa484d 100644
--- a/Mailman/Queue/RetryRunner.py
+++ b/Mailman/Queue/RetryRunner.py
@@ -1,4 +1,4 @@
-# Copyright (C) 2003 by the Free Software Foundation, Inc.
+# Copyright (C) 2003-2018 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
@@ -37,7 +37,10 @@ class RetryRunner(Runner):
self.__outq = Switchboard(mm_cfg.OUTQUEUE_DIR)
def _dispose(self, mlist, msg, msgdata):
- # Move it to the out queue for another retry
+ # Move it to the out queue for another retry if it's time.
+ deliver_after = msgdata.get('deliver_after', 0)
+ if time.time() < deliver_after:
+ return True
self.__outq.enqueue(msg, msgdata)
return False