GNU/Linux >> Linux Esercitazione >  >> Linux

Riduci a icona le intestazioni mostrate dai Digest in Mailman 2.1.xx

Problema:
I riepiloghi in Mailman sono composti da molte intestazioni non necessarie che ingombrano i messaggi.

Soluzione:
Modifica manualmente il file di configurazione di Mailman come segue:
AVVERTENZA !!!:queste intestazioni fanno parte di una "RFC 1153" che, se modificata, può avere effetti imprevedibili o indesiderati.
Quindi eccomi qui ha mantenuto le intestazioni:Data:, Da:, Oggetto:, Parole chiave (se presenti) e Tipo di contenuto (abbastanza importante da conservare)

Passaggi:
Rinomina il file di configurazione Python compilato automaticamente:
mv /usr/lib/mailman/Mailman/Defaults.pyc /usr/lib/mailman/Mailman/Defaults.pyc.orig

Modifica il file di configurazione:
mcedit /usr/lib/mailman/Mailman/Defaults.py

e apportare le seguenti modifiche da:

# 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',
]

A:

# 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',
]

Nota: Potrebbe sembrare confuso, ma dai un'occhiata alle modifiche che ho apportato e puoi vedere che ho semplicemente eliminato alcune intestazioni dai 2 elenchi.
Ho semplicemente mantenuto la versione originale ma l'ho commentata come riferimento nel caso in cui le cose va storto e devo reintrodurne alcuni.


Linux
  1. Modifica del bit di "moderazione" degli abbonati mailman sulla riga di comando

  2. Come creare la sezione del kernel 9 Manpage Quali funzioni del documento, strutture di dati e intestazioni?

  3. Il valore massimo dell'ID di processo?

  4. Crontab passato l'ora?

  5. Dove sono le intestazioni della libreria standard C++

Guida essenziale:il modo semplice per abilitare "Riduci al minimo i clic" su Ubuntu

Che cos'è la shell in Linux?

Un'introduzione all'editor vi

Personalizzazione della shell Bash

Un'introduzione al comando diff

Il comando timer in Linux