How to get Gmail Categories in macOS Mail app? I'm using the default Gmail inbox, where emails are magically filed under the proper tab: Primary, Social, Update and Forum.

In Mail on OS X Yosemite (10.10) however, all end up in the Inbox.

I can see my custom labels (I use several) under "Google" in the left panel. Under Mailboxes, I have of course the standard Inbox, Drafts, Outbox... But the Gmail tabs appear nowhere, not even as folders.

I could maybe create rules on Gmail that would match the tabs, e.g. if this is a "Social" email, then add a label "Social", but this seems clumsy.

Is there an easy/elegant way to enable it?

EDIT

You can follow the instructions from this page (too long to reproduce them here). It boils down to creating server filters for each category (=tab), in order to archive the email from your inbox and apply a label on it. Then, it will show nicely in OSX Mail. Some caveats though:


The search function in Mail does not work on all folders at once
You lose the small tab counter, telling you for instance you have 3 new emails in Social. The counter resets itself as soon as you hit the tab in Gmail. Not in OSX Mail
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.


Go to Gmail/Settings/Filters
Using a search operator enter category:[chosen category] in the “Has the words” field and click “Create filter with this search.“
Check “Apply the label:” and select or create new label
(optional) Check “Also apply filter to matching conversations.“
Create filter
Go to Gmail/Settings/Labels and show the label in IMAP
(optional) Hide the label from label and message lists


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