Moving emails out of IMAP accounts to local folders without keeping copies on server
I have my Mail.app set up with multiple email accounts (from different providers).
For each of these accounts, I would like to make sure that when I drag an email *out* of the respective inbox into a custom “On my Mac” folder, that it gets deleted (or ends up in the IMAP Trash folder).
However, this only works for the iCloud account.
For Gmail accounts, as well as for other third party IMAP accounts, unfortunately, when I drag an email out of an inbox, it ends up in the IMAP "All Mail" folder (under “Archive”) and not in the Trash.
See the screenshot below of my setup:
Dragging a message from Inbox > iCloud into On My Mac > A Local Test Folder deletes the message from iCloud (it neither puts it into the Trash > iCloud nor into the Archive > iCloud folders – this is how I hope it would work in general).
Dragging a message from Inbox > Account A (which is a Gmail account, but with B, C, D it's the same) into On My Mac > A Local Test Folder moves the message into Archive > Account A (All Mail).
I would like it to be either moved into the Trash > Account A folder (so that it eventually gets deleted from the server), or to be deleted immediately.
Here’s a few things I have tried:
In the Gmail settings (in the browser) under Forwarding and POP/IMAP > IMAP access I changed the setting for "When I mark a message in IMAP as deleted:" from “Auto-Expunge on” to “Auto-Expunge off” and then changed the next option to “Move the message to the Trash” and, after that didn't work, to "Delete immediately".
Neither setting does seem to have any effect on the behavior in Mail. The message still appears under “Archive/All Mail”.
Then, in the Mail.app Preferences > Accounts > Mailbox Behaviors, for all Mailboxes (Drafts, Sent, Junk, Trash) I can choose if I want the IMAP or "On My Mac" version of the mailbox to be used. See the screenshot below illustrating this option for Trash:
However, for the Archive Mailbox there is no such option. I can only choose [Gmail]/All Mail.
For other accounts too, I can only choose the respective IMAP "Archive" folders here. Under no account does an On My Mac option appear.
So:
Essentially I'm looking for any of the following as possible solutions:
How to tweak Mailbox behaviors beyond the options shown
(a) make the default Archive mailbox use the "Gmail/Trash" folder or
(b) make it use the "On My Mac/Archive" folder or
(c) (ideally) some other "On My Mac" folder which I could then control.
Or alternatively, leave Mailbox behaviors as they are (as I also don't want to break anything else) and instead
(d) make sure that the action of dragging anything to an "On My Mac" folder is interpreted by Mail as "deleting" from IMAP.
Any help/suggestions for any of these (or maybe people have come up with other solutions too) would be greatly appreciated!
MacBook Pro 15", macOS 10.14