Message246726
I found the same problem retrieving mail from my ISP's (unknown) POP3 server. I was sent an HTML email as one long 50KB line, which naturally broke everything.
Instead of limiting line length, I suggest you should limit total message body size, since that's what you're actually trying to defend against here. You could also either use the +OK XXX octets line to set a more conservative limit (and fail fast if it announces intent to send more than your limit).
As above the workaround was to insert import poplib; poplib._MAXLINE = 1000000 at the top of the 'getmail' script.
A side-note: one message that is broken this way causes all future messages to fail because poplib does not flush the connection when bailing due to a 'line too long' error. If it isn't prepared to read the rest of the incoming data, it *must* hang up the connection and re-login to fetch the next message. |
|
Date |
User |
Action |
Args |
2015-07-14 11:01:17 | Chris Smowton | set | recipients:
+ Chris Smowton, doko, rblank, christian.heimes, r.david.murray, berker.peksag, gnarvaja, Ingo Ruhnke |
2015-07-14 11:01:17 | Chris Smowton | set | messageid: <1436871677.76.0.843650475982.issue23906@psf.upfronthosting.co.za> |
2015-07-14 11:01:17 | Chris Smowton | link | issue23906 messages |
2015-07-14 11:01:16 | Chris Smowton | create | |
|