Closed Bug 382836 Opened 17 years ago Closed 17 years ago

Filtering IMAP to Local Folders corrupts mail folder

Categories

(SeaMonkey :: MailNews: Message Display, defect)

x86
Windows XP
defect
Not set
critical

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: base12, Unassigned)

Details

Attachments

(1 file)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a5pre) Gecko/20070601 SeaMonkey/2.0a1pre
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a5pre) Gecko/20070601 SeaMonkey/2.0a1pre

I've noticed getting alerts that new messages have arrived in Local Folders. Upon opening a folder, I see no new message. I now see that new messages are getting appended to previous nessages, so they don't show up in the message list. If I open the MBOX file, I can see all the new messages, which are all lacking the lines

From - Day Date Time
X-Mozilla-Status: NNNN
X-Mozilla-Status2: NNNNNNNN


Reproducible: Sometimes

Steps to Reproduce:
1.Set up filters on IMAP folders to have some messages filtered to Local Folders
2.As new messages arrive and are filtered to local folders, see whether new messages actually appear in the message list
3.
Actual Results:  
For several folders, the new messages get appended to the previous message. This seems to be due tot he fact that the new messages, when stored in the MBOX file, do not get 

From - Day Date Time
X-Mozilla-Status: NNNN
X-Mozilla-Status2: NNNNNNNN

prepended to the header. This seems to result in SeaMonkey no being able to index them and consider them as part of the previous message.

Expected Results:  
New messages filtered into a Local Folder should appear as separate messages.

I'll see if I can find more of a pattern and report back.
X-Mozilla-Status:/X-Mozilla-Status2: are written during "compact folder" if they are not exist (see my Bug 377986 Comment #3). 
(Q1) What will happen when "compact folder" is executed?
     Note: "Move a mail to other folder, then move back again" is required
           to force compacting action. 

When "offline use" is set for the IMAP folder, phenomenon of Bug 381472 Comment #0 will probably occur instead of your problem.
(Q2) Is "offline use" set in your case?

(Q3) Does "no From -/X-Mozilla-Status:/X-Mozilla-Status2:" in mail folder file occur when manual move(or copy) of a mail from IMAP folder to local mail folder?
Here's some additional information. As I look at the MBOX files, I see that the problem started shortly after I downloaded and installed the May 29 nightly trunk build of SeaMonkey 1.5a. I didn't switch over to SuiteRunner until May 31, but I didn't notice the problem with the mail folders until today, June 1.

Beginning May 29, I noticed that some Local Folders appeared to be getting IMAP mail filtered into them. I couldn't actually see the new messages when I opened the folders. I tried <right click> | Properties | General Information | Rebuild Summary File, but I'd keep getting a message that the folder was in use. I think, but I'm not positive, that I'd get the same message when I'd try to compact the folder.

I'm in the process of manually editing the corrupted MBOX files to add the "From - " line to the beginning of each message that lacks it, which seems to be working to get the messages to show up in the list pane and I can select them so that I can read them in the preview pane.

I'm not seeing any new messages getting filtered to Local Folders that lack the "From -" but this has been a slow e-mail day. I'll watch SuiteRunner closely to see if I notice this behavior again, but at this point I really think the problem was with SM 1.5a on the May 29 and 30 nightly builds.

Sorry for jumping the gun on this. I'll add another comment in a few days if it looks like there's no continuing problem.
Andy: When was your last update before May 29 ?
I encounter comparable problems (missing From - lines) since
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a5pre) Gecko/20070522 SeaMonkey/1.5a
These occur when I move several mails via context menu (right click) from my IMAP inbox to a local folder.
They occur also after disabling all my filters (including junk controls). 
They do not occur when I move single mails from Inbox to local.
And they do not occur when I move several mails from Inbox to a Inbox subfolder
or between different local folders.
I'm not working with "offline use".
(My greyed out problems for move and delete until Gecko/20070521 see Bug 380740)
I've attached a portion of one of my MBOX files for a Local Folder. This portion contains e-mails received on the morning of June 5. All of these e-mails were moved from my IMAP inbox to a local folder using a filter that moved them automatically as they were received.
@Wolfgang -- I updated on May 25, but only used that nightly for a few hours. I also updated on May 24 and May 22. It's possible that there were problems before my May 29 update, but I didn't notice if there were. In fact, I didn't realize what was happening until I had switched to SuiteRunner on May 31. I noticed some flakey behavior, such as being unable to build a new summary file using the button on the folder properties until after restarting SM. It wasn't until I tried forwarding a message and seeing several other messages appended to it that I realized something was seriously broken. 

