Open Bug 1920358 Opened 2 months ago Updated 1 month ago

Thunderbird not updating IMAP inbox until it closes

Categories

(Thunderbird :: Untriaged, defect)

Thunderbird 128
defect

Tracking

(Not tracked)

UNCONFIRMED

People

(Reporter: tym.huckin, Unassigned)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36 OPR/112.0.0.0

Steps to reproduce:

When I move emails from the inox to other local folders, they move in Thunderbird, but when accessing the same mailbox from my phone they remain. The inbox on my phone does not change until I close Thunderbird

Actual results:

This is the same regardless of moving manually of moving via rules. Emails in the inbox, whilst moved in Thunderbird, remain in the inbox when accessed via another client.

Expected results:

Inbox on the mail server should have been updated as soon as the mails are moved.

Thunderbird does set the deleted state of the emails on the server immediately. What is your Thunderbird account setting for how to handle message deletion?

It's not changed since I updated. It always used to work as expected, but since the update to this version, it doesn't exhibit expected behaviour. The only option that seems available is "Empty Deleted folder on Exit", which is checked.

The problem here is that when TB moves emails from inbox to a local folder, it remains in the inbox on the IMAP server and this isn't updated until I exit TB. The issue here is that I don't exit TB; my machine in on 24 hours a day, so TB files the emails in the background. This always used to work fine, but since the update it exhibits the above problem which causes a problem as I wake to dozens of emails on my phone now, where I never used to.

I see the same behaviour as reported by Tym, since updating to the latest version of Thunderbird 128 a few weeks ago. It worked as expected (I have 'When I delete a message: remove it immediately' checked; and mail was indeed removed immediately) the frist few releases of 128.

I don't think anything in TB has changed in 128 regarding "move messages to Local Folders" behavior.
What is the type of IMAP server you are using, e.g., gmail, outlook/hotmail, dovecot etc.?
Some servers, like gmail, maybe outlook and fastmail will expunge (completely delete) the message when it is flagged as \deleted, as occurs when a message is moved to another "account" like Local Folders. But most servers just leave the message there with the \deleted flag set, so your cell phone client may still show the \deleted but not expunged message depending on its design.

By any chance, have you changed IMAP servers recently? Or maybe your cell phone client has changed?

Maybe you could try this: Move some messages from Inbox to a Local Folder. Verify that they are actually visible on your phone. If so, right-click on Inbox and choose "Compact". Does that cause the emails to not appear on phone -- you may have to refresh the mailbox display on your phone.

If we can't resolve this based on info requested above, it may be necessary to record an IMAP:4 log file and attach it above using "Attach new file" button. The info for recording a log is here: https://wiki.mozilla.org/MailNews:Logging#Gecko_Logging. Just start TB using the script and move a few messages to Local Folders and then shutdown TB. Then attach the resulting log. It's OK to edit out or redact any personal or private data that may appear in the log. Passwords won't appear in the log.

Attached file log_file.moz_log

Log file of deleting and compacting two IMAP folders. (See comment)

I have several email account, two on different IMAP servers. I see the behaviour on both accounts. To be specific, when deleting an email with Thunderbird, the deleted email still is shown in other devices for both email accounts on both different IMAP servers. Compacting the inbox with Thunderbird deletes the emails from the server and they no longer show up on other devices. Attached the log file when performing the following steps

  • starting TB
  • deleting one message from account 1
  • deleting one message from account 2
  • compacting account 1
  • compacting account2

jhh, Thanks for the log. What I see is the messages you deleted are just getting marked with \deleted flag, as I expected. They are not getting expunged so depending on how other clients use the \deleted flag, it is up to the client whether to show the messages marked with \deleted flag. For example, if the other client is TB with default "move to trash on delete" setting, you won't see the \deleted messages; but if set to "Just mark deleted message" you will see them but crossed out (a line drawn through them). Also, you won't see them in TB with your setting "Delete immediately".

I couldn't find any changes regarding this since 128 came out so I also tried doing a delete message with "delete immediately" setting like yours with 115. I see the same thing in the log. The messages deleted just have the \deleted flag stored and TB does no expunge, so the messages are still present in the mailbox.

As I mention, some servers do an "auto-expunge" when a message is marked deleted, but I don't see in the log that your servers (dovecot and cyrus) are doing that. (Note: the cyrus server used by mail provider fastmail does do an auto-expunge after \deleted flag is set.)

Another note: There is another bug (bug 399475) with a patch still pending review that will force a UID EXPUNGE or a full folder EXPUNGE after a message is just marked \deleted. It requires setting the preference mail.imap.expunge_after_delete to true. Currently (as of 128) that preference doesn't have an effect when a message is just deleted like you are doing. It also doesn't have an effect when a message is marked \deleted after being moved to Local Folders as reported by "Tym" in comment 0.

See Also: → 399475

Thanks for coming back to me so quickly. If TB didn't change, I figured perhaps something else must have changed. And indeed I found the culprit: I recently also updated my other (apple) devices to iOS 18. The apple mail client on these devices keep showing mail deleted by TB. But I now picked up an older device with iOS 17.4 and checked my mail on that: and it DOES NOT show mail deleted by TB. So apparently with iOS 18 something changed in the way apple mail decides whether to show deleted mail or not.

P.S.: This does beg the question though what the semantics of the "delete immediately" setting is. I had always interpreted this as an immediate expunge on the server. And apparently (if I understand your last comment correctly), a move to a local folder is not treated the same way as a delete from the source folder. Again something I would not have expected. (But hey, that's just me.)

Others have also thought "delete immediately" meant the message would be expunged. But it has always meant the message is just marked with the \deleted flag and is still present. This makes "undo" of a delete easier since all the undo code has to do is go back and remove the \deleted flag for the message in the server. Otherwise if it's expunged from the server and also removed from TB database, it would harder (or impossible) to bring it back with undo.

a move to a local folder is not treated the same way as a delete from the source folder. Again something I would not have expected.

this is exactly bug 399475, which will be fixed soon.

You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: