Mavericks does not delete Gmail emails I use the built-in Mail.app client to fetch my Google Mail emails using IMAP.

If I delete an email in any mailbox except trash using the delete button, Mail.app puts the email in the corresponding trash mailbox like it is supposed to be. I also like having the deleted mails saved on the server.



But if I delete emails in trash, the emails are still visible in the web interface of Gmail but disappears on my Mail.app.

I also tried right-clicking in the sidebar and choosing “Erase Deleted Items ...” but it does not help.

My IMAP settings on mail.google.com are the following:

When I mark a message in IMAP as deleted:
 (x) Auto-Expunge on - Immediately update the server. (default)
 ( ) Auto-Expunge off - Wait for the client to update the server.

When a message is marked as deleted and expunged from the last visible IMAP folder:
 (x) Archive the message (default)
 ( ) Move the message to the Trash
 ( ) Immediately delete the message forever




I tried playing with them using “Auto-Expunge off” and “Move the message to the Trash” or “Immediately delete the message forever” but it did not work either. Maybe I have not waited enough?

So my question is how can the old behavior be achieved? Put it in trash, review them, then delete it permanently.

My other IMAP accounts do not behave like this and handle the trash correctly.



Edit:

Despite my Trash is not showing any email, the "Account Info" (right click on any mail box in the sidebar and choose "Get Account Info") shows that emails exist. I also tried "Show Deleted Messages" from "View" in the menu bar, but it did not help. See the image below:



The message count equals the messages in the web interface trash. But I cannot see them in my Mail.app and I also cannot delete them in Mail.app.
Google recommends the following configuration for Gmail on Mail.app OS X:

From the Mail menu, click Preferences &gt; Accounts &gt; Mailbox Behaviors
Drafts:
Store draft messages on the server &gt; leave unchecked
Sent:
Store sent messages on the server &gt; leave unchecked
Junk:
Store junk messages on the server &gt; checked
Delete junk messages when &gt; Never
Trash:
Move deleted messages to the Trash mailbox &gt; leave unchecked
Store deleted messages on the server &gt; leave unchecked

Also, trash gets emptied on its own on Gmail; mail older than 30 days gets deleted automatically, so other than particular workflows or because of lack of space on the server or locally, deleting mail already on the Trash folder should not be a preocupation.
I've seen tweaks and counter-suggestions from other reputable sources, I'm not linking them here because they are fairly old.
That said, Joe Kissell and others accuse Gmail of not following standard IMAP implementations –so much so that Mavericks accommodated its interaction with Gmail entirely to avoid duplication and other problems–, and that could be the source of many of the problems.