Moving a message to local folder does not delete it from server
Categories
(Thunderbird :: Folder and Message Lists, defect)
Tracking
(Not tracked)
People
(Reporter: hlein, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: regression, Whiteboard: [Supernova3p])
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/114.0
Steps to reproduce:
Server is IMAP
move a message from Inbox to local folder
Actual results:
Message moved to local folder, disappears from Inbox, but is not deleted from server. It seems to mark it as "deleted" (it is still available by webmail), regardless of the account settings for action at delete of a message (move to folder, mark as deleted, remove/delete at once).
Expected results:
moving a message to another folder should respect the account settings for handling message deletion
Comment 1•2 years ago
|
||
duplicate?
Reporter | ||
Comment 2•2 years ago
|
||
Maybe because I did not set "Expunge Inbox at exit" (to avoid the long time it takes until the Thunderbird background processes are terminated) ?
Comment 3•2 years ago
|
||
Reporter Helmut,
Are you reporting this as change from past behavior? From what I just tested, the action when moving a message between server/accounts (e.g., imap account to Local Folder) has not changed after v102. The message is marked deleted at the source imap server and is not immediately expunged when testing with version 102.
Note: I wrote the above paragraph yesterday before I saw your comment 2.
Maybe because I did not set "Expunge Inbox at exit" (to avoid the long time it takes until the Thunderbird background processes are terminated) ?
Yes, that should expunge Inbox but, of course, it won't affect any other folder when you move a message to another server/account. (And not sure I understand your point about the background processes.)
Reporter | ||
Comment 4•2 years ago
|
||
Gene,
- the reason for filing this bug:
In the account settings there is an option of the action to be taken when a message is deleted (I use TB in German, so the translation may not be exact):
(x) move to this folder ...
( ) flag as deleted
( ) remove immediately
-
If a message is deleted by the del key or the Delete button, it disappears from the INBOX and appears in the folder defined above ("deleted" folder of the mail account). This can be seen also on the server (by webmail)
-
moving a message to another (local) folder is consists of two phases
phase 1: copy the message from the source folder to the target folder
phase 2: delete the message from the source folder
As a normal user I would expect/assume that for phase 2 the action defined in the account settings is applied. But this is not the case.
The message is only flagged as deleted (disappears locally from the INBOX), but remains on the server (can be seen by webmail or if TB is restarted with the second option (flag as deleted) is restarted.
Note: "Expunge" more or less cleans up the situation, but:
- Clean up (Expunge) the input folder at termination
if this flag is set, I have seen in Windows 10/11 in the task manager:
Thunderbird is seen in the Apps section, with several processes/tasks (minimum three)
When TB is to terminate, the GUI is closed and TB disappears from the Apps section of the task manager. But quite often, several TB processes (also minimum three) can bee seen in the "Background processes" section of the task manager. They do not seem to use CPU cycles or Network traffic, with the exception of very low small peaks every many seconds. It may take minutes until these processes disappear.
May be this depends on the server and/or how man messages are concerned (flagged as deleted) or stored in total on the server inbox folder.
Comment 5•2 years ago
•
|
||
I'm don't know a lot about TB's process and thread structure and I only run linux, but I now see 2 processes associated with thunderbird while running the latest daily. According to top -p `pidof -d, thunderbird`
:
PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ COMMAND
519318 gene 20 0 2491944 154980 133648 S 0.0 1.0 0:01.02 Isolated Web Co
519165 gene 20 0 4085024 774552 266008 S 0.0 4.8 5:48.92 thunderbird
They both go away when I shutdown the TB application. I also see several "Isolated Web Co" processes while running firefox so I assume it has something to do with the web access functionality in TB. So I don't see how this would cause a delay in expunging the Inboxes of TB.
"Moving" a message between servers (accounts) really has no direct relation to the "delete model" selected for deleting a message (mark deleted, move to trash, etc). I think the design reason for only marking a message as deleted when moving a message or messages across servers has to do with the "undo" functionality. If the move appears to work but the remote server somehow fails to receive or store the message and if the message has been expunged at the source server and in TB's database, there is no way to undo the operation and bring the message back. This is somewhat explained here:
https://searchfox.org/comm-central/rev/6e383056888c2a03dedf63de8f60e14ece374247/mailnews/imap/src/nsImapProtocol.cpp#6532.
This is not as much of a problem with undo when you are deleting a message and it gets (literally) moved to trash folder since you can only select a trash (deleted items) folder within the same server. Note also that imap commands "move" and "copy" only apply to folders on the same server. There is no imap move or copy command that goes to a different server. To copy a message to a different server TB has to read the source message into a file and then send the file content to the other server using imap APPEND command. Then if it's a move requested, TB marks the source message deleted and doesn't immediately expunge it so it's undo-able even if the destination server loses the message(s).
Note also that by default, TB will auto-expunge on restart on folder selection if you have 20 or more messages marked deleted in the folder. This is controlled by parameters:
mail.imap.expunge_threshold_number (default 20)
mail.imap.expunge_option (default 0)
which is explained here in the code: https://searchfox.org/comm-central/rev/6e383056888c2a03dedf63de8f60e14ece374247/mailnews/imap/src/nsImapProtocol.cpp#299 (Note: "Imap delete model" is the "just mark as deleted" method and this auto-expunge will not occur in that mode.)
Reporter | ||
Comment 6•2 years ago
|
||
Does this mean that with default settings (delete action move to folder) and expunge at exit not set, the INBOX folder on the server will (nearly) never contain more than 20 messages marked as deleted?
If so, this could explain why I did not notice marked as deleted. And I could live with it.
Comment 7•2 years ago
•
|
||
(In reply to Helmut Leininger from comment #6)
Does this mean that with default settings (delete action move to folder) and expunge at exit not set, the INBOX folder on the server will (nearly) never contain more than 20 messages marked as deleted?
If you move, for example, 100 message to another server the source folder won't instantly be expunged so you will see them with webmail (assuming your webmail also doesn't hide messages marked deleted). The folder will only be expunged under a certain conditions:
- If you restart tb and then select the folder (with "condstore" not enabled [default]:
mail.server.default.use_condstore = false
). - With tb running and the imap connection to the folder times out. When you access that folder and it re-connects, it will be expunged.
- When a few other conditions apply as shown here: https://searchfox.org/comm-central/rev/6e383056888c2a03dedf63de8f60e14ece374247/mailnews/imap/src/nsImapProtocol.cpp#4224
If so, this could explain why I did not notice marked as deleted. And I could live with it
Possibly, but not sure when you "did not notice marked as deleted".
Reporter | ||
Comment 8•2 years ago
|
||
After doing some test, i would say it works as designed (WorksForMe).
The confusion was partially because GMX webmail and App do not differentiate between "normal" messages and messages marked as deleted. They all look the same - no option to configure.
Comment 9•2 years ago
|
||
(In reply to Helmut Leininger from comment #8)
After doing some test, i would say it works as designed (WorksForMe).
The confusion was partially because GMX webmail and App do not differentiate between "normal" messages and messages marked as deleted. They all look the same - no option to configure.
Yes, I guess some webmails and phone apps ignore the "deleted" flag on messages and keep showing them as visible messages. I'll go ahead and close this as INVALID.
Description
•