Package: spambayes
Version: 1.0.4-3
Severity: important

When processing a mail with an attached file with a filename longer than
40 characters, the sb_filter.py script reformats the content of the mail
by introducing a linebreak. Thus it changes the content of a signed
email, making the signature invalid. As I am using it as a filter for
incoming mail by procmail, it reproduceable breaks certain signed mails.

Here is a minimal example. Start with the following file:
--------------------minimal-example.mail--------------------
>From [EMAIL PROTECTED] Fri Jun  1 13:26:51 2007
From: xxxxx xxxxxxx <[EMAIL PROTECTED]>
To: xxxxx xxxxxxx <xxxxx>
Subject: Minimal Spambayes Example
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="ikeVEW9yuYc//A+q"
Content-Disposition: inline
Status: RO
Content-Length: 392
Lines: 14


--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

This is a minimal example which makes Spambayes break every signature.

--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; 
filename="file-with-a-name-longer-than-40-letters.txt"

This file has a too long name, hence breaks SpamBayes.

--ikeVEW9yuYc//A+q--
------------------------------------------------------------

Process it manually with:
$ /usr/bin/sb_filter.py <minimal-example.mail >output.mail

It results to the file:
--------------------output.mail-----------------------------
>From [EMAIL PROTECTED] Fri Jun  1 13:26:51 2007
From: xxxxx xxxxxxx <[EMAIL PROTECTED]>
To: xxxxx xxxxxxx <xxxxx>
Subject: Minimal Spambayes Example
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="ikeVEW9yuYc//A+q"
Content-Disposition: inline
Status: RO
Content-Length: 392
Lines: 14
X-Spambayes-Classification: ham; 0.13


--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

This is a minimal example which makes Spambayes break every signature.

--ikeVEW9yuYc//A+q
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment;
        filename="file-with-a-name-longer-than-40-letters.txt"

This file has a too long name, hence breaks SpamBayes.

--ikeVEW9yuYc//A+q--
------------------------------------------------------------

As sb_filter.py apparently introduces a linebreak after the
"attachment;", gpg (of course) will fail to verify a possible signature
on this mail. I found this by getting a mail with a bad signature sent
by myself, which was very annoying.

If have no fix for this, but for me the error looks like spambayes
is intentionally reformatting this Content-Disposition line, which
should be preserved, at least when the mail is signed.


This is my first bug-report to debian, so please tell me if you need
more information from me or if could help in another way.

Best regards,

Mark

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-4-k7
Locale: LANG=de_DE, LC_CTYPE=de_DE (charmap=ISO-8859-1)

Versions of packages spambayes depends on:
ii  python                        2.4.4-2    An interactive high-level object-o
ii  python-central                0.5.12     register and build utility for Pyt

spambayes recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to