Thunderbird "loses"/corrupts email messages when downloading from the mail server to a local folder
Categories
(MailNews Core :: Backend, defect)
Tracking
(Not tracked)
People
(Reporter: paul.barlow, Unassigned)
References
Details
(Keywords: dataloss, steps-wanted, Whiteboard: [needs reproducible steps][testcases: comment 35, comment 38, comment 84][tools: comment 52])
Attachments
(1 file)
15.85 KB,
text/x-log
|
Details |
Reporter | ||
Updated•17 years ago
|
Reporter | ||
Comment 1•17 years ago
|
||
Comment 2•17 years ago
|
||
Reporter | ||
Comment 3•17 years ago
|
||
Comment 4•17 years ago
|
||
Reporter | ||
Comment 5•17 years ago
|
||
Comment 6•17 years ago
|
||
Reporter | ||
Comment 7•17 years ago
|
||
Reporter | ||
Comment 8•17 years ago
|
||
Reporter | ||
Comment 9•17 years ago
|
||
Comment 10•17 years ago
|
||
Reporter | ||
Comment 11•17 years ago
|
||
Comment 12•17 years ago
|
||
Reporter | ||
Comment 13•17 years ago
|
||
Reporter | ||
Comment 14•17 years ago
|
||
Comment 15•17 years ago
|
||
Reporter | ||
Comment 16•17 years ago
|
||
Updated•16 years ago
|
Comment 18•16 years ago
|
||
Comment 19•15 years ago
|
||
Comment 20•15 years ago
|
||
Comment 21•15 years ago
|
||
Comment 22•15 years ago
|
||
Comment 23•15 years ago
|
||
Comment 24•15 years ago
|
||
Comment 25•14 years ago
|
||
Comment 26•14 years ago
|
||
Reporter | ||
Comment 27•14 years ago
|
||
Comment 28•14 years ago
|
||
Reporter | ||
Comment 29•14 years ago
|
||
Reporter | ||
Comment 30•14 years ago
|
||
Comment 31•14 years ago
|
||
Comment 32•14 years ago
|
||
Comment 33•13 years ago
|
||
Reporter | ||
Comment 34•13 years ago
|
||
Comment 35•13 years ago
|
||
Updated•13 years ago
|
Comment 36•13 years ago
|
||
Comment 37•13 years ago
|
||
Comment 38•13 years ago
|
||
Comment 39•13 years ago
|
||
Comment 40•13 years ago
|
||
Comment 41•13 years ago
|
||
Comment 42•13 years ago
|
||
Comment 43•13 years ago
|
||
Comment 44•12 years ago
|
||
Comment 45•12 years ago
|
||
Comment 46•12 years ago
|
||
Comment 47•12 years ago
|
||
Comment 48•12 years ago
|
||
Comment 49•12 years ago
|
||
Comment 50•12 years ago
|
||
Comment 51•12 years ago
|
||
Comment 52•12 years ago
|
||
Comment 53•12 years ago
|
||
Comment 54•12 years ago
|
||
Comment 55•12 years ago
|
||
Comment 56•12 years ago
|
||
Comment 57•12 years ago
|
||
Comment 58•12 years ago
|
||
Comment 59•12 years ago
|
||
Comment 60•11 years ago
|
||
Comment 61•11 years ago
|
||
Comment 62•11 years ago
|
||
Comment 63•11 years ago
|
||
Comment 64•11 years ago
|
||
Comment 65•11 years ago
|
||
Comment 66•11 years ago
|
||
Comment 67•11 years ago
|
||
Comment 68•11 years ago
|
||
Comment 69•11 years ago
|
||
Comment 70•11 years ago
|
||
Comment 71•11 years ago
|
||
Comment 72•11 years ago
|
||
Comment 73•11 years ago
|
||
Comment 74•11 years ago
|
||
Comment 75•11 years ago
|
||
Comment 76•11 years ago
|
||
Comment 77•11 years ago
|
||
Comment 78•11 years ago
|
||
Comment 79•11 years ago
|
||
Comment 80•11 years ago
|
||
Comment 81•11 years ago
|
||
Comment 82•11 years ago
|
||
Comment 83•11 years ago
|
||
Comment 84•11 years ago
|
||
Comment 85•11 years ago
|
||
Comment 86•11 years ago
|
||
Comment 87•11 years ago
|
||
Comment 88•11 years ago
|
||
Comment 89•11 years ago
|
||
Comment 90•10 years ago
|
||
Comment 91•10 years ago
|
||
Comment 92•10 years ago
|
||
Comment 93•10 years ago
|
||
Comment 94•10 years ago
|
||
Comment 95•10 years ago
|
||
Comment 96•10 years ago
|
||
Comment 97•10 years ago
|
||
Comment 98•10 years ago
|
||
Comment 99•10 years ago
|
||
Comment 100•10 years ago
|
||
Comment 101•10 years ago
|
||
Comment 102•10 years ago
|
||
Comment 103•10 years ago
|
||
Comment 104•10 years ago
|
||
Comment 105•10 years ago
|
||
Comment 106•10 years ago
|
||
Comment 107•10 years ago
|
||
Comment 108•10 years ago
|
||
Comment 109•10 years ago
|
||
Comment 110•10 years ago
|
||
Comment 111•10 years ago
|
||
Comment 112•10 years ago
|
||
Comment 113•10 years ago
|
||
Comment 114•10 years ago
|
||
Comment 115•10 years ago
|
||
Comment 116•10 years ago
|
||
Comment 117•10 years ago
|
||
Comment 119•10 years ago
|
||
Comment 120•10 years ago
|
||
Comment 121•10 years ago
|
||
Comment 122•10 years ago
|
||
Comment 123•10 years ago
|
||
Comment 124•10 years ago
|
||
Comment 125•10 years ago
|
||
Comment 126•10 years ago
|
||
Comment 127•9 years ago
|
||
Comment 128•9 years ago
|
||
Comment 129•9 years ago
|
||
Comment 130•9 years ago
|
||
Comment 131•9 years ago
|
||
Comment 132•9 years ago
|
||
Comment 133•9 years ago
|
||
Comment 134•9 years ago
|
||
Comment 135•9 years ago
|
||
Comment 136•9 years ago
|
||
Comment 137•9 years ago
|
||
Comment 138•9 years ago
|
||
Comment 139•9 years ago
|
||
Comment 140•9 years ago
|
||
Comment 141•9 years ago
|
||
Comment 142•9 years ago
|
||
Comment 143•9 years ago
|
||
Comment 144•9 years ago
|
||
Comment 145•8 years ago
|
||
Comment 147•8 years ago
|
||
Comment 148•8 years ago
|
||
Comment 149•8 years ago
|
||
Comment 150•8 years ago
|
||
Comment 151•8 years ago
|
||
Comment 152•8 years ago
|
||
Comment 153•8 years ago
|
||
Comment 154•8 years ago
|
||
Comment 155•8 years ago
|
||
Comment 156•8 years ago
|
||
Comment 157•7 years ago
|
||
Comment 158•7 years ago
|
||
Comment 159•7 years ago
|
||
Comment 160•7 years ago
|
||
Comment 161•7 years ago
|
||
Comment 162•7 years ago
|
||
Comment 163•7 years ago
|
||
Comment 164•7 years ago
|
||
Comment 165•7 years ago
|
||
Comment 166•7 years ago
|
||
Comment 167•7 years ago
|
||
Comment 168•7 years ago
|
||
Comment 169•7 years ago
|
||
Comment hidden (admin-reviewed) |
Comment 171•7 years ago
|
||
Comment 172•7 years ago
|
||
Comment 173•6 years ago
|
||
It happen to me with version 60.4.0 a month ago but I have only noticed it now.
I do remember now that also with earlier versions I saw such "subject-less" e-mails but just thought it were phantom blank messages and deleted them.
Now I see that I miss two months worth of work e-mails and found this bug report.
I do not use Move or drag and drop, but what I use is "archive" which is "move" essentially I suppose.
I have IMAP inbox that can fit around 6 months of e-mail and every few months I pick few months of e-mails from Inbox and "archive" them to a local folder. I never delete things from this local folder or run any filters on it.
I do have filters on my Inbox though.
I keep my local folder file in Dropbox, but I always close Dropbox during the move process so it does not mess with the file. Inspecting the Dropbox file version history did not help since a 30 days old copy is the same as the current one.
I have the blank mails now in trash. Not sure if local file has the data that could be retrieved.
Date is same on this blank messages but statuses are different (some are starred, some replied, some forwarded) and seem as they correspond to the original messages that were supposed to be moved.
Guess I'll have to change my "archive" behavior.
Comment 174•6 years ago
|
||
Just a quick follow-up for anyone discovering this...
I'm still using "Copy To" to get mail from the server to my local folder and haven't had any issues.
Basically, I created a local "INBOX" folder---so when I check my email, I highlight all of it and "Copy To" my local "INBOX" folder. This seems to work because rather than "Moving" the file, since it's "Copying", the original email is not deleted from the server after the process.
Once I'm done with a particular email (that's now in my Local "INBOX" folder), I then "Archive" it---which, since it's just moving from one local folder to another local folder, appears to workaround whatever causes the bug.
Hope this helps anyone---it may seem like an unnecessary extra step, but I'd rather that than lose email. Plus, I've been in the habit of copy/paste (rather than cut/paste) for many years, with regards to moving files around in general, for similar reasons. I've seen firsthand files cut/pasted that disappeared instead of pasting (which a quick CMD+Z or CTRL+Z saved the day), so now I only copy/paste (with the exception of moving text around in an editor, which I'll sometimes cut/paste if it's not something I'm incredibly concerned about losing if I mess up somehow).
If you're reading this, I'm sorry for your loss. :(
Comment 175•6 years ago
|
||
I have experienced something similar with empty messages before, but just now I had an incident which might give some directions into what is happening:
- My setup: IMAP folder that downloads messages, and I have some filters configured to automatically delete specific emails. (no copy'ing to local folders though)
- I just did some housekeeping: deleting & archiving (thus moving) various messages.
- I opened a 6MB text attachment of another email I had. When examining this attachment (a log file), it turned out that at the bottom, some of the messages I had moved/deleted had become part of the attachment! Headers, html, text, even the attachments of those mails had become part of that single attachment.
- it seems like a line ending issue: the last log line now ends with an email header, so it looks like:
[final line of log file] From - Fri Aug 9 10:32:56 2019
- it seems like a line ending issue: the last log line now ends with an email header, so it looks like:
- Strangely enough, if I download the same attachment a second time it is alright!
- it turns out the corrupted file didn't contain the full logs.
- the corrupt file is 6.8MB, while the uncorrupted attachment is 6.4MB - which is also what Thunderbird reports as the attachment size.
I am happy to share the log file if needed, but as you might imagine there is some personal data in there so I will not just attach it.
Comment 176•6 years ago
|
||
Forgot to add: I'm using Thunderbird 60.7.2 on Debian (testing).
Comment 177•5 years ago
|
||
Not sure but this might be a duplicate of and fixed by Bug 505456. This fix should be in tb 78 I think.
Comment 178•5 years ago
|
||
Only if it deletes before it downloads, which would be another bug anyway.
Comment 179•5 years ago
|
||
The fix in Bug 505456 avoids downloads from the server at all when doing copies or moves to Local Folders, provided you have the source folder set to the default of all messages stored locally. In any case I would recommend doing only copies and not moves especially if it involves lots of important messages. See detailed discussions in bug 1566717 regarding the issue.
The problem fixed was that copies to local folders always went to the server to obtain the data. With lots of message being fetched, occasionally a network error occurs that stops the transfer. This resulted in a 0.2KB sized essentially blank message being placed in the destination Local Folder and tb thought the transfer was successful so, for moves, the source message got marked deleted. This bug still exists but now won't occur if just copies and not moves are attempted.
A more general bug that covers all move/copies also still exists: bug 538375
Comment 180•10 months ago
|
||
Uh, oh, ran into yet another issue so old, it's unlikely to get treatment for it any soon.
I can confirm this bug is still alive and well, and while apparently most messages focus on bulk operations, that's definitely not a requirement.
All I wanted is a notification filter to cut down on the spam, letting me read low priority mostly notification messages on demand instead of getting interrupted on arrival. Given the history of Thunderbird not including such often demanded functionalities but regularly breaking addons providing them, figured I'd cook up something with message filters.
Copying to a local folder and deleting (move is magically not the same as copy+delete on Gmail) was apparently not the right answer, as aside from message filters not providing adequate conditions to filter everything, ended up with this mail after just a few days of usage with less than 20 mails after the initial filter run:
X-Mozilla-Status: 0011
X-Mozilla-Status2: 00000000
X-Mozilla-Keys:
Comment 181•10 months ago
|
||
Pedro,
According to comment 177, if you have emails in the source folder using offline store, you should be able to reliably move messages from source folder to a Local Folder. Are you using offline storage?
(move is magically not the same as copy+delete on Gmail)
Not sure what this means. When you move or copy and email from a gmail folder/label to Local Folders, this doesn't use and imap copy or move at all. If you have offline store, the message is read from offline store and appended to the destination local folder without involving gmail (other than to mark the message deleted on the server if doing move).
Comment 182•10 months ago
|
||
According to comment 177, if you have emails in the source folder using offline store, you should be able to reliably move messages from source folder to a Local Folder. Are you using offline storage?
Wondered a bit about that, and I remembered seeing offline use mentions in the past, but File -> Offline -> Offline Settings just lead to Local Folder Disk Space settings, so felt like it was only a leftover.
However the "Select this folder for offline use" option described in comment 77 is enabled (by default I assume) not just on the affected source folder, but generally everywhere.
(move is magically not the same as copy+delete on Gmail)
Not sure what this means. When you move or copy and email from a gmail folder/label to Local Folders, this doesn't use and imap copy or move at all. If you have offline store, the message is read from offline store and appended to the destination local folder without involving gmail (other than to mark the message deleted on the server if doing move).
If for some odd reason move is expected to work here but copy isn't, then I guess it's an important quirk, but generally shouldn't matter, describing the problem anyway:
At one point I discovered that on Gmail the Thunderbird move operation doesn't actually mean copy+delete, but it does archiving which was a really unfortunate problem as "deleted" emails didn't just still hang in All Mail, they got mixed up with intentionally archived emails with no distinction, so it was quite time consuming to go over all of them manually to deal with the mess.
Couldn't even use just Thunderbird to untangle the mess because the way archiving works on Gmail, the mail just disappears from Inbox but stays around in All Mail, and couldn't filter based on that logic with Thunderbird.
Suspecting that Google is at fault with the silly behavior, but end result is that I just can't use the move operation when I actually want to move, I need to do copy+delete in such cases at least on Gmail accounts.
Comment 183•10 months ago
|
||
However the "Select this folder for offline use" option described in comment 77 (actually comment 177) is enabled (by default I assume) not just on the affected source folder, but generally everywhere.
Yes, if you use default settings, full message offline storage (not just header storage) is used for all folders (not sure, maybe except for Trash and Junk).
At one point I discovered that on Gmail the Thunderbird move operation doesn't actually mean copy+delete, but it does archiving which was a really unfortunate problem as "deleted" emails didn't just still hang in All Mail, they got mixed up with intentionally archived emails with no distinction, so it was quite time consuming to go over all of them manually to deal with the mess.
Couldn't even use just Thunderbird to untangle the mess because the way archiving works on Gmail, the mail just disappears from Inbox but stays around in All Mail, and couldn't filter based on that logic with Thunderbird.
Suspecting that Google is at fault with the silly behavior, but end result is that I just can't use the move operation when I actually want to move, I need to do copy+delete in such cases at least on Gmail accounts.
I'm working a fix for these kind of gmail issues. Not sure it covers your problems described, but I think it mostly does. Re: bug 399475.
Comment 184•10 months ago
|
||
(In reply to gene smith from comment #183)
Yes, if you use default settings, full message offline storage (not just header storage) is used for all folders (not sure, maybe except for Trash and Junk).
Seems to be the case, you even remembered the exceptions well.
Problem is that this means my configuration is not the problem then, however apparently I'll be able to reproduce the issue rather easily, just depending a bit on the traffic. Just remembered to check the new folder, and it already has multiple completely empty mails.
Now assuming I'm not just hitting bug 538375 as I'm not doing bulk mail moving and it would be incredibly odd to hit TCP timeout this often with moving just small mails on arrival, would it be helpful to gather information? Would MOZ_LOG=IMAP:4,timestamp
cover needs for that?
(In reply to gene smith from comment #183)
I'm working a fix for these kind of gmail issues. Not sure it covers your problems described, but I think it mostly does. Re: bug 399475.
IMAP terminology already tripped me up a bit when I looked into the matter a while ago, and I'm still not well-versed with it, but the more recent messages seem to describe familiar issues. Thanks for the heads up, stashing it for later.
Mostly just wanted to make sure that my copy+delete approach isn't what's making the difference here compared to possibly others not experiencing it anymore with move.
Comment 185•10 months ago
|
||
Mangled the log quite a bit, but I believe there's plenty of info to use, at least I believe I can see the high level overview of the problem.
Apparently when more than a single email arrives when checking for mails, the order of operations gets silly:
- Email A header is fetched
- Email B header is fetched
- Email A body gets fetched
- Email A and B gets effectively deleted
- Email B body gets fetched
Aside from the obvious logical problem, I'm mildly amused by the "OK Success" response to the last fetch after not sending any content because the email doesn't exist (outside of Trash at least, so it's not completely gone).
Comment 186•10 months ago
•
|
||
Thanks for the log. However, I don't know what you were doing that triggered this.
It looks like tb checked for new message (sent DONE to server to exit IDLE (*)) and two messages, A and B, were detected. As you point out, header A and B are fetched. Then header A body is fetched and then both are imap MOVEd to Trash. Do you know why they are moved to Trash? Maybe they are spam or a normal filter is doing this?
Then body B gets fetched but it is already expunged and gmail says OK Success when nothing is fetched. Technically that's not an error as you can see by the 2nd (middle) paragraph here: https://datatracker.ietf.org/doc/html/rfc3501#section-6.4.8. However, it does give the impression that the front end doesn't know what the back end is doing.
Anyhow, please explain how this illustrates how moving gmail messages to Local Folders has a problem.
(*) An unrelated issue, but it also looks like you are not getting instant notification of new mail from gmail as pointed out by this issue: https://issuetracker.google.com/issues/369861263
Comment 187•10 months ago
|
||
It seems to be rather easy to trigger, at least I keep on getting it consistently for emails arriving in the same "batch".
Trashing is expected as my filter does the earlier mentioned Copy+Delete instead of a Move, because that's the closest I can get to logically moving emails without them lingering forever on the server. This way they get moved to Trash on the server, lingering for 30 days (at least on Gmail) which I'm okay with, better than forever.
Suspected that the empty message may not be a specification violation, I just found it amusing in a "successfully failed" kind of way.
Moving is a bit subjective here as I'll consider Copy+Delete doing that, but given that there's no spam filtering involved, and I can reliable keep on reproducing the second or sometimes even the third (I guess all but the first) mail disappearing with my filter, I'm not sure what else could be explained. Could show the exact filter but only the Copy (to local folder)+Delete part is what matters, could attempt to reproduce completely manually by sending 2 emails quick from another address to have clear reproducer instructions but maybe it's even easier to use another Thunderbird instance and just add multiple new emails into the Inbox.
There may be actually a bit more work to do, because I already have one completely blank (no subject, no sender) email just showing 1970-01-01 as a date, suggesting that even the header was lost, not just the body.
That linked Gmail bug is actually quite relevant, as the bug I'm encountering highly likely gets exposed due to batched email processing. If I'd get mails instantly, then the chance of processing multiple emails at the same time would go down quite a bit.
Guess I can replace the Copy+Delete filter with a Move one for some more information. The affected account shouldn't be hard to clean up, but even if that one behaves, it's not what I'd normally use (the info in bug 399475 may change that), and the Copy+Delete corruption would be still in need of fixing.
Comment 188•10 months ago
•
|
||
Ok, I see the problem too. I make a filter on gmail account to
- Copy matching message to Local Folders/test
- Star the message (just to adds some timing delay)
- Delete the message
Then I copy 2 messages from another account to gmail Inbox and let biff happen every 3 minutes. The IMAP:4 log shows 2 messages detected and headers are fetched and one message body fetched. I also see the empty fetch like you see. When I look at LF/test, I see my two messages but the 2nd one is blank but the 1st one is OK (the 1st one is starred and 2nd one isn't)
I look in gmail Trash and both messages are there and perfectly OK and starred.
So the fetch for the 1st message obtains data that is copied to LF. Then the move (of both messages) to Trash occurs which expunges the messages from Inbox at the server. Then the 2nd message is fetched which is now expunged and the "empty" message is copied to LF.
There is definitely a timing or "order of operation" problem here that is blanking the 2nd message before it is "streamed" to LF/test.
Comment 189•10 months ago
|
||
What happens with three messages or four? That might establish whether it's an order problem or a counting problem.
Comment 190•10 months ago
|
||
(In reply to K.J. Petrie from comment #189)
What happens with three messages or four? That might establish whether it's an order problem or a counting problem.
I will try it with more than 2. But there is at least one other bug where "order" of multiple filter actions matter.
Wayne, Do you recall that/those bugs?
Comment 191•10 months ago
|
||
The code is at https://searchfox.org/comm-central/source/mailnews/search/src/nsMsgFilter.cpp#221
One of these?
- Bug 931303 - message filter failed writing to folder (If "outdated msf condition" exists in "filter move target", and if the filter is "before Classification", filter move shows error message after fix of bug 782738, and skips "Move")
- Bug 419368 - Filter actions after copy to folder applied to copies as well as originals
- Bug 383792 - Message Filters that forward and then delete a message fail to forward.
Using a bug query like https://mzl.la/3N9oDIr
Comment 192•10 months ago
|
||
Wayne, didn't expect you to do a detail search, but thanks! Anyhow, here's the bug I was thinking of: bug 1781792.
Comment 193•10 months ago
|
||
Pedro, Please see if this filter sequence works for you:
- Copy matching message to Local Folders/<folder name>
- Copy the matching message to Trash
This works for me with more than 1 message in the "batch". Step 2 is the main difference from what I did in comment 188 -- Copy to Trash instead of "Delete" the message. (Ignore the setting "Star".)
For gmail, imap MOVE and COPY seem to have the same effect, at least when the destination is [Gmail]/Trash. Gmail auto-expunges the message from the source folder after a COPY.
I don't yet know why, but when Copy to Trash is done in the last step, the TB doesn't try to do a "batch" move to Trash of all the messages but does them one at a time, so I see:
Fetch the headers for all new messages (this is batched).
Fetch and then copy 1st message to LF
Copy 1st message to Trash (gmail expunges it from Inbox)
Fetch and then copy 2nd message to LF
Copy 2nd message to Trash (gmail expunges it from Inbox)
:
Fetch and then copy the last message to LF
Copy last message to Trash (gmail expunges it from Inbox)
Finally I see an attempt to set each of the new messages in Inbox (all now expunged) with the flag "Not Junk" which gets just an OK response.
All the message are now in LF and not corrupted. The message are also in [Gmail]/Trash. None of the new messages are now in [Gmail]/All Mail.
Comment 194•10 months ago
|
||
Copy seems to be the key here as one possible workaround.
Copy to trash on Gmail effectively being a move operation is an interesting quirk, and apparently it works the other way too. Also noticed that Thunderbird seems to have no expectations regarding the outcome of such operations, updating mails from the server as it just forgot about copying mails.
Exploiting that oddity, I found a faster way to reproduce issues by copying from Trash to Inbox which is treated as if the recently filtered messages just freshly arrived again.
The reason why Copy seems to work is the lack of coalescing which is done for onlinemove, but not for onlinecopy, so Move to Trash gets a coalesced onlinemove operation which makes mails disappear before they are all properly processed, while Copy to Trash queues onlinecopy operations one by one.
Not sure about IMAP ordering guarantees, but generally it feels like this just happens to work because commands are processed in order without any kind of dependency management actually ensuring that mails don't actually disappear.
https://datatracker.ietf.org/doc/html/rfc3501#section-5.5 considers parallel "COPY + COPY" invalid (isn't "UID COPY" different though?), so maybe the reordering concern is only theoretical.
But the reason why coalescing seem to be causing trouble is because apparently there's nothing taking care of fetching the messages in time.
Based on filter log messages, nsImapMailFolder::ApplyFilterHit was the function of interest, but couldn't really figure out where copyService->CopyMessages leads, so felt things up in the dark, and assumed that nsImapMailFolder::CopyMessages would be my target. Within that, nsImapMailFolder::CopyMessagesWithStream seems to only take care of the first mail, likely leading to ImapMessageService's copyMessage issuing a single fetch for the currently processed (the first) message, and I guess there's an asynchronous suspend at this point allowing the destructive coalesced move to be processed before the other fetches even get into the queue.
Quite ironically something issues a coalesced fetch operation too at some point, just way too late. Would still feel a bit fragile, but if CopyMessages would start with this coalesced fetch (or it would queue up all fetches during initialization), then assuming no parallel command execution issues, all mails should be fetched before they get deleted/moved.
Comment 195•9 months ago
•
|
||
I'll admit that I have tried to avoid the filter code over the years and don't really understand it. Also, don't think it's been touched (other than re-formatting and array and loop modernization) since I've been working on TB since about 2017. But I have found another workaround. Instead of doing a 2 step filter, use two single-step filters that run sequentially:
Filter 1:
Apply when manually run and getting new mail with "Filter before junk classification"
(Make sure junk classification is enabled for account in Junk settings.)
Rule: Copy message to Local Folder
Filter 2:
Apply when manually run and getting new mail with "Filter after junk classification"
Rule: Delete message OR Move message to Trash, either will work {*}.
This should also work for non-gmail servers that don't do the same thing for copy and move to Trash. However, it does require that junk classification be enabled which I typically turn off. Also, not sure why classification has to be "before" in Filter 1; but, if not, the problem still occurs, i.e., all but 1st message is expunged before they are copied to LF.
Unless someone can find a fix for this, I think the filter dialog should show a warning that if "Move" or "Delete" is used in a filter, there may be problems. So user needs to test the filter with "throw away test messages" before relying on it.
Finally, this issue should be written up as a new bug since it is not really the same thing as was described in this bug report at comment 0 which didn't really involve filters.
{*} Edit: If "Delete message" is used, the messages are moved to Trash but when Trash is imap SELECTed, the filter actually marks each message in Trash as \deleted. Gmail doesn't auto-expunged messaged marked as deleted in Trash so the messages are still there but hidden, so you still need to "compact" or empty trash to get rid of them. If "Move message to Trash" is used, the messages are just moved to Trash and not marked deleted and remain visible in Trash (and, in both cases, are also gone from All Mail).
Note: Wouldn't expect the 2nd filter to run on Trash when it is selected, but it does. I thought the filter would only run when new messages arrive at Inbox. But if set to "Move message to Trash" the filter does nothing, unlike if set to "Delete message".
Comment 196•9 months ago
|
||
Decided to ride on the back on this issue because the fundamental problem is the same, even if mine can get a filter-specific fix.
Haven't tried the bug starter issue, but I wouldn't be surprised if that would have the same coalesced move problem.
Will try the 2 filter workaround. The currently set COPY+COPY is working, but due to the delayed copy to Trash, it doesn't inhibit notifications, and I expect the 2 filter setup to behave essentially the same.
I still believe that issuing a coalesced fetch query early would deal with it without the complacency of just putting out a warning message, but of course that's just guessing. Contemplating looking into later, but last time I setup a build environment for Firefox it took quite some time and I expect Thunderbird to be similar, and I'm not particularly fond of the messaging interface being involved as that uses a whole lot of auto-generated black magic I'm not familiar with.
Was about to write up a new bug report, but as I was going through the process, I realized it wasn't the right option. While it doesn't contain enough information to make sure it's an exact match, I seem to have a case of bug 1781792 .
Seeing the bug severity discussion there though, I'm wondering:
- What's the appropriate severity for this? If severity description is supposed to be understood as "may impact more than 25% of users OR causes data loss", then it's S1.
- Is the "critical" severity here a leftover from the past? Wondering if that affects proper prioritization.
My filter is set to run on Inbox only, so it shouldn't mess with Trash.
Aside from that, I haven some archiving filters which seem to behave okay (assuming mails are downloaded in time), and mails from the Trash disappear with those.
Description
•