[Mailman-Users] removing individual email headers from digest
mark at msapiro.net
Thu Mar 9 03:56:00 EST 2017
On 03/08/2017 10:11 AM, Jim Dory wrote:
> 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
> sudo nano /etc/mailman/mm_cfg.py
> with adding in the end:
> # removing frustrating headers, 2016 06 04 by OG2K
Do you really want to remove them all? Actually, the format of the plain
digest is described in RFC 1153 which says in part
If they exist in the
original message header, the following lines must be retained as-is
in the reconstructed header: Date:, From:, To:, Cc:, Subject:,
Message-ID:, and Keywords:, rearranged to appear in that order.
So the RFC requires those. It also says
All other header lines should be
discarded, especially Received lines.
note that this is a 'should', not 'must' but the only others we include
are the Message: header which is actually just the sequence number of
the message in the digest and Content-Type:. Actually, since this is a
'plain' digest, all non-text/plain parts have been removed anyway, and
depending on the list's content filtering, the content type will be
either text/plain or some multipart/ or message/rfc822 type which is
probably meaningless in the context of a plain text digest.
I'm not sure why we include Content-Type: in plain digests and that
chould be removed, although it could contain potentially useful
information about the original character set of the message (the charset
in the digest is that of the list's preferred language). Steve's point
about Content-Type: is only relevant for MIME digests. The only other
header not required by the RFC is Message:
Of course, you are free to remove any headers you don't want, but this
makes your digest non-compliant and Steve's point about Message-ID: and
threading in exploded digests is valid although without References: or
In-Reply-To:, Message-ID: alone is not to useful for threading.
Mark Sapiro <mark at msapiro.net> The highway is for gamblers,
San Francisco Bay Area, California better use your sense - B. Dylan
More information about the Mailman-Users