Closed Bug 1855985 Opened 1 year ago Closed 1 year ago

Thunderbird Beta 119.0b1 snap is never purging deleted messages on IMAP server

Categories

(Thunderbird :: Mail Window Front End, defect)

Thunderbird 119
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1857881

People

(Reporter: bugzilla, Unassigned)

References

Details

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0

Steps to reproduce:

Either permanently delete messages or send messages to Trash and then empty Trash.

Actual results:

Thunderbird does not show the permanently deleted messages. But they are visible in the Roundcube webmail client. This is actually not unusual, but in past versions of Thunderbird, as soon as I quit Thunderbird, these messages would be entirely purged and no longer visible in Roundcube. This purge step is no longer occurring when Thunderbird exits.

Expected results:

By default, on Thunderbird exit, all messages that are permanently deleted should be purged from IMAP, as past Thunderbird versions have done.

I actually would prefer to have a "purge now" button/menu, and/or a radio button section of additional settings:

  • Purge immediately on message delete
  • Purge XX minutes after deletion
  • Purge on Thunderbird exit
  • Purge manually

I would set it to the first option. That last option might not be a good idea to implement, but I mentioned it just in case the devs think it should be there. The ordering of these options is not important to me ... whatever Thunderbird defaults to should probably be the first option listed.

The first and third are available in Thunderbird's server settings.
I'm reasonably certain we'd never do #2. Maybe also #4

Component: Untriaged → Mail Window Front End

(In reply to Shawn Heisey from comment #0)

Thunderbird does not show the permanently deleted messages. But they are visible in the Roundcube webmail client. This is actually not unusual, but in past versions of Thunderbird, as soon as I quit Thunderbird, these messages would be entirely purged and no longer visible in Roundcube. This purge step is no longer occurring when Thunderbird exits.

I can confirm that:

 Settings -> /General\ -> Disk Space
 => [X] Compact all folders when it will save over <n> MB in total

does not work anymore.
This causes deleted email to no longer be automatically removed from the server after Move-To-Trash.

For the INBOX can be:

 Account Settings -> "Account" -> /Server Settings\ -> Message Storage
 => [X] Clean up ("Expunge") Inbox on Exit

activate. And this works here as intended.
But it has no effect on other folders.

I actually would prefer to have a "purge now" button/menu, and/or a radio button section of additional settings:

This "purge" is actually called "compact" and is present in the context menu of the folders.
And yes, manually compacting a single folder also works here.

But even that doesn't seem to work as it should for some time now. See: Bug 1850687 Bug 1853584 Bug 1845066
The same bug may be the cause. Maybe here too: Bug 1852998

(In reply to Shawn Heisey from comment #0)

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/118.0

Steps to reproduce:

Either permanently delete messages or send messages to Trash and then empty Trash.

The trash folder is sent an imap expunge command when you empty trash so the server should permanently delete the messages there. I'm seeing it happen in IMAP:4 log when I do do empty trash.

If I do a shift-delete on a message that would normally go to trash, the message just gets marked with the imap \deleted flag and is not completely/permanently removed (expunged) from the server and will even be visible but crossed out if you set tb delete mode "just mark as deleted".

Is Roundcube showing the marked \deleted message as normal messages or does it indicate they are marked deleted such has showing them crossed out? I don't have Roundcube to test this myself.
I found this link that implies Roundcube shows messages marked deleted by outlook (and probably TB) as crossed out: https://www.roundcubeforum.net/index.php?topic=2817.0

Item 1 "Purge immediately on message delete", controlled by mail.imap.expunge_after_delete, just expunges your folder when you mark \deleted a message. This may be OK if the folder isn't shared by more than one client (a major purpose for imap) it might be better if after TB marks a message \deleted, instead of folder expunge, it then did a UID expunge on the message and not expunge what you might not want removed if you have more than one client/user sharing the folder. However, UID expunge is only available on servers with UIDPLUS capability, but most servers now have that.

There's another feature that tries to run a folder expunge if more than 20 messages get marked deleted in a folder. It's controlled by mail.imap.expunge_threshold_number which defaults to 20. It can be shut off if you don't want any auto-expunge by setting mail.imap.expunge_option to 3. Specifically, with comments taken from the code and edited some:

// Let delete model control expunging, i.e., don't ever expunge when the
// user chooses the imap delete model (i.e., just mark deleted), otherwise, expunge when over the
// threshold when new messages fetched for folder. This is the default TB behavior.
mail.imap.expunge_option = 0;  // default

// Expunge whenever the folder is selected regardless of delete model or number
// of marked deleted messages present in the folder and new messages are fetched.
 mail.imap.expunge_option = 1;

// Expunge when over the threshold on folder selection with new messages, independent of the delete model.
mail.imap.expunge_option  = 2;

// Set mail.imap.expunge_option to kAutoExpungeNever to NEVER do an auto-
// expunge. This is useful when doing a bulk transfer of folders and messages
// between imap servers.
mail.imap.expunge_option = 3;

The last expunge_option = 3 was added as part of bug 1828372. This also removed places where an imap CLOSE occurs since it causes messages to be expunged unexpectedly when folders are shared with other clients and is described here: bug 1739833. This is likely the main reason the reporter is seeing a difference with earlier TB versions.

Note also that you can "compact" an mbox folder at any time which will do an imap folder expunge. However, this is not currently possible with imap accounts configured with maildir as described here: bug 1827973.

Note also, I haven't addressed the issue with folder compacting based on the amount of disk space it would free up in the mbox or maildir files, as mentioned in comment 2. I think that's a subject of another bug.

See Also: → 1853584
Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1857881
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.