From 2aee920dd9b9f522c4358b600a007315b7f57667 Mon Sep 17 00:00:00 2001 From: Barry Warsaw Date: Thu, 13 Mar 2008 09:00:20 -0400 Subject: 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. --- mailman/queue/docs/lmtp.txt | 58 +++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 56 insertions(+), 2 deletions(-) (limited to 'mailman/queue/docs') 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') + + >>> 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: + ... + ... 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: + ... + ... 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: + ... + ... Please help me. + ... """) + {} + Clean up -------- -- cgit v1.3.1