Issue264

Title Mail gateway borks quotes and console sessions
Priority bug Status chatting
Superseder Nosy List ajaksu2, eric.araujo, ezio.melotti, pitrou, r.david.murray, serhiy.storchaka, techtonik, zbysz
Assigned To Topics

Created on 2009-04-07.16:48:11 by ajaksu2, last changed 2012-06-15.16:45:10 by serhiy.storchaka.

Files
File name Uploaded Type Edit Remove
fix_quotes.diff ajaksu2, 2009-04-07.17:29:26 text/plain
pc.py ajaksu2, 2009-04-07.16:48:10 text/plain
Messages
msg1307 (view) Author: ajaksu2 Date: 2009-04-07.16:48:10
Antoine Pitrou reported the issue that Roundup borks email responses containing
lines stating with '>' [1][2][3]. I've tracked it down to mailgw.parseContent
wrongly discarding sections bits.

Attached script shows this behavior.

[1] http://bugs.python.org/msg82084
[2] http://bugs.python.org/msg85439
[3] http://bugs.python.org/msg70718

Antoine Pitrou wrote:
The problem I'm having often is that quoted text, or snippets of interpreter
sessions, are lost. Basically, everything which begins with one or more '>'
signs is threatened.
msg1308 (view) Author: ajaksu2 Date: 2009-04-07.16:50:37
This patch fixes the symptom, I'll try to find the cause and fix it. This will
probably lead to a lot more noise reaching the tracker if committed as-is.
msg1309 (view) Author: ajaksu2 Date: 2009-04-07.17:29:26
In the original code, a for-else is used with wrong logic, so that if there was
a response ('no blank line between quoted message and response') in the section,
the loop would break and not execute the else[1]. Unfortunately, the code that
checks whether to include the quoted text verbatim is inside the else clause.

Attached patch fixes this and reorganizes the code a bit.

[1] http://docs.python.org/reference/compound_stmts.html#the-for-statement
msg2098 (view) Author: techtonik Date: 2011-06-19.10:34:50
It seems that Roundup need a standards based reST or Markdown editor
msg2100 (view) Author: r.david.murray Date: 2011-06-19.14:53:36
Even if it did, that would have zero effect on this issue.

Personally, I'd rather deal with the occasional lost text when someone is doing an email reply than to deal with the reams of quoted text resulting from top post replies.  I deal with the latter frequently with a work related (non-roundup) tracker, and it is a PITA to figure out what is actually going on in the tickets when I review them.

That said, we ought to be able to develop a heuristic that detects and preserves interactive session blocks.  Somebody has to do it, though :)
msg2275 (view) Author: pitrou Date: 2011-10-11.14:15:27
Could this be fixed?
msg2292 (view) Author: ezio.melotti Date: 2011-10-20.20:52:25
I closed #321 as a duplicate of this.  #321 also has an example mail that could be useful for tests.
msg2363 (view) Author: pitrou Date: 2012-01-08.14:25:31
Ping. This is annoying people on a daily basis.
msg2374 (view) Author: pitrou Date: 2012-02-19.19:47:07
> I'd rather deal with the occasional lost text when someone is doing an email
> reply than to deal with the reams of quoted text resulting from top post replies

Well, the logic must be *very* buggy, because I accidentally posted such a reply and it didn't get trimmed:
http://bugs.python.org/issue13627#msg153722

So, really, can't we have this fixed? Please? :)
msg2375 (view) Author: pitrou Date: 2012-02-19.19:50:53
Let me at least suggest the following behaviour change: lines beginning with ">>> " should never be trimmed (in the context of b.p.o, they are interpreter prompt).
msg2376 (view) Author: techtonik Date: 2012-02-20.10:16:04
Real-time plan http://piratepad.net/roundup-fix-mailgateway - hope my disability note doesn't make you upset. Feel free to remove it.
History
Date User Action Args
2012-06-15 16:45:10serhiy.storchakasetnosy: + serhiy.storchaka
2012-02-20 10:16:04techtoniksetmessages: + msg2376
2012-02-19 19:50:54pitrousetmessages: + msg2375
2012-02-19 19:47:07pitrousetmessages: + msg2374
2012-01-09 09:57:43zbyszsetnosy: + zbysz
2012-01-08 14:25:32pitrousetmessages: + msg2363
2011-10-20 20:52:25ezio.melottisetmessages: + msg2292
2011-10-11 14:15:28pitrousetnosy: + pitrou, ezio.melotti
messages: + msg2275
2011-06-19 14:53:36r.david.murraysetnosy: + r.david.murray
messages: + msg2100
2011-06-19 10:34:51techtoniksetnosy: + techtonik
messages: + msg2098
2011-04-08 15:26:38eric.araujosetnosy: + eric.araujo
2009-04-07 17:29:38ajaksu2setfiles: - quotes_interactive.diff
2009-04-07 17:29:27ajaksu2setfiles: + fix_quotes.diff
messages: + msg1309
2009-04-07 16:50:37ajaksu2setfiles: + quotes_interactive.diff
status: unread -> chatting
messages: + msg1308
2009-04-07 16:48:11ajaksu2create