The Computer Oracle

how to use Gmail tabs with IMAP?

--------------------------------------------------
Rise to the top 3% as a developer or hire one of them at Toptal: https://topt.al/25cXVn
--------------------------------------------------

Music by Eric Matyas
https://www.soundimage.org
Track title: A Thousand Exotic Places Looping v001

--

Chapters
00:00 How To Use Gmail Tabs With Imap?
00:25 Answer 1 Score 7
01:13 Accepted Answer Score 16
02:06 Answer 3 Score 0
02:29 Answer 4 Score 0
02:54 Thank you

--

Full question
https://superuser.com/questions/719677/h...

--

Content licensed under CC BY-SA
https://meta.stackexchange.com/help/lice...

--

Tags
#gmail #imap #mutt #gmailimap #gnus

#avk47



ACCEPTED ANSWER

Score 16


Unfortunately, Gmail doesn’t expose its “Categories” to IMAP. I'm using Mail.app as my email client, and I had the same desire to have my mail categorized with Gmail’s bayesian-or-whatever classifiers, so I found a fix.

This workaround uses filters to automatically apply labels to categories. Once labeled the old fashioned way, they can then be exposed to IMAP.

  1. Create a new filter via Gmail/settings/filters
  2. Enter category:primary in the “Has the words” field and click “Create filter with this search.”
  3. Check “apply a label to this filter” and create the filter.
  4. Expose the filter to IMAP via Gmail/settings/labels

This will link up your Gmail categories to your Mail.app.

-- Original post by dylan conlin in 2014




ANSWER 2

Score 7


I know this is an old thread, but I wanted to do almost the same thing (I actually just wanted to have my IMAP client fetch all messages except the ones that Google placed on the 'Promotions' tab), and came up with this approach.

I set up a filter for the messages that I do not want to retrieve by IMAP (my search is Category:Promotions) and chose "Skip Inbox" as the action of that filter. I also checked the settings on the Settings:Labels page to make sure that All Mail was not marked as Show in IMAP.

This means that these messages are never available for my IMAP client to download. The minor drawback is that the 'Promotions' tab is always empty, but if for some bizarre reason I want to see what is in there, I can do a search on the category: the messages are still available. You can even set up the labels in the side-bar to give you access to the 'Promotions' messages if you want.

Hope this helps someone.




ANSWER 3

Score 0


If you are stuck in getting category emails and do not want to apply above solutions. Gmail IMAP API provide support for category. Messages in a certain category

category:primary
category:social
category:promotions
category:updates
category:forums
category:reservations
category:purchases

Example: category:updates

See https://support.google.com/mail/answer/7190




ANSWER 4

Score 0


The problem is Categories are not Labels (the things that everything else calls folders). My solution was to:

  1. Create a label i.e. "Social Folder".
  2. Create a Filter that moves emails from social media into both the Category "Social" and the Label "Social Folder".
  3. You can now see the stuff that was in the Social category in the "Social Folder".