<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Activesync: quoted replies are broken in half</title> 
  <pubDate>Fri, 10 Apr 2026 13:09:12 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/13355</link> 
  <atom:link rel="self" type="application/rss+xml" title="Activesync: quoted replies are broken in half" href="https://bugs.horde.org/ticket/13355/rss" /> 
  <description>Activesync: quoted replies are broken in half</description> 
 
   
   
  <item> 
   <title>Device: BlackBerry 10
In Summary, Horde does not understand</title> 
   <description>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&#039;ve tried both the reply text at the top or at the bottom. It doesn&#039;t change anything.
It&#039;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&#039;s sent, the message looks like this:
user@domain.tld wrote
&gt;BODY1
&gt;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
&gt;user@domain.tld wrote
&gt;&gt;BODY1
&gt;&gt;SIG1
&gt;BODY2
&gt;SIG2
&gt;--------------
&gt;HEADER1
&gt;--------------
BODY3
SIG3
--------------
HEADER2
--------------


I&#039;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:
-----------------
</description> 
   <pubDate>Sat, 12 Jul 2014 12:43:56 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13355#t84694</link> 
  </item> 
   
  <item> 
   <title>Some background:

Email reply and forwards in EAS are (usu</title> 
   <description>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 &quot;top-posting&quot; - 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&#039;s own &quot;quoted header&quot; - the &quot;On blah blah, so and so said this:&quot; text in the appropriate place based on the user&#039;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&#039;t &quot;sniff&quot; 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 &quot;bottom-posting&quot; 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&#039;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&#039;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?



&gt; Device: BlackBerry 10
&gt; In Summary, Horde does not understand the structure of the message it 
&gt; gets to send and breaks it in half in an attempt to quote it.
&gt; I&#039;ve tried both the reply text at the top or at the bottom. It 
&gt; doesn&#039;t change anything.
&gt; It&#039;s the same behaviour for both HTML and text emails.
&gt;
&gt; 1st message looks normal
&gt; BODY1
&gt; SIG1
&gt;
&gt; When I reply, the compose window looks like this
&gt; BODY2
&gt; SIG2
&gt; --------------
&gt; HEADER1
&gt; BODY1
&gt; SIG1
&gt;
&gt; But ater it&#039;s sent, the message looks like this:
&gt; user@domain.tld wrote
&gt;&gt; BODY1
&gt;&gt; SIG1
&gt; BODY2
&gt; SIG2
&gt; --------------
&gt; HEADER1
&gt;
&gt;
&gt; So the text of the reply is placed above everything else while the 
&gt; header is placed at the bottom.
&gt;
&gt; At the next reply, the message looks like this
&gt; user@domain.tld wrote
&gt;&gt; user@domain.tld wrote
&gt;&gt;&gt; BODY1
&gt;&gt;&gt; SIG1
&gt;&gt; BODY2
&gt;&gt; SIG2
&gt;&gt; --------------
&gt;&gt; HEADER1
&gt;&gt; --------------
&gt; BODY3
&gt; SIG3
&gt; --------------
&gt; HEADER2
&gt; --------------
&gt;
&gt;
&gt; I&#039;ve done the same test from the same client, but using gmail and 
&gt; replies look fine
&gt; BODY3
&gt; SIG3
&gt; --------------
&gt; HEADER2
&gt; --------------
&gt; BODY2
&gt; SIG2
&gt; --------------
&gt; HEADER1
&gt; --------------
&gt; BODY1
&gt; SIG1
&gt;
&gt; What I call the header looks like this:
&gt; -----------------
&gt; From:
&gt; Sent
&gt; To:
&gt; Subject:
&gt; -----------------
&gt;
</description> 
   <pubDate>Sat, 12 Jul 2014 16:01:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13355#t84712</link> 
  </item> 
   
  <item> 
   <title>FWIW, this is also what makes your other request for configu</title> 
   <description>FWIW, this is also what makes your other request for configurable signatures so messy to implement.</description> 
   <pubDate>Sat, 12 Jul 2014 16:06:58 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13355#t84713</link> 
  </item> 
   
  <item> 
   <title>Changes have been made in Git (master):

commit c0744f481b31</title> 
   <description>Changes have been made in Git (master):

commit c0744f481b31b954f7fd6043b3e0b0730a48df52
Author: Michael J Rubinsky &lt;mrubinsk@horde.org&gt;
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</description> 
   <pubDate>Thu, 24 Jul 2014 03:20:45 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13355#t84875</link> 
  </item> 
   
  <item> 
   <title>Went ahead and removed the code that adds the reply text. Th</title> 
   <description>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.
</description> 
   <pubDate>Thu, 24 Jul 2014 03:24:53 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13355#t84876</link> 
  </item> 
   
  <item> 
   <title>&gt; Went ahead and removed the code that adds the reply text. </title> 
   <description>&gt; Went ahead and removed the code that adds the reply text. The pref 
&gt; that determined which one to use was ignored (probably got dropped at 
&gt; some point during 5.2 development) so that was removed as well.
&gt;
Ah, I was wondering why that switch had no effect in my tests..

OK, I&#039;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&#039;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.

</description> 
   <pubDate>Thu, 24 Jul 2014 10:15:30 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13355#t84883</link> 
  </item> 
   
  <item> 
   <title>
&gt; HTML replies look perfect now, but text replies only hav</title> 
   <description>
&gt; HTML replies look perfect now, but text replies only have the main 
&gt; message in quotes, the header preceding it isn&#039;t.

Not sure what you mean by this. Typically the header wouldn&#039;t be quoted. Either way, this is 100% controlled by the client. Horde doesn&#039;t add/remove anything from the reply text and header sent from the client anymore. That&#039;s what was causing the trouble in the first place.</description> 
   <pubDate>Thu, 24 Jul 2014 20:25:38 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13355#t84905</link> 
  </item> 
   
  <item> 
   <title>&gt;
&gt;&gt; HTML replies look perfect now, but text replies only h</title> 
   <description>&gt;
&gt;&gt; HTML replies look perfect now, but text replies only have the main
&gt;&gt; message in quotes, the header preceding it isn&#039;t.
&gt;
&gt; Not sure what you mean by this. Typically the header wouldn&#039;t be 
&gt; quoted. Either way, this is 100% controlled by the client. Horde 
&gt; doesn&#039;t add/remove anything from the reply text and header sent from 
&gt; the client anymore. That&#039;s what was causing the trouble in the first 
&gt; place.

I&#039;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 &gt; sign.

If Horde is not touching the reply, then it must be a problem with the phone.
</description> 
   <pubDate>Thu, 24 Jul 2014 22:41:58 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13355#t84911</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
