GNU/Linux >> Linux の 問題 >  >> Linux

Mailman2.1.xxでヘッダーに表示されるダイジェストを最小化する

問題:
Mailmanのダイジェストは、メッセージを乱雑にする多くの不要なヘッダーで構成されています。

解決策:
Mailman構成ファイルを次のように手動で編集します。
警告!!!:これらのヘッダーは「RFC1153」の一部であり、変更すると予測できないまたは望ましくない影響を与える可能性があります。
ここで私はヘッダーを保持:Date:、From:、Subject:、Keywords(存在する場合)、およびContent-Type(保持することが非常に重要)

手順:
自動的にコンパイルされたPython構成ファイルの名前を変更します。
mv /usr/lib/mailman/Mailman/Defaults.pyc /usr/lib/mailman/Mailman/Defaults.pyc.orig

構成ファイルを編集します:
mcedit /usr/lib/mailman/Mailman/Defaults.py

から次の変更を加えます:

# Headers which should be kept in both RFC 1153 (plain) and MIME digests. RFC
# 1153 also specifies these headers in this exact order, so order matters.
MIME_DIGEST_KEEP_HEADERS = [
'Date', 'From', 'To', 'Cc', 'Subject', 'Message-ID', 'Keywords',
# I believe we should also keep these headers though.
'In-Reply-To', 'References', 'Content-Type', 'MIME-Version',
'Content-Transfer-Encoding', 'Precedence', 'Reply-To', 'List-Post',
# Mailman 2.0 adds these headers
'Message',
]
#
# The order in this list controls the order of the RFC 1153 digest headers.
# Also, any headers in this list will be kept in the MIME digest even if they
# don't appear in the MIME list above. Finally, headers appearing in both
# lists must be casewise the same or duplication can result in the digest.
PLAIN_DIGEST_KEEP_HEADERS = [
'Message',
# RFC 1153 headers in order
'Date', 'From', 'To', 'Cc', 'Subject', 'Message-ID', 'Keywords',
'Content-Type',
]

TO:

# Headers which should be kept in both RFC 1153 (plain) and MIME digests. RFC
# 1153 also specifies these headers in this exact order, so order matters.
#MIME_DIGEST_KEEP_HEADERS = [
# 'Date', 'From', 'To', 'Cc', 'Subject', 'Message-ID', 'Keywords',
# # I believe we should also keep these headers though.
# 'In-Reply-To', 'References', 'Content-Type', 'MIME-Version',
# 'Content-Transfer-Encoding', 'Precedence', 'Reply-To', 'List-Post',
# # Mailman 2.0 adds these headers
# 'Message',
# ]
#
MIME_DIGEST_KEEP_HEADERS = [
'Date', 'From', 'Subject', 'Keywords',
# I believe we should also keep these headers though.
'In-Reply-To', 'References', 'Content-Type', 'MIME-Version',
'Content-Transfer-Encoding', 'Precedence', 'Reply-To', 'List-Post',
]
#
# The order in this list controls the order of the RFC 1153 digest headers.
# Also, any headers in this list will be kept in the MIME digest even if they
# don't appear in the MIME list above. Finally, headers appearing in both
# lists must be casewise the same or duplication can result in the digest.
#PLAIN_DIGEST_KEEP_HEADERS = [
# 'Message',
# # RFC 1153 headers in order
# 'Date', 'From', 'To', 'Cc', 'Subject', 'Message-ID', 'Keywords',
# 'Content-Type',
# ]
#
PLAIN_DIGEST_KEEP_HEADERS = [
# RFC 1153 headers in order
'Date', 'From', 'Subject', 'Keywords',
'Content-Type',
]

注: これは紛らわしいように見えるかもしれませんが、私が行った変更をよく見ると、2つのリストからいくつかのヘッダーを削除したことがわかります。
元のバージョンをそのまま保持しましたが、万が一の場合に備えてコメントとしてコメントしました。うまくいかず、それらのいくつかを再導入する必要があります。


Linux
  1. コマンドラインで郵便配達員の「モデレーション」ビットを変更する

  2. [[$ a ==Z*]]と[$a==Z *]の違いは?

  3. 関数、データ構造、およびヘッダーを文書化するカーネルセクション9のマンページを作成する方法は?

  1. プロセスIDの最大値は?

  2. バッシュ‘?

  3. MvはFsでアトミックですか?

  1. Linuxlsコマンドをマスターする

  2. Bashシェルのカスタマイズ

  3. C++ 標準ライブラリのヘッダーはどこにありますか