Skip Menu |

This queue is for tickets about the MIME-Base64 CPAN distribution.

Report information
The Basics
Id: 53919
Status: resolved
Priority: 0/
Queue: MIME-Base64

People
Owner: Nobody in particular
Requestors: mark.zealey [...] pipex.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in:
  • 3.07
  • 3.08
Fixed in: (no value)



Subject: Some lines longer than 76 chars
I've been looking into why emails that we send out get flagged as invalid by spamassassin (specifically they fail the MIME_QP_LONG_LINE test). It seems that in some situations the XS in MIME::QuotedPrint produces a final line 77 chars long: [root@mailer02 ~]# perl -MMIME::QuotedPrint -e 'print encode_qp("a" x 76)' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa= [root@mailer02 ~]# perl -MMIME::QuotedPrint -e 'print encode_qp("a" x 77)' aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa= aa= However it doesn't always do this: # perl -MMIME::QuotedPrint -e 'for( 1 .. 500) { $t = encode_qp("a" x (76 * $_)); print "Invalid line length at $_\n" if grep { length > 76 } split /\n/, $t }' Invalid line length at 1 Invalid line length at 76 Invalid line length at 151 Invalid line length at 226 Invalid line length at 301 Invalid line length at 376 Invalid line length at 451 Thanks, Mark
From: mark.zealey [...] pipex.net
A colleague has show this is actually a more general bug at any line length 75n+1: # perl -MMIME::QuotedPrint -le 'for $body (map "a" x $_, 1 .. 5000) {$t = encode_qp($body); print "Invalid line length at " . length $body if grep { length > 76 } split /\n/, $t }' Invalid line length at 76 Invalid line length at 151 Invalid line length at 226 Invalid line length at 301 Invalid line length at 376 Invalid line length at 451 Invalid line length at 526 Invalid line length at 601 Invalid line length at 676 Invalid line length at 751 ...
I can confirm this problem but I don't have a solution yet. Strange that nobody else has complained in all these years :-)
http://github.com/gisle/mime- base64/commit/ad244ac0eaa13f934d90f151045f9a206d709e0b