[Python-Dev] The first trustworthy <wink> GBayes results

Skip Montanaro skip@pobox.com
Thu, 29 Aug 2002 09:43:09 -0500


(trimming the cc list a bit, since this is drifting a bit away from strictly
discussing the current algorithm.)

    Anthony> For what it's worth, the attached (simple) script will
    Anthony> 'de-spamassassin' an email message. I use it on my 'spam'
    Anthony> folder to get test messages of various ugly MIME things that
    Anthony> spam and viruses let through...

Thanks, that helps me as well, as I need to delete the X-VM-* headers
Emacs's VM mail package inserts.  While spamassassin -d does what you are
doing, it can be easily extended to elide other headers as well.

One thing worth noting before everybody starts using it to massage their
mailboxes is that the email package contains a bug which causes it to
occasionally delete whitespace when reformatting headers.  For example, in
one example, the header went from

    Received: from rogers.com ([24.43.65.252])
              by fep02-mail.bloor.is.net.cable.rogers.com
              (InterMail vM.5.01.05.06 201-253-122-126-106-20020509) with ESMTP
              id <20020820205424.DFHH4777.fep02-mail.bloor.is.net.cable.rogers.com@rogers.com>;
              Tue, 20 Aug 2002 16:54:24 -0400

to

    Received: from rogers.com ([24.43.65.252])
            by fep02-mail.bloor.is.net.cable.rogers.com
            (InterMail vM.5.01.05.06 201-253-122-126-106-20020509) with ESMTPid
            <20020820205424.DFHH4777.fep02-mail.bloor.is.net.cable.rogers.com@rogers.com>;
            Tue, 20 Aug 2002 16:54:24 -0400

Note that in the second version there is no space between "ESMTP" and "id",
which had previously been separated by a newline and several spaces.

I filed a bug report about it a few days ago:

    http://python.org/sf/594893

Skip