diff options
| author | bwarsaw | 2001-10-12 05:02:32 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-10-12 05:02:32 +0000 |
| commit | 2f2fe1255b622f004b3bbe2519fcb35c5f459a0f (patch) | |
| tree | af761e62c3136070a5891776a7a86f442e1f3a1b | |
| parent | 344d453c1041a6975863b976b727194320c51113 (diff) | |
| download | mailman-2f2fe1255b622f004b3bbe2519fcb35c5f459a0f.tar.gz mailman-2f2fe1255b622f004b3bbe2519fcb35c5f459a0f.tar.zst mailman-2f2fe1255b622f004b3bbe2519fcb35c5f459a0f.zip | |
A first shot at configuration for cleaning headers before a message
gets gated mail->news. Specifically,
NNTP_REMOVE_HEADERS: This is a list of headers to remove from the
message before posting to nntp.
NNTP_REWRITE_DUPLICATE_HEADERS: A list of headers that should get
moved if there are more than one in the message. Contains a tuple of
the original field name and the new field name.
| -rw-r--r-- | Mailman/Defaults.py.in | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Mailman/Defaults.py.in b/Mailman/Defaults.py.in index 6fc7ebd8e..2efc50c21 100644 --- a/Mailman/Defaults.py.in +++ b/Mailman/Defaults.py.in @@ -283,6 +283,26 @@ NNTP_PASSWORD = None # Set this if you have an NNTP server you prefer gatewayed lists to use. DEFAULT_NNTP_HOST = '' +# These variables controls how headers must be cleansed in order to be +# accepted by your NNTP server. Some servers like INN reject messages +# containing prohibited headers, or duplicate headers. The NNTP server may +# reject the message for other reasons, but there's little that can be +# programmatically done about that. See Mailman/Queue/NewsRunner.py +# +# First, these headers (case ignored) are removed from the original message. +NNTP_REMOVE_HEADERS = ['nntp-posting-host', 'nntp-posting-date', 'x-trace', + 'x-complaints-to', 'xref', 'date-received', 'posted', + 'posting-version', 'relay-version', 'received'] + +# Next, these headers are left alone, unless there are duplicates in the +# original message. Any second and subsequent headers are rewritten to the +# second named header (case preserved). +NNTP_REWRITE_DUPLICATE_HEADERS = [ + ('to', 'X-Original-To'), + ('cc', 'X-Original-Cc'), + ('content-transfer-encoding', 'X-Original-Content-Transfer-Encoding'), + ] + # All `normal' messages which are delivered to the entire list membership go # through this pipeline of handler modules. Lists themselves can override the # global pipeline by defining a `pipeline' attribute. |
