12

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?

8
  • 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. Commented Nov 4, 2010 at 20:44
  • 3
    @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
    Commented Nov 4, 2010 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
    Commented Nov 5, 2010 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
    Commented Nov 5, 2010 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
    Commented Feb 20, 2017 at 22:39

2 Answers 2

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.

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

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.

3
  • 7
    but how do you find all messages with ANY two labels? Commented Jul 1, 2015 at 13:00
  • @IliasKarim include OR in between.
    – Magne
    Commented Aug 16, 2022 at 15:38
  • It seems like the answer suggested here doesn't work anymore...
    – Magne
    Commented Aug 16, 2022 at 15:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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