summaryrefslogtreecommitdiff
path: root/src/mailman/mta/docs
diff options
context:
space:
mode:
authorBarry Warsaw2009-10-31 15:14:37 -0400
committerBarry Warsaw2009-10-31 15:14:37 -0400
commit6ec26d074d923fa83b65b96c4904459d777781f9 (patch)
tree50258e956bc1a7f4eaaa989a34180ebecd3a0de1 /src/mailman/mta/docs
parentcac646019303ffe85cfac4c00eca7d44f634a03d (diff)
downloadmailman-6ec26d074d923fa83b65b96c4904459d777781f9.tar.gz
mailman-6ec26d074d923fa83b65b96c4904459d777781f9.tar.zst
mailman-6ec26d074d923fa83b65b96c4904459d777781f9.zip
Handle SMTPResponseExceptions like smtp_direct.py, but without the distinction
between temporary and permanent failures. That will happen at a higher level.
Diffstat (limited to 'src/mailman/mta/docs')
-rw-r--r--src/mailman/mta/docs/bulk.txt34
1 files changed, 29 insertions, 5 deletions
diff --git a/src/mailman/mta/docs/bulk.txt b/src/mailman/mta/docs/bulk.txt
index fabc265b6..bcce7e4c7 100644
--- a/src/mailman/mta/docs/bulk.txt
+++ b/src/mailman/mta/docs/bulk.txt
@@ -338,14 +338,14 @@ local mail server which manages queuing and final delivery. However, even
this local mail server can produce delivery failures visible to Mailman in
certain situations.
-For example, something could be seriously wrong with the mail server and it
-could refuse delivery to all recipients.
+For example, there could be a problem delivering to any of the specified
+recipients.
# Tell the mail server to fail on the next 3 RCPT TO commands, one for
# each recipient in the following message.
- >>> smtpd.err_queue.put('rcpt')
- >>> smtpd.err_queue.put('rcpt')
- >>> smtpd.err_queue.put('rcpt')
+ >>> smtpd.err_queue.put(('rcpt', 500))
+ >>> smtpd.err_queue.put(('rcpt', 500))
+ >>> smtpd.err_queue.put(('rcpt', 500))
>>> recipients = set([
... 'aperson@example.org',
@@ -373,3 +373,27 @@ could refuse delivery to all recipients.
>>> messages = list(smtpd.messages)
>>> len(messages)
0
+
+Or there could be some other problem causing an SMTP response failure.
+
+ # Tell the mail server to register a temporary failure on the next MAIL
+ # FROM command.
+ >>> smtpd.err_queue.put(('mail', 450))
+
+ >>> failures = bulk.deliver(mlist, msg, msgdata)
+ >>> for address in sorted(failures):
+ ... print address, failures[address][0], failures[address][1]
+ aperson@example.org 450 Error: SMTPResponseException
+ bperson@example.org 450 Error: SMTPResponseException
+ cperson@example.org 450 Error: SMTPResponseException
+
+ # Tell the mail server to register a permanent failure on the next MAIL
+ # FROM command.
+ >>> smtpd.err_queue.put(('mail', 500))
+
+ >>> failures = bulk.deliver(mlist, msg, msgdata)
+ >>> for address in sorted(failures):
+ ... print address, failures[address][0], failures[address][1]
+ aperson@example.org 500 Error: SMTPResponseException
+ bperson@example.org 500 Error: SMTPResponseException
+ cperson@example.org 500 Error: SMTPResponseException