[Mailman-Users] Scrubbing charset-unspecified text

Roger Lynn Roger at rilynn.demon.co.uk
Tue May 2 15:38:39 CEST 2006


Hi,

I'm running Mailman 2.1.7, packaged for Debian (although I don't think
that's relevant to this question). A list that I administer has non-digest
scrubbing enabled. An email was recently sent to it with the following headers:

Content-Type: text/plain
Content-Disposition: inline
MIME-Version: 1.0
X-Mailer: MIME-tools 5.411 (Entity 5.404)
Date: Mon, 01 May 2006 18:47:30 +0100
Subject: [...]
To: [...]
From: [...]
X-Mailer: SINA Webmail 6.00.
Reply-To: [...]
X-Sina-Mail-Agent: sinadeliver-6.00-1.97
Message-Id: [...]
X-Virus-Scanned: by myinternet myAV on ngflrtr1
Content-Transfer-Encoding: quoted-printable

This resulted in the contents of the email being replaced with:

An embedded and charset-unspecified text was scrubbed...
Name: not available
Url: http://[...]/attachments/20060501/aad799ed/attachment.ksh

Why is it necessary to scrub plain text in this instance, when no character
set is specified? Couldn't it just be assumed that it is us-ascii?

If I were to comment out the following code from process() in Scrubber.py,
would there be any consequences other than allowing messages like the above
through to the list?

            # TK: if part is attached then check charset and scrub if none
            if part.get('content-disposition') and \
               not part.get_content_charset():
                omask = os.umask(002)
                try:
                    url = save_attachment(mlist, part, dir)
                finally:
                    os.umask(omask)
                filename = part.get_filename(_('not available'))
                filename = Utils.oneline(filename, lcset)
                replace_payload_by_text(part, _("""\
An embedded and charset-unspecified text was scrubbed...
Name: %(filename)s
Url: %(url)s
"""), lcset)

Incidentally, why does the attachment have the suffix ".ksh"? It seems
rather unusual. I'm using the following settings:

SCRUBBER_DONT_USE_ATTACHMENT_FILENAME	= False
SCRUBBER_USE_ATTACHMENT_FILENAME_EXTENSION = True

Thanks for any help,

Roger




More information about the Mailman-Users mailing list