Open Bug 1759335 Opened 3 years ago Updated 3 months ago

Deleting mail does not delete from Gmail's "All messages" folder

Categories

(Thunderbird :: Folder and Message Lists, defect)

Thunderbird 91
defect

Tracking

(Not tracked)

REOPENED

People

(Reporter: markai, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0

Steps to reproduce:

in multiple Gmail accounts, all used with ThunderBird IMAP:
Deleted (actually even SHIFT-deleted) messages, typically from Inbox

Actual results:

deleted messenges still show up in Gmails "All messages" folder.

Expected results:

If I delete messages in other (non-ThunderBird-based) clients, deleted messages are also gone from "All messages" folder.

Perhaps we should reopen Bug 651945? Shift-delete does not delete from All Mail in IMAP [gmail] account
There is also Bug 1649789 - When moving messages out of imap mailbox, the "Delete" action is not processed correctly (affects gmail)

Attached image GMail IMAP settings.

These are the default IMAP settings on the Google web site. Really I think anything contradicting those settings (shown in their default settings) is doomed to failure. As you can see, the lock in default on removing mail from the last visible folder is "Archive" which in IMAP terms translates to "All Mail".

So, unless you have previously modified the default settings on Google. Deleting a mail will not remove it from the all mail folder.

Have you modified your settings to allow the deletion of mail in the event it is removed from the last visible folder? Note you will need to disable the immediate expunge to even get a chance to change the action.

I see this Bug and all those around Google defaulting to ignoring the delete are invalid.

It appears to me both Bug 1649789 and this are invalid as both are asking Thunderbird to somehow take an action that is contradicted server side with settings.

Blocks: tb-gmailWIP
See Also: → 651945, 1649789

Thank you for all the recent comments!
Thank you Roy for Gtrash; will try it.
My server-side setting is "Immediately delete message forever."
Noticed however that in client's settings for Gmail accounts I had "Marked as deleted"

Double-checked in EM Client:
if I delete a Gmail message, it goes to the Trash
if I delete a Gmail message from the Trash, it is gone, even from All Messages
if I SHIFT-delete a Gmail message from any folder, it is gone, even from All Messages

Gene, do you agree with comment 3?

Flags: needinfo?(gds)

I just tried to delete a newly arrived message from TB's gmail Inbox and it went to [Gmail]/Trash. It was also gone from [Gmail]/All Mail. This is with TB default settings for message deletion and default settings at gmail per comment 2 by Matt.
Also, emptying TB's [Gmail]/Trash empties the webmail gmail trash and it remains gone from webmail All Mail and TB's All Mail.

Really I think anything contradicting those settings (shown in their default settings) is doomed to failure.

I agree with Matt's statement. In the past, I've tried to use the non-default setting for gmail and it never does exactly what is stated on their site, it seemed to me.

Of course, if you've coped a message from TB's gmail Inbox to another folder and then try to delete it from Inbox, it will probably remain in All Mail until you deleted both copies.

So unless someone has a valid and justifiable reason to not use TB and gmail defaults, I would say the bugs are invalid.

Flags: needinfo?(gds)
Duplicate of this bug: 1649789

Closing per comment 8 and comment 3.

Status: UNCONFIRMED → RESOLVED
Closed: 2 years ago
Resolution: --- → INVALID

For the record, there is still one case where "Deleting mail does not delete from Gmail's All messages folder".

It's when:

  • auto-expunge is "on" on the Gmail side ("Settings" >> "When I mark a message in IMAP as deleted" >> "Auto-Expunge on - Immediately update the server.")
  • one uses "Shift-Delete" on Thunderbird.

However, when auto-expunge is off on Gmail and "When a message is marked as deleted and expunged from the last visible IMAP folder" >> "Immediately delete the message forever", then everything works fine.

Conclusion: it's better to disable auto-expunge on Gmail and use "Immediately delete the message forever".

Yes, with default TB delete settings and default gmail IMAP settings, when you "shift-delete" a message it is marked as deleted by TB and in the imap "uid store" response, the message is expunged. The "archive" copy of the message remains in "All Mail".

If I disable gmail's "auto-expunge" and choose "when marked deleted and expunged from all visible folders, immediately delete the message forever", when I "shift-delete" a message, the message is marked as deleted by TB and, as expected, gmail does not report that it is expunged. Then I "compact" the folder to trigger and imap expunge and the the imap expunge response reports the marked deleted message as expunged. However, the message still remains in "All Mail".
I was thinking maybe I had copied the same message to another "visible" folder, but I don't think had. So, to be sure, I went to another non-gmail account and sent a new message to the gmail account and repeated the sequence on the new message in Inbox:

  • Verified the new message is visible in Inbox and All Mail
  • Shift-delete the new message in Inbox
  • IMAP:4 log shows the \deleted flag is stored on the message, no expunge of the message occurs
  • Compact Inbox to force an imap expunge on the mailbox
  • IMAP:4 log show the message expunged in the imap expunge response
  • Looking at All Mail with TB, the message is still there and no message expunge response observed in IMAP:4 log
  • Looking in All Mall on gmail.com site, the message is still there but, of course, gone from Inbox

So monperrus, maybe you get different results (or I'm missing something)? Also, to be clear, this is without your proposed patch to conditionally force an expunge when a message is deleted: Re: bug 399475

Yes we observe the same behavior.

My proposed patch will remove the need for compacting after shift-delete.

My proposed patch will remove the need for compacting after shift-delete.

That's true (provided user has set expunge_after_delete pref). However, it appears that the message remains in All Mail even though it is expunged from all (visible) folders, and I have "Immediately delete the message forever" selected at gmail site. I would expect this setting to cause gmail to "auto-expunge" the message from "All Mail" but it doesn't.

Maybe if "All Mail" was not subscribed or disabled for IMAP at gmail site, then it would not be "visible" and the message would be auto-removed from "All Mail". Haven't tried that.

The question here seems to be an example of what I said in comment 8 above a while back:

I've tried to use the non-default setting for gmail and it never does exactly what is stated on their site, it seemed to me.

Maybe if "All Mail" was not subscribed or disabled for IMAP at gmail site, then it would not be "visible" and the message would be auto-removed from "All Mail". Haven't tried that.

Ok, I disabled imap for "All Mail" at gmail site and expunge of message in Inbox gets rid of it in "All Mail" viewed at gmail site. So it works if gmail "hides" All Mail from TB.

Interesting, thanks for the additional info.

Note that the patch allows for auto-expunge for shift-delete on any server, not just Gmail.

FTR, I also reported the auto-expunge issue on Google's bug reporting system: see https://issuetracker.google.com/issues/358918868

The issue is assigned and severity has been bumper to S3.

Status: RESOLVED → REOPENED
Ever confirmed: true
Resolution: INVALID → ---
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: