Package: getmail4 Version: 4.20.0-1 Severity: normal I have a setup where the IMAP server is backed by a mbox file, which has also been accessed directly by mutt. Mutt has added Content-Length headers to the messages in the mbox. The IMAP server is not aware of these and serves them as normal headers. Some of the messages in the file have CRLF-terminated lines.
When getmail fetches these messages, it converts the CRLFs to LFs. However, it leaves the Content-Length header untouched, even though this header now has an invalid value since the CRLF->LF conversion changed the length of the message body. Invalid Content-Lengths are dangerous, especially if they are too large. Many tools (e.g. mutt, dovecot's mbox backend, formail in default mode) trust the Content-Length if it is present, but if they don't find a message boundary (From_-line) where the Content-Length indicates, the scan _forward_ until they find a From_-line. The end result is that the following message gets merged with the one that had the invalid Content-Length. Of course getmail doesn't claim to support the mboxcl format, but it should not produce files that pretend to support it by having the Content-Length header. Hence, getmail should either remove the header, or alternatively support mboxcl properly by recalculating it to a correct value. -- System Information: Debian Release: squeeze/sid APT prefers stable APT policy: (900, 'stable'), (2, 'unstable'), (1, 'experimental') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-3-amd64 (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages getmail4 depends on: ii python 2.6.6-3+squeeze6 interactive high-level object-orie ii python-support 1.0.8 automated rebuilding support for P getmail4 recommends no packages. getmail4 suggests no packages. -- no debconf information -- To UNSUBSCRIBE, email to [email protected] with a subject of "unsubscribe". Trouble? Contact [email protected]

