<?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>AS sync of IMAP messages that are in trash folder AND in another folder with &#039;deleted&#039;-flag</title> 
  <pubDate>Fri, 10 Apr 2026 14:48:32 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/13009</link> 
  <atom:link rel="self" type="application/rss+xml" title="AS sync of IMAP messages that are in trash folder AND in another folder with &#039;deleted&#039;-flag" href="https://bugs.horde.org/ticket/13009/rss" /> 
  <description>AS sync of IMAP messages that are in trash folder AND in another folder with &#039;deleted&#039;-flag</description> 
 
   
   
  <item> 
   <title>I noticed that there are email clients (at least Apple Mail,</title> 
   <description>I noticed that there are email clients (at least Apple Mail, Mavericks), that, although configured to use the trash folder, leave a deleted message in the folder it was deleted from with the &#039;deleted&#039;-flag set. As ActiveSync only regards Horde_Imap_Client_Base.vanished() mails as removed, such mails appear on the syncing devices in both, the original folder and the trash, until the mails are expunged.
</description> 
   <pubDate>Tue, 04 Mar 2014 18:03:49 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13009#t82554</link> 
  </item> 
   
  <item> 
   <title>&gt; I noticed that there are email clients (at least Apple Mai</title> 
   <description>&gt; I noticed that there are email clients (at least Apple Mail, 
&gt; Mavericks), that, although configured to use the trash folder, leave 
&gt; a deleted message in the folder it was deleted from with the 
&gt; &#039;deleted&#039;-flag set. As ActiveSync only regards 
&gt; Horde_Imap_Client_Base.vanished() mails as removed, such mails appear 
&gt; on the syncing devices in both, the original folder and the trash, 
&gt; until the mails are expunged.

So, why is this an ActiveSync bug? It&#039;s a bug in the client that doesn&#039;t expunge it from the folder when moving it to the trash. There is no method available to mark a message as deleted in ActiveSync. The ONLY way to remove a message from a mailbox on the AS client is to send it a remove command. Since this email was not actually removed from the mailbox, we cannot do this.</description> 
   <pubDate>Tue, 04 Mar 2014 18:19:08 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13009#t82555</link> 
  </item> 
   
  <item> 
   <title>&gt;&gt; I noticed that there are email clients (at least Apple Ma</title> 
   <description>&gt;&gt; I noticed that there are email clients (at least Apple Mail,
&gt;&gt; Mavericks), that, although configured to use the trash folder, leave
&gt;&gt; a deleted message in the folder it was deleted from with the
&gt;&gt; &#039;deleted&#039;-flag set. As ActiveSync only regards
&gt;&gt; Horde_Imap_Client_Base.vanished() mails as removed, such mails appear
&gt;&gt; on the syncing devices in both, the original folder and the trash,
&gt;&gt; until the mails are expunged.
&gt;
&gt; So, why is this an ActiveSync bug? It&#039;s a bug in the client that 
&gt; doesn&#039;t expunge it from the folder when moving it to the trash. 

First of all, I absolutely agree that this is not an AS bug, sorry for posting it as a bug.
I don&#039;t know if any specification clarifies the &quot;correct&quot; way of moving a message with IMAP (rfc6851 is nowhere implemented, isn&#039;t it?). To keep a &#039;deleted&#039; copy of a moved message in the original folder is admittedly rather uncommon, but not necessarily a bug.

&gt; There 
&gt; is no method available to mark a message as deleted in ActiveSync.

Yes, so here is the problem.

&gt; The ONLY way to remove a message from a mailbox on the AS client is 
&gt; to send it a remove command. Since this email was not actually 
&gt; removed from the mailbox, we cannot do this.

I think here is room for interpretation. I understand your way of solving it and, even more, I inwardly prefer it. But the facts are as follows: IMAP has the feature of &quot;deleted&quot;-flagged messages, while AS lacks it. Hence, we have to analyze the semantics of the &quot;deleted&quot;-flag and reproduce this semantics in AS. Two possibilities come to my mind:

1) Ignore the flag. This is basically what you do at the moment, right?
2) Regard messages with this flag as removed.

Do you think that 2) is worth to think about? As far as I see, it would work pretty well: If a message is marked as deleted, it disappears from synced devices. If an IMAP-client undeletes it, in the synced devices it is simply added again...

Ideally, the administrator can configure which behavior he likes.</description> 
   <pubDate>Tue, 04 Mar 2014 19:54:09 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13009#t82561</link> 
  </item> 
   
  <item> 
   <title>
&gt; 1) Ignore the flag. This is basically what you do at the</title> 
   <description>
&gt; 1) Ignore the flag. This is basically what you do at the moment, right?
&gt; 2) Regard messages with this flag as removed.
&gt;
&gt; Do you think that 2) is worth to think about? 

No. This causes all kinds of side effects and data integrity issues.

&gt; As far as I see, it 
&gt; would work pretty well: If a message is marked as deleted, it 
&gt; disappears from synced devices. If an IMAP-client undeletes it, in 
&gt; the synced devices it is simply added again...

Either the email is on the client or it&#039;s not. Besides the fact that we would need to introduce a whole bunch of additional logic to detect these changes, there can&#039;t be any sort-of-on-the-client-but-hidden scenario. We are not going to start to have to track which messages are really on the client and which are not. 

The &quot;deleted&quot; flag is not honored by ActiveSync clients, period. 
</description> 
   <pubDate>Tue, 04 Mar 2014 22:17:57 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/13009#t82562</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
