#1542 new
Spot

Support for Zimbra tags

Reported by Spot | October 2nd, 2016 @ 09:01 AM

Context:
* I'm using Zimbra as my e-mail infrastructure (8.6.x as of now). * I'd like to use Zimbra's tag functionality to label and organise my e-mails.

Problem:
* Mailmate can't identify the Zimbra tags. Presumably because Zimbra uses some proprietary way to handle tags. * The tags from Zimbra can be discovered through "RAW Flags" in Mailmate, which shows for example: "\Recent \Seen \MyTag1:FLAG661007". MyTag1 is the tag I'd like to make use of in Mailmate.

Question:
* Is there a way that Zimbra and Mailmate can sync tags?

Comments and changes to this ticket

  • benny

    benny October 3rd, 2016 @ 02:02 PM

    Well, in theory you should be able to go to the Tags preferences pane in MailMate and bind a tag named, e.g., “MyTag” to the IMAP keyword \MyTag1:FLAG661007. The IMAP keyword is a bit unusual, but maybe Zimbra needs them to be globally unique or something like that.

    (I didn't know Zimbra could do this and I don't know if any MailMate users utilize it.)

  • Spot

    Spot October 3rd, 2016 @ 02:25 PM

    Good point. I'll give tag binding a try!

  • Spot

    Spot October 7th, 2016 @ 04:12 PM

    I managed to bind the IMAP keywords.

    One question (or issue) remains: If I tag a message, Mailmate won't sync back the tags to Zimbra. I couldn't really figure out a reproduction path, but what I can observe is that Mailmate (or Zimbra) messes up with the "\" before the IMAP keyword. I think Zimbra doesn't set them while Mailmate (correctly) sets them. This way you'll end up with something like "\Recent \Seen MyTag1 \MyTag1". Does my explanation make sense?

  • benny

    benny October 11th, 2016 @ 01:06 PM

    Hmm, I'm not sure about that explanation. You can try this:

    • Open the Activity Viewer (⌥⌘0).
    • Set a tag server side and wait for it to sync with MailMate.
    • Set a tag in MailMate and wait for it to sync with Zimbra (or not sync).
    • Use “Help ▸ Send Server Logs”.

    Then I can see if there's anything suspicious in the logs.

  • Spot

    Spot October 23rd, 2016 @ 08:24 PM

    The interesting part is that my flag "URGENT" works without any issue, while my other flags like "DESIGN" don't, for no apparent reason. I just sent you my server log via e-mail.

  • benny

    benny October 24th, 2016 @ 11:33 AM

    I can confirm that URGENT seems fine in your logs, but I don't see any attempts to set any other keywords. (Note that logging is only enabled while the Activity Viewer is open.)

    Maybe try another set of logs where you try more actions. Also try taking the account offline/online while logging since this'll allow me to see what the server tells MailMate about what is possible (what kind of flags are allowed).

  • Spot

    Spot October 24th, 2016 @ 01:55 PM

    Sure, I just sent you another log.

  • benny

    benny October 24th, 2016 @ 07:51 PM

    Thanks. I can only see that you tried to disable the DESIGN tag from MailMate, but I can also see some interesting things about TECHNEWS.

    It appears that the server tells MailMate that the following keywords are allowed:

    S: * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded $Junk $NotJunk Junk JunkRecorded NonJunk NotJunk DESIGN TECHNEWS)
    

    This line also tells MailMate that it cannot create any new keywords. This indicates that new tags can only be created server-side. It's also possible that MailMate might not always pick up changes to the set of allowed keywords since this is not a common scenario.

    If you create, e.g., TECHNEWS server side, are you then still unable to use MailMate to set this tag on a message (in the same mailbox)?

  • Spot

    Spot October 24th, 2016 @ 08:38 PM

    Now it's getting interesting! Yes, if I've set TECHNEWS server-side beforehand, I'm then able to set this tag on a message within Mailmate and it syncs its state properly with the server.

  • benny

    benny October 25th, 2016 @ 12:40 PM

    • State changed from “new” to “resolved”

    Ok, if you don't think anything else is misbehaving then I'll close the ticket. MailMate cannot create new tags client-side and there's not really anything I can do about it.

    (It's possible that even though the server reports that MailMate cannot create new keywords that it still might allow it in practice.)

  • Spot

    Spot October 25th, 2016 @ 01:36 PM

    I'd love if we could investigate one step deeper. We narrowed down the situation to the following problem:

    Even if the tags are created on the server, I need to set the tag of an e-mail on the server-side first to allow it to be removed/ re-added client-side in Mailmate. I could imagine that URGENT works without issues because it already exists as a standard tag. But any other, custom tag (like DESIGN or TECHNEWS) generates the aforementioned issue.

  • benny

    benny October 27th, 2016 @ 10:07 AM

    You can try the following manually in a Terminal window:

    telnet zimbra.webstyle.ch 143
    

    Then login:

    0 LOGIN username password
    

    Then select a mailbox:

    0 SELECT INBOX
    

    List its messages:

    0 FETCH 1:* (UID FLAGS)
    

    Finally, try setting a non-existing keyword (replace 12345 with a valid UID in the list returned above):

    0 UID STORE 12345 +FLAGS (DUMMY)
    

    Now, see if this last action is successful despite the non-existence of the keyword. If this works then I could add an option to ignore that the server tells MailMate that this is not possible.

  • Spot

    Spot October 29th, 2016 @ 05:44 PM

    The last action was successful and also re-listed the messages to be sure: The non-existing tag was successfully added despite its non-existence.

  • benny

    benny November 2nd, 2016 @ 02:24 PM

    Ok, try this. Edit this file:

    ~/Library/Application Support/MailMate/Sources.plist
    

    Add ignorePermanentFlags = 1; to the Zimbra account and save the file.

    Hold down ⌥ when clicking “Check Now” in the Software Update preferences pane (r5296).

    This should make MailMate ignore the PERMANENTFLAGS response in the sense that MailMate assumes the server allows the creation of new IMAP keywords.

  • Spot

    Spot November 2nd, 2016 @ 03:06 PM

    Awesome. I successfully applied the update. I still have some sync issues, but I'll have to observe a bit longer to figure out a patterns. Will come back with more insights!

  • benny

    benny November 2nd, 2016 @ 03:07 PM

    Ok, I didn't really test the workaround (not having a Zimbra account or something similar) and it's possible that I failed to implement it correctly.

    It's also possible that the Zimbra server does not always allow the implicit creation of IMAP keywords.

  • Spot

    Spot November 5th, 2016 @ 05:23 PM

    After a few tests, the situation is actually a bit weirder. In the sense of less reproducible:
    * The existing tag DESIGN syncs perfectly client- and server-side. * The existing tag TECHNEWS doesn't sync at all. * The existing tag URGENT doesn't sync at all. * The new client-side tag DONOW is not created on the server-side. Can't really see a pattern yet. At least the tags DESIGN and TECHNEWS/ URGENT should have the exact same behaviour.

  • benny

    benny November 5th, 2016 @ 08:25 PM

    Well, I guess we are at a dead end then unless this somehow means the workaround is not doing as advertised.

  • Spot

    Spot November 5th, 2016 @ 08:34 PM

    Looks like Zimbra is pretty buggy in this regard :/ Just curious: Are you aware of any open-source e-mail servers that fully support IMAP keywords?

  • benny

    benny November 6th, 2016 @ 03:07 PM

    My personal favorite is Dovecot.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Mac OS X email client.

Shared Ticket Bins

People watching this ticket

Pages