pop3 retr responses too large lines - Fails with current python's poplib
tss at iki.fi
Fri Apr 10 14:59:25 UTC 2015
On 10 Apr 2015, at 17:51, Guillermo M. Narvaja <guillermo.narvaja at fierro.com.ar> wrote:
> El vie, 10-04-2015 a las 10:21 +0900, Timo Sirainen escribió:
>> On 09 Apr 2015, at 06:52, Guillermo M. Narvaja <guillermo.narvaja at fierro.com.ar> wrote:
>>> Since December 2014, clients using the Python poplib library (getmail in
>>> my case) started to limit the line length of RETR and other command
>>> responses sent from the server to 2048 bytes:
>>> See https://bugs.python.org/issue16041 (Included at least in
>>> Dovecot doesn't have line split in the POP3 module, so Python fails to
>>> retrieve messages with long lines.
>>> RFC 1939 says:
>>> Responses in the POP3 consist of a status indicator and a keyword
>>> possibly followed by additional information. All responses are
>>> terminated by a CRLF pair. Responses may be up to 512 characters
>>> long, including the terminating CRLF.
>>> I think dovecot-pop3 should split it's output in lines of at least 512
>>> characters. Or at least it should have a "pop3_max_line_length" setting
>>> (like "imap_max_line_length").
>> Um. This is talking about POP3 responses themselves - not about the
>> actual email message body. Dovecot's POP3 reponses are short always I
>> think. The message body is sent exactly as it was originally saved.
>> Changing this could break things like PGP/SMIME signing and so on.
> So there is no way to break the lines without breaking the message?
> Please note that if you are right, I should post a bug on the Python
Yes. They are crazy if they think their behavior would work with any POP3 server. I think they have simply misunderstood the RFC.
More information about the dovecot