GNU/Linux >> Belajar Linux >  >> Linux

Minimalkan Intisari yang ditampilkan Header di Mailman 2.1.xx

Masalah:
Intisari di Mailman terdiri dari banyak header yang tidak dibutuhkan yang mengacaukan pesan.

Solusi:
Edit file konfigurasi Mailman secara manual sebagai berikut:
PERINGATAN !!!:Header ini adalah bagian dari 'RFC 1153' yang jika diubah dapat memiliki efek yang tidak terduga atau tidak diinginkan.
Jadi di sini saya pertahankan tajuk:Tanggal:, Dari:, Subjek:, Kata kunci (jika ada), dan Tipe-Konten (cukup penting untuk disimpan)

Langkah-langkah:
Ganti nama file konfigurasi Python yang dikompilasi secara otomatis:
mv /usr/lib/mailman/Mailman/Defaults.pyc /usr/lib/mailman/Mailman/Defaults.pyc.orig

Edit file konfigurasi:
mcedit /usr/lib/mailman/Mailman/Defaults.py

dan buat perubahan berikut dari:

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

KEPADA:

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

Catatan: Ini mungkin terlihat membingungkan tetapi perhatikan baik-baik perubahan yang saya buat dan Anda dapat melihat bahwa saya hanya menghilangkan beberapa header dari 2 daftar.
Saya hanya menyimpan versi aslinya tetapi mengomentarinya sebagai referensi jika terjadi sesuatu salah dan saya perlu memperkenalkan kembali beberapa di antaranya.


Linux
  1. Hasil Ls * , Ls ** Dan Ls ***?

  2. Nilai Maksimum Id Proses?

  3. 'Seandainya'?

  1. Crontab Melewati Jam?

  2. Bagaimana cara meminimalkan Evolution ke baki sistem di Ubuntu?

  3. Bagaimana cara mempersingkat jalur direktori saat ini yang ditampilkan di terminal?

  1. Menyesuaikan shell Bash

  2. Pengantar perintah diff

  3. Mengubah bit 'moderasi' pelanggan tukang pos di baris perintah