Implement move later functionality to prevent conflicts with filter actions needing the body (race condition)
Categories
(MailNews Core :: Filters, defect)
Tracking
(Not tracked)
People
(Reporter: rkent, Unassigned)
References
(Blocks 1 open bug)
Details
(Keywords: dataloss, Whiteboard: [filterfails])
| Reporter | ||
Updated•15 years ago
|
Comment 1•15 years ago
|
||
| Reporter | ||
Comment 2•15 years ago
|
||
| Reporter | ||
Comment 3•15 years ago
|
||
| Reporter | ||
Comment 5•14 years ago
|
||
Updated•11 years ago
|
Comment 6•8 years ago
|
||
Comment 7•3 years ago
•
|
||
It has been demonstrated at https://bugzilla.mozilla.org/show_bug.cgi?id=1781792#c23 that filter actions 1) copy to Imap sub-folder and 2) move to local folder within the same filter leads to dataloss
Problem (Filters with dataloss):
Filter (A) fails with
1. Copy the matching message to Imap Sub-Folder
2. Move the matching message to Local Folder
--> All mails are moved to Local Folder and the body is fine, but only ONE (the first) mail was copied to imap Sub-Folder
Filter (B) fails with
1. Copy the matching message to Local Folder
2. Move the matching message to imap Sub-Folder
--> All mails are copied to Local Folder, but all mails lack body, except first mail. All mails are moved correctly to imap Sub-Folder.
Filter (C) fails with
1. Move the matching message to Local Folder
2. Copy the matching message to imap Sub-Folder
--> All mails are moved to Local Folder and the body is fine, but only ONE (the first) mail was copied to imap Sub-Folder
Solution (Filter without dataloss):
Details are at https://bugzilla.mozilla.org/show_bug.cgi?id=1781792#c25. Use following filter actions in given order:
1. "Move later" the matching message to Imap Sub-Folder
2. Copy the matching message to Local Folder
This solution depends on the Filtaquilla Addon.
Comment 8•1 year ago
|
||
From Thilo's comment 7:
This solution depends on the Filtaquilla Addon.
Yes, installing "filaquilla" and enabling "Move later" action seems to fix the problem described by Thilo above, at least on 128.12esr that I tested. This in spite of the fact that filaquilla help page says:
Filter actions that require the message body do not work correctly when a move is also requested
for the message. Move Later is one solution to this problem, though it currently only works reliable
with the Save Message as File action. So if you use that action combined with a move, try Move Later
instead of the normal move, and the combination should work reliably.
This implies that it might not work reliably if "copy" is the first rule, but it works OK for me and apparently also for commenter Thilo.
I can see the code to do the "move later" in filaquilla's source code file filtaquilla.js. But I don't know how to port that functionality into the main TB filter code. Any advice would be appreciated.
Kent James wrote in comment #3):
Actually perhaps a better idea, and the one that I can make work more
reliably, is to do the move first, and apply the other filters after the
move.I've experimented with this concept with a detach attachments action, which
is really tricky because it changes the message URI. Very difficult with
moveLater, works really well with applying filter after the move.In FiltaQuilla, I have a new "folder name" search term, and in IMAP you have
to enable incoming filters on the destination folder, and setup the complex
filter action (like detachAttachments) to only apply if the folder name
matches. This is way beyond the capabilities of the average user, while
applying the filters after the move in core would be pretty straightforward
to implement.
I'm not sure if this is a better way instead of the "move later". FWIW, it appears that filter rule setup forces "move" rule to be last in an attempt to avoid the problem, but, by itself, doesn't fix the problem (messages will still be deleted or partially deleted while they get copied). So I'm not seeing how forcing moves to be first would help at all -- at least in combination with copy.
Comment 9•2 months ago
|
||
ISTR Ben or Geoff commenting recently in a refactoring bug about the need for a better process.
Comment 10•2 months ago
|
||
(In reply to Wayne Mery (:wsmwk) from comment #9)
ISTR Ben or Geoff commenting recently in a refactoring bug about the need for a better process.
Maybe you are referring to this bug 1781792, not sure. (It's the first bug in the "Blocks" list above.)
Description
•