10

I'd like to optimize my Gmail layout for desktop IMAP client friendliness. That's why I'd like to ensure all my messages have one and only one label applied (because with IMAP labels appear as folders and multi-labelling results in message dupes).

So, how to find all messages with more than one label applied?

migrated from superuser.com Nov 4 '10 at 20:40

This question came from our site for computer enthusiasts and power users.

  • 2
    I think you're missing the point of labels. A big benefit of labels is that you can have more than one. You don't need to decide if an email from John about homework for physics goes into the "homework" folder or the "John" folder or the "physics" folder. – Doug Harris Nov 4 '10 at 20:44
  • 2
    @Doug: I think he's trying to use them as folders for compatibility reasons with the other mail client (e.g. Thunderbird). Although from what I remember, Google's IMAP feature will allow you to treat folders as labels (even if your email client doesn't support it), so your message will appear in both, but it won't be a duplicate. – Senseful Nov 4 '10 at 21:29
  • 3
    @ryan-thompson, I am really (extremely) tight on bandwidth - that's why I want offline mail. And I really can't stand any crapyness - that's why I don't want to allow any misunderstanding between my email client and server. – Ivan Nov 5 '10 at 7:16
  • 2
    @doug-harris, no, I love labels and use them extensively, but there seem to be no offline email client liking them as well and supporting them any close to perfect. And I want my email client and server to speak one language and understand things the same. – Ivan Nov 5 '10 at 7:17
  • 1
    I would love an answer to this. Labels were ok a couple of years ago, but as my saved emails have grown in number, having things in multiple labels has become a major pain and I'd like to find all emails that have two or more labels so I can clean them up. – John Smith Feb 20 '17 at 22:39
4

Update: I don't have a query to find all messages with 2 or more labels. However, it sounds like you're trying to make Gmail behave more like IMAP (e.g. folders instead of labels). Instead of using "folders" in Gmail, I think you can continue using them as labels and your IMAP client will just adapt correctly, here's why...

Even though your mail client doesn't support labels, Gmail's IMAP feature compensates for this and allows the folders in your mail client to act as labels.

This means that some messages will appear in both folders, but will still be the same message (e.g. if you delete one, the other one will be deleted as well).

what [...] if I move a message from one folder (in the IMAP client) to another already containing that message?

According to Google's article, How do actions sync in IMAP?, I would guess that it simply removes the original label from the message and leaves the new one on there. Rather than having two messages in the same folder, you should only see one.

Or if I want to delete a message, not just remove a particular label?

According to Google's article, you move it to the trash to delete the message.

  • 2
    the question was how to find all messages having more than one label applied? did you misunderstand or misread it? – Ilias Karim Jul 1 '15 at 12:59
  • Useful information but doesn't answer the question. – Seafish Feb 17 at 21:34
  • Updated the answer with clarification – Senseful Feb 21 at 20:47
1

You can use the following syntax in the search input field:

label:label-x label:label-y

The result is going to bessages with both label-x and label-y.

  • 5
    but how do you find all messages with ANY two labels? – Ilias Karim Jul 1 '15 at 13:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.