[Mailman-Users] removing individual email headers from digest

Jim Dory james at dorydesign.com
Wed Mar 8 13:11:03 EST 2017


I got a request from a user that seemed to make sense: removing unnecessary
email headers at the top of each message in a digest. So I googled it, but
before implementing it wanted to make sure it was correct and wouldn't
cause other issues by presenting it here for comment.

The fields of each collected message that seem appropriate for removal
would be the "To:" line, since that is in the digest header, the
Message-ID: line since that means nothing to the end user, and the
Content-Type as that probably means nothing to the end user.

That would leave intact the Date, From, and Subject lines.

So here's the solution I found by googling (would it work or is better
way?), and commenting out lines to keep:

main config is loaded is Defaults.py
above it mm_cfg.py config loaded
edit
sudo nano /etc/mailman/mm_cfg.py
with adding in the end:


# removing frustrating headers, 2016 06 04 by OG2K
#
PLAIN_DIGEST_KEEP_HEADERS.remove('Message')
PLAIN_DIGEST_KEEP_HEADERS.remove('Date')
PLAIN_DIGEST_KEEP_HEADERS.remove('From')
PLAIN_DIGEST_KEEP_HEADERS.remove('To')
PLAIN_DIGEST_KEEP_HEADERS.remove('Cc')
PLAIN_DIGEST_KEEP_HEADERS.remove('Subject')
PLAIN_DIGEST_KEEP_HEADERS.remove('Message-ID')
PLAIN_DIGEST_KEEP_HEADERS.remove('Keywords')
PLAIN_DIGEST_KEEP_HEADERS.remove('Content-Type')


More information about the Mailman-Users mailing list