I thought maybe the problem was just with SM 1.5a, but I'm continuing to see this problem in SuiteRunner. I'm going to go back through some of my MBOX files to see if there are earlier corrupted messages that I haven't noticed. Maybe I can pinpoint the date this started.

@WADA
(Q1) What will happen when "compact folder" is executed?
I get an alert "Unable to oopen the folder XXXXX becasue it is in use by some other operation. Please wait for the operation to finish and then select the folder again." Same message for attempting to rebuild summary file.

(Q2) Is "offline use" set in your case?
No.

(Q3) Does "no From -/X-Mozilla-Status:/X-Mozilla-Status2:" in mail folder file
occur when manual move(or copy) of a mail from IMAP folder to local mail
folder?
I haven't tried this yet, but I will do and report back.
I've looked back through one of the MBOX files for one of my local folders. The first message that lacks a "From - " arrived at the institutional mail store at Thu, 24 May 2007 14:36:24. Coincidentally, I downloaded and installed the nightly trunk build on May 24 at 2:33 pm. Until that installation, I had used the May 22 nightly trunk build. It looks like the problem could have started with either the May 23 or May 24 nightly trunk build.
I've tried moving some messages from my IMAP Inbox to Local Folders. I find I'm unable to copy nor to move messages from IMAP to Local Folders.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a6pre) Gecko/2007060602 SeaMonkey/2.0a1pre
Searching through other local mail folders, I've found additional e-mail that didn't get "From -", the earliest being from the morning of May 23, when I was still using the trunk nightly of May 22.

Continuing to experiment. I moved two unread messages from my IMAP inbox. They were removed from the Inbox but did not appear in the local folder. Upon opening the file itself, I could see that the two messages had been appended to the file, neither with the "From -". Without closing SeaMonkey, I moved two more unread messages from my IMAP Inbox, but nothing happened. The messages stayed in the Inbox.

The pattern I seem to be seeing is that messages get moved successfully from IMAP Inbox to a local folder, but they lack "From -" causing them to be invisible when the folder is opened. Subsequent messages moved to the folder are not moved at all. If you try to compact the folder or rebuild the summary file, you get an error message that the folder is in use by some other operation.
To ensure "No server side fault", I recommend you to get IMAP protocol log.
  http://kb.mozillazine.org/Session_logging_for_mail/news
  http://www.mozilla.org/quality/mailnews/mail-troubleshoot.html#pop
A person said "log of 400MB per 8 hour with 'imap:5' only" in other bug.
Please be careful if long run with NSPR logging.
I'll try the IMAP protocol log. In the meantime, I've switched back to

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a5pre) Gecko/20070521 SeaMonkey/1.5a

No more e-mail problems.

One other thing I've noticed is when I delete messages from a local folder, I can't seem to empty the local Trash folder. If I restart SeaMonkey, the Trash folder still seems to have trash in it, until I actually click on the folder, after which it appears empty. Perhaps this is related to the problems I'm seeing moving IMAP mail to Local Folders, as the empty trash problem does not occur with the May 21 trunk nightly.
Andy Boze, See Bug 383777 Comment #6. Multiple message copy/move case only?
By the way, big change by Bug 379070 started at end of April, and is still in progress. So I think testing of recent trunk of mailer by daily use, using mail server for daily use, is very dangerous, thrilling though. Good luck.
(In reply to comment #11)
> Andy Boze, See Bug 383777 Comment #6. Multiple message copy/move case only?
> 
Yes, it does appear that I can move one message at a time to local folders. After I attempt to move multiple messages, then I can no longer move even a single message to the local folder until after I restart SeaMonkey.
Fix for Bug 383777 has been landed. Does latest-trunk resolve your problems?
(In reply to comment #14)
> Fix for Bug 383777 has been landed. Does latest-trunk resolve your problems?
> 
Yes, it looks like it does.
Closing as WFM per comment 15, though likely dupe of bug 383777.
Status: UNCONFIRMED → RESOLVED
Closed: 17 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: