Problém:
Výpisy v Mailman se skládají ze spousty nepotřebných hlaviček, které zaplňují zprávy.
Řešení:
Upravte konfigurační soubor Mailman ručně následovně:
UPOZORNĚNÍ!!!:Tyto hlavičky jsou součástí 'RFC 1153', které v případě změny mohou mít nepředvídatelné nebo nežádoucí účinky.
Takže zde ponechala záhlaví:Datum:, Od:, Předmět:, Klíčová slova (pokud existují) a Typ obsahu (docela důležité je zachovat)
Kroky:
Přejmenujte automaticky kompilovaný konfigurační soubor Pythonu:mv /usr/lib/mailman/Mailman/Defaults.pyc /usr/lib/mailman/Mailman/Defaults.pyc.orig
Upravte konfigurační soubor:mcedit /usr/lib/mailman/Mailman/Defaults.py
a proveďte následující změny z:
# 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',
]
KOMU:
# 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',
]
Poznámka: Může to vypadat zmateně, ale jen se dobře podívejte na změny, které jsem provedl, a uvidíte, že jsem jednoduše odstranil některá záhlaví ze 2 seznamů.
Jednoduše jsem ponechal původní verzi, ale okomentoval jsem ji jako referenci pro případ, že by se něco stalo pokazit a musím některé z nich znovu zavést.