summaryrefslogtreecommitdiff
path: root/mailman/queue/docs
diff options
context:
space:
mode:
authorBarry Warsaw2008-03-13 09:00:20 -0400
committerBarry Warsaw2008-03-13 09:00:20 -0400
commit2aee920dd9b9f522c4358b600a007315b7f57667 (patch)
tree4807e5b96d241a42bba62a8d97f1a9cbe5992b94 /mailman/queue/docs
parentb091b286812b2c2c380454eeee914f77a5c35def (diff)
downloadmailman-2aee920dd9b9f522c4358b600a007315b7f57667.tar.gz
mailman-2aee920dd9b9f522c4358b600a007315b7f57667.tar.zst
mailman-2aee920dd9b9f522c4358b600a007315b7f57667.zip
Move mailman.database.txnsupport to mailman.database.transaction and update
the txn() decorator. It no longer requires a _withtxn() method since it knows how to commit and abort the current transaction using the global database. Flesh out the lmtp.txt doctest with documentation for both bogus and valid subaddresses.
Diffstat (limited to 'mailman/queue/docs')
-rw-r--r--mailman/queue/docs/lmtp.txt58
1 files changed, 56 insertions, 2 deletions
diff --git a/mailman/queue/docs/lmtp.txt b/mailman/queue/docs/lmtp.txt
index 7c886c281..7b25d6a74 100644
--- a/mailman/queue/docs/lmtp.txt
+++ b/mailman/queue/docs/lmtp.txt
@@ -22,8 +22,8 @@ It also helps to have a nice LMTP client.
(250, ...)
-Invalid mailing list
---------------------
+Posting address
+---------------
If the mail server tries to send a message to a non-existant mailing list, it
will get a 550 error.
@@ -42,6 +42,60 @@ will get a 550 error.
...
SMTPDataError: (550, 'Requested action not taken: mailbox unavailable')
+Once the mailing list is created, the posting address is valid.
+
+ >>> from mailman.app.lifecycle import create_list
+ >>> create_list(u'mylist@example.com')
+ <mailing list "mylist@example.com" at ...>
+ >>> commit()
+ >>> lmtp.sendmail(
+ ... 'anne.person@example.com',
+ ... ['mylist@example.com'], """\
+ ... From: anne.person@example.com
+ ... To: mylist@example.com
+ ... Subject: An interesting message
+ ... Message-ID: <badger>
+ ...
+ ... This is an interesting message.
+ ... """)
+ {}
+
+
+Sub-addresses
+-------------
+
+The LMTP server understands each of the list's sub-addreses, such as -join,
+-leave, -request and so on. If the message is posted to an invalid
+sub-address though, it is rejected.
+
+ >>> lmtp.sendmail(
+ ... 'anne.person@example.com',
+ ... ['mylist-bogus@example.com'], """\
+ ... From: anne.person@example.com
+ ... To: mylist-bogus@example.com
+ ... Subject: Help
+ ... Message-ID: <cow>
+ ...
+ ... Please help me.
+ ... """)
+ Traceback (most recent call last):
+ ...
+ SMTPDataError: (550, 'Requested action not taken: mailbox unavailable')
+
+But the message is accepted if posted to a valid sub-address.
+
+ >>> lmtp.sendmail(
+ ... 'anne.person@example.com',
+ ... ['mylist-request@example.com'], """\
+ ... From: anne.person@example.com
+ ... To: mylist-request@example.com
+ ... Subject: Help
+ ... Message-ID: <dog>
+ ...
+ ... Please help me.
+ ... """)
+ {}
+
Clean up
--------