Mail.app does not sync Junk folder with Gmail

data synchronizationemailgmailimapmail.app

I am running Mail.app on Yosemite with a few Gmail accounts on IMAP. Everything is syncing just fine, with the exception of the Junk folders: every time I use "Erase junk mail…", the emails are immediately deleted from the client, but they still show up in Gmail's spam folder.

enter image description here

This doesn't happen with the other folders (sent mail ecc): whenever I delete an item from one of these folders, the change is synced to the server. They are also configured in the same way in Mail.app:

enter image description here

How can I make sure that emptying the Junk folder in Mail.app deleted all spam from Gmail web as well?

Best Answer

In your IMAP folders, do you still have the junk folder inside the GMAIL folder ? If so, you should select it, and the choose "use as -> junk" in the mailbox folder.