[sync] trash folder
Michael J Rubinsky
mrubinsk at horde.org
Sun Feb 17 21:21:13 UTC 2013
Quoting Jens-Uwe Mozdzen <jmozdzen at nde.ag>:
> Hi *,
>
> maybe this was introduced with the latest code update or is
> something else, but I just noticed that my code to limit ActiveSync
> to only special folders does not longer support my trash folder.
>
> In my personal preferences for IMP, I have deactivated moving
> deleted messages to the trash folder, and therefore have no folder
> marked as "trash folder".
>
> IMP_Mailbox::getSpecialMailboxes() contains:
>
> self::SPECIAL_TRASH => $GLOBALS['prefs']->getValue('use_trash') ?
> self::getPref('trash_folder') : null,
>
> therefore no trash folder is reported.
>
> Now when I sync my remote device, where I have deleted messages, the
> SYNC call returns with HTTP error 500 and an error message in the
> ActiveSync log:
>
> --- cut here ---
> 2013-02-17T19:26:51+01:00 DEBUG: [30306]
> Horde_Core_ActiveSync_Driver::deleteMessage() INBOX: Array
> (
> [0] => 26765
> [1] => 26766
> )
>
> 2013-02-17T19:26:51+01:00 ERR: Ordner "" konnte nicht geöffnet werden.
> --- cut here ---
>
> The German message translates to 'folder [or mailbox?] "" could not
> be opened.' and probably is a native PHP message returned because no
> trash folder is known.
>
> Once I change my account configuration to "use_trash", everything
> works without an error. So I assume that the error is caused because
> the trash folder is not set (as a special folder) and the sync code
> doesn't know where to move the deleted message... as ActiveSync does
> not support the "deleted" flag.
>
> Shouldn't it be possible to define a trash folder in the
> configuration independently of the setting to move deleted mails
> there?
No, because if a Trash folder is set on the EAS client, it
automatically uses it to move deleted messages to it - thus making
this new setting equal to the existing setting. If the client does not
know what to do if there is no Trash folder present, that's a client
bug.
If you don't have IMP set to move deleted messages to trash, then no
trash folder is sent to the EAS client. What the protocol says should
happen when messages are "deleted" from the EAS client in this case is
that messages are automatically expunged from the mailbox. It is the
client's responsibility to tell the server (via setting the
DeletesAsMoves property to '0' in the SYNC command request) that there
is no Trash folder on the client. Some devices, like iOS, screw this
up. That is why it is recommended to use a Trash folder if you plan on
using ActiveSync.
--
mike
The Horde Project (www.horde.org)
mrubinsk at horde.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 6062 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.horde.org/archives/sync/attachments/20130217/372e86c0/attachment.bin>
More information about the sync
mailing list