6.0.0-alpha14
7/2/25

[#13355] Activesync: quoted replies are broken in half
Summary Activesync: quoted replies are broken in half
Queue Synchronization
Queue Version Git master
Type Bug
State Resolved
Priority 1. Low
Owners mrubinsk (at) horde (dot) org
Requester software-horde (at) interfasys (dot) ch
Created 07/12/2014 (4008 days ago)
Due
Updated 07/31/2014 (3989 days ago)
Assigned 07/12/2014 (4008 days ago)
Resolved 07/24/2014 (3996 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
07/31/2014 01:31:13 PM Michael Rubinsky Version ⇒ Git master
Queue ⇒ Synchronization
 
07/24/2014 10:41:58 PM software-horde (at) interfasys (dot) ch Comment #8 Reply to this comment

[Show Quoted Text - 9 lines]
I've found out why I get that mix of quoted and unquoted text.

When the original message contains an attachment, the text of the 
original message is quoted using the > sign.

If Horde is not touching the reply, then it must be a problem with the phone.

07/24/2014 08:25:38 PM Michael Rubinsky Comment #7 Reply to this comment
HTML replies look perfect now, but text replies only have the main 
message in quotes, the header preceding it isn't.
Not sure what you mean by this. Typically the header wouldn't be 
quoted. Either way, this is 100% controlled by the client. Horde 
doesn't add/remove anything from the reply text and header sent from 
the client anymore. That's what was causing the trouble in the first 
place.
07/24/2014 10:15:30 AM software-horde (at) interfasys (dot) ch Comment #6 Reply to this comment
Went ahead and removed the code that adds the reply text. The pref 
that determined which one to use was ignored (probably got dropped 
at some point during 5.2 development) so that was removed as well.
Ah, I was wondering why that switch had no effect in my tests..

OK, I've just tested the commit and there is a discrepancy between the 
way HTML an text replies are being built.

HTML replies look perfect now, but text replies only have the main 
message in quotes, the header preceding it isn't.

On mobile devices, it makes sense to have replies at the top, but it 
will create some strange emails if people place their replies at the 
bottom when using the desktop.
Thanks for the detailed explanation on the inner workings.


07/24/2014 03:24:53 AM Michael Rubinsky Comment #5
State ⇒ Resolved
Reply to this comment
Went ahead and removed the code that adds the reply text. The pref 
that determined which one to use was ignored (probably got dropped at 
some point during 5.2 development) so that was removed as well.

07/24/2014 03:20:45 AM Git Commit Comment #4 Reply to this comment
Changes have been made in Git (master):

commit c0744f481b31b954f7fd6043b3e0b0730a48df52
Author: Michael J Rubinsky <mrubinsk@horde.org>
Date:   Wed Jul 23 22:41:25 2014 -0400

     Bug: 13355 Remove logic dealing with (broken) 
activesync_replyposition pref.

  framework/Core/lib/Horde/Core/ActiveSync/Mail.php |   28 +++-----------------
  horde/config/prefs.php                            |   11 +-------
  2 files changed, 6 insertions(+), 33 deletions(-)

http://github.com/horde/horde/commit/c0744f481b31b954f7fd6043b3e0b0730a48df52
07/12/2014 04:06:58 PM Michael Rubinsky Comment #3 Reply to this comment
FWIW, this is also what makes your other request for configurable 
signatures so messy to implement.
07/12/2014 04:01:08 PM Michael Rubinsky Comment #2
Assigned to Michael Rubinsky
State ⇒ Feedback
Reply to this comment
Some background:

Email reply and forwards in EAS are (usually) handled via something 
called SMART_REPLY or SMART_FORWARD - where only the NEW text (the 
actual reply text of the email) is sent to the server. The server is 
then responsible for fetching the original email from the IMAP server 
and the parse out the needed originally text and append the reply text 
before sending.

EAS assumes "top-posting" - it assumes all replies appear before the 
quoted text.

SOME clients include what you call the [header] text in the text that 
it sends to the server, but some do not. Because of this, Horde adds 
it's own "quoted header" - the "On blah blah, so and so said this:" 
text in the appropriate place based on the user's preference for 
top/bottom posting.

This can lead to strange placements and duplicate headers (the one the 
client sent and the one Horde adds). We can't "sniff" out if there is 
a header in the text already since there is not standard form for it 
to take.

There are two options other than the current situation:

1) Never add a header on the Horde side. The down side is that if the 
user is "bottom-posting" the client provided header still appears at 
the bottom of the email and there is no header at the beginning of the 
quoted text.

2) Disallow bottom posting. This would avoid the problem above, but 
would force the use of a reply style that many feel is inappropriate. 
The small number of clients that don't explicitly add the reply header 
to the text will generate replies without any reply header (though the 
original message would still be quoted).

I've thought about this on and off over the last year or so, and I 
think (2) is probably the best solution. This was the way EAS was 
designed to operate. What Horde is doing is just a weak attempt to 
work around that limitation. While I personally prefer bottom posting, 
I think for mobile/EAS use this seems like the best option.

Any other voices want to chime in?

[Show Quoted Text - 72 lines]
07/12/2014 12:43:56 PM software-horde (at) interfasys (dot) ch Comment #1
State ⇒ Unconfirmed
Patch ⇒ No
Milestone ⇒
Queue ⇒ Horde Framework Packages
Summary ⇒ Activesync: quoted replies are broken in half
Type ⇒ Bug
Priority ⇒ 1. Low
Reply to this comment
Device: BlackBerry 10
In Summary, Horde does not understand the structure of the message it 
gets to send and breaks it in half in an attempt to quote it.
I've tried both the reply text at the top or at the bottom. It doesn't 
change anything.
It's the same behaviour for both HTML and text emails.

1st message looks normal
BODY1
SIG1

When I reply, the compose window looks like this
BODY2
SIG2
--------------
HEADER1
BODY1
SIG1

But ater it's sent, the message looks like this:
user@domain.tld wrote
BODY1
SIG1
BODY2
SIG2
--------------
HEADER1


So the text of the reply is placed above everything else while the 
header is placed at the bottom.

At the next reply, the message looks like this
user@domain.tld wrote
user@domain.tld wrote
BODY1
SIG1
BODY2
SIG2
--------------
HEADER1
--------------
BODY3
SIG3
--------------
HEADER2
--------------


I've done the same test from the same client, but using gmail and 
replies look fine
BODY3
SIG3
--------------
HEADER2
--------------
BODY2
SIG2
--------------
HEADER1
--------------
BODY1
SIG1

What I call the header looks like this:
-----------------
From:
Sent
To:
Subject:
-----------------

Saved Queries