Defect in QPEncoder make lines one char to long
Status: Beta
Brought to you by:
mikelbridge
Current implementation of QPEncoder can generate lines with 77 characters where standard specify max 76 characters per line.
This can trigger the MIME_QP_LONG_LINE rule in SpamAssassin and add points to the spam score.
Steps to reproduce:
Run Test Case "TestTwo" through a mail server and
a) look for MIME_QP_LONG_LINE from SpamAssassin.
b) manually validate line length to 76 plus equal char.
Suggested sollution:
Change line 420
From:
if (offset + columnposition > QPEncoder.MAX_CHARS_PER_LINE )
To:
if (offset + columnposition >= QPEncoder.MAX_CHARS_PER_LINE )
Line 430 is possible wrong but I do not have a test case for that.