[MlMt] How do changes to tag setup in MailMate affect messages in Gmail?

Benny Kjær Nielsen mailinglist at freron.com
Fri Jan 22 15:57:01 EST 2016


On 22 Jan 2016, at 17:21, Jody Foo wrote:

> **Background**: I recently tidied up my tag set and their location and 
> basically did what I am asking in question 4. I had some temporary 
> glitches (semi duplicate folders in MailMate, e.g. both folders 
> `labelmappedtotag` and a new folder `_labelmappedtotag`. I don't 
> remember the exact details, but this went away. Possibly after a 
> MailMate crash..

Doesn't sound very robust :-/

I'm sorry if I'm a bit vague in the following. There are all kinds of 
issues involved when handling tags/keywords/labels/mailboxes and I might 
have forgotten some details.

> I have three gmail accounts set up in MailMate. For all of these I 
> have set up a gmail label[^label] called '`#`' under which all labels 
> I am going to use as tags in MailMate should be stored. For example, 
> the tag '#`purchase`' might have the following mapping in the MailMate 
> preferences: '`#purchase` = '`#purchase` = '`#/purchase`'. I created 
> all the labels in gmail first, some with messages.
>
> I also discovered that if a *label structure defined in MailMate* 
> *does not exist in gmail*, MailMate will *create* the label structure 
> in gmail and then MailMate will add the newly created label to the 
> message (or if its the Gmail API that does this?)

If you assign a tag mapped to a Gmail label to an email then it'll 
trigger the creation of the label in Gmail.

> Now to my questions...
>
> 1. Am I correct that the above is the same thing as specifying a label 
> path without the path existing in gmail? This would mean that I _do 
> not_ have to create the label in (at least one of) the gmail accounts 
> I have configured in MailMate before adding it as a Tag in the 
> MailMate Preferences?

I believe that is correct.

> 2. If I change the mapping of an existing tag in MailMate, what 
> happens on the gmail side?
> 	1. messages get both new and old labels in gmail (*MailMate using 
> IMAP flags* to _add_ gmail labels or
> 	2. the existing gmail label is renamed or
> 	3. only future tag assignments are affected and the old tagged 
> messages are no longer considered to be tagged with the previous gmail 
> label is again shown as a mailbox in Mailmate, or
> 	4. something completely different?

I'm pretty sure it's number 3.

> 3. With regard to the previous question, what steps should I perform 
> to
> 	1. Change the mapping of a previously used tag to a new one? E.g. the 
> tag "#todo" has been mapped to messages with the gmail label "todo" 
> and now I want to use the label !todo in gmail?

In order to remap existing messages then you have to create a new tag to 
apply the new label. Then untag with the old label. Delete the old tag. 
Rename the display name of the new tag.

> 	2. Change the IMAP flag used for a tag? E.g. if the flag `todo` has 
> been used but now I want to use the flag `#todo` and therefore replace 
> all occurrences of the flag `todo` with `#todo`?

Ah, now I can see my previous answer did not take the IMAP keyword into 
consideration. It might be tricky to change an IMAP flag (keyword) 
without also changing the Gmail label. I cannot give you a clear answer 
on that one.

> 	3. Change the displayed string used by MailMate for a tag

This should always be safe since it really is just a display name. It 
doesn't affect anything on the server.

> 4. Finally, what would happen if I did two or more of the above 
> operations? E.g. if I changed the display string to `TODO`, the flag 
> used to `#todo` and the gmail mapping to `tags/todo`? Is it _always_ 
> "sort of" safe (I did this and no data was lost but there were some 
> glitches)?

I think the safe approach is to create a new tag and then apply that to 
existing messages with the old tag. Then get rid of the old tag.

> I'll say *label* for gmail labels, tag for MailMate's implementation, 
> and folder for IMAP-folders or MailMate folders (should that be 
> Mailboxes technically?)

Well, I have learned that “mailbox” is often mis-interpreted as 
being an account. I think this is because with POP3 there is no 
difference between account and mailbox. In other words, even though 
MailMate uses the word “mailbox” then it's often safer to use the 
word “folder”. To me there is no difference between mailbox and 
folder (in the context of an email account).

As a general comment: It may seem that MailMate should be better at 
automatically re-labeling/tagging emails when making changes, but it's 
not straightforward when and how to do it. (I think, at least, that 
MailMate should ask before doing anything.)

MailMate does a few things automatically, e.g., if something is labelled 
without the corresponding IMAP keyword or vice versa then MailMate tries 
to “clean it up” by adding the missing keyword or label. It's not 
unlikely that this was involved in the observed glitches/issues.

Based on crash reports I've observed an issue with the handling of Gmail 
labels. If you are able to reproduce such a crash then please let me 
know.

-- 
Benny
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freron.com/pipermail/mailmate/attachments/20160122/8597cca0/attachment-0001.html>


More information about the mailmate mailing list