6.0.0-alpha12
6/6/25

[#4832] escaped "from" not being unescaped
Summary escaped "from" not being unescaped
Queue IMP
Queue Version HEAD
Type Bug
State Not A Bug
Priority 1. Low
Owners slusarz (at) horde (dot) org
Requester jan (at) horde (dot) org
Created 01/03/2007 (6729 days ago)
Due
Updated 01/21/2007 (6711 days ago)
Assigned 01/03/2007 (6729 days ago)
Resolved 01/21/2007 (6711 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
01/21/2007 01:05:18 AM Michael Slusarz Comment #15
State ⇒ Not A Bug
Reply to this comment
Looks like we can resolve this as "Not a Bug".
01/17/2007 07:51:21 AM Michael Slusarz Comment #14 Reply to this comment
Is there any rule how and when lines beginning with "from" or "From"
should be escaped *not* related to flowed messages, i.e. in RFC 2822?
I searched for some but couldn't come up with anything. I'd like to
have something at hand to point the GMX folks at.
See, e.g.,

http://www.rfc-archive.org/getrfc.php?rfc=4155



(Although not an official standards RFC).
01/12/2007 01:26:35 PM Jan Schneider Comment #13 Reply to this comment
Also, unsure if we need this change (for the same reasons):
http://lists.horde.org/archives/cvs/Week-of-Mon-20061225/064107.html
I found a case where this was removing a quote falsely. Reverted.
01/12/2007 10:47:27 AM Jan Schneider Comment #12 Reply to this comment
Understood. I thought the stuffed lines were merged before parsing for 
quoted lines.



Is there any rule how and when lines beginning with "from" or "From" 
should be escaped *not* related to flowed messages, i.e. in RFC 2822? 
I searched for some but couldn't come up with anything. I'd like to 
have something at hand to point the GMX folks at.
01/12/2007 06:36:04 AM Michael Slusarz Comment #11 Reply to this comment

[Show Quoted Text - 15 lines]
no. the display is proper.  lines 1 and 3 are non-quoted lines, line 2 
is a quoted line.  Thus they need to appear on separate lines.



Let me use a different example to try to explain the problem better.   
You want to send the following message.



Long line blah from me.



In flowed format, assuming the line exceeds the limit for line length, 
it will be

sent as follows:



Long line blahSP

from me.



On receipt, converting from fixed to flowed, the algorithim first 
checks for quoted lines (there are none) then checks for space stuffed 
lines and combines all consecutive space stuffed lines at the same 
level.  So we correctly get the desired result.



With an MTA escaping the 'from', we have the following:



Long line blahSP
from me
Again, doing the conversion (see RFC 3676 [4.1]) we check for quoted 
lines - and "this test for quoted lines is done before any other tests 
(that is, before checking for space-stuffed and flowed)".  Therefore 
we discover that the line ">from me" is quoted at level 1 and we can't 
combine this with the previous line since that line is at level 0.   
And therein lies the problem.  We can't regexp all "^>from" to 'from' 
either since ">from" may very well be the beginning of a quoted line.
01/11/2007 06:17:10 PM Jan Schneider Comment #10 Reply to this comment
But currently:



line 1
from line 2
line 3



Is being displayed as:



line 1
from line 2
line 3



which isn't correct either. this should at least be displayed as



line 1 >from line 2 line 3



then, unless I'm missing something.
01/11/2007 04:49:20 PM Michael Slusarz Comment #9 Reply to this comment
Well, not completely since my former commit already fixed this for
plain messages, but not for flowed message.
I don't think this can be fixed.



Take these examples (sent in flowed format):
line 1
from line 2
line 3
Which should be displayed after converting from flowed to:
line 1 from line 2 is continued line 3
As opposed to:
line 1
From line 2
line 3
Which should be displayed as:
line 1
From line 2
line 3
In other words, ">from" and ">From" indicate two totally different 
events in flowed formatting (i.e. you can't auto convert ">from" to 
">From" or vice versa because it will break formatting).
01/11/2007 02:30:06 PM Jan Schneider Comment #8 Reply to this comment
Well, not completely since my former commit already fixed this for 
plain messages, but not for flowed message.
01/11/2007 02:21:12 PM Jan Schneider Comment #7
Summary ⇒ escaped "from" not being unescaped
Reply to this comment
Oh, and this is completely unrelated to flowed formatting.
01/11/2007 02:19:46 PM Jan Schneider Comment #6 Reply to this comment
It turned out to not being caused by my system. Instead it seems to be 
the qmail installation of Germany's largest freemail provider GMX 
where most of my mail are routed through. I was able to track this 
change down to the smallest possible route:



Received: (qmail 15291 invoked by uid 0); 11 Jan 2007 14:13:07 -0000

Received: from xxx.xxx.xxx.xxx by www067.gmx.net with HTTP;

  Thu, 11 Jan 2007 15:13:07 +0100 (CET)



Whether this behaviour is correct or not, is there a way to reliably 
work around this?
01/03/2007 09:27:56 PM Jan Schneider Comment #5 Reply to this comment
I'm using Postfix 2.2.10 and dovecot.  Maybe you should check the
stored message in your spool - if the '>' is there, it is postfix, if
not it is cyrus.
It's in the spool, but that doesn't mean anything since MTAs are not 
delivering directly into Cyrus' spool but through LMTP.
Also, unsure if we need this change (for the same reasons):
http://lists.horde.org/archives/cvs/Week-of-Mon-20061225/064107.html
Yeah, probably. But since is probably happening with all Cyrus server, 
we need to work around that somehow. I'm probably going to update to a 
newer version these days, maybe it's a bug that has been fixed.
01/03/2007 06:47:09 PM Michael Slusarz Comment #4 Reply to this comment
I'm using Postfix 2.2.10 and dovecot.  Maybe you should check the 
stored message in your spool - if the '>' is there, it is postfix, if 
not it is cyrus.



Also, unsure if we need this change (for the same reasons):

http://lists.horde.org/archives/cvs/Week-of-Mon-20061225/064107.html
01/03/2007 02:18:58 PM Jan Schneider Comment #3 Reply to this comment
Really strange. I wonder if it's Postfix (2.2.9) or Cyrus.
01/03/2007 05:12:19 AM Michael Slusarz Comment #2
State ⇒ Feedback
Reply to this comment
Hmmm... it kind of looks like your local mail software is munging that 
message.  Because it displays fine on my setup.  But looking at the 
mail source, it appears that the message I received from the list is 
different than the version you attached here.  My message has the 
following line:



from one machine to another in the course of a session (due to  a



Your message has it as follows:
from one machine to another in the course of a session (due to  a
I don't know where that '>' is coming from, since it shouldn't be 
there.  The RFC is very clear that flowed formatting only escapes 
"From", not the case-insensitive word "from".  See 
http://www.faqs.org/rfcs/rfc3676.html [section 4.4].
01/03/2007 12:29:38 AM Jan Schneider New Attachment: horde_ clustering horde with memcached.eml Download
 
01/03/2007 12:29:12 AM Jan Schneider Comment #1
Priority ⇒ 1. Low
State ⇒ Assigned
Assigned to Michael Slusarz
Queue ⇒ IMP
Summary ⇒ Flowed message rendered incorrectly
Type ⇒ Bug
Reply to this comment
The attached message is not rendered correctly at the moment. The 
">from" line is not correctly unescaped, and a line break is inserted 
before the "If I tell" sentence.

Saved Queries