Package: fetchmail Version: 6.4.0.beta4
Summary: I use fetchmail to get emails from a few servers. These emails are then parsed by kopano-dagent. Some emails from some senders got corrupted consistently, and I’ve tracked the issue down to fetchmail corrupting long single-line base64 strings by inserting invalid characters NUL and ETX. Detailed description: For base64-encoded emails that were not sent with a character limit for each line, Fetchmail will insert characters NUL and ETX if the line becomes sufficiently long (it does trigger around 10000 characters per line or so), and then insert a line break. This, consecutively, breaks the email parsing by kopano-dagent, which throws an error when it sees NUL (0x0000) and ETX (0x0003) in the base64-encoded string – which is a valid error, since those are not base64 string characters. This also holds for attachments in base64-encoding, which will break. Of course, the error is effectively triggered by non-compliant senders who do not terminate lines after a reasonable number of characters. This doesn’t mean these messages should be corrupted, especially for a simple solution like correctly inserting line breaks without adding erroneous characters. Proposed solution: do not insert line breaks (probably meaning the buffer size should increase) -or- ensure line breaks are correctly inserted for base64 encoded messages after a reasonable amount of characters