Follow

Changing the Delete Behavior for Gmail Accounts

Gmail vs IMAP

With Gmail, all your messages are in one big pool called "All Mail". Other folders contain messages from All Mail that have a specific tag applied. For instance the "Important" folder contains all messages in your Gmail account that are tagged as Important.

Converting this setup to IMAP means Gmail's implementation of IMAP is different than other mail providers. Messages will appear in All Mail as well as other folders (Inbox, Sent, label, etc.). When you archive a Gmail message, it is already in the All Mail folder; you're just removing from the Inbox.

Deleting from within the Inbox vs a Label

Deleting a message from the Inbox, moves the messages to Gmail/Trash, causing it to be removed from ALL other labels/folders.

Deleting a message from within a label/folder, removes the message from the current label/folder only, and the message remains in other labels/folders.

To make deleting remove all labels/folders:

  1. Open Config Editor.
  2. In the Filter field, paste the following preference: pb.gmail.label_delete.useAllMail 
  3. Double-click the row for pb.gmail.label_delete.useAllMail to change the value to false.

Postbox Delete Preferences for Gmail Accounts

Preferences for deleting messages in your Gmail account can be found in the following location

  • (Mac) Preferences > Accounts > [your Gmail account], under When I delete a message
  • (Windows) Tools > Options > Accounts > [your Gmail account], under When I delete a message

2017-11-14_23-11-57.png

Move it to this folder [Trash]

This is the default setting. In Gmail accounts, you can not specify a different folder for Trash. When using the default settings in both Postbox and Gmail:

If you delete a message from Postbox's Inbox, it is then:

  • Removed from the Postbox Inbox, but NOT the Gmail Inbox until you empty the Trash in Postbox.
  • Placed into the Postbox Trash folder, AND the Gmail Trash folder.
  • Removed from Postbox labels, AND Gmail's labels (although the Inbox will show messages with labels, but label selection will not)
  • Removed from Postbox's All Mail folder, AND Gmail's All Mail folder. 

Just mark it as deleted

The IMAP protocol allows messages to be marked for deletion, a sort of limbo state where a message is still present in the folder but slated to be deleted the next time the folder is expunged. With Gmail's default settings, when you mark a message as deleted, Gmail doesn't let it linger in that state -- it deletes (or auto-expunges) it from the folder right away.

If you want the two-stage delete process:

  • Select "Auto-Expunge off" under the "Forwarding and POP/IMAP" tab in Gmail Settings.
  • Check the "Clean up ('Expunge') Inbox on Exit checkbox in the same Postbox preferences panel listed above.

When you delete a message using the default "Archive the message" options in Gmail settings, it is then:

  • Marked as deleted in the Inbox, until you exit Postbox, upon which time, the message will then be removed from the Postbox Inbox, and the Gmail Inbox.
  • Placed into the Postbox Archive folder, and the Gmail All Mail folder.
  • A copy is not placed in the Postbox Trash folder.

Remove it immediately

If you select this setting, and then delete a message in Postbox, it is then:

  • Removed from the Postbox Inbox, and the Gmail Inbox.
  • Placed into the Postbox Archive folder, and the Gmail All Mail folder.
  • A copy is not placed in the Postbox Trash folder.