[Mailman-Users] Digest message header filtering

Simon White simon at mtds.com
Thu Jan 30 17:04:14 CET 2003


30-Jan-03 at 10:56, Jim Littlefield (little at abaqus.com) wrote :
> A number of the subscribers to my lists have complained about the
> "unimportant" headers (Message-ID, In-Reply-To, etc.) included with each
> post when receiving a plain digest. I am talking about headers within
> the digest. Has anyone figured out a good way to strip these out?

If you have Postfix as an MTA, then you can do body_checks on the email
*body* only to silently ignore any lines with extraneous headers by
using a regexp to ignore them. However, this is best done on a server
which is not also an all-purpose MTA in case people forward full headers
to others for analysis.

Other solutions from your MTA of choice are possible, in Mailman itself
you'd have to hack Digester.py. At first glance, it looks like it pretty
much forwards plaintext mbox style, to Handlers/ToDigest.py. This
handles MIME conversion where necessary.

Interesting part of ToDigest.py

# rfc1153 says we should keep only these headers, and present them in
# this
# exact order.
KEEP = ['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',
        # Mailman 2.0 adds these headers, but they don't need to be kept
        # from
        # the original message: Message
        ]


Hacking that might allow you to get rid of those headers quite simply,
breaking RFC1153 in the process, perhaps.

(I think I should stop promoting Postfix on the Mailman list now...)

-- 
|-Simon White, Internet Services Manager, Certified Check Point CCSA.
|-MTDS  Internet, Security, Anti-Virus, Linux and Hosting Solutions.
|-MTDS  14, rue du 16 novembre, Agdal, Rabat, Morocco.
|-MTDS  tel +212.3.767.4861 - fax +212.3.767.4863



More information about the Mailman-Users mailing list