summaryrefslogtreecommitdiff
path: root/Mailman/Utils.py
diff options
context:
space:
mode:
authorbwarsaw1998-12-23 00:07:24 +0000
committerbwarsaw1998-12-23 00:07:24 +0000
commit62c4138839889e8cfb0fefd1e8fd55f757bbb630 (patch)
treeaf65e01e3233cb039b26435adca5b35df307d368 /Mailman/Utils.py
parentfc57ff2b512050bde32ef88e39e189d66d456a47 (diff)
downloadmailman-62c4138839889e8cfb0fefd1e8fd55f757bbb630.tar.gz
mailman-62c4138839889e8cfb0fefd1e8fd55f757bbb630.tar.zst
mailman-62c4138839889e8cfb0fefd1e8fd55f757bbb630.zip
Diffstat (limited to 'Mailman/Utils.py')
-rw-r--r--Mailman/Utils.py10
1 files changed, 9 insertions, 1 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py
index ed351d9d3..a2c8c2630 100644
--- a/Mailman/Utils.py
+++ b/Mailman/Utils.py
@@ -184,7 +184,15 @@ def TrySMTPDelivery(recipient, sender, text, queue_entry):
try:
conn = smtplib.SMTP(mm_cfg.SMTPHOST)
- conn.sendmail(sender, recipient, text)
+ # Do the EHLO/HELO manually so we can check for DSN support
+ if conn.ehlo() >= 400:
+ conn.helo()
+ # receipt opts, empty unless DSN is supported, in which case we only
+ # want notification on failures
+ ropts = []
+ if conn.has_extn('dsn'):
+ ropts.append('NOTIFY=failure')
+ conn.sendmail(sender, recipient, text, rcpt_options=ropts)
conn.quit()
defer = 0
failure = None