diff options
| author | bwarsaw | 2001-10-01 21:31:16 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-10-01 21:31:16 +0000 |
| commit | 662b0878fad5a539b8e14b5e32bbce0dae138978 (patch) | |
| tree | 1bf91a6b5657b9b6c0d31451226fc9098e8a705a | |
| parent | b444ffa0538c20922beedb6732a7b52949855c61 (diff) | |
| download | mailman-662b0878fad5a539b8e14b5e32bbce0dae138978.tar.gz mailman-662b0878fad5a539b8e14b5e32bbce0dae138978.tar.zst mailman-662b0878fad5a539b8e14b5e32bbce0dae138978.zip | |
prepare_message(): Remove X-Trace: and NNTP-Posting-Host: headers,
since some nntpd servers will complain about these if they exist,
and will reject the message posting.
| -rw-r--r-- | Mailman/Queue/NewsRunner.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Mailman/Queue/NewsRunner.py b/Mailman/Queue/NewsRunner.py index bc247bdf0..3626f838b 100644 --- a/Mailman/Queue/NewsRunner.py +++ b/Mailman/Queue/NewsRunner.py @@ -100,7 +100,6 @@ def prepare_message(mlist, msg, msgdata): else: # Newsgroups: isn't in the message msg['Newsgroups'] = mlist.linked_newsgroup - # # Note: We need to be sure two messages aren't ever sent to the same list # in the same process, since message ids need to be unique. Further, if # messages are crossposted to two Usenet-gated mailing lists, they each @@ -121,16 +120,17 @@ def prepare_message(mlist, msg, msgdata): if hackmsgid: del msg['message-id'] msg['Message-ID'] = Utils.unique_message_id(mlist) - # # Lines: is useful if msg['Lines'] is None: # BAW: is there a better way? count = len(email.Iterators.body_line_iterator(msg)) msg['Lines'] = str(count) - # - # Get rid of these lines + # BAW: It appears that some news servers have problems if the message + # contains X-Trace:, NNTP-Posting-Host: or duplicate Cc: headers. Should + # we retain X-Trace or NNTP-Posting-Host as backup X-* headers? del msg['received'] - # + del msg['x-trace'] + del msg['nntp-posting-host'] # BAW: Gross hack to ensure that we have only one # content-transfer-encoding header. More than one barfs NNTP. I don't # know why we sometimes have more than one such header, and it probably |
