Potential data loss when delete/recreate filter destination folder

VERIFIED FIXED in mozilla0.9.1


MailNews Core
17 years ago
10 years ago


(Reporter: laurel, Assigned: Navin Gupta)



Firefox Tracking Flags

(Not tracked)


(Whiteboard: [nsbeta1+])



17 years ago
Using jan29 commercial trunk builds: linux rh6.0 and win98

Seth reported today that he appears to be losing messages which are filtered
from his INBOX to another folder after he'd deleted the filter destination
folder and subsequently recreated it.

I've seen problems with the linux build where newly filtered headers will appear
in the newly created folder, but I can't get the bodies.  Seth reports for both
linux and windows that he sees the new folder's unread count increase but
nothing appears when opening the folder.

Heres one scenario of steps where I get into trouble:
1.  Launch IMAP account, login.
2.  Create a new folder (I created a top level folder, didn't involve subfolders
in this case).
3.  Create a simple filter, specify filter action Move To Folder and select the
newly created folder as the destination for the filter. Confirm OK from filters
4.  Send a message to the IMAP account which will match the filter criteria, get
messages and see that message is indeed filtered and readable.
5.  Select the filter destination folder and Delete Folder, confirm OK if
confirmation dialog appears.
6.  On the IMAP account, create a new/replacement folder for the one you deleted
(same name as deleted one).
7.  Send a message to the IMAP account which will match the filter criteria, get
    Here's where results tend to differ:
    Seth has seen the unread count in the new/replacement filter destination
folder increase, but doesn't see anything when folder is opened.
    I have seen the newly filtered message header appear, but cannot download
the new message's body. I have seen it where the newly filtered message when
selected will show previously filtered message content. 
    If sending another new message to be filtered, sometimes it works, sometimes
it doesn't.

Actual result:  Message potentially lost.

Expected:  Either the message should be filtered and appear properly in
destination folder or stay in Inbox; should not be lost.

Other scenarios:
1.    OK  so far (tried windows): Emptied trash containing old folder before I
created new one. 
2.    OK so far (windows): Exited application after deleting old folder before
creating new one (in next session).
3.    OK so far (windows):  After old folder deleted, sent & got message
matching filter; filter stayed in Inbox and filter disabled due to invalid
4.    Lots of possibilities to try...

I will update this bug with comments as more info found, just wanted to get the
bug report in and the ball rolling.

Comment 1

17 years ago
Oh yeah, related basic bug about no ui handling for deleting/renaming folders
specified in filters is bug 41720.

nomminating this for fix in next release
Keywords: nsbeta1
QA Contact: esther → laurel

Comment 2

17 years ago
marking nsbeta1+ and moving to mozilla0.9.  Let's see if there's a way to make
it so that these filters either don't enable with recreated folders or enable
and work.
Priority: -- → P2
Whiteboard: [nsbeta1+]
Target Milestone: --- → mozilla0.9


17 years ago
Target Milestone: mozilla0.9 → mozilla0.9.1

Comment 3

17 years ago
reassigning to naving since his code handles the cases (renaming/moving/deleting
folders) where this would occur.
Assignee: gayatrib → naving


17 years ago
Depends on: 77232


17 years ago
No longer depends on: 77232


17 years ago
Blocks: 77248

Comment 4

17 years ago
fix checked in. 
Last Resolved: 17 years ago
Resolution: --- → FIXED

Comment 5

17 years ago
Navin, it's great that you've fixed this. Can you please describe the fix? 

Comment 6

17 years ago
The fix was in imapProtocol code. Deleting the folder was using the inbox 
connection to the server instead of using the folder connection; therefore 
it was messing up in getting the flags for that folder. Makes sense; little bit 
complicated because the fix was deep inside imap code. Thanks to bienvenu for 
all the help. 

Comment 7

17 years ago
From the user's perspective, what happens if you delete and then recreate the
filter destination folder? Will the filter not enable when you re-create the
folder, or will the filter still work with the re-created folder? Thanks.

Comment 8

17 years ago
From the user perspective, if you delete and recreate the folder in the 
same session it would filter to the destination folder. The filter will 
still work with recreated folder.

Comment 9

17 years ago
OK using may03 commercial trunk build: linux rh6.2, win98 and mac OS 9.0
Generally okay, tried the steps listed above. Filter stays enabled, it fires,
works with recreated folder. Newly filtered messages appear in destination and
content downloads.  Will be trying other scenarios/steps -- Any other issues
found with rename/delete of filter destination will be logged separately.
Marking this one verified.
Product: MailNews → Core
Product: Core → MailNews Core
You need to log in before you can comment on or make changes to this bug.