FAQ
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?

--
Jim Littlefield "All those who believe in psychokinesis
raise my hand." - Steven Wright

Search Discussions

  • Simon White at Jan 30, 2003 at 4:04 pm

    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
  • Jim Littlefield at Jan 30, 2003 at 4:49 pm

    On Thu, Jan 30, 2003 at 04:04:14PM +0000, Simon White wrote:
    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.
    I guess my question wasn't very clear...I was referring to headers
    *within* the body of the digest; not the digest's headers. So this isn't
    an MTA issue, just a message content one.
    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
    ]
    Hmmm, I'll have to take a look at that file. Thanks for pointing it out.
    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...)
    Why? Postfix is a great MTA :)

    --
    Jim Littlefield "All those who believe in psychokinesis
    raise my hand." - Steven Wright
  • Tokio Kikuchi at Jan 30, 2003 at 11:57 pm

    Jim Littlefield 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?
    Please update to the most recent CVS.
    http://sourceforge.net/cvs/?group_id3
    You may want to add further patch if your list is i18n.
    http://sourceforge.net/tracker/?funcÞtail&aidg4401&group_id3&atid00103

    --
    Tokio Kikuchi, tkikuchi@ is.kochi-u.ac.jp
    http://weather.is.kochi-u.ac.jp/
  • Tokio Kikuchi at Jan 31, 2003 at 11:47 am
    Hi,

    I am Cc-ing this reply to the list.
    You can always change your preferred charset by adding following
    lines in your mm_cfg.py.

    LC_DESCRIPTIONS['en'] = (_('English (USA)'), 'iso-8859-1')

    This is useful if your list's main language is English but
    majority of users are from Latin-1 countries. Plain text
    digest will go out with latin characters un-replaced, I believe.

    kenneth at drosera.be wrote:
    Hello,

    I just read your reply to a question on the mail-users list concerning the
    extra headers.
    What updates/patches are available in the CVS directory ? I quickly had a look
    but was unable to find much and even less that I understood.
    But ok, I will also upgrade to the latest CVS on a test machine first.

    Since your name pops up several times on the list I am contacting you directly
    for a question of mine that remained unanswered.
    How did you tackle the character-encoding problem of "us-ascii" for digests ?
    Where do I have to make changes ?

    For your information I run MM2.1 + qmail + demime.
    I know mails using "iso-8859-1" pass demime with flying colours, but once they
    end up in a digest (which is us-ascii :-( ) all non-us-ascii characters
    get "transformed".


    kind regards,

    Kenneth Bruyninckx.



    --
    Tokio Kikuchi, tkikuchi@ is.kochi-u.ac.jp
    http://weather.is.kochi-u.ac.jp/
  • Tokio Kikuchi at Feb 6, 2003 at 12:08 am
    Hi,

    Kenneth Bruyninckx wrote:
    Hello,

    I followed your advice and added the line to mm_cfg.py in mailman/Mailman
    I must say that I received an error when adding this line, but after I
    removed the underscore from (_('English... it was accepted.
    Ah, _() should have been escaped. Try this.
    def _(s):
    return s
    LC_DESCRIPTIONS['en'] = (_('English (USA)'), 'iso-8859-1')
    But, my digest still does not show the charset info.
    What could I have done wrong ?
    Did you restart mailman qrunner by bin/mailmanctl restart ?



    kind regards,

    Kenneth.

    ----- Original Message -----
    From: "Tokio Kikuchi" <tkikuchi at is.kochi-u.ac.jp>
    To: <kenneth at drosera.be>
    Cc: <Mailman-Users at python.org>
    Sent: Friday, January 31, 2003 12:47 PM
    Subject: Re: [Mailman-Users] Digest message header filtering


    Hi,

    I am Cc-ing this reply to the list.
    You can always change your preferred charset by adding following
    lines in your mm_cfg.py.

    LC_DESCRIPTIONS['en'] = (_('English (USA)'), 'iso-8859-1')

    This is useful if your list's main language is English but
    majority of users are from Latin-1 countries. Plain text
    digest will go out with latin characters un-replaced, I believe.

    kenneth at drosera.be wrote:
    Hello,

    I just read your reply to a question on the mail-users list concerning
    the
    extra headers.
    What updates/patches are available in the CVS directory ? I quickly had
    a look
    but was unable to find much and even less that I understood.
    But ok, I will also upgrade to the latest CVS on a test machine first.

    Since your name pops up several times on the list I am contacting you
    directly
    for a question of mine that remained unanswered.
    How did you tackle the character-encoding problem of "us-ascii" for
    digests ?
    Where do I have to make changes ?

    For your information I run MM2.1 + qmail + demime.
    I know mails using "iso-8859-1" pass demime with flying colours, but
    once they
    end up in a digest (which is us-ascii :-( ) all non-us-ascii characters
    get "transformed".


    kind regards,

    Kenneth Bruyninckx.
    --
    Tokio Kikuchi, tkikuchi@ is.kochi-u.ac.jp
    http://weather.is.kochi-u.ac.jp/

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupmailman-users @
categoriespython
postedJan 30, '03 at 3:56p
activeFeb 6, '03 at 12:08a
posts6
users3
websitelist.org

People

Translate

site design / logo © 2022 Grokbase