diff options
| author | Barry Warsaw | 2010-06-29 22:11:09 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2010-06-29 22:11:09 -0400 |
| commit | db19156330bf6bbca9a6e13c5d85676e43be3b29 (patch) | |
| tree | 792f46e7cf0e5cc3c1ac3a693915cf4c4455168d | |
| parent | b3e874703bce97c121eb97dd9776da15a8b90070 (diff) | |
| download | mailman-db19156330bf6bbca9a6e13c5d85676e43be3b29.tar.gz mailman-db19156330bf6bbca9a6e13c5d85676e43be3b29.tar.zst mailman-db19156330bf6bbca9a6e13c5d85676e43be3b29.zip | |
| -rw-r--r-- | src/mailman/app/docs/chains.txt | 1 | ||||
| -rw-r--r-- | src/mailman/archiving/docs/common.txt | 2 | ||||
| -rw-r--r-- | src/mailman/chains/hold.py | 1 | ||||
| -rw-r--r-- | src/mailman/mta/base.py | 12 | ||||
| -rw-r--r-- | src/mailman/mta/docs/bulk.txt | 56 | ||||
| -rw-r--r-- | src/mailman/mta/docs/decorating.txt | 12 | ||||
| -rw-r--r-- | src/mailman/mta/docs/personalized.txt | 18 | ||||
| -rw-r--r-- | src/mailman/mta/docs/verp.txt | 6 | ||||
| -rw-r--r-- | src/mailman/queue/docs/outgoing.txt | 4 |
9 files changed, 5 insertions, 107 deletions
diff --git a/src/mailman/app/docs/chains.txt b/src/mailman/app/docs/chains.txt index 927004e27..216bf2f5b 100644 --- a/src/mailman/app/docs/chains.txt +++ b/src/mailman/app/docs/chains.txt @@ -159,7 +159,6 @@ This message is addressed to the mailing list moderators. MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: confirm ... - Sender: _xtest-request@example.com From: _xtest-request@example.com ... <BLANKLINE> diff --git a/src/mailman/archiving/docs/common.txt b/src/mailman/archiving/docs/common.txt index 62b407486..18400da42 100644 --- a/src/mailman/archiving/docs/common.txt +++ b/src/mailman/archiving/docs/common.txt @@ -103,8 +103,6 @@ address at the Mail-Archive. The message gets no header or footer decoration. Subject: An archived message Message-ID: <12345> X-Message-ID-Hash: ZaXPPxRMM9_hFZL4vTRlQlBx8pc= - Sender: test-bounces@example.com - Errors-To: test-bounces@example.com X-Peer: 127.0.0.1:... X-MailFrom: test-bounces@example.com X-RcptTo: archive@mail-archive.dev diff --git a/src/mailman/chains/hold.py b/src/mailman/chains/hold.py index 6755fe904..f5ff237d9 100644 --- a/src/mailman/chains/hold.py +++ b/src/mailman/chains/hold.py @@ -233,7 +233,6 @@ message will be approved for posting to the list. The Approved: header can also appear in the first line of the body of the reply.""")), _charset=language.charset) dmsg['Subject'] = 'confirm ' + token - dmsg['Sender'] = mlist.request_address dmsg['From'] = mlist.request_address dmsg['Date'] = formatdate(localtime=True) dmsg['Message-ID'] = make_msgid() diff --git a/src/mailman/mta/base.py b/src/mailman/mta/base.py index 7b254fd3e..2f1470d56 100644 --- a/src/mailman/mta/base.py +++ b/src/mailman/mta/base.py @@ -67,18 +67,8 @@ class BaseDelivery: :return: delivery failures as defined by `smtplib.SMTP.sendmail` :rtype: dictionary """ - # Blow away any existing Sender and Errors-To headers and substitute - # our own. Our interpretation of RFC 5322 $3.6.2 is that Mailman is - # the "agent responsible for actual transmission of the message" - # because what we send to list members is different than what the - # original author sent. RFC 2076 says Errors-To is "non-standard, - # discouraged" but we include it for historical purposes. - sender = self._get_sender(mlist, msg, msgdata) - del msg['sender'] - del msg['errors-to'] - msg['Sender'] = sender - msg['Errors-To'] = sender # Do the actual sending. + sender = self._get_sender(mlist, msg, msgdata) message_id = msg['message-id'] try: refused = self._connection.sendmail( diff --git a/src/mailman/mta/docs/bulk.txt b/src/mailman/mta/docs/bulk.txt index 925d29554..a15a30279 100644 --- a/src/mailman/mta/docs/bulk.txt +++ b/src/mailman/mta/docs/bulk.txt @@ -215,22 +215,8 @@ each with 20 addresses in the RCPT TO header. Delivery headers ================ -The message delivered to bulk recipients has its Sender and Errors-To headers -set to some Mailman-responsible agent that can handle such errors, for example -the -bounces robot for the list or the site owner's address. The relevant -RFCs are 5321, 5322, and 2076. - -It is arguably incorrect for Mailman to touch the Sender header, if the -interpretation is such that the original author's agent is considered the -"agent responsible for actual transmission of the message" (RFC 5322 $3.6.2). -On the other hand, a reasonable argument can be made that Mailman is the -responsible agent since the message being received by list members is -different than the message sent by the original author. We make the latter -interpretation, and thus Mailman removes all existing Sender headers and -inserts its own. - -RFC 2076 states that Errors-To is "non-standard, discouraged". We treat it -the same as Sender for historical de-facto purposes. +The sending agent shows up in the RFC 5321 MAIL FROM header, which shows up in +the X-MailFrom header in the sample message. The bulk delivery module calculates the sending agent address first from the message metadata... @@ -248,8 +234,6 @@ message metadata... To: test@example.com Subject: test one Message-ID: <aardvark> - Sender: asender@example.org - Errors-To: asender@example.org X-Peer: ... X-MailFrom: asender@example.org X-RcptTo: aperson@example.com @@ -268,8 +252,6 @@ message metadata... To: test@example.com Subject: test one Message-ID: <aardvark> - Sender: test-bounces@example.com - Errors-To: test-bounces@example.com X-Peer: ... X-MailFrom: test-bounces@example.com X-RcptTo: aperson@example.com @@ -293,45 +275,13 @@ message. To: test@example.com Subject: test one Message-ID: <aardvark> - Sender: site-owner@example.com - Errors-To: site-owner@example.com X-Peer: ... X-MailFrom: site-owner@example.com X-RcptTo: aperson@example.com <BLANKLINE> This is a test. -Any existing Sender or Errors-To headers in the original message are always -deleted first. - - >>> msg = message_from_string("""\ - ... From: bperson@example.org - ... To: test@example.com - ... Subject: test two - ... Message-ID: <badger> - ... Sender: robot@example.org - ... Errors-To: robot@example.org - ... - ... This is a test. - ... """) - - >>> bulk.deliver(mlist, msg, msgdata) - {} - - >>> message = list(smtpd.messages)[0] - >>> print message.as_string() - From: bperson@example.org - To: test@example.com - Subject: test two - Message-ID: <badger> - Sender: test-bounces@example.com - Errors-To: test-bounces@example.com - X-Peer: ... - X-MailFrom: test-bounces@example.com - X-RcptTo: aperson@example.com - <BLANKLINE> - This is a test. - + # Remove test configuration. >>> config.pop('site-owner') diff --git a/src/mailman/mta/docs/decorating.txt b/src/mailman/mta/docs/decorating.txt index 935d9e349..f89d0b102 100644 --- a/src/mailman/mta/docs/decorating.txt +++ b/src/mailman/mta/docs/decorating.txt @@ -99,8 +99,6 @@ The decorations happen when the message is delivered. MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit - Sender: test-bounces@example.com - Errors-To: test-bounces@example.com X-Peer: ... X-MailFrom: test-bounces@example.com X-RcptTo: aperson@example.com @@ -120,8 +118,6 @@ The decorations happen when the message is delivered. MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit - Sender: test-bounces@example.com - Errors-To: test-bounces@example.com X-Peer: ... X-MailFrom: test-bounces@example.com X-RcptTo: bperson@example.com @@ -141,8 +137,6 @@ The decorations happen when the message is delivered. MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit - Sender: test-bounces@example.com - Errors-To: test-bounces@example.com X-Peer: ... X-MailFrom: test-bounces@example.com X-RcptTo: cperson@example.com @@ -177,8 +171,6 @@ into the message metadata. To: test@example.com Subject: test one Message-ID: <aardvark> - Sender: test-bounces@example.com - Errors-To: test-bounces@example.com X-Peer: ... X-MailFrom: test-bounces@example.com X-RcptTo: aperson@example.com @@ -189,8 +181,6 @@ into the message metadata. To: test@example.com Subject: test one Message-ID: <aardvark> - Sender: test-bounces@example.com - Errors-To: test-bounces@example.com X-Peer: ... X-MailFrom: test-bounces@example.com X-RcptTo: bperson@example.com @@ -201,8 +191,6 @@ into the message metadata. To: test@example.com Subject: test one Message-ID: <aardvark> - Sender: test-bounces@example.com - Errors-To: test-bounces@example.com X-Peer: ... X-MailFrom: test-bounces@example.com X-RcptTo: cperson@example.com diff --git a/src/mailman/mta/docs/personalized.txt b/src/mailman/mta/docs/personalized.txt index 7e4331b97..38494b725 100644 --- a/src/mailman/mta/docs/personalized.txt +++ b/src/mailman/mta/docs/personalized.txt @@ -57,8 +57,6 @@ By default, the To header is not personalized. To: test@example.com Subject: test one Message-ID: <aardvark> - Sender: test-bounces@example.com - Errors-To: test-bounces@example.com X-Peer: ... X-MailFrom: test-bounces@example.com X-RcptTo: aperson@example.com @@ -69,8 +67,6 @@ By default, the To header is not personalized. To: test@example.com Subject: test one Message-ID: <aardvark> - Sender: test-bounces@example.com - Errors-To: test-bounces@example.com X-Peer: ... X-MailFrom: test-bounces@example.com X-RcptTo: bperson@example.com @@ -81,8 +77,6 @@ By default, the To header is not personalized. To: test@example.com Subject: test one Message-ID: <aardvark> - Sender: test-bounces@example.com - Errors-To: test-bounces@example.com X-Peer: ... X-MailFrom: test-bounces@example.com X-RcptTo: cperson@example.com @@ -114,8 +108,6 @@ the recipient's address and name. To: aperson@example.com Subject: test one Message-ID: <aardvark> - Sender: test-bounces@example.com - Errors-To: test-bounces@example.com X-Peer: ... X-MailFrom: test-bounces@example.com X-RcptTo: aperson@example.com @@ -126,8 +118,6 @@ the recipient's address and name. To: bperson@example.com Subject: test one Message-ID: <aardvark> - Sender: test-bounces@example.com - Errors-To: test-bounces@example.com X-Peer: ... X-MailFrom: test-bounces@example.com X-RcptTo: bperson@example.com @@ -138,8 +128,6 @@ the recipient's address and name. To: cperson@example.com Subject: test one Message-ID: <aardvark> - Sender: test-bounces@example.com - Errors-To: test-bounces@example.com X-Peer: ... X-MailFrom: test-bounces@example.com X-RcptTo: cperson@example.com @@ -172,8 +160,6 @@ associated real name, then this name also shows up in the To header. To: aperson@example.com Subject: test one Message-ID: <aardvark> - Sender: test-bounces@example.com - Errors-To: test-bounces@example.com X-Peer: ... X-MailFrom: test-bounces@example.com X-RcptTo: aperson@example.com @@ -184,8 +170,6 @@ associated real name, then this name also shows up in the To header. To: Bill Person <bperson@example.com> Subject: test one Message-ID: <aardvark> - Sender: test-bounces@example.com - Errors-To: test-bounces@example.com X-Peer: ... X-MailFrom: test-bounces@example.com X-RcptTo: bperson@example.com @@ -196,8 +180,6 @@ associated real name, then this name also shows up in the To header. To: Cate Person <cperson@example.com> Subject: test one Message-ID: <aardvark> - Sender: test-bounces@example.com - Errors-To: test-bounces@example.com X-Peer: ... X-MailFrom: test-bounces@example.com X-RcptTo: cperson@example.com diff --git a/src/mailman/mta/docs/verp.txt b/src/mailman/mta/docs/verp.txt index 75e608c7a..aa7f27793 100644 --- a/src/mailman/mta/docs/verp.txt +++ b/src/mailman/mta/docs/verp.txt @@ -93,8 +93,6 @@ VERPing is only actually done if the metadata requests it. To: test@example.com Subject: test one Message-ID: <aardvark> - Sender: test-bounces+aperson=example.com@example.com - Errors-To: test-bounces+aperson=example.com@example.com X-Peer: ... X-MailFrom: test-bounces+aperson=example.com@example.com X-RcptTo: aperson@example.com @@ -105,8 +103,6 @@ VERPing is only actually done if the metadata requests it. To: test@example.com Subject: test one Message-ID: <aardvark> - Sender: test-bounces+bperson=example.com@example.com - Errors-To: test-bounces+bperson=example.com@example.com X-Peer: ... X-MailFrom: test-bounces+bperson=example.com@example.com X-RcptTo: bperson@example.com @@ -117,8 +113,6 @@ VERPing is only actually done if the metadata requests it. To: test@example.com Subject: test one Message-ID: <aardvark> - Sender: test-bounces+cperson=example.com@example.com - Errors-To: test-bounces+cperson=example.com@example.com X-Peer: ... X-MailFrom: test-bounces+cperson=example.com@example.com X-RcptTo: cperson@example.com diff --git a/src/mailman/queue/docs/outgoing.txt b/src/mailman/queue/docs/outgoing.txt index cdabdb795..73a9200ef 100644 --- a/src/mailman/queue/docs/outgoing.txt +++ b/src/mailman/queue/docs/outgoing.txt @@ -76,8 +76,6 @@ Every recipient got the same copy of the message. To: test@example.com Subject: My first post Message-ID: <first> - Sender: test-bounces@example.com - Errors-To: test-bounces@example.com X-Peer: ... X-MailFrom: test-bounces@example.com X-RcptTo: cperson@example.com, bperson@example.com, aperson@example.com @@ -117,7 +115,7 @@ recipients. >>> from operator import itemgetter >>> def show_headers(messages): ... for message in sorted(messages, key=itemgetter('x-rcptto')): - ... print message['X-RcptTo'], message['Sender'] + ... print message['X-RcptTo'], message['X-MailFrom'] >>> show_headers(messages) aperson@example.com test-bounces@example.com |
