summaryrefslogtreecommitdiff
path: root/src/mailman/queue/outgoing.py
diff options
context:
space:
mode:
authorBarry Warsaw2011-05-18 23:05:44 -0400
committerBarry Warsaw2011-05-18 23:05:44 -0400
commit2884180c24a27a3ecee3c804dad2270928c5d19b (patch)
treedce4a8e15ccca713f7d69962a96b772d66383fb0 /src/mailman/queue/outgoing.py
parent0a7fe8845bc20df2e934509df0e8830f4274d0c7 (diff)
downloadmailman-2884180c24a27a3ecee3c804dad2270928c5d19b.tar.gz
mailman-2884180c24a27a3ecee3c804dad2270928c5d19b.tar.zst
mailman-2884180c24a27a3ecee3c804dad2270928c5d19b.zip
Diffstat (limited to 'src/mailman/queue/outgoing.py')
-rw-r--r--src/mailman/queue/outgoing.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/mailman/queue/outgoing.py b/src/mailman/queue/outgoing.py
index 2939651d6..e591353f9 100644
--- a/src/mailman/queue/outgoing.py
+++ b/src/mailman/queue/outgoing.py
@@ -41,6 +41,7 @@ from mailman.utilities.modules import find_name
DEAL_WITH_PERMFAILURES_EVERY = 10
log = logging.getLogger('mailman.error')
+smtp_log = logging.getLogger('mailman.smtp')
@@ -140,13 +141,17 @@ class OutgoingRunner(Runner, BounceMixin):
last_recip_count = msgdata.get('last_recip_count', 0)
deliver_until = msgdata.get('deliver_until', current_time)
if len(recipients) == last_recip_count:
- # We didn't make any progress, so don't attempt
- # delivery any longer. BAW: is this the best
- # disposition?
+ # We didn't make any progress. If we've exceeded the
+ # configured retry period, log this failure and
+ # discard the message.
if current_time > deliver_until:
+ smtp_log.error('Discarding message with '
+ 'persistent temporary failures: '
+ '{0}'.format(msg['message-id']))
return False
else:
- # Keep trying to delivery this message for a while
+ # We made some progress, so keep trying to delivery
+ # this message for a while longer.
deliver_until = current_time + as_timedelta(
config.mta.delivery_retry_period)
msgdata['last_recip_count'] = len(recipients)