Last Comment Bug 209501 - Phantom mail from 1/01/1970 11:00 AM or 12/31/1969 keeps reappearing in my inbox, often related to junk or deleting a message
: Phantom mail from 1/01/1970 11:00 AM or 12/31/1969 keeps reappearing in my in...
Status: NEW
[dupetome][gs][status: comment 37][pa...
:
Product: MailNews Core
Classification: Components
Component: Backend (show other bugs)
: Trunk
: x86 All
: -- normal with 25 votes (vote)
: ---
Assigned To: Nobody; OK to take it and work on it
:
Mentors:
https://getsatisfaction.com/mozilla_m...
: 73614 73759 167956 168606 180254 187451 191058 191424 194063 195583 197416 199805 202094 204228 216081 219824 221458 221686 221882 223916 224363 224484 225504 226041 271526 275965 314556 316679 325001 325704 344332 371526 401967 403629 434105 434999 447898 457268 484886 555533 557526 (view as bug list)
Depends on:
Blocks: 444343
  Show dependency treegraph
 
Reported: 2003-06-15 18:51 PDT by email
Modified: 2015-09-25 05:47 PDT (History)
73 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
Problematic Inbox.msf (19.92 KB, application/octet-stream)
2003-09-19 08:27 PDT, Christian Reis
no flags Details
proposed fix (843 bytes, patch)
2003-09-27 12:34 PDT, David :Bienvenu
no flags Details | Diff | Splinter Review
Pihl's problematic msf (2.09 KB, text/plain)
2004-12-21 00:56 PST, Tomas Pihl
no flags Details
Pihl's mailfolder (1.78 KB, text/plain)
2004-12-21 00:58 PST, Tomas Pihl
no flags Details
per comment #146: screenshot showing deleted message with phantom-like date but normal otherwise (650.61 KB, image/jpeg)
2012-07-12 11:49 PDT, Ruth Milner
no flags Details
screen shot showing autoexpired spam in Trash with bogus date displayed (246.99 KB, image/jpeg)
2012-07-14 17:48 PDT, Ruth Milner
no flags Details
Screen shot showing same list of Trash messages but with bogus date fixed in display (241.88 KB, image/jpeg)
2012-07-14 17:54 PDT, Ruth Milner
no flags Details
Per comment 154, recent entries from TB filter log (83.71 KB, text/plain)
2012-07-17 13:25 PDT, Ruth Milner
no flags Details
Per comment #154, recent entries from TB Junk log (10.01 KB, text/plain)
2012-07-17 13:26 PDT, Ruth Milner
no flags Details
Screenshot per comment #168 upload 1: 201409242204_ForBugzilla_JunkNewest_byReceivedOrder.jpg (113.59 KB, image/jpeg)
2014-09-24 23:02 PDT, Ruth Milner
no flags Details
Screenshot per comment #168 item 2: 201409242210_ForBugzilla_JunkWithPhantom.jpg (121.96 KB, image/jpeg)
2014-09-24 23:05 PDT, Ruth Milner
no flags Details
Screenshot per comment #168 item 3: 201409242225_ForBugzilla_TrashWithPhantom.jpg (112.21 KB, image/jpeg)
2014-09-24 23:07 PDT, Ruth Milner
no flags Details
Screenshot per comment #168 item 4: 201409242225_ForBugzilla_JunkSizeAndContents.jpg (57.84 KB, image/jpeg)
2014-09-24 23:08 PDT, Ruth Milner
no flags Details
TB Error Console entries per comment #168 item 5: 201409241025_TBErrorLog.txt (1.98 KB, text/plain)
2014-09-24 23:09 PDT, Ruth Milner
no flags Details
Screenshot per comment #168 item 6: 201409242315_ForBugzilla_TrashWithPhantomOffsetReassigned.jpg (94.97 KB, image/jpeg)
2014-09-24 23:11 PDT, Ruth Milner
no flags Details
Screenshot per comment #168 item 7: 201409241312_ForBugzilla_JunkOldest_byReceivedOrder.jpg (60.01 KB, image/jpeg)
2014-09-24 23:12 PDT, Ruth Milner
no flags Details
Screenshot per comment #181: 201409302118_ForBugzilla_JunkTrashSizeAndContents.jpg (57.67 KB, image/jpeg)
2014-10-01 00:31 PDT, Ruth Milner
no flags Details
Screenshot per comment #181: 201409302118_ForBugzilla_JunkMsfHexdumpTail_BeforeAndAfterPhantom.jpg (108.16 KB, image/jpeg)
2014-10-01 00:32 PDT, Ruth Milner
no flags Details
Screenshot per comment #181: 201409302127_ForBugzilla_TrashDateAndMsfTail.jpg (96.58 KB, image/jpeg)
2014-10-01 00:34 PDT, Ruth Milner
no flags Details

Description email 2003-06-15 18:51:12 PDT
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3.1) Gecko/20030425
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.3.1) Gecko/20030425

Whenever I open my mail there is a message with the date above there. It has no
sender, no subject or body other than the date and time come with the message.
Also if i delete it and go to another account (I have 3 mail accounts on the one
screen) and return to this one it is back there

Reproducible: Always

Steps to Reproduce:
1.Open Mozilla Mail
2.
3.

Actual Results:  
mail from 1970 in inbox

Expected Results:  
no mail from 1970
Comment 1 email 2003-06-15 18:53:41 PDT
I can forward the email but no date is attached to the forward??
Comment 2 Travis Chase 2003-06-15 20:26:45 PDT
Wierd I have never seen anything like that, maybe you should check your system for 
a Virus, or wipe Mozilla clean and try a more up to date nightly
Comment 3 Matthias Versen [:Matti] 2003-06-15 20:49:44 PDT
Reporter:
Do you use Imap or Pop3 ?
Comment 4 Felix Miata 2003-06-15 22:21:05 PDT
Bug 131983 regression?
Comment 5 Christian Reis 2003-09-19 07:56:27 PDT
I've seen this in a Mozilla 1.4 build. I think this is bug 73759 come back to
life, or some tricky msf corruption that is hard to track down.
Comment 6 Christian Reis 2003-09-19 07:59:14 PDT
*** Bug 202094 has been marked as a duplicate of this bug. ***
Comment 7 Christian Reis 2003-09-19 08:00:31 PDT
Bug 202094 has a screenshot of a message displaying the bug, btw.
Comment 8 David :Bienvenu 2003-09-19 08:06:57 PDT
taking this bug.

Reporter, is this IMAP or POP3? If you delete the INBOX.msf file, does the
problem come back?

Comment 9 Christian Reis 2003-09-19 08:23:15 PDT
Bienvenu, I've done some research on bugs similar to this one, reported all the
way back to 2001. As I wrote in bug 73759, I just reproduced this in a Mozilla
1.4 build at a client installation.

There are three bugs waiting to be duped: bug 197416, bug 199805 and bug 216081.
Now, from the previous duplicates reported, I was inclined to say this is bug
73565, and was about to dupe them, but since you've taken this, I'll defer to you.

I think this is probably msf corruption of some sorts. Let me check if my client
had success removing his file.. yes, removing the msf solved it. I'm having him
email his msf, so I can zip and attach it.
Comment 10 Christian Reis 2003-09-19 08:23:50 PDT
He's using POP, btw.
Comment 11 Christian Reis 2003-09-19 08:27:46 PDT
Created attachment 131751 [details]
Problematic Inbox.msf

Here's the msf file.

While we're at it, it might make sense to dupe 73759 to this one too. It was
the first bug I ran into while querying.
Comment 12 David :Bienvenu 2003-09-19 11:43:27 PDT
OK, I poked around the .msf file, and there is a bogus hdr in there.  I'd really
like to know how it got in there, because that's where the bug is. I can try to
figure out how to remove the bogus header automatically, or how to make delete
work on it.
Comment 13 Christian Reis 2003-09-19 12:07:32 PDT
Would getting you the INBOX itself be any help? Apart from that, I can ask if
anything fishy (crashes, weird mailnews behaviour, etc) happened at the client.

I'll go ahead and dupe the other bugs to this here.
Comment 14 Christian Reis 2003-09-19 12:10:10 PDT
*** Bug 197416 has been marked as a duplicate of this bug. ***
Comment 15 Christian Reis 2003-09-19 12:10:33 PDT
*** Bug 199805 has been marked as a duplicate of this bug. ***
Comment 16 Christian Reis 2003-09-19 12:10:51 PDT
*** Bug 216081 has been marked as a duplicate of this bug. ***
Comment 17 Christian Reis 2003-09-19 12:13:47 PDT
*** Bug 73759 has been marked as a duplicate of this bug. ***
Comment 18 David :Bienvenu 2003-09-19 13:48:59 PDT
thx, unless deleting the .msf file and then clicking on the inbox produces the
phantom message again, it's unlikely that the actual INBOX would be helpful. Or,
if perhaps reading one of the messages in the INBOX causes the phantom to
appear, or saving an attachment from one of the messages, then having the INBOX
would be useful.
Comment 19 Christian Reis 2003-09-19 13:55:14 PDT
I'll bother him to try and reproduce again; if it reoccurs, I'll ask for his INBOX.
Comment 20 Miha Psenica 2003-09-20 15:46:05 PDT
Compacting mail folder made the phantom mail to disappear.

Just deleting the message did nothing - or even worse sometimes - it created
another phantom message.
Comment 21 Christian Reis 2003-09-26 11:29:32 PDT
I've sent the user's Inbox and Sent folders to bienvenu; it may be related to
the fact that sending a large message had failed to save the message into the
Sent folder (even after 2h) previous to this, and/or the fact that the user had
multiple Send events occurring simultaneously (because one of them was taking a
long time to complete -- large attachments, probably).
Comment 22 Christian Reis 2003-09-26 11:32:23 PDT
From email from bienvenu:

>    This is really likely to be the problem - it explains all the symptoms -
>    what could have happened is that the second send finished before the first
>    because it was much smaller, and then got a lock on the sent folder at
>    just the wrong time - the first send process tried to get the sent folder
>    and failed, and then did not handle the failure gracefully. I've tried to
>    reproduce this problem w/o success but I'll try some more. Maybe I'll just
>    do it in the debugger.

It could be a timing issue; Windows has a very coarse resolution for 
time() -- 18ms or so, IIRC. It would be much harder to trigger on Linux.

Let me check on the dupes. Heh, guess what? All the dupes are Windows 
2000 and/or Windows NT boxes. Does that make sense?

Comment 23 Chuck Heffner 2003-09-26 12:07:53 PDT
Hi,

I submitted this bug a while back but when it sat for months, I didn't follow up
on it. Sorry.

My PC is Win2K Pro SP2 running an Athlon-B 650mhz. I use POP3 through my domain
at fatchucks.com. I recall getting rid of this annoying bug by shutting down
Mozilla Mail and going into its directory structure and manually deleting (*I
think*) the inbox.msf file. When I restarted MozMail, it automagically recreated
an inbox.msf for me and the bug has never reoccurred.

By the way, should I respond to your e-mails via my e-mail or by coming here and
replying on this page? Unclear about what's best for you.

Peace,
Chuck
Comment 24 Matthias Versen [:Matti] 2003-09-26 12:16:36 PDT
You can't respond via mail and adding a comment in the bug is the best way. 
Comment 25 Christian Reis 2003-09-26 12:41:55 PDT
Chuck: do you recall this happenning after sending two messages simultaneously
(i.e., have two compose windows being sent at the same time), or/and is that a
common usage pattern of yours?

I'm asking because my user appears to have done this when her error appeared.
Comment 26 Chuck Heffner 2003-09-26 13:14:11 PDT
Christian, I recall that specifically *not* happening. I'm totally a
write-n-send kind of e-mailer and don't engage multiple e-mail composition
windows. As best as my memory permits, I had some already-read e-mails in my
inbox and closed the client before heading out. When I got back, the phantom
message was there after I checked my mail and would keep regenerating itself no
matter what I did to delete it. Deleting the inbox.msf file is what finally
buried it. YMMV, sorry. :-)

Chuck
Comment 27 David :Bienvenu 2003-09-27 12:34:55 PDT
Created attachment 132264 [details] [diff] [review]
proposed fix

This patch fixes the delete operation so that it will actually delete the
message. The problem (at least in the attached Inbox.msf") was that the msg hdr
did not have the thread id set correctly (it was 0) so we could not find the
thread it belonged to and remove it from that thread. This fix makes it so we
if the we can't find the thread from the thread key, look for the thread with
the key of message key - this will be the right thread. It doesn't deal with
how the phantom message got there in the first place, but this will at least
allow you to delete it.
Comment 28 David :Bienvenu 2003-09-28 17:33:57 PDT
fix checked in, r/sr=mscott. Now, you should be able to delete the phantom
messages.  I'd still like figure how to prevent them from getting added in the
first place.
Comment 29 Charles Fenwick 2003-10-09 13:19:40 PDT
*** Bug 221686 has been marked as a duplicate of this bug. ***
Comment 30 DJ Feldmeyer 2003-10-09 14:04:59 PDT
I am not able to delete these, still. (I can delete them but the reappear as
soon as I refresh the mailbox.) Is the patch something I must apply separately?
(Using 1.5rc2 here.)

Unlike the comments below about Windows, this is happening to me on Mac OS X and
has been since at least 1.3, I believe.
Comment 31 David :Bienvenu 2003-10-09 14:13:57 PDT
the fix is only in 1.6
Comment 32 Jo Hermans 2003-10-09 15:24:17 PDT
*** Bug 221458 has been marked as a duplicate of this bug. ***
Comment 33 Andreas Schrafl 2003-10-09 15:49:59 PDT
I (or better my mother) got it on an Windows 98 with Mozilla 1.4.
Also I think its not a timing thing since we are on a Lan to our own mailserver
and unless she would send the mails really fast or have a huge attachment (must
be some 100MB atleast and then she would probably wait but I'll ask here on that
tomorrow) it would not trigger the timing thing.
Comment 34 Andreas Schrafl 2003-10-12 14:03:05 PDT
The thing with deleting all the .msf Files worked for me.
Comment 35 Tom Booth 2003-10-24 01:39:40 PDT
i had exactly the same bug - with 0.2 in pop mode. a compact sorted it out 
straight away.
Comment 36 Andreas Schrafl 2003-10-24 01:41:17 PDT
I wrote before that deleting worked for me but it only woked for some days. now
the phantom mail starts reapearing.
Comment 37 David :Bienvenu 2003-10-25 08:40:38 PDT
I believe the delete is working, but new phantom headers are getting added. The
problem is I don't know what's causing the phantom headers to get added.
Comment 38 Christian Reis 2003-10-25 10:52:36 PDT
*** Bug 73614 has been marked as a duplicate of this bug. ***
Comment 39 Christian Reis 2003-10-25 11:10:15 PDT
*** Bug 168606 has been marked as a duplicate of this bug. ***
Comment 40 Christian Reis 2003-10-25 11:10:32 PDT
*** Bug 187451 has been marked as a duplicate of this bug. ***
Comment 41 Christian Reis 2003-10-25 11:10:41 PDT
*** Bug 191058 has been marked as a duplicate of this bug. ***
Comment 42 Christian Reis 2003-10-25 11:10:44 PDT
*** Bug 191424 has been marked as a duplicate of this bug. ***
Comment 43 Christian Reis 2003-10-25 11:10:57 PDT
*** Bug 195583 has been marked as a duplicate of this bug. ***
Comment 44 Aleksey Nogin 2003-10-25 11:14:02 PDT
I see this from time to time on Red Hat Linux. There are two forms of this -
either a phantom message appears and does not go away or a phantom message
appeares and then goes away if I go to another folder and back. In both cases it
was in IMAP and seemed offline-related. The first kind of problems ("permanent"
phantom) would only apper when doing things (e.g. moving messages from folder to
folder, including delete to Trash) offline, but I didn't detect any obvious
pattern. The sacond one ("temporary" phantom) _always_ happens in the following
fashion:

- Move a message from the current folder to another one
- As the message is deleted from the view, a phantom message appears

P.S. I was running 1.4.1 and lower until recently, not sure if this is the same
in recent builds.
Comment 45 Christian Reis 2003-10-25 11:17:50 PDT
*** Bug 194063 has been marked as a duplicate of this bug. ***
Comment 46 Christian Reis 2003-10-25 11:25:05 PDT
In bug 115316 a potential cause is also described, but since none of the
commenters on the bug said the message was unkillable, I tend to think it's not
the same bug as here.

Scavenging mailnews bugs is interesting work.
Comment 47 Aleksey Nogin 2003-10-25 11:26:02 PDT
Forgot to say in comment #44 - the "temporary" phantoms always happen when I am
online (but the folder is selected for offline). I would guess that it could be
caused by biff interacting in a weird way with move.

Here is a possibility (complete guess on my part, without examining the actual
code).

1a) As the message is being moved, it is removed from the local header db
2a) Biff fires and notices a message on IMAP server that is not present in local db
1b) The move comes around to telling IMAP server to move the message away.
2b) When trying to get the header data for the "new" message, biff ends up not
getting anything as the message is no longer there. As a result, a phantom
header is created.

Note that from Mozilla's perspective it is quite possible that the order is
actually 1a-1b-2a-2b, but the server is Couries-IMAP with messages stored in the
maildir format, so the server thread responsible for 2 may read directory
contents before the 1 thread gets around to updating them.
Comment 48 Christian Reis 2003-10-25 11:29:48 PDT
In bug 78785 it's said that view-sourceing an unkillable message would crash the
browser -- if anyone runs into one, it would be nice to give it a try and report
back.

Aleksey, IIRC Bienvenu mentioned a bug related to msf corruption related to
IMAP, and it doesn't seem that this bug is the same, since at least my user uses
only POP3. This bug seems to be (rather loosely) targetted around *unkillable*
bogus messages ;-)
Comment 49 Christian Reis 2003-10-25 11:35:47 PDT
*** Bug 204228 has been marked as a duplicate of this bug. ***
Comment 50 David :Bienvenu 2003-10-25 12:04:27 PDT
Aleksey, an imap protocol log of this happening might be interesting. However,
all operations within a single imap folder happen serially - so if we move a
message, we'll store the deleted flag, and biff won't get to run until that
operation has finished. I would think that would mean that on the server, it's
the same thread handling both operations.
Comment 51 Aleksey Nogin 2003-10-25 13:09:36 PDT
> Aleksey, an imap protocol log of this happening might be interesting.

It's quite rare (may be a few times a week at most), not sure if I can get a
log... I can try, of course.
Comment 52 Patrick 2003-11-01 09:20:14 PST
*** Bug 224363 has been marked as a duplicate of this bug. ***
Comment 53 Patrick 2003-11-01 09:22:23 PST
Added "12/31/1969" as alternative date for these empty messages in the summary.
Comment 54 Malte Rücker (mbr) 2003-11-03 01:27:30 PST
*** Bug 224484 has been marked as a duplicate of this bug. ***
Comment 55 Jason Baker 2003-11-04 07:55:02 PST
Has this issue been solved yet, I have it on two computers at work and would
like to get it fixed.
Comment 56 Charles Fenwick 2003-11-12 17:54:05 PST
*** Bug 225504 has been marked as a duplicate of this bug. ***
Comment 57 Lorrin Nelson 2003-11-24 12:10:21 PST
I have this problem too. When it happens, it is invariably the case that a
message was downloaded from my POP server and subsequently mangled by Mozilla
Mail. I had hoped the messages were just appearing, but I did a packet trace and
confirmed that real messages are getting mangled. I've been using 1.5 since it
was released and didn't have this problem until a few days; now it happens w/
about 2 messages per day.

Here's header from the packet trace of a message that Mozilla picked up from an
Exchange POP3 server and subsequently displayed as 12/31/1969 w/ no sender,
body, subject, or antyhing else. I've blanked out the email addresses by hand.
In the packet trace the line feeds were all \r\n. I sometimes see this on other
mail servers as well and have not been able to pin it to any particular sender
or anything like that. I checked and there's no trace of the message in the
mailbox file. Dunno enough about .msf files to know what to expect in there.

X-MimeOLE: Produced By Microsoft Exchange V6.5.6944.0
Received: by harp.grouplogic.com 
	id <01C3B2C0.64DD9C77@harp.grouplogic.com>; Mon, 24 Nov 2003 14:23:09 -0500
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-class: urn:content-classes:message
Subject: Autoreject on case 11792 pass back to support
Date: Mon, 24 Nov 2003 14:22:25 -0500
Message-ID: <70B9A1F820956748BA12EFD0D9183780106EC0@harp.grouplogic.com>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Autoreject on case 11792 pass back to support
Thread-Index: AcOywEq5yj/wr5C9RFupCbVE/V21kQ==
From: "--- ---" <----@grouplogic.com>
To: "--- ---" <---@grouplogic.com>

This case has been remarked as "Tier 1 - Active Engineering - Dev".
Comment 58 Malte Rücker (mbr) 2003-12-14 12:19:40 PST
*** Bug 221882 has been marked as a duplicate of this bug. ***
Comment 59 Jennifer Fackler 2003-12-14 12:50:28 PST
I deleted my inbox.msf file amd the problem of the phantom 1969 e-mail was
solved. It seems to be working for most everyone.

-Jenn
Comment 60 Patrick 2004-01-03 09:43:30 PST
*** Bug 219824 has been marked as a duplicate of this bug. ***
Comment 61 Peter Smith 2004-01-06 10:53:13 PST
I am currently experiencing this problem.  My setup is as follows.  Incoming
mail goes into an IMAP account on an MS Exchange Server.  I have a local IMAP
server setup using BincIMAP (www.bincimap.org).  The idea is new mail comes in
via Exchange and gets filtered out to permanent storage on my local box.. 
MozillaMail (v1.5) is the filtering method.  However, whenever Mozilla moves
mail from one IMAP store to another, there is a good chance that some of the
messages will turn into blank or empty messages in transit.  I'm using Message
Filters to accomplish this and I'm losing _real_ mail as a result.  I've also
noticed some message loss when moving many messages from one IMAP to another
IMAP (>400 messages at a time.)

Running Redhat Linux v8.0, remote IMAP is MS Exchange via TCPIP, local IMAP is
BincIMAP v1.2.3 for Redhat v8.0 in RPM form.  Mozilla is v1.5 "Mozilla/5.0 (X11;
U; Linux i686; en-US; rv:1.5) Gecko/20031021".

I used to use Courier-IMAP as a local IMAP store with the same results (I
thought it might be the local IMAP implementation that is losing the messages,
but now I think it is Mozilla.)
Comment 62 Skip McWilliams 2004-02-11 14:52:14 PST
I am experiencing this bug.  I am using Moz 1.6 on a home built 
Duron 950 in WinXP Home.
How do I install that patch.  I am unable to locate Inbox.msf
Please let me know how to proceed.  I had this once before and
got rid of it by placing it in the Junk folder then disabling
Junk then deleting the junk folder.  I then re enabled the junk
controls and the message was gone.  This time I have not had that luck.
I can't get it to go away using anything.
Thanks.
Comment 63 James Rome 2004-02-14 17:04:36 PST
I reported this in October in bug 167956 and it still is there.
Comment 64 David :Bienvenu 2004-02-19 17:16:46 PST
Inbox.msf is under your user profile directory, in the server sub-directory
Comment 65 Gerrit Hannaert 2004-03-29 04:57:12 PST
One of our users had this problem too (Mozilla 1.5): IMAP using offline 
folders. Also, multiple identical mail messages were present and the "1970" 
files appear to have been the result of deleting those (if I understood 
correctly). How the duplicates appeared is a mystery to me.

Deleting the .msf file appears to solve the problem. Deleting any remaining 
duplicate mails seems not to trigger new "1970" mails and effectively only 
removes one copy (previously it would appear that all copies were then 
deleted). These may be two intertwined bugs.
Comment 66 Graham Leggett 2004-07-06 07:57:58 PDT
Just to confirm - upgrading Mozilla from v1.6 to v1.7 brought this bug back with
a vengeance.

When an atempt is made to compact an IMAP folder while other IMAP operations are
taking place (particularly an IMAP folder synchronise in Inbox) suddenly many
empty messages dated 1 Jan 1970 appear in the folder.

Exiting Mozilla and starting it again seems to deal with a number of them, and
they go away on their own.
Comment 67 William Shih 2004-08-25 19:21:45 PDT
I'm not sure if this is the same bug, or just a similar bug.  I had to recreate
the MSF file due to corruption.  When I did that, there were a lot of messages
with a blank subject, an ordinary word as sender, and 12/31/1969 4:00PM as the date.

Looking further in my email box, this appears for all emails that start with the
phrase "From ".  These emails have that particular word in the body, but
Thunderbird just parses it like it's the header "From - [Day] [Month] [Date]
[Time] [Year]" and inserts the X-Mozilla-Status flags there.

Configuration:
Windows XP Professional
Mozilla Thunderbird 0.7.1 (also 0.7.3)
Accessing email by POP3
Comment 68 Tomas Pihl 2004-12-20 12:02:56 PST
*** Bug 271526 has been marked as a duplicate of this bug. ***
Comment 69 Tomas Pihl 2004-12-20 12:50:36 PST
Same problem in Thunderbird 0.9 and 1.0. This when using a IMAP Inbox and a
filter which delivers mailinglist posts to a Local Folder. For almost all posts,
I get a phantom mail in the same folder as the filter is setup to move the mail to.

I'll try to post a full mail which causes this bug once I get to work tomorrow.

Screenshot in Bug 271526
Comment 70 Tomas Pihl 2004-12-21 00:56:58 PST
Created attachment 169269 [details]
Pihl's problematic msf
Comment 71 Tomas Pihl 2004-12-21 00:58:26 PST
Created attachment 169270 [details]
Pihl's mailfolder
Comment 72 david.murko 2005-01-10 08:37:06 PST
i have the same problem with thunderbird 1.0 under linux OS with this phantom
mail s 01/01/1970 01:00 AM.

it occurs when i have this > bug 271259 < problem. when a message is not able to
be stored in the 'sent' folder - such an phantom mail is created at my side, and
when i try to delete them - there still remain after i go back to the inbox
folder (after 'emtpy trash' or close and restart the mailclient).

any suggestions? tia, with regards from austria, davidm
Comment 73 Mark B 2005-02-21 17:03:51 PST
Couple of hopefully helpful points (please let them be read and of use!)

In case it's not obvious to anyone who's made it this far all the bad dates are
just zero represented in the C locale/timezone of the observer.  Hence some
hours before midnight at the end of '69 in the USA, midnight in GMT (like
myself), and 1am in most of the rest of Europe.

My IMAP server is Groupwise 6.5 (not sure what sub-version).  I'll try and get a
trace of the transactions tomorrow.  I've got T-Bird 1.0 on Win XP SP2.

Looking at the INBOX file, it seems that many emails start with From - <date>,
which doesn't appear to be valid SMTP to me (but what would I know).  When those
emails also lack a Date: or Sent: field, Thunderbird uses zero as the date,
hence 1969/70.  I guess it should ideally parse some of the other fields to get
a date, use the time the download was made, or even guess the date based on the
adjacent messages in the server folder.
Comment 74 Josh 2005-04-19 10:54:07 PDT
I am experiencing this bug, running Thunderbird version 1.0.2 (20050317) on OSX 10.3.9

Hopefully that's of use to someone.
Comment 75 jonm 2005-04-20 09:18:09 PDT
(In reply to comment #74)
> I am experiencing this bug, running Thunderbird version 1.0.2 (20050317) on
OSX 10.3.9
> 
> Hopefully that's of use to someone.

Same here but on Windows 2000/xp boxes and on more then one PC.  Our whole
office just transitioned to Thunderbird and this is so far the #1 complaint.
Comment 76 Tomas Pihl 2005-05-03 06:51:28 PDT
After some further testing, it seems at least my phantom-mails is due to a
dateheader which looks like:

  Date: 03 May 2005 14:15:11 +0200

ie. without the optional [ day "," ] as specified by RFC822 (see chapter 5).
Mails sent with the day, ie.

  Date: Mon, 02 May 2005 15:10:22 +0100

works ok.
Comment 77 sjackson 2005-07-29 19:35:06 PDT
I have it on my Mac OSX - I had for about a year on Netscape and last week I
switched to THunderbird 1.6 and Il be damned if it didnt pop up again. It puts
an msf. extension on all files in my mail inbox, sent, and all other files. I
then deleate and trash all .msf and reopen thunnderbird and it works OK for
awhile and then it comes back. THe reason I swithed to ThunderB is becuase I
thought it wouldnt slip through. Any ideas yet ?
Comment 78 James Rome 2005-07-30 06:03:36 PDT
This still occurs regularly with Thunderbird on XP, and is really annoying
Comment 79 Mike Cowperthwaite 2005-11-16 08:17:58 PST
This is being reported on TB, moving to Core.
Comment 80 Mike Cowperthwaite 2005-11-16 08:19:39 PST
*** Bug 314556 has been marked as a duplicate of this bug. ***
Comment 81 Mike Cowperthwaite 2005-11-16 08:20:47 PST
*** Bug 316679 has been marked as a duplicate of this bug. ***
Comment 82 akabrams 2005-11-21 09:39:28 PST
i have this bug too.

had it when i used to use netscape for my email.  every time i got the bug, which was several tiems a year, i simultaneously had problems sending emails. the emails would send but netscape couldn't copy the emails to my sent items folder.  every time i was told to cure it by deleting the .msf files which always worked.

switched recently to TB and am having same problem now.

this is SO ANNOYING.
Comment 83 akabrams 2005-11-21 09:39:53 PST
i have this bug too.

had it when i used to use netscape for my email.  every time i got the bug, which was several tiems a year, i simultaneously had problems sending emails. the emails would send but netscape couldn't copy the emails to my sent items folder.  every time i was told to cure it by deleting the .msf files which always worked.

switched recently to TB and am having same problem now.

this is SO ANNOYING.
Comment 84 Mike Cowperthwaite 2006-02-14 07:30:40 PST
*** Bug 325704 has been marked as a duplicate of this bug. ***
Comment 85 Mike Cowperthwaite 2006-03-09 12:57:17 PST
*** Bug 325001 has been marked as a duplicate of this bug. ***
Comment 86 Rosalie 2006-04-08 20:56:21 PDT
(In reply to comment #85)
> *** Bug 325001 has been marked as a duplicate of this bug. ***

I am also receiving this bug...I run Windows ME...
Mine is marked 12/31/1969 4:00 1kb...
How do I get it to go away...????
Thanks for your help..
> 

Comment 87 Magnus Melin 2006-05-21 03:30:49 PDT
*** Bug 226041 has been marked as a duplicate of this bug. ***
Comment 88 Dave Feltham 2006-06-19 09:17:37 PDT
Have this same issue on Windows XP, SP3. However I can add new info: this mail appears when simply changing folders, and when disconnected from the internet: it's completely internal to Thunderbird.
Comment 89 Magnus Melin 2006-07-12 12:11:52 PDT
*** Bug 344332 has been marked as a duplicate of this bug. ***
Comment 90 jan klopper 2006-07-17 02:58:40 PDT
(In reply to comment #88)
> Have this same issue on Windows XP, SP3. However I can add new info: this mail
> appears when simply changing folders, and when disconnected from the internet:
> it's completely internal to Thunderbird.
> 

I seccond this. (same system, winxp sp2)

Deleting the mail from the Junk folder, and then switching to "inbox", and back to the Junk folder, makes it re-apear. If needed il attach the junk file, (which only has that mail in it)
Comment 91 Jesus M. Rodriguez 2006-08-04 20:45:48 PDT
This problem is not related to windows only.  I'm using Thunderbird 1.5.0.4 on Fedora Core 5 (AMD64) and I see the empty mail dated 12/31/1969 in my inbox.
I've tried deleting it several times, and I can't seem to see it in my Inbox
folder on disk only in the GUI.
Comment 92 Matthew Paul Thomas 2007-02-22 00:16:30 PST
*** Bug 223916 has been marked as a duplicate of this bug. ***
Comment 93 Magnus Melin 2007-02-25 05:44:11 PST
*** Bug 371526 has been marked as a duplicate of this bug. ***
Comment 94 benc 2007-06-24 15:51:17 PDT
*** Bug 180254 has been marked as a duplicate of this bug. ***
Comment 95 James Rome 2007-06-24 19:45:24 PDT
This bug is 4 years old now. Isn't it time that it was fixed???
Comment 96 Nikki 2007-06-29 07:39:58 PDT
I had this issue today.  The folder it was in (junk) showed that it had 20 messages, even though the only message appeared to be this one, which reappeared after being trashed and deleted.  I tried choosing compact folder, and it showed me 20 messages which were not previously visible.  After deleting these, the message did not reappear.
Comment 97 Magnus Melin 2007-11-01 08:44:22 PDT
*** Bug 401967 has been marked as a duplicate of this bug. ***
Comment 98 Jo Hermans 2007-11-13 08:21:19 PST
*** Bug 403629 has been marked as a duplicate of this bug. ***
Comment 99 Tony Mechelynck [:tonymec] 2008-06-30 21:34:43 PDT
*** Bug 167956 has been marked as a duplicate of this bug. ***
Comment 100 Nikolay Shopik 2008-07-25 04:30:57 PDT
*** Bug 447898 has been marked as a duplicate of this bug. ***
Comment 101 Matthias Versen [:Matti] 2008-09-26 11:13:55 PDT
*** Bug 457268 has been marked as a duplicate of this bug. ***
Comment 102 Patrick 2009-03-15 08:31:37 PDT
Some recent change (for me: within the last week or two) caused this bug to come back with a vengeance.
Comment 103 Jo Hermans 2009-03-23 16:17:59 PDT
*** Bug 484886 has been marked as a duplicate of this bug. ***
Comment 104 Jo Hermans 2009-03-23 16:18:43 PDT
*** Bug 434105 has been marked as a duplicate of this bug. ***
Comment 105 Jo Hermans 2009-03-23 16:20:10 PDT
*** Bug 434999 has been marked as a duplicate of this bug. ***
Comment 106 raoul bhatia 2010-01-28 14:55:56 PST
haven't seen any phantom emails in a long time.
currently on:

Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.7) Gecko/20100127 Shredder/3.0.2pre
Comment 107 Mervyn Witherow 2010-01-29 00:32:50 PST
Just got this bug again yesterday and wondered what it was as I haven't followed this before.  Mervyn
Comment 108 Jérôme Bouat 2010-04-01 09:53:42 PDT
*** Bug 555533 has been marked as a duplicate of this bug. ***
Comment 109 Jérôme Bouat 2010-04-01 09:54:39 PDT
I encountered the same bug into my Junk folder.
Comment 110 raoul bhatia 2010-04-02 03:03:14 PDT
btw - haven't seen this in a long time
currently running:

Mozilla/5.0 (X11; U; Linux i686 (x86_64); de-DE; rv:1.9.1.8) Gecko/20100301 Shredder/3.0.4pre
Comment 111 Jérôme Bouat 2010-04-02 03:09:05 PDT
The bug occured on Thunderbird 2.0.0.24 x86_64
Comment 112 Jérôme Bouat 2010-04-13 11:00:44 PDT
The bug just occured into my junk folder with Thunderbird 2.0.0.24 (20100411).

I restarted Thunderbird with "-safe-mode" option. Next I deleted the fake message into the junk folder and I fetched again my new messages. Among the new message, a few where moved to my junk folder. Displaying again the content of my junk message shows this fake message again.

Note that I need to change the folder view to another folder before I fetch the new message in order to make the fake message appear again into the junk folder  when I display its content after all new messages where retrieved.
Comment 113 Tom O'Leary 2010-05-09 07:44:06 PDT
This occurs for me on a daily basis, but only on one of my email addresses: the .mac account. It is an IMAP account and I receive the majority of my email on it. 
Here's what I have to do: Read one of the duplicates (both then go "gray" as Read), close and reopen Thunderbird (I'm using 3.0.4). If I don't close and reopen but delete the email instead, I get the blank email dated 12/31/1969 residue. Pain in the butt. Can you help?
Tom
Comment 114 Jérôme Bouat 2010-05-22 01:59:19 PDT
The bugs occurs on linux. I didn't achieve to update the platform of this bug.
Comment 115 Jérôme Bouat 2010-06-04 14:05:18 PDT
I noticed one other strange behaviour. Sometimes, a few sent message move to the junk folder. I don't know if it is related to this bug.
Comment 116 thehazo 2010-06-13 16:21:50 PDT
I am also getting this problem. I access 3 gmail accounts with Thunderbird 3.04 via IMAP protocol. Sometimes I have a blank (fantom) email from -no one- with the date 12/31/1969 7:00pm. Other times when I click on fantom email I see old emails that I just deleted.
Comment 117 CSharpner 2010-08-18 08:26:32 PDT
I've been seeing this problem for a couple years now in several versions and minor releases.  I believe I know the cause.  I was about to submit a different bug report about failing message filters, but saw this one and realized my issue is probably the cause of THIS issue, so I'm commenting here instead:

I have 4 accounts set up with 4 non-combined inboxes.  All are POP3.  All are hosted on Google domain hosted e-mail (but I don't think that's important because I used to host my own smtp servers and when I used Thunderbird as a POP3 client against those, this problem still happened).

I have nearly 100 message filters on my primary account.  The filters are failing on SOME of the accounts (but always the same ones).  WHEN THE FILTERS FAIL, they leave in the inbox the e-mail messages that were supposed to have been dropped into specific folders.  BUT, the folders that should have received the filtered messages, they instead receive a blank message with an ancient date (like 1969 or 1970).

Further, when I bring up the message filters window and select the account (to get the list of filters for that account), then select ALL the filters (nearly 100), and tell Thunderbird to run all of them on the inbox, many times it still fails (that's the bug I was going to report).  If I select a /specific/ filter that usually fails and if I run just it, it always works.  AND, once the failed filtered messages get properly filtered, they replace the phantom, empty, back-dated messages that were apparently place holders for them.

In my case, this phantom, empty, old message entry issue is caused by the message filters failing.  This problem has gotten much worse for me since 3.x was released.  Deleting and recreating individual message filters does NOT fix the problem for me.
Comment 118 CSharpner 2010-08-18 08:34:38 PDT
Correction and addendum to my last comment:

Original: "The filters are failing on SOME of the accounts"
Correction: "SOME of the filters are failing" (same account).

Original: "WHEN THE FILTERS FAIL, they leave in the inbox"
Correction:  "WHEN THE FILTERS FAIL, the leave in the root of the inbox"

Addendum:
Windows 7 Ultimate 64bit.
Thunderbird 3.1.2

Unconfirmed:
This has happened since at least Thunderbird 2.x, Windows Vista Ultimate 32bit and 64bit.  I can't say for sure, but I believe I experienced this on rare occasions in Thunderbird 2.x on Windows XP (various flavors and versions).
Comment 119 Felix Miata 2010-08-18 08:40:14 PDT
(In reply to comment #117)
> I have nearly 100 message filters on my primary account. 

I have a lot of filters on my (pop3) primary account too, but can't remember
the last time I saw this. My primary account is currently 126M in size. Usually
I delete all binary attachments from messages I keep. I compact folders every
time I empty trash, sometimes more often, typically when a message with binary
attachment(s) arrives and I open it. How often do you: compact folders? delete
binary attachments? How large is your primary account folder?
Comment 120 Jérôme Bouat 2010-08-18 10:48:58 PDT
It seems the below option descreases the chance the bug occurs :
reducing the estimated saved size which triggers the auto compacting of the mail folders.
Comment 121 CSharpner 2010-08-18 12:18:42 PDT
(In reply to comment #119)
<Felix Miata>
How often do you:
   compact folders?
   delete binary attachments?
   How large is your primary account folder?
</Felix Miata>

I have it auto compact when it can save at least 10,000 KB.  This pops up about once every 2 weeks or so.  I never delete anything.  My primary account is about 2.5GB.

Jerome:  I'll try the compacting to see if it works as a temporary work-around. Thanks.

On a side note:  Outlook 2007 seems to have limited space for message rules.  The only reason I bring that up is because it triggers the thought that perhaps there's some intentional or unintentional limit imposed, but not handled properly?  Or perhaps there's a variable of the wrong type that holds the size of it and it's in overflow? (like a 16 bit int when it might need to be 32 bit or even 64 bit)  Just some random thoughts on what the Thunderbird devs could look for.
Comment 122 Wayne Mery (:wsmwk, NI for questions) 2010-10-04 08:48:07 PDT
*** Bug 275965 has been marked as a duplicate of this bug. ***
Comment 123 Bruno 'Aqualon' Escherl 2010-12-11 06:17:15 PST
*** Bug 557526 has been marked as a duplicate of this bug. ***
Comment 124 Andrew Walrond 2010-12-13 01:36:30 PST
Well, I have this bug with v3.1.7 on Ubuntu linux.

Must be a record; this bug is seven and a half years old, and reports are still coming in ;) !!!
Comment 125 SkyeFerret 2011-01-03 22:48:07 PST
3.1.7; getting this error since the year changed.
Comment 126 Leho Kraav (:macmaN @lkraav) 2011-02-03 01:17:09 PST
here, this phantom message problem every once in a while rears its ugly head for saved search folders over IMAP, apparently when incoming messages get threaded. switching away and back in the search folder usually fixes it for a while. collapsed thread with this phantom message cannot be expanded, thunderbird simply doesnt react to clicking the expand arrow. phantom message does seem to have it's own message ID (I have Order Received column showing), maybe it's a real message whose display simply gets mangled somewhere along the way?

maybe this is a more general threading algorithm problem, sincce i'm also experiencing this: http://getsatisfaction.com/mozilla_messaging/topics/virtual_folder_inbox_with_2_or_more_imap_accounts

"i am using 3 imap accounts, thus thunderbird created a virtual folder "inbox" which aggregates all 3 imap inboxes. The problem is, that some e-mails are shown twice there. This problem does not occur when using the dedicated inboxes of the accounts."
Comment 127 Erich 2011-03-03 21:54:03 PST
I have been having this problem off and on since I switched over to Thunderbird 3.0 and IMAP.  It has recently gotten much worse in 3.1.8.  It seems to be a problem with the virtual folder in-box.  I will have to do some checking  if it is occurring in the dedicated in-boxes.  

Also since 3.1.8, while reading mail in the consolidated in-box, messages that have been marked "read" will switch back to unread.  I don't know if this is related, or not.  

Seems like this bug has been around for a really long time
Comment 129 Leho Kraav (:macmaN @lkraav) 2011-09-23 08:10:20 PDT
I have just recently seen one of these stick in Inbox for a while when running 6.0.x. Thunderbird restart has usually cleaned it up I think, as I've done nothing other special activity to get rid of it and it isn't there in Inbox anymore.

Junk/Filter processing sounds a likely cause, since before moving to server-side Sieve, I had a bunch of rules sitting in Thunderbird taking care of message sorting into IMAP folders.
Comment 130 Erich 2011-09-23 16:34:23 PDT
Still having this problem with 6.0.2.  Restarting does not clear it.  Also having a maybe related problem that started with updating to Thunderbird 6.  Messages that have been read disappear out of my IMAP inbox and then only appear in the Unified Folder Inbox.
Comment 131 keithknight@kpkmail.co.uk 2011-09-26 06:03:26 PDT
I thought this bug had been fixed long ago but has reappeared in my 6.0.2. Compacting files and new profile have not fixed this problem. I still have one 1/1/70 00:00 constantly reappearing (in my Junk folder).
Comment 132 Ruth Milner 2011-12-19 15:42:52 PST
This bug is associated with one I reported recently, bug ID 700229. I have seen the phantom old messages since I upgraded to TB 3.0 more than a year ago, though I cannot reproduce it the way others have reported here. At around the same time, I started seeing occasional freezing behavior in my Trash and sometimes Junk folders, which are the only places (so far) that I have noticed the phantom messages.

In early November I upgraded to 7.0 and the freezing got *much* worse, so I reported it as a bug. I have only today managed to correlate it with a phantom message appearing in Junk and then being immediately auto-expired into Trash by TB (I have a 30-day expiry on Junk). TB 7.0 does this process much more frequently than 3.x did, and I see the freezing behavior much more often, too:  anywhere from once every few days to multiple times per day.

Compacting does not fix the problem - in fact, when it's in this state, Junk says it can't compact due to another operation in progress - and neither does repairing the index files for the affected folders. Only exiting TB, waiting several minutes, and then restarting clears it up (until the next time). So I would say there is now a more urgent need to fix this bug, because it is creating other problems that seriously affect the useability of Thunderbird.
Comment 133 keithknight@kpkmail.co.uk 2012-01-16 06:47:33 PST
Appeared again today in junk folder; email to default email address with completely blank message source - 01/01/1970 00:00
Comment 134 Ruth Milner 2012-04-06 21:34:38 PDT
Still happening in TB 11.0.1. Some days it is so frequent that the fallout with Junk and Trash freezing makes using TB *incredibly* frustrating.

This bug has 20 votes, 41 duplicates, and 68 people on its Cc list, and has existed since 2003. Shouldn't that indicate that it has a pretty high user impact?
Comment 135 keithknight@kpkmail.co.uk 2012-04-07 06:54:28 PDT
I too have experienced this problem for many years. re-installs and new profiles make no difference. it is a fundamental and very annooying error that is never prioritised enough to fix, like many other errors (e.g. html errors) that inhabit the bottom of the pile and never receive enough attention. It is a shame for such a high quality product. It is the kind of persistent fault that will ultimately lose significant alleigance.
Keith Knight
Comment 136 mickw 2012-05-10 00:46:18 PDT
I'm am also getting this bug.
Happens frequently over the last few days.
Also losing internal mail from Postfix. Should get 3 emails daily (from backup program), only getting 1 or 2.
Have tried restarting but still get the problem.
Ran compact - received phantom mail again.
Deleted message ran Get Mail and the phantom mail re-appeared.


thunderbird 12.0
openSuse 12.1 (x86_64)
postfix(2.8.8-3.10.1.x86_64)
Comment 137 mickw 2012-05-11 23:12:19 PDT
Resolved (temporarily?).
I downgraded from 
MozillaThunderbird-12.0-33.20.1.x86_64
to
MozillaThunderbird-11.0.1-33.17.3.x86_64

and the problem went away.
Comment 138 keithknight@kpkmail.co.uk 2012-05-12 07:03:59 PDT
This problem seems to occur under many different scenarios. I tried the downgrade - didn't work for me. Normally if I "repair" the Junk folder, the phantom mails disappear. This has not always been the case. I have had this problem for many, mnay years as have many others and using "folder-properties-repair" works now when it didn't on versions before 9. The message has no body - is not a real message. The issue is how can a minimal header with no body present as an email at all?? Perhaps if the thunderbird definition of what constitutes a whole email was revisited, the problem could be resolved. On the downside NO OTHER email client in history has EVER had this or any such persistent problem, which is a shame for such an ace product and concept generally.
Keith Knight
Comment 139 Ruth Milner 2012-06-14 07:04:45 PDT
(In reply to mickw from comment #137)
> I downgraded [...] to MozillaThunderbird-11.0.1-33.17.3.x86_64
> and the problem went away.

It still shows up for me on 11.0.1 (file version 11.0.0.4469).
Comment 140 keithknight@kpkmail.co.uk 2012-06-14 10:53:49 PDT
(In reply to Ruth Milner from comment #139)
> (In reply to mickw from comment #137)
> > I downgraded [...] to MozillaThunderbird-11.0.1-33.17.3.x86_64
> > and the problem went away.
> 
> It still shows up for me on 11.0.1 (file version 11.0.0.4469).

I have version 13.0
The problem still occurs periodically, usually after some new junk mail has been processed. "Repairing" the junk folder removes the phantom mail.
The phantoms have never really been emails. They have only ever been empty headers. The issue is what constitutes an email message? An empty header, however generated should not constitute a displayable email message and we should not see it. I have had this problem since probably version 3! Time to fix it finally.
Keith Knight
Comment 141 Ruth Milner 2012-06-14 16:02:10 PDT
For me the displayed phantom message goes away on its own if I don't spot it, but in that situation it makes Trash and Junk hang (see bug #700229). Repairing those folders - or any others - does not revive them. The only solution I have found is to exit TB, wait for at least several minutes, and then restart it. Needless to say, this is really disruptive on days when it happens repeatedly.
Comment 142 keithknight@kpkmail.co.uk 2012-06-15 03:42:02 PDT
As Ruth has shown, different users have different experiences of this bug. It is difficult for developers to recreate it in every scenario as there are so many variables. In a clean (new profile) install of every version since 9 I have recreated this bug. For me it only occurs when processing Junk Mail. I use the addon Junquila but with this uninstalled I still get the bug. With clean installs the folder repair option has always removed the email but not the bug as it recurs. Developers need to stop an empty header that adopts the default system date from ever appearing as a message. Since there are so many other variables, including the choices we make for junk mail processing, there seems to be no other solution. It is an annoying glitch in an otherwise brilliant product and I wish it could be fixed. You can set up a rule to delete it automatically by the way but we shouldn't have to, should we?
Keith Knight
Comment 143 Ruth Milner 2012-06-15 09:49:18 PDT
(In reply to keithknight@kpkmail.co.uk from comment #142)
> You can set up a rule to delete it automatically by the way but we shouldn't
> have to, should we?

A couple of months ago I set up a filter which would check for any message with a date of 12/31/1969 or 1/1/1970, mark it as "Not Junk" and move it to a specific (new) folder. Not one phantom message has ever ended up there; they still just show up in Junk or Trash, which reinforces the theory that they are not real. If some other operation (e.g. move to Junk or Trash via either spam filtering or deleting) puts some sort of garbage in the folders, it makes sense that a filter on "incoming" messages could not detect that.

Also, a few minutes ago I spotted a phantom message in my Trash folder and made a copy of the corresponding file before manually deleting that message. I am happy to send the copy to anyone who wants it (there are only 16 other messages there, all expired spam), but "diff" reports no difference between the two files, even after I compacted the Trash folder. So perhaps there isn't even random **** there, just something screwing up the index (although repairing the index has never fixed the side effects I reported in bug #700229). I didn't think to make a copy of the .msf, but will try to remember to do that next time I catch one (which is only occasionally).
Comment 144 Ruth Milner 2012-06-22 09:53:11 PDT
Caught another phantom in my Trash just now, before it could disappear and hang the folder. Again there was no difference in the Trash message file before and after delete+compact. I did make a copy of the Trash.msf index file this time; unfortunately I also did an index rebuild, not realizing that it would resequence everything differently. Using "diff" I can see how the messages correspond before & after, but much of the index metadata has changed, so the diff output is probably not very useful.

The .msf is mostly gibberish to me, but I can see patterns. There were 20 messages in the Trash, counting the phantom. The index clearly numbers these in hex, so the phantom, being the most recent to appear, ought to be 0x14. But there is also a number 0x15. I don't know whether this is because there's a special entry at the beginning, or one at the end, but here are the two of them:

@$${14{@
[-14:m(^9C^19B)(^90^19B)(^91=0)(^93=1)(^94=1)]

<(19D=1059276)(19E=50)>
{1:^80 {(k^97:c)(s=9)}
  [-1029CC(^9D^19B)(^C1^19D)(^C5^C6)(^C6^9F)(^C7=50)(^8A=0)(^9B^9D)
    (^8F^19B)(^C4=0)]}
{-1029CC:^80 {(k^98:c)(s=9)14:m } 1029CC }
{FFFFFFFD:^9A {(k^99:c)(s=9)} [-1029CC(^95=)]}
<(1A0=14)>[-1:^9F(^AC=1)(^AD=1)(^A7^81)(^A3^19B)(^A5^19C)(^88^84)(^B0^81)
    (^A1=14)(^B1^88)(^B2=12)(^B3=1)(^B4=0)(^B5=0)(^B6=)(^B7^8B)(^B8=1)
    (^A6^8C)(^A2=1)(^A4=0)(^AF^8D)(^AE=0)(^B9=1)(^BA=1e)(^BB=1e)(^BC=1e)
    (^BD=0)(^BE=0)(^BF=1)(^C0=0)]
@$$}14}@

@$${15{@
<(1A1=1340380855)>[1:^9F(^B1^1A1)]
@$$}15}@

Every other entry in the index with this type of pre/postamble has far more information between opening and closing than these two, stuff that's clearly header values. The lack of obvious header data in these suggests that one of them might correspond to the phantom (which appears to be devoid of values for its "headers").

Anyway, I hope this is useful. I'm happy to send the saved .msf file to anyone who can make sense of it. I will also keep trying to collect scat from these critters. :-)
Comment 145 Ruth Milner 2012-06-22 09:55:06 PDT
In case someone is wondering: I don't want to simply post/attach the .msf file here because it contains real people's personal email addresses as well as auto-deleted spam.
Comment 146 Ruth Milner 2012-07-12 11:45:11 PDT
An odd bit of data which would seem to confirm that these phantoms are related to deleting messages. About an hour ago I deleted a message that someone had sent me. A couple of minutes later I noticed a "new" message in Trash. This is usually a sign of a phantom email. But when I went to look at it, it was the message that I had just deleted, with two key oddities:

  1. it had been marked as unread (just like the phantom messages always are)
  2. the date on the message showed as 12/31/1969 5:00 p.m. (it was actually sent today at 11:09 a.m. MDT)

I took a screenshot, which I will upload (some addresses/names blurred using the GIMP), and then examined the file. The message appeared perfectly normal, with proper date fields etc. I saved both the Trash file and Trash.msf.

A little later, I saw that Trash was displaying this message normally, with the correct date. So whatever made TB think it had a null (or default) date apparently fixed itself, possibly when two additional Junk messages were expired into Trash in the meantime. So I also saved the updated Trash and Trash.msf, along with a diff on the two .msf's. Those files I can send on request.

I hope this is useful, since it's a slightly different behavior than has been reported so far.
Comment 147 Ruth Milner 2012-07-12 11:49:58 PDT
Created attachment 641552 [details]
per comment #146: screenshot showing deleted message with phantom-like date but normal otherwise
Comment 148 Ruth Milner 2012-07-12 11:59:14 PDT
P.S. The Error Console for TB shows nothing that looks relevant at the time this was happening. (Thank you for adding the timestamps!) There are many of these which have been happening irregularly but frequently for two days:

  Timestamp: 7/12/2012 11:59:26 AM
  Error: this.view.dbView is null
  Source File: chrome://messenger/content/SearchDialog.js
  Line: 240

sporadic errors like this one:

  Timestamp: 7/12/2012 11:41:28 AM
  Warning: Error in parsing value for 'width'.  Declaration dropped.
  Source File: mailbox:///C:/Users/Ruth/Mail/mail.q.com/Inbox?number=297572
  Line: 0

and these two from about half an hour before I deleted the message:

  Timestamp: 7/12/2012 11:21:26 AM
  Warning: WARN addons.updates: Update manifest for {972ce4c6-7e08-4474-a285-3208198ce6fd} did not contain an updates property
  Source File: resource:///modules/AddonUpdateChecker.jsm
  Line: 313

  Timestamp: 7/12/2012 11:21:25 AM
  Error: formatURL: Couldn't find value for key: TIME_SESSION_RESTORED
  Source File: resource:///components/nsURLFormatter.js
  Line: 131
Comment 149 Ruth Milner 2012-07-14 17:46:52 PDT
Same thing again today, this time with an auto-expired spam message. Clearly TB knows that its real date is 06/14/2012 because the messages are sorted by date, but for some reason it is showing the bogus date instead. Screen shot will be uploaded.

I never caught this behavior (legit messages being displayed with bogus date even though the real date is in the headers) until a couple of days ago, even though I've been at 13.0.1 for a while now.
Comment 150 Ruth Milner 2012-07-14 17:48:04 PDT
Created attachment 642298 [details]
screen shot showing autoexpired spam in Trash with bogus date displayed
Comment 151 Ruth Milner 2012-07-14 17:49:47 PDT
And as before, TB has quietly on its own fixed both the read status and the date.
Comment 152 Ruth Milner 2012-07-14 17:54:44 PDT
Created attachment 642299 [details]
Screen shot showing same list of Trash messages but with bogus date fixed in display
Comment 153 Ruth Milner 2012-07-17 11:10:33 PDT
New twist #2:

Last night one of these phantoms showed up my Junk folder, after which TB could no longer move Junk messages into it. So as usual I exited the program. When I restarted it about a half-hour later, my Junk folder had been completely recreated. All that was in it were four new spams that had been delivered to my Inbox while TB was not running, and were tagged as Junk (based on their SpamAssassin headers) when it started up again. The folder had gone from about 8MB to 22KB in size, which means the entire file must have been wiped out of existence because there were a couple of thousand messages in there before restart (my TB settings do not empty Junk, and the automatic compact does not trigger until it saves 20MB).

I think I will add a couple of new backup jobs to my SSR schedule just in case it zaps anything else in future.
Comment 154 Ruth Milner 2012-07-17 13:06:30 PDT
New twist #3, and this one is bizarre:

After writing up the comment above, I discovered that these phantom messages are being processed both by my custom message filters and (for the ones that get past the SpamAssassin flag filter) by TB's junk controls. The log entries look like this:

  Applied filter "SpamAssassinYes" to message from - at 12/31/1969 5:00:00 PM moved message id = to mailbox://rmilner@mailhost.nmt.edu/Junk

or

  Detected junk message from - at 12/31/1969 5:00:00 PM moved message id = to mailbox://rmilner@mailhost.nmt.edu/Junk

And here's a real kicker: *for every message handled by ANY filter, there is a phantom-message entry immediately after it in the filter log*.

That strikes me as potentially very significant.

It is not the case in the junk log, where sometimes there are isolated single entries and sometimes there are clusters without any other messages being mentioned. There are no timestamps in either of these logs <sigh>, but in some cases time-range limits of varying length can be determined from the (mostly true) dates on the messages around them.

If nothing else, this may account for why some people see these messages in Inbox (maybe no filters and/or TB Junk processing?) while others see them in Junk or Trash - or not at all. Perhaps those of you following this bug could turn on message-filter and Junk logging, and see if you get similar entries when these things show up (or, periodically, even when they don't).

Clearly not all of these cause the intermittent freezing behavior that I reported in bug #700229. Maybe that's related to some sort of collision between the two types of processing. I also don't know why some of these are flagged by the filtering while others go through to the Junk controls (it's clear the latter normally only handle the ones that SpamAssassin didn't score high enough). But hopefully this will be a step forward in debugging this elusive and persistent bug.

I'll upload recent portions of both logs for your viewing enjoyment.
Comment 155 Ruth Milner 2012-07-17 13:25:30 PDT
Created attachment 643112 [details]
Per comment 154, recent entries from TB filter log

The log is actually HTML, but since the only formatting is paragraph separation, I have put this in plain text for easier reading (copy/paste from Firefox window). NOTE: occasional entries from other filters are actually redundant processing of the same bogus messages. Again, no idea why this only happens once in a while. Not related to intended recipient.
Comment 156 Ruth Milner 2012-07-17 13:26:25 PDT
Created attachment 643113 [details]
Per comment #154, recent entries from TB Junk log

The log is actually HTML, but since the only formatting is paragraph separation, I have put this in plain text for easier reading (copy/paste from Firefox window).
Comment 157 Ruth Milner 2012-07-17 14:55:14 PDT
A few other tidbits gleaned from the full logs, with some analysis:

 - Junklog goes back to August 2007. The first phantom-message entry appears in late September 2010, which is just after I upgraded from TB 1.x to 3.0.x and started sporadically seeing the phantom messages and the Junk/Trash hanging problem (though I didn't correlate them at that time since I don't always spot the phantom emails before things hang).

 - Filterlog goes back to mid-September 2010 (see above), but the first of the bogus entries doesn't appear there until just over a month ago. IIRC I tinkered with my filters around then because I had noticed that the one I created back in April to pick up these messages (which has never worked) had somehow changed its 12/31/1969 trigger date to 1/1/1970, so I fixed it. Looking at this filter now, I see that the trigger date changed again, this time to NaN/NaN/NaN (perhaps a TB13 innovation). I just tried changing it back to 12/31/1969 yet again, closed the Edit dialog, then reopened it, and yet again it had changed to NaN/NaN/NaN. I guess this explains why the filter wasn't working. There was no error message in the console or anywhere else about an invalid/illegal date format. <grrrr>

 - The one-to-one correspondence in the recent filterlog entries seems to be due to the fact that the entries for each message come in pairs: one for the match, one for the move. Since the filter edit above, the "moved" ones are all showing the bogus dates and no other header data. The timing of this change fits with the thirty-day autoexpiry that would have hit these messages a few days ago, when I posted about the weird date display on real autoexpired spam messages in Trash (see comment #146). Is it possible that TB's application of the mutated phantom-message filter could change something in the messages' headers when they were moved, even though that filter was not the one doing the move? 

Anyway, it looks like the filter log entries may have a different cause.

However, the junk log entries are sporadic enough (because, as I mentioned, TB's Junk processing only handles stuff that gets past the SpamAssassin check first) that they might well account for the phantom messages and associated freezing problems I have been dealing with for nearly two years. (!!!!) There were a couple from the past week that could match ones I spotted and deleted before they disappeared from the display, and then the one last night. The clusters of such entries could easily explain why some days I see multiple occurrences and other days I see none.

Now if only these logs had timestamps, I might be able to correlate them with the phantoms/freezes for certain ... (hint, hint)
Comment 158 Bernd 2014-02-03 12:39:46 PST
For me the 01/01/1970 mails always appear for moved/deleted mails on IMAP. Funny enough, with the Extra Folder Columns Addon I get mailcounts of 1+2+0+3+5 for my accounts with a total of 12, so, the extraneous 01/01/1970 mail which doesn't go away on compacting only exists in unified folder, not in the normal ones.
Comment 159 Tom Rutigliano 2014-03-25 07:41:55 PDT
Also seeing this bug, and it does appear to be related to deleting or archiving messages, possibly when they are part of a conversation.  I'm using Postbox 3.0.9 and synching with a Gmail account via IMAP.

Compacting did not get rid of the message. Following Ruth's observations in comment 146, I noticed that there were messages marked as new in the trash.  Simply doing "Mark folder read" on the trash folder made the phantom message disappear from my inbox.
Comment 160 Thomas D. (currently busy elsewhere; needinfo?me) 2014-09-09 03:56:53 PDT
wowhow
Comment 161 Thomas D. (currently busy elsewhere; needinfo?me) 2014-09-09 03:59:00 PDT
WADA, any insights?
Comment 162 WADA 2014-09-18 01:39:52 PDT
(In reply to Thomas D. from comment #161)
> WADA, any insights?

There are two kinds of "date = 01/01/1970 " mail :
  a) No Date: header, mulformed Date: header in POP3 mail, and "Repair Folder" is executed.
       If no Date: header, upon POP3 download, Tb uses "timestamp of mail downloda" as "timestamp of mail".
       But when "Repair Folder", If no Date: header, "usable timestmp of mail" is Epoc time only.
  b) Phantom mail 

I usually could see "Phantom mail" by "Compact Folder after 'MsgDBHdr with null mail data' is generated by Tb''s bug".
   Bug example which produced 'MsgDBHdr with null mail data' :
   - POP3 case : Bug 750630
   - IMAP csse : 
          when multiple new mails are fetched, and if "mail view of a new mail" is executed while header fetch is in progress,
          broken MsgDBHdr is generated without correct corresponding entire mail body data in offline-store file..
   There is no corresponding mail data in "local mail folder file in cluding "Unix Mbox separator line/"offline-store file of IMAP",
   so "Compact Folder" failed to get mail header data.

"mail of date = 01/01/1970" is merely a result of other problem.
"Merely reporting 'I saw phantom mails' is usually useless at B.M.O, because here is not support forum.
Comment 163 Ruth Milner 2014-09-18 10:12:38 PDT
Thanks for weighing in, WADA. A few points in response:

 1. I use POP3, but the steps that lead up to my phantom messages, and the resulting behavior
    described in detail above (mainly during the summer of 2012), are nothing like any of what
    you describe in your post, and nothing like Bug 750630.
 2. In the error log entries, message filter logs, and Junk processing logs produced by TB that
    I have posted, the MsgDBHdr error you mention never showed up.
 3. Some of us have stated that the appearance of the phantoms described in this bug thread
    has no correlation with compacting. For example, I compact once daily, at night, but these
    crop up at any time, and never first show up right after compacting. So there is evidently
    at least one other source of phantom emails.

Of course the phantom messages are a result of some other problem, and I think we all understand that this is not a support forum. I did think, however, that one of the official purposes of this forum was for users to provide information that might help developers figure out what the real problem is. Several of us have reported that these phantoms *are* clearly correlated with message deletion, especially when done as Junk processing. We are not "merely reporting 'I saw phantom mails'"; we are trying to provide as much specific data as is available to us.

I think all the posters here realize that TB developers are mostly volunteers with no shortage of other things to do, and greatly appreciate your work on the product. (I for one would not otherwise have followed it since it was part of Netscape.) Choosing which bugs to focus on is the developers' decision, and if this one isn't on the radar for a fix, I respect that. But please don't accuse us of coming here merely to whine uselessly.

Thank you.
Comment 164 WADA 2014-09-18 17:14:45 PDT
(In reply to Ruth Milner from comment #163)
> We are not "merely reporting 'I saw phantom mails'";
> we are trying to provide as much specific data as is available to us.

If so, why all of next phenomena are mixed in this bug?
(a) "mail of mail date=1970/01/01"
(a-1) "mail of mail date=1970/01/01" in Inbox(not moved by filter)
(a-2) "mail of mail date=1970/01/01" in filter move target folder(or filter copy target folder)
(b) "mail date=1970/01/01" in message filter log, with null in Subhect/From/Message-ID (Bug 762318 already exists)

If so, and if (a), and if POP3(local mail folder), why data like next is still not provided in this bug?
- Thread Pane colimn idata, including "Order Received" column value.
      "Order Received" column value, i f local mail folder(not IMAP mail folder) :
        (i) Offset in mail folder file.
             => "Relevant mail data at the Offset" can be pretty easily checked merely using Text Editor by any comment poster.
        (ii) { "File size of mail folder file before consecutive filter move" + (N-1)  } for N-th filter moved mail.
              This is after Thunderbird 12 which started to support "Pluggable-message-store".
              This is altered to (i) by Compact, Repair Folder, Copy/Move mail(manually, or by manual filtering).
- Message source line which is relevant to "mail date".

If so, and if "message filter move" is relevant, why data about "messge filter rule" is still not provided in this bug?
   Example of already-existent "message filter" relevant bugs.
     Bug 376235, Bug 398498 (Copy & Move actions)
     Bug 695671 (Delete action)
     Bug 321371 (Qurantine option=On, then filter move is affected if qurantined by AV software)

If so, and if "Junk filter move" is relevant, why data about "Junk filter log" is still not provided in this bug?
Comment 165 Ruth Milner 2014-09-18 20:58:31 PDT
OK, I will try to address the questions that I think I understand from your comment #164:

> why all of next phenomena are mixed in this bug?

> (a) "mail of mail date=1970/01/01"
> (a-1) "mail of mail date=1970/01/01" in Inbox(not moved by filter)
> (a-2) "mail of mail date=1970/01/01" in filter move target folder(or filter copy target folder)
> (b) "mail date=1970/01/01" in message filter log, with null in Subhect/From/Message-ID

I speculated a little on some of these differences in my comment #154.

The folder where a phantom message shows up may be related either to where it was deleted from or where it was moved to; that's unclear. More importantly, it may not be limited to filter actions since not everyone who commented here seems to be using filters. People describe the symptoms they are seeing, and a given individual may never see all possible variations of a bug's behavior. With multiple people affected, some differences are inevitable.

> (Bug 762318 already exists)
>    Example of already-existent "message filter" relevant bugs.
>    Bug 376235, Bug 398498 (Copy & Move actions)
>    Bug 695671 (Delete action)
>    Bug 321371 (Qurantine option=On, then filter move is affected if qurantined by AV software)

None of those bug reports was "already-existent" when this one was created. Some of them don't even mention phantom emails, and at the time most of those bug reports were created, this one had hardly any mention of filtering (not at all in the title).

> If so, and if (a), and if POP3(local mail folder), why data like next is still not provided
> in this bug?
> - Thread Pane colimn idata, including "Order Received" column value
>       "Order Received" column value, i f local mail folder(not IMAP mail folder) :

Personally, I never use TB in thread mode, so it didn't occur to me to turn it on and provide that information. Even if I had thought of it, threading wouldn't show much because (for me) it occurs pretty much exclusively in connection with Junk processing, and every one of those messages is independent of the rest.

Perhaps one of the other commenters uses Thread mode and can supply this information, if they've read this far. 

> (i) Offset in mail folder file.
>   => "Relevant mail data at the Offset" can be pretty easily checked merely using Text Editor
>   by any comment poster.

If by this you mean "where in the folder does the phantom message start", the answer is, it doesn't. See the second paragraph of my comment #143. No difference in the folder before/after the phantom message was "removed", even after compacting.

If, instead, you mean "where does the deleted message start", this may not be possible to determine. Phantoms only shows up in my Junk folder occasionally, and never immediately after a deletion. If you know of a way to tell which deletion triggered a phantom, I'd be happy to try doing that and post the result. (It may take a while, since my mail provider switched spam filtering services a month ago and I don't see anywhere near as much junk now - which I'm actually trying to change because I like to know what it is and which +variant of my email address it was sent to.)

> (ii) { "File size of mail folder file before consecutive filter move" + (N-1)  }
>   for N-th filter moved mail.

I'm not sure what you mean by "before consecutive filter move". Can you clarify, please?

I can tell you that my Inbox, Junk, and Trash folders are not terribly huge - under 20MB for Inbox and <2MB max for Trash, with Junk somewhere in between. Does size matter?

> - Message source line which is relevant to "mail date".

Again, which message? The non-existent phantom, or the unknown one that triggered it?

> If so, and if "message filter move" is relevant, why data about "messge filter rule" is
> still not provided in this bug?
> if "Junk filter move" is relevant, why data about "Junk filter log" is still not provided
> in this bug?

Logs were provided two years ago. See comment #154, comment #155 (upload), comment #156 (upload), and comment #157. The uploads are listed in the "Attachments" section at the top of this page. The logs show the order of processing, which should reflect the received order.

For representative Error Console entries, see comment #148.

In addition, some excerpts from an affected folder's .msf file are in comment #144, which may show an index entry for a phantom message.

I hope this response answers some of your questions. Please let me know what other information would be helpful.

Thank you.
Comment 166 WADA 2014-09-18 21:40:04 PDT
(In reply to Ruth Milner from comment #165)> 
> Personally, I never use TB in thread mode, so it didn't occur to me to turn it on and provide that information. 

"threadPane" is official/internal name(id of xul element) of "message list" in Thunderbird's messenger window.
"Threaded mode display at threadPane" or "Non-Threaded mode display at threadPane" is irrelevant.

For "Order Received" column value at "filter move target folder.
1. Call filter Move Target folder "FolderX". Before filter move, file size of file named FolderX(not FolderX.msf file) = SIZE
2. New mails arrived, and mail#1 to mail#N is moved by message filter.
    Call mail size of mail#N = ss#N
3. mail#1 : saved at messageOffset= "SIZE + 0" of file named FolderX, messageKey = SIZE + 0
    mail#2 : saved at messageOffset= "SIZE + ss#1" of file named FolderX, messageKey = SIZE + (2-1) 
    mail#N : saved at messageOffset= "SIZE + Sum( ss#1 to ss#(N-1) )" of file named FolderX, messageKey = SIZE + (N-1)

    Order Received column value = messaheKey value.
    Usually,  messaheKey==messageOffset is used if local mail folder. So "Order Received" value == Offset of the mail.
    However, after filter move, messageKey != messageOffset occurs. 
    This is because messaheKey is incremented by one if "filter move to local mail folder".
    messgeKey is "unique key to access msgDBHdr".
    "Mail view"/"Message Source" is shown using messageOffset value held in msgDBHdr.
Comment 167 Ruth Milner 2014-09-18 23:47:23 PDT
Thank you for the detailed explanation.

I have turned on display of the Order Received column in the message list/threadPane in my Inbox, Junk, and Trash folders. Junk and Trash are the only places I have ever seen the phantoms; other people's experience is different, though. I see that the messageKey value appears in the Error Console Warning entries, but there aren't any in the Error or Messages entries at the moment, nor in the filter/Junk logs.

I'm not entirely sure what you would like me to report. I can check to see if a messageKey value is shown for a phantom message when it appears in Junk, and look at what's at that offset in the folder, but in the past there has never actually been anything there; I fully expect that column to be either empty or peculiar for it. Can I tell which message in Inbox (if any) it corresponded to before the move? These are local folders with POP3, so the original message does not actually get removed until compact, but it won't be visible in the pane any more to obtain its offset.

I may be able to take advantage of the new spam filtering to control delivery, and watch to see whether a phantom appears shortly after they come through and get moved to Junk. Would it be better to let them through one at a time, or in groups?

Please let me know your instructions.
Comment 168 Ruth Milner 2014-09-24 22:59:53 PDT
Got one! Seven uploads to follow (all small). Maybe this will at least help to narrow down the
possibilities.

1. Screenshot 201409242204 (MDT): New additions to Junk folder following delivery of a bunch
   of spam, which TB automatically moved to Junk (unread except for the top one, which I had
   Junked by hand). These are listed in descending "Order Received" value. Shortly after this,
   I marked them all read because my best alert of a phantom is when Junk suddenly gets a
   single new message.

2. Screenshot 201409242210 (MDT): Thread pane of Junk folder a few minutes later, showing
   a phantom.
   - The folder pane shows one new message.
   - The "Order Received" offset shows 9639880 for the phantom, with a size of 0KB.

3. Screenshot 201409242225 (MDT): Thread pane of Trash folder, showing the phantom that
   TB autoexpired from Junk (where it then no longer appeared).
   - The folder pane shows one new message.
   - The "Order Received" offset shows 443844 for the phantom, with a size of 0KB.

4. Screenshot 201409242225 (MDT): Cygwin shell window showing the following:

   a. Size and timestamp on Junk folder file right after the phantom showed up.
      - The size of the folder is equal to the offset TB shows for the phantom message
        in Junk.
      - The timestamp on the folder has not changed since the spam messages were moved
        into it initially at 2204.

   b. Output of "tail" on the Junk folder.
      - There is no message data corresponding to that final offset (= EOF), which makes
        sense for a size of 0KB.

   c. Size and timestamp of Trash folder file at the time the phantom showed up in Junk
      (basically a "before" picture, which I took because I knew the phantom would be expired
      at some point).
      - As with Junk, the size of the file is equal to the offset subsequently shown for the
        phantom message.

   d. Size and timestamp of Trash folder file after the phantom had been autoexpired out of
      Junk (where it no longer appeared in the list) because of its apparent date being >30
      days ago.
      - Like Junk, the appearance of the phantom message in the Trash folder in TB caused no
        change to either the size or timestamp of the Trash file.

5. Recent error console entries from Thunderbird.
   - The newest ones were around the time the spam was moved into Junk. The "unexpected EOF"
     might possibly be related to a phantom appearing at the EOF offset shortly thereafter.
   - Nowhere in the console contents, which cover ~36 hours, were there any entries referring
     to MsgDBHdr.

6. Screenshot 201409242315: Appearance of the Trash thread pane a while later, showing three
   more old Junk messages that have since been autoexpired from Junk. One of them has of course
   picked up the offset at what used to be the end of the file. Oddly, while it now has a
   valid subject line, sender, recipient, and date, the display has retained the phantom's
   empty date and unread status. When I looked at it again a minute later, the TB thread pane
   had been corrected, and showed the affected message's original data. (I previously noted
   this behavior in my comment #146 and comment #147 with upload.)

   Shortly before I spotted this, the TB Error Console reported a new entry which may be relevant:

   Timestamp: 9/24/2014 11:01:14 PM
   Error: ReferenceError: unexpected is not defined
   Source File: javascript:%20unexpected
   Line: 1

7. Screenshot 201409241312: Taken of the Junk folder earlier in the day, showing the oldest
   messages in the folder. The one with the timestamp of 8/25/2014 10:38PM is the one that
   got displayed wrong when it went into Trash.

I did not think to make a copy of the .msf files tonight, but comment #144 shows one that was
captured while a phantom was being displayed in TB.

Please let me know what else I can provide.
Comment 169 Ruth Milner 2014-09-24 23:02:41 PDT
Created attachment 8495023 [details]
Screenshot per comment #168 upload 1: 201409242204_ForBugzilla_JunkNewest_byReceivedOrder.jpg
Comment 170 Ruth Milner 2014-09-24 23:05:48 PDT
Created attachment 8495025 [details]
Screenshot per comment #168 item 2: 201409242210_ForBugzilla_JunkWithPhantom.jpg
Comment 171 Ruth Milner 2014-09-24 23:07:01 PDT
Created attachment 8495026 [details]
Screenshot per comment #168 item 3: 201409242225_ForBugzilla_TrashWithPhantom.jpg
Comment 172 Ruth Milner 2014-09-24 23:08:00 PDT
Created attachment 8495027 [details]
Screenshot per comment #168 item 4: 201409242225_ForBugzilla_JunkSizeAndContents.jpg
Comment 173 Ruth Milner 2014-09-24 23:09:00 PDT
Created attachment 8495030 [details]
TB Error Console entries per comment #168 item 5: 201409241025_TBErrorLog.txt
Comment 174 Ruth Milner 2014-09-24 23:11:33 PDT
Created attachment 8495032 [details]
Screenshot per comment #168 item 6: 201409242315_ForBugzilla_TrashWithPhantomOffsetReassigned.jpg
Comment 175 Ruth Milner 2014-09-24 23:12:55 PDT
Created attachment 8495033 [details]
Screenshot per comment #168 item 7: 201409241312_ForBugzilla_JunkOldest_byReceivedOrder.jpg
Comment 176 Ruth Milner 2014-09-25 01:19:12 PDT
I wrote:

> Nowhere in the console contents, which cover ~36 hours, were there any entries referring to MsgDBHdr.

There is one with a similar name. It doesn't look like the "null mail data" error that WADA described, and it was generated 20 hours before the phantom incident that I caught and documented above, when no phantoms were in evidence. So it may not be related. Here it is, though, just in case:

  Timestamp: 9/24/2014 2:14:36 AM
  Error: 2014-09-24 02:14:36	gloda.index_msg	ERROR	Exception while attempting to mark message
   with gloda state afterdb commit [Exception... "Component returned failure code: 0x80070057
   (NS_ERROR_ILLEGAL_VALUE) [nsIMsgDBHdr.getUint32Property]"  nsresult: "0x80070057
   (NS_ERROR_ILLEGAL_VALUE)"  location: "JS frame :: resource:///modules/gloda/index_msg.js ::
  PendingCommitTracker_commitCallback :: line 160"  data: no]

  Source File: resource:///modules/gloda/log4moz.js
  Line: 693
Comment 177 Ruth Milner 2014-09-25 10:11:43 PDT
Got another phantom this morning shortly after manually marking a Junked message as not junk, so that TB moved it back into Inbox. A few minutes after I did that, a phantom showed up in Trash. (If it showed up in Junk first, I didn't catch it.) Same deal as above: Order Received offset is EOF, and tail shows only the last real message. (A couple of old spams were expired earlier this morning, but I wasn't at the computer then to see whether anything got triggered by that.)

I did take screenshots of the phantom in Trash and the file attributes/ending data in the shell window, but since emails about new comments etc. on this bug are going to so many people, I won't post those unless someone asks me to.
Comment 178 WADA 2014-09-27 18:08:56 PDT
(In reply to Ruth Milner from comment #168)

Good catch.

Phantom in Junk  : No Subject, Date=12/31/1969 05:00 ??, Size=0, Offset=9639880 == file size of file named "Junk"
Phantom in Trash : No Subject, Date=12/31/1969 05:00 ??, Size=0, Offset=  443844 == file size of file named "Trash"
    EPOC Time = 1970/01/01 00:00 +00:00(==GMT). "??" is AM? PM? What is your Time Zone?
i.e. Nothing(including Unix Mbox mail separator, X-Mozilla-Status:/X-Mozilla-Status-2:) is written to file named Junk/Trash.
(a) msgDBHdr for the mail was generated in Junk folder with no mail header data/no mail body data.
      Then, the "Phantom mail in Junk" was moved to Trash => same "msgDBHdr with no mail data" is generated in Trash.
(b) Junk filter tried to move "mail in Inbox" to Junk.
      "Delete of Junk by your setting" immediately tried to move the "moved mail in Junk" to Trash.
      Then, "Phantom mail" was generated.

(Q1) Why "junk mail moved from Inbox to Junk folder by Junk filter of Tb" doesn't stay in Junk folder in your case?
(Q2) What is written in Junk Filter log of Tb?
(Q3) "Junk move to Junk folder" looks "Incomplete" when phantom mail is generated.
         If so, "Expunge bit in X-Mozilla-Status: of mail in Inbox" may not set to On.
         Does the "moved mail by Junk filter" appear at Inbox when you do "Repair Folder of Inbox"?
(Q4) Do you enable Quarantine option?
              Read http://kb.mozillazine.org/Download_each_e-mail_to_a_separate_file_before_adding_to_Inbox
         Do you enable "virus scan of AV software" on Tb's mail folder files under Tb's mail directory?

(In reply to Ruth Milner from comment #177)
> Got another phantom this morning shortly after manually marking a Junked
> message as not junk, so that TB moved it back into Inbox. A few minutes
> after I did that, a phantom showed up in Trash. (If it showed up in Junk
> first, I didn't catch it.) Same deal as above: Order Received offset is EOF,
> and tail shows only the last real message. (A couple of old spams were
> expired earlier this morning, but I wasn't at the computer then to see
> whether anything got triggered by that.)

(Q5) Why the "Unjunk'ed mail, which is moved back to Inbox from Junk by Tb" is immediately moved to Trash(deleted) in your environment?
Comment 179 WADA 2014-09-27 19:00:16 PDT
(In reply to Ruth Milner from comment #177)

(Q6) Do you set "Expiration days" of Junk folder? (Folder Properties/Retention Policy)?
         If yes, "phantom mail" == "mail date=1970/01/01" is periodically deleted by MsgPurge.
         However, IIRC, MsgPurge != "move to trash". IIUC, MsgPurge is similar to Shift+Delete.

(Q7) "Automatic mail delete at Junk folder by Retention Policy" is merely a nuisance for problem determination in your case.
Why you still enable "Retention Policy of junk & Inbox folder" even though you see your problem around Junk folder/Junk move pretty frequently in your environment? For problem re-creation?
Comment 180 Ruth Milner 2014-09-30 22:32:17 PDT
(In reply to WADA from comment #178)

I will try to answer your questions, and then post some new information from tonight.

> [Q0]     EPOC Time = 1970/01/01 00:00 +00:00(==GMT). "??" is AM? PM? What is your Time Zone?

I am on US Mountain Daylight Time right now; that's the "MDT" in the comments for my recent uploads. Note that in "Date=12/31/1969 05:00", the "05:00" is actually 5:00 p.m. - i.e. 7 hours behind GMT.

> (Q1) Why "junk mail moved from Inbox to Junk folder by Junk filter of Tb"
> doesn't stay in Junk folder in your case?

It *does* stay in the Junk folder. The only newly-moved Junk emails that don't are those with apparent dates beyond the expiry limit. Note that Tb uses the "Date" header to determine this, not the real delivery time; so messages with dates in the past get expired sooner. (Conversely, messages with apparent dates well into the future have to be cleaned up by hand, since they never meet the expiry limit.)

> (Q2) What is written in Junk Filter log of Tb?

I have the Junk Filter log, but it is clearly incomplete. It has never shown the processing of all emails that are Junked, and it doesn't seem to show any of tonight's even though logging is still enabled. Is there a log size limit somewhere? And where does the Junk log live? It is not in the same directory as the log for other filters (which lives with my folder files).

I do have some entries from the time of comment #168, if you would like me to upload those.

There are no errors in the Tb Error Console since this morning, and the many warnings all refer to errors in parsing HTML in the message contents (I think).

> (Q3) "Junk move to Junk folder" looks "Incomplete" when phantom mail is generated.
>        If so, "Expunge bit in X-Mozilla-Status: of mail in Inbox" may not set to On.
>        Does the "moved mail by Junk filter" appear at Inbox when you do "Repair Folder
>        of Inbox"?

Since the phantoms have never, as far as I can remember, appeared in my Inbox, I have not tried doing a Repair operation on it in connection with them. I will try that next time one appears. (Not the one I will post about following these answers.)

I have done Repair on both Junk and Trash many times to see if it would clear up the problem, and it didn't change anything that I could see.

> (Q4) Do you enable Quarantine option?
>      Read http://kb.mozillazine.org/Download_each_e-mail_to_a_separate_file_before_adding_to_Inbox
>      Do you enable "virus scan of AV software" on Tb's mail folder files under Tb's mail directory?

I do not use the Tb Quarantine option (didn't know about it). I do allow anti-virus to scan email folders. I use NAV, which can isolate attachments if it finds them infected. However, it only runs quick scans a couple of times a day, typically around 3am and 6pm, and a full scan once a week. The last time it found a threat in my email was three weeks ago, so it clearly is not connected with this problem.

> (Q5) Why the "Unjunk'ed mail, which is moved back to Inbox from Junk by Tb"
> is immediately moved to Trash(deleted) in your environment?

It wasn't. That message moved back to Inbox (probably actually just got flagged there to begin with, and unflagged when I unjunked it) and stayed there. What appeared in Trash was a phantom. It may well have appeared in Junk before Trash, but Tb is pretty vigilant about expiring old junk messages so unless I check quickly, I don't always catch them there. I wouldn't get too focused on that operation, it was just something I did that affected Junk and, possibly, caused another phantom to appear.

> (Q6) Do you set "Expiration days" of Junk folder? (Folder Properties/Retention Policy)?

Yes, 30 days.

I also use Tb's Bayesian filtering for spam, as well as settings that tell Tb to automatically move spam to the Junk folder (including when I mark it as spam by hand).

>   If yes, "phantom mail" == "mail date=1970/01/01" is periodically deleted by MsgPurge.
>   However, IIRC, MsgPurge != "move to trash". IIUC, MsgPurge is similar to Shift+Delete.

I don't think this can be correct, because all expired junk messages appear in my Trash; you can see some in the uploaded screenshot in comment #171. They can be moved elsewhere from there if I wish. They get cleared out for real when I do Empty Trash.

> (Q7) "Automatic mail delete at Junk folder by Retention Policy" is merely a nuisance
> for problem determination in your case.
> Why you still enable "Retention Policy of junk & Inbox folder" even though you see your
> problem around Junk folder/Junk move pretty frequently in your environment? For problem
> re-creation?

First, I keep it enabled because it is useful; it saves me from having to manage most junk email directly. It kind of sounds like you're saying, "if this feature of Tb causes a problem, don't use it", which surely defeats the purpose of offering useful features.

Second, I respectfully disagree that the retention policy setting is a nuisance. The most common trigger of the problem is delivery of new junk messages. Now that I control when my email provider's spam filter allows them through, I can make it happen quite reliably. Tonight, for example, I told it to deliver 15 quarantined spam messages, and within 5 minutes of their arrival, a phantom showed up in Junk. The appearance of the phantoms has nothing to do with the retention policy.

The only effect the automatic expiry does have is moving the phantom to Trash fairly quickly. Once it's in Trash, the phantom stays visible until another message is either deleted by hand or expired to Trash by Tb. This new message gets the offset that was formerly EOF, which the phantoms always show.

I hope these answers are helpful. I will now work on posting some results from tonight. Thank you.
Comment 181 Ruth Milner 2014-10-01 00:30:21 PDT
I had some time to spend on this tonight, so I told the spam filter service to deliver all the spam in quarantine. Most were automatically junked by Tb on delivery, and I did the remaining few by hand.

A phantom email appeared in Junk within 5 minutes, and was expired to Trash ~10 minutes later. (I have screenshots of the Junk and Trash thread panes before spam delivery, after delivery, and during phantom periods, but they don't provide any new information, so I will only upload them if someone asks for them.)

While monitoring the activity, I noticed that the Trash file itself had not been modified since 4 hours earlier. At no point during all of this did the mtime on Trash change. This applies to Junk as well, although its time was more recent because of the spam delivery. But that time did not change when the phantom appeared, or when it was expired to Trash.

What *did* change was the contents of the .msf files. 

During this monitoring, I did hex dumps of Junk.msf before and after the phantom appeared to see how it changed at the end, and to show any unprintable characters. I will upload a few screenshots showing that information and mtimes on the files. They show just the last part of the files.

I don't know exactly how the .msf files work, or everything they are used for, but while I was watching them, they were updated frequently even when there was no actual message activity. One of the screenshots shows the normal format for Trash.msf.

Given that the files with the actual message content are not even touched while the phantoms are appearing, it seems likely the problem is in the .msf files - something that makes Tb think it should interpret EOF as a message.

Uploads follow.
Comment 182 Ruth Milner 2014-10-01 00:31:57 PDT
Created attachment 8497992 [details]
Screenshot per comment #181: 201409302118_ForBugzilla_JunkTrashSizeAndContents.jpg
Comment 183 Ruth Milner 2014-10-01 00:32:53 PDT
Created attachment 8497993 [details]
Screenshot per comment #181: 201409302118_ForBugzilla_JunkMsfHexdumpTail_BeforeAndAfterPhantom.jpg
Comment 184 Ruth Milner 2014-10-01 00:34:10 PDT
Created attachment 8497994 [details]
Screenshot per comment #181: 201409302127_ForBugzilla_TrashDateAndMsfTail.jpg
Comment 185 WADA 2014-10-01 00:46:17 PDT
(In reply to Ruth Milner from comment #180)
> > (Q2) What is written in Junk Filter log of Tb?
> I have the Junk Filter log, but it is clearly incomplete. It has never shown
> the processing of all emails that are Junked, and it doesn't seem to show
> any of tonight's even though logging is still enabled. Is there a log size
> limit somewhere? And where does the Junk log live? It is not in the same
> directory as the log for other filters (which lives with my folder files).

"Writing to junklog.html" is buffered. I think "Show junk log" displays buffered part, or junk filter does FLUSH at end of junk filtering job, as usually done in message filter log.
But it may be wrong. If something bad happens, buffered part may not be shown.
(see bug 695671 comment #11 for incomplete filterlog.html case)
junklog.html is held in profile directory, and each log entry is a "<p> ... <p/>".
When you check next time, do following, please.
   Copy junklog.html to WORK.HTML, View WORK.HTML by Text Editor and Browser.
   Is junklog.html content truncated at bottom?
  
> I do allow anti-virus to scan email folders.
> I use NAV, which can isolate attachments if it finds them infected. 
> However, it only runs quick scans a couple of times a day, typically around 3am and 6pm,
> and a full scan once a week. 
> The last time it found a threat in my email was three weeks ago,
> so it clearly is not connected with this problem.

Why can "it clearly is not connected with this problem" be sure, merely by "quarantine by NAV was not done"?
"Scan of Tb's mail folder files by NAV" surely opens Tb's mail folder files for a while.
Even if the "file open by NAV" is "read open", it surely interferes Tb's mail folder file open which is "write open", unless NAV opens Tb's mail folder files with same "Shared option" which Tb uses.
Because Mozilla's code usually doesn't check return code at many places, "mail folder file open failure in Tb" can produce problems.
This is absolutely same in "Tb's mail folder file open by auto-backup software etc."
Known problems due to interfere by other software.
- File named Inboxis completely deleted by Compact of Tb,
  if Inbox.msf file open/Inbox file open, is interfered just before/while executing Compact.
  (IIUC, already fixed)
- "Outdated msf condision" is generated(==broken .msf file status is generated),
  if xxx.msf file open/xxx file open, is interfered when filter move is atempted.
  (still problem)
- Wrong mail data in Offline-Store file of IMAP is used,
  if xxx.msf file open/xxx file open, is interfered when download of maail s atempted.
  (still problem)

Do you run "Scan of Tb's mail folder files by NAV" while Tb is running?

> > (Q6) Do you set "Expiration days" of Junk folder? (Folder Properties/Retention Policy)?
> Yes, 30 days.

Option setting at where?
If Junk folder, there are two kinds of "Retention".
(a) MsgPurge by Retention Policy :
    (a-1) Account Settings/Disk Space
    (a-2) Folder Properties/Retention Policy.
             If "use my account setting", (a-1) is used for this folder.
    "(a)MsgPurge" uses term of "permanently delete".
    IIUC, "permanently delete used in Tb" is usually not "Delete mail"(="move to trash").
(b) Automatic Junk mail deletion after NN days.
     Junk Settings of each account.
     [?] Automatically delete junk mails older than NN days.
     This is "Delete mail"(==move to trash if local mil folder. it depends on delete model if IMAP)

Which do you call by your "Retention" when Junk folder?
Comment 186 WADA 2014-10-01 00:58:29 PDT
NSPR log may help problem determination. See bug 402793# comment #28 and read pointed documents.
    SET NSPR_LOG_MODULES=timestamp,MsgCopyService:5
    "Move mail from Imbox to Junk" is perhaps requested via MsgCopyService.
If further analysis will be needed, following may help.
    SET NSPR_LOG_MODULES=timestamp,MsgCopyService:5,MsgDB:1,POP3,bayesianfilter:5
    Note: Log volume will be huge. Check log file size periodically, if you use additional parameters.
Comment 187 WADA 2014-10-01 01:13:08 PDT
(In reply to Ruth Milner from comment #181)
> A phantom email appeared in Junk within 5 minutes, and was expired to Trash ~10 minutes later. 
> (I have screenshots of the Junk and Trash thread panes
> before spam delivery, after delivery, and during phantom periods,
> but they don't provide any new information, so I will only upload them if someone asks for them.)
> 
> While monitoring the activity, I noticed that the Trash file itself had not been modified since 4 hours earlier.
> At no point during all of this did the mtime on Trash change.
> This applies to Junk as well, although its time was more recent because of the spam delivery. 
> But that time did not change when the phantom appeared, or when it was expired to Trash.

I recommend you to stop "Automatic Junk mail deletion by days" and/or "MsgPurge of Junk folder by Retention Policy".
By this, you don't need to watch Trash folder. You need to watch Junk folder(and Inbox folder) only.
Comment 188 Ruth Milner 2014-10-01 02:03:23 PDT
Thank you for the information about the Junk log; I will follow your suggestion next time I do a spam release from the filter service. I will try to do this tomorrow, but am about to be away from home for 2 weeks and will not be using Tb during that time, so it may be a while before I respond again.

> Option setting at where?
> (b) Automatic Junk mail deletion after NN days.
>     Junk Settings of each account.
>    [?] Automatically delete junk mails older than NN days.
>    This is "Delete mail"(==move to trash if local mil folder. it depends on delete model if IMAP)

This is the method I am using (with POP3 and local storage). I will take your suggestion and disable it to see what happens. Very likely Junk will then behave like Trash, i.e. the phantom will remain until a new message is put there.

> Why can "it clearly is not connected with this problem" be sure, merely by "quarantine by NAV
> was not done"?
> "Scan of Tb's mail folder files by NAV" surely opens Tb's mail folder files for a while.

Well, OK, I can't be 100% certain, but I can think of several reasons why virus scanning is not likely to be the cause here:

 1. NAV scans *all* folders as well as incoming and outgoing mail (auto-Bcc'd to myself),
    yet the only time I ever see this problem is in connection with Junk mail delivery.
    It cannot be a coincidence that, time after time, spam is moved into Junk and within
    minutes a phantom shows up. Meanwhile, the messages that stay in my Inbox, which are
    also scanned, have never triggered the problem.

 2. NAV does not do real-time scanning on files that are not receiving incoming messages,
    and not at all on the .msf's since they are Tb-specific and do not themselves contain
    email messages.

 3. System-wide NAV scans are not running at the time I'm doing this analysis. I don't do
    specific "scan email" runs; they're just part of the overall configuration - and yes,
    Tb is running all the time. (Backups have never noticeably interfered, either; on my
    key email folders, they run four times a day, taking less than a minute to complete.)
    Also, on files as small as the .msf's, the NAV scan takes a fraction of a second. The
    chance of that coinciding with Tb needing to use it is pretty small, and unlikely to
    collide routinely like this.

 4. I'm far from being the only Tb user seeing this problem. It's *possible* that we're
    all doing A/V scanning the same way, but it would be a long shot.

 5. If A/V software interfered this badly when scanning files, surely it would cause
    major problems for all kinds of applications on a regular basis, not just Tb; yet
    problems caused by A/V are relatively rare given all the activity that's occurring
    on a computer. In >20 years of having home computers, I've only needed to exclude
    a handful of applications because of A/V interference, and none in several years.

That said, to eliminate it as a variable, I will disable email scanning in NAV and also exclude my Tb folder directory from scanning. But only just long enough to see if the problem still happens. :)

Thank you also for the NSPR log suggestion; I will look at it more carefully tomorrow. (3 a.m. :) )
Comment 189 WADA 2014-10-01 02:49:41 PDT
(In reply to Ruth Milner from comment #188) 
>  5. If A/V software interfered this badly when scanning files, surely it would cause
>      major problems for all kinds of applications on a regular basis, not just Tb;

It's not true. 
Lack of "sufficient or appropriate error return code check after subroutine call/OS function call", lack of "sufficient or appropriate error notification to user upon error in subroutine call/OS function call", "going ahead even when error happens upon subroutine call/OS function call", are characteristics of program code of Mozilla family which is merely a client PC application, which is never host/server application  :-)
   If MVS application, "if RC!=expected one, call SVC 13(=Abend, which forces termination and produces dump)" is pretty popular. 
   In Mozilla family, "Check RC, if RC!=expected one, return 0 or continue" is pretty popular code :-)
Comment 190 WADA 2014-10-01 17:59:26 PDT
(In reply to Ruth Milner from comment #157)
>  - Junklog goes back to August 2007. The first phantom-message entry appears
> in late September 2010, which is just after I upgraded from TB 1.x to 3.0.x
> and started sporadically seeing the phantom messages and the Junk/Trash
> hanging problem (though I didn't correlate them at that time since I don't
> always spot the phantom emails before things hang).

If problem started from Tb 3.0, "Close MsgDB(.msf file) after threshold of inactivity period" may be relevant.
   Till Tb 2, xxx.msf file is opened at startup of Tb, and is closed only upon termination of Tb, 
   so no one could open Tb's xxx.msf file once Tb opened xxx.msf file.
Bug 905576 is problem relevant to this new feature from Tb 3.0.
See bug 498814, bug 498817, bug 501851, bug 542723 for "interfere by other software".
See bug 497804 for "interfere by Tb's other component".
 
>  - Filterlog goes back to mid-September 2010 (see above), but the first of
> the bogus entries doesn't appear there until just over a month ago. IIRC I
> tinkered with my filters around then because I had noticed that the one I
> created back in April to pick up these messages (which has never worked) had
> somehow changed its 12/31/1969 trigger date to 1/1/1970, so I fixed it.
> Looking at this filter now, I see that the trigger date changed again, this
> time to NaN/NaN/NaN (perhaps a TB13 innovation). I just tried changing it
> back to 12/31/1969 yet again, closed the Edit dialog, then reopened it, and
> yet again it had changed to NaN/NaN/NaN. I guess this explains why the
> filter wasn't working. There was no error message in the console or anywhere
> else about an invalid/illegal date format. <grrrr>

It's Bug 762318/Bug 935934 which started to occur from Tb 12(pluggable msgStore was introduced by Tb 12).
   1. "Filter action=Move to folder" is requested to a mail(messageKey=AA) by message filter rule.
       "Move the mail of messageKey=AA in Inbox to other mail folder, call FolderX"/messageKey=BB in FolderX, is executed.
   2. Message filter tries to write filter log for "Filter action=Move to folder"
        => Because "Truncate of file named Inbox" is executed upon filter move if "Filter before Junk Classification" in POP3,
              mail data for messageKey=AA doesn't exist in file named Inbox any more.
        Before the enhancement, "move mail by filter" was not actually executed when move log is written, so no problem occurred.
If "Filter before Junk Classification", Junk Classification(Junk filtering) is invoked on the moved mail(messageKey=8B in FolderX).
If messageKey=AA is passed from message filter to Junk filter, similar problem may happen in Junk filter.
If "Filter after Junk Classification", mail data for messageKey=AA remains in file named Inbox even after "filter move".
   1. Download all POP3 new mails to Inbox.
   2. Invoke Junk filter on all new mails in Inbox.
   3. Invoke message filter on all new mails which was not moved to Junk(=deleted from Inbox) by Junk filter.
       Because "delete step of filter move(=copy+delete) at Inbox" = "set Expunge bit=On in X-Mozilla-Status: header",
       filter logging code can read mail data  for messageKey=messageOffset=AA in Inbox.

Which do you use in message filter? Filter before Junk Classification? Filter after Junk Classification?
Do you see your problem frequently with "Filter after Junk Classification" in rules which has "move to folder" action?
Comment 191 WADA 2014-10-01 21:12:34 PDT
FYI.
Quick check result on "filter move/junk move" in Tb 31.1.2 on Win.
(A) Junk filter log.
      Junk Filter log is buffered before write to junklog.html.
      "Show junk filter log" simply displays junklog.html content.
      So, data in buffer is not shown until buffer overflows occurs by next logs, or buffer is flushed by termination of Tb.
(B) Filter move before Junk Classification and Junk filtering, with interfere on "filter move target folder" by other software.
[Setups, test procedure]
      (0) POP3, Leave Messages on server=On, 
            3 mails are held in server's Mbox which is surely marked as Junk by Tb's junk filter.
            Junk filter/Junk move is enabled
            Filter rules : (all mails hits)
               Filter before Junk Classification, If subject contains ??? or If subject doesn't contain ???, Add Tag Later
               Filter before Junk Classification, If subject contains ??? or If subject doesn't contain ???, Move to MoveTarget
      (1) "Open Write Exclusive" of file named MoveTarget by Tool(Object REXX script is used)
      (2) Delete popstate.dat
      (3) Get Msgs
[Result]
(1) At MoveTarget folder :
      Upon each mail download and "filter move" attempt, error message is shown because "open MoveTarget in write mode" fails.
      3 mails are shown in Thread Pane of MoveTarget, with correct subject/from/size etc.
      Because it's by filter move, "Order Received column value" == messageKey(incremented by 1) !=== messageOffset.
      Because "Write open of MoveTarget file" failed, messageOffset=0 is perhaps used for these 3 msgDBHdr.
      Because "Write open of MoveTarget file" failed, nothing is added to file named MoveTarget.
(2) At Junk folder :
      Nothing is written to Junk folder.MoveTarget.
      However, Junk log is written for 3 mails.
(3) At Inbox folder :
      3 mails are held, with Unread state, with tag=Later, with Junk mark.
      It looks :
         Following are done on each new mail;
            tag is added by filter at Inbox,
            "move to MoveTarget" is requested but it failed.
            Junk Classification is invoked with "msgDBHdr of a new mail in Inbox => mail in Inbox is marked as junk"
            Junk move is attempted at MoveTarget folder because "Move to MoveTarger" is already requested by message filter, 
            but it fails due to bad MsgDBHdr or non-existent mail at MoveTarget folder
(4) Other observed phenomenon.
      After above test, "copy mail from other POP3 account to this POP3 account's folder" silently does do nothing.
      This was true even after "file named MoveTarget " is closed by other software.
      This problem continued until shutdown/restart of Tb is done.
      "copy/move/delete at POP3 account is impossible" is  phenomenon reported to some other bugs.
       This kind of problem may be relevant to "Junk/filter move failure during Junk filtering/message filtering".
Comment 192 WADA 2014-10-01 23:58:19 PDT
FYI.
Another quick test result.
Same setups as test in comment #191, except that all message filter rules is disabled.
[test-1] interfere on both file named Junk.msf and file named Junk
(1) "Open Write Exclusive" for Junk.msf & "Open Write Exclusive" for Junk by Script, and delete popstate.dat, and GetMsgs
      Because both Junk.msf/Junk is not opened, "Junk move" silently fails, and mails are held in Inbox with Junk mark.
      junk log is written for all 3 mails.
      => Silent failure of "Junk move" == "mail marked as Junk is not moved to Junk" is pretty easily observed by this test.
[test-2] interfere on file named Junk.msf only
(2) "Open Write Exclusive" for Junk.msf,  delete popstate.dat, GetMsgs
      Each new mail in Inbox is marked as Junk at Inbox by junk Classification, and junk log is written for all 3 mails.
      Because Junk.msf is unable to open, MsgDB for Junk folder is internally initialized in memory as ".msf file size=0",
      and MsgDBHdr for each mail is created from "Junk file size=0 states" in memory.
      i.e. "Junk move" silently ignores "Junk.msf open failure", and goes ahead.
      Because file named "Junk" is accessible, mail data can be appended to file named "Junk",
      the mail is moved to Junk from Inbox, then mail in Inbox is marked as "Deleted"(expunge bit of X-Mozilla-Status: = On).
      If file named Junk.msf is already closed by other software upon next Junk folder open in Tb,
      because "actual file size of Junk" != "file size of Junk which is saved in Junk.msf", "Outdated msf" condition is raised,
      and Internal Rebuild-Index(==Repair Folder) is automatically invoked.
      This is phenomenon of bug 495760

As seen in above pretty simple/easy tests, "xxx.msf file(MsgDB file) open by other software", "xxx file(MsgStore file) open by other software", can produce funny penomena in Thunderbird.
A cause of "interfere on xxx file(MsgStore file) of Tb by AV software" is "no file extension in MsgStore file of Tb".
Major AV software has default white list of "file extension which is used by major mailers"(for example .pst file), and won't invoke virus scan for such files by default. However, because of "no file extension", any AV software vender can not provide "default white list of file extension" for Thunderbird.
Recent AV software has "Virus Scan of inbound mail" and "Virus Scan of outbound mail" feature(port scan type, or local POP3/IMAP/SMTP proxy type for SSL as done by Avast), and it's main stream of "Virus Scan of mail data".
If possible, register Tb's profile directory(at least \Mail or \ImapMail directory of Tb) to "White list of directories for which periodical virus scan is not invoked by your AV software".
Comment 193 WADA 2014-10-02 01:02:26 PDT
(In reply to Ruth Milner from comment #132)
> This bug is associated with one I reported recently, bug ID 700229. 

> Bug summary of bug 700229 :
>        Intermittent but Frequent: Deleted/Junked messages not removed from pop Inbox, Trash/Junk hang
I'm not sure what happened in that bug, but I could see similar phenomenon to your bug 700229 in simple/easy/quck tests of  comment #191 and  comment #192.
Comment 194 Ruth Milner 2014-10-02 01:38:51 PDT
> Which do you use in message filter? Filter before Junk Classification? Filter after
> Junk Classification?

Filter Before, because the majority of my filters are whitelists. It appears to be the default, and until you mentioned it, I'd forgotten there even is an option to filter after, so I can't say whether the problem occurs with that.

However, these filters are very rarely invoked any more. filterlog.html shows that the last one was on Sept 14, and the time before that was Aug 26. So I don't think they're part of the problem.

Here's what I did tonight:

1. disabled Junk auto-expiry in Tb
2. created a .bat file to set the NSPR variables and run Tb:

     set NSPR_LOG_FILE=%USERPROFILE%\Mail\20141002_TB_Debuglog.log
     set NSPR_LOG_MODULES=timestamp,MsgCopyService:5,MsgDB:1
     "C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe"

3. exited Tb
4. disabled real-time A/V scanning
5. ran the .bat file to start Tb with logging
6. released the spam from quarantine in the filtering service

The spam messages were duly received in Inbox, and were immediately Junked. And nothing happened after that. I waited for more than half an hour before ending the logging session. So it looks like you're right that this is being caused by A/V scanning. (I have the NSPR log, but since nothing happened, I'm not sure it's very enlightening. I would have to sanitize it a bit since I manage five email accounts with Tb. The others are very low-traffic so I don't bother with Junk controls on them, but they nonetheless appear in some of the log entries.)

As a confirmation of your conclusion, tomorrow evening I will leave A/V active, start Tb with the .bat file to obtain the NSPR logs, and then see what happens when I let the spam through. I will also re-enable auto-expiry of Junk to Trash, because it provides a marker in the log for when a phantom has appeared in Junk. Otherwise only the thread pane shows them (and perhaps the .msf if you know how to read them, which I mostly don't).

Will the NSPR settings I used above include the error messages if Tb can't open a file because something else has it open? I don't know how to set things like exclusive open, and am very concerned about deleting popstate.dat given that there are nearly 200 old messages in my Inbox. (Will act on these Real Soon Now.)

> If possible, register Tb's profile directory(at least \Mail or \ImapMail directory of Tb)
> to "White list of directories for which periodical virus scan is not invoked by your AV software".

Is it necessary to exclude the entire directory, or would doing that just for the .msf files (which of course do have a file extension) be enough? From what you've described very thoroughly, it sounds like they are most sensitive to interference. 

Thank you very much for your patient help.
Comment 195 WADA 2014-10-02 02:34:17 PDT
(In reply to Ruth Milner from comment #194)

If "interfere by other software's file open of Tb's mail folder file" is suspected, getting "Process Monitor" log for file access on Inbox&Inbox.msf, Junk&Junk.msf, Trash&Trash.msf, may help, if you use MS Win.
 (see bug 905576 comment #28 for getting , and see lines contains "process monitor" in that bug)
   Filter : if path ends with \???, Include. if path ends with \???.msf, Include. where ???=Inbox, Junk, Trash
   Show timestmp column(s), at least process name, file I/O request related columns.
   If default option, entire data by Process monitor is held in swap file(i.e. held in Virtual Memory).
   If external file is chosen as place to hold entire data while Process Monitor is running, data is held in the file.
   With any option, total volume of Process Monitor data becomes huge, if Process Monitor runs for long time.
   Please be careful on disk space usage.
   
Who accessed Tb's Inbox&Inbox.msf, Junk&Junk.msf, Trash&Trash.msf, while Tb is running?

> > If possible, register Tb's profile directory(at least \Mail or \ImapMail directory of Tb)
> > to "White list of directories for which periodical virus scan is not invoked by your AV software".
> Is it necessary to exclude the entire directory, 
> or would doing that just for the .msf files (which of course do have a file extension) be enough?

Tb's profile directory(needless to say, mail directory of Tb under profile directory too) is mainly place for "data". "Program code in Tb's profile directory" is usually for extension=Addon. And "interfere on msgStore file"(no file extension) can cause problem in Tb too. Because msgStore file is far larger than .msf file, and because msgStore file contains data of mail data stream, "virus scan by AV software" takes far longer than .msf file. 
So, one of next is recommended;
  a) Register Tb's profile directory to White list : <Tb's Profile directory>\* 
  b) Register Tb's mail directory to White list    : <Tb's Profile directory>\Mail\* , <Tb's Profile directory>\ImapMail\*
       Attachment of mail can contain virus, but it can be detected by;
          server side virus scan service, 
          AV software's port scanning on POP3/IMAP/SMTP port upon mail send/receive
          AV software's local proxy server(SSL tunnel like one), if SSL is used(port scan of SSL port is hard to implement)
       "Very frequent Virus scan of each mail data file by AV software" is not mandatory nowadays.
Comment 196 WADA 2014-10-02 02:54:37 PDT
(In reply to Ruth Milner from comment #194)
> 4. disabled real-time A/V scanning

"real-time A/V scanning" is different from "periodical virus scan of Tb's mail files"(==interfere on Tb's file open).
    (i)    When Tb writes mail data to msgStore file, AV software hooks Tb's file I/O request, and scan for virus.
            This is executed under Tb's task, and is perhaps not visible by Process Monitor log.
            In Process Monitor log, it perhaps merely looks like "Tb's file read/write takes long".
    (ii)   If virus is detected by AV software, AV software quarantines the file(Delete the file, from perspectve if Tb)
    (iii)  If AV software quarantines file named Inbox of Tb, Tb looses all data held in file named inbox.
           So, to avoid this issue, Tb provided "Quarantine option".
               Write data of a newly downloaded mail to Temp file, instead of file named Inbox.
               Even if AV software quarantines this temp file, "dataloss in Tb" is limited to single mail only.
This can be relevant to "phantom mail in Junk" phenomenon.
However, there is no log for "Quarantine" by NAV in your case.
So, I believe "real-time A/V scanning" is irrelevant to your problem.
Comment 197 WADA 2014-10-02 03:58:36 PDT
(In reply to Ruth Milner from comment #194)
> Will the NSPR settings I used above include the error messages if Tb can't open a file
> because something else has it open?

MsgDB:x log perhaps reports "xxx.msf file open error" as "error opening DB" log, but I'm not sure.
Process Monitor log is better for this purpose, because "xxx.msf file open error" is logged as "open error with Sharing violation" like one, if Tb's file open is interfered by someone including Tb's other task.

> I don't know how to set things like exclusive open, (snip)

Ordinal "open write of a file" request is "exclusive" in almost all programing code including Open Object REXX, PHP, Windows Scripting Host, Window's BATCH file etc., unless "Shared " option is requested by the "open file" request.

> and am very concerned about deleting popstate.dat given that there are nearly 200 old messages in my Inbox. 

If POP3 access is supported by ISP with support of IMAP access and/or Web Mail access, test is pretty easy.
    Content in POP3 Mbox == Content in Inbox via IMAP or Web Mail.
    Move all mails in Inbox to other than Inbox via IMAP or Web Mail.
    Copy Junk mails to Inbox via IMAP or Web Mail, then access via POP3.
    If repeated test is needed, Copy Junk mails to Inbox via IMAP or Web Mail again, 
    or do "Undelete" operation at Inbox via IMAP if mail is flagged as "\Deleted" by POP3 download,
    then access via POP3 again,
My ISP fortunately supports all of Web Mail, IMAP access, and POP3 access, so I used it for test.
"Leave messages on server" + "delete popstate.dat" is merely a shortcut of above multi-step operation -:)
Gmail is an example who supports all of Web Mail, IMAP, POP3, although "Leave Messages on Server" is ignored if POP3 of Gmail.
Yahoo! supports Web Mail and IMAP via free Yahoo! mail account. But I don't know about POP3 support of free mail account.
Comment 198 Ruth Milner 2014-10-02 08:56:05 PDT
Quick comments on a couple of points (more later):

>> I don't know how to set things like exclusive open, (snip)
> Ordinal "open write of a file" request is "exclusive" in almost all programing code

Right, sorry; I overlooked the "write" part and was thinking you meant for reading.

> "real-time A/V scanning" is different from "periodical virus scan of Tb's mail files"
>(==interfere on Tb's file open).

Yes, but the periodic "quick scan" only runs twice a day, and was not active at the time of last night's test. (I checked NAV history to be sure.) The full scan only runs once a week, ditto.

>     (i)    When Tb writes mail data to msgStore file, AV software hooks Tb's file I/O
> request, and scan for virus.

But not if the real-time scanning is disabled. In that situation, NAV is not monitoring or reacting to ongoing activity. Sorry, perhaps "real-time" was not a very clear name for it. NAV calls it "anti-virus auto-protect".

The fact that nothing happened on this test, whereas every spam delivery release before that had shown the problem within a few minutes, suggests that Tb was operating undisturbed this time.

Tonight's test back in the original state (plus NSPR logging) could be interesting. I probably will not have time to do anything more complicated before I leave, but if that test is inconclusive, I will look into the Process Monitor logging when I get back.

Thanks again.
Comment 199 WADA 2014-10-02 14:25:08 PDT
(In reply to Ruth Milner from comment #198) 
> Yes, but the periodic "quick scan" only runs twice a day, and was not active
> at the time of last night's test. (I checked NAV history to be sure.) The
> full scan only runs once a week, ditto.

If so, it may be "null mail data to RETR command by NAV's port scan".
    Tb sends RETR command to POP3 server.
    NAV's port scan intercepts response from POP3 server, and scans for virus.
    If virus is detected, NAV passes null data to Tb.
If this case, I think at least Unix Mbox mail separator, X-Mozilla-Status:/X-Mozilla-Status2:, X-Mozilla-Keys:, is written to Inbox, but I'm not sure. Even if these lines are written with mail data Size=0, Tb ignores this kind of mail data in MsgStore upon Rebuild-Index. So this kind of mail data may be ignored upon Junk move, Compact etc.

Do you enable "Virus scan of incoming mail"?
   Usually enabled by default, and is always active in many AV software if non-SSL.
This kind of action of AV software is perhaps not called "Quarantine".
Is there any log in NAV for "Virus detection on incoming mail"?

FYI.
If "null RETR response generated by NAV", it can be seen by POP3:5 of NSPR logging.
POP3:5 logging writes entire mail data stream in log file, so log volume is usually huge.
If Tb's Quarantine option is enabled, "null data in temporary file" happens when inbound mail data is ignored by NAV. This may produce error message in Tb upon mail download from POP3 server.
Comment 200 Ruth Milner 2014-10-02 16:09:40 PDT
>  NAV's port scan intercepts response from POP3 server, and scans for virus.
>  If virus is detected, NAV passes null data to Tb.
>  Do you enable "Virus scan of incoming mail"?

I do, but the NAV history shows no virus detections in email since February. The phantoms show up daily. Does Tb have an expected time window for receiving messages when it requests them from the server? Normal-sized ones come within a second or two, as far as I can tell.

Looking at the NAV configuration, the only protected ports are the default 110 and 25. Neither of these is actually used for my email, though; it's SSL/TLS on 995 for POP, and STARTTLS on 587 for sending. NAV can't scan encrypted connections directly; it can only scan the contents later, when you access it. So the only place it could be intercepting them is when the folders are accessed, not on the POP connection.
Comment 201 Ruth Milner 2014-10-03 00:22:47 PDT
So, everything is back the way it was - Junk expiry, A/V protection enabled, etc. It has now been 40 minutes since I released the spam, watched it get filtered (plus one I had to junk by hand), and marked them as "read" in Junk so I could easily spot when a phantom appears; they are always new. (I do this every time.)

And still no phantom, just like last night.

The only thing different than normal is the NSPR logging. I started Tb with the .bat file that sets the necessary environment variables. Could this be some sort of race condition, and the command window/logging changes the timing? A Heisenbug?

Anyway, further investigation at my end will have to wait a couple of weeks until I'm back using Thunderbird.
Comment 202 WADA 2014-10-03 01:39:19 PDT
(In reply to Ruth Milner from comment #201)
> Could this be some sort of race condition, and the command window/logging changes the timing?

By NSPR logging, "program code execution at multiple tasks in multi-tasking/multi-cpu environment" is serialized at NSPR logging call.
In analysis of bug 905576, timestamp,MSGDB:5,MsgCopyService:5,MsgPurge:5 was used in conjunction with Process Monitor logging, but problem was repeatedly re-produced merely by daily use.
However, in IMAP related problems, problem sometimes couldn't be re-produced with timestamp,imap:5 logging.
Because it seems "Junk move, and automatic Junk deletion are relevant to your problem", and because both "Junk move" and "automatic Junk deletion" perhaps utilizes MsgCopyService(DoCopy is perhaps requested, and is perhaps seen by MsgCopyService:5 logging), "Serialization by NSPR logging with MsgCopyService:5" may mask "Race condition in actual environment".

If your problem won't be re-produced with NSPR logging enabled, I think "getting Process Monitor log" and "finding who/when accesses Tb's .msf file and MsgStore file" is better done first.
Comment 203 WADA 2014-10-03 21:15:25 PDT
FYI.
Bug 750630 I mentioned in Comment #162 is for phenomenon relevant to race condition between two "move mail" request on same mail.
(0) "Fetch header only" is used. Filter rule : If sunject contains, move to MoveTarget.
(1)  A header only mail is moved to MoveTarget by message filter. 
       Call Msg#=NN/UIDL=UU at POP3 Mbox. Call messageKey=Xa/messageOffset=Xb at MoveTarget.
       Call Inbox file size = LastInboxSize. Moved mail is normally flagged s deleted in Inbox.
(2) At MoveTarget : "Click Here" of header only mail(download entire mail data) => following occurs
      By "Click Here" :
          At Inbox : RETR for Msg#=NN(UIDL=UU), and entire mail data is appended to file named Inbox.
                           This is same as "new mail download".
                           Call messageKey=A/messageOffset=LastInboxSize at Inbox.
         => message filter(Filter before Junk Classification) requests :
                    Move mail of messageKey=A in Inbox to MoveTarget
      At same time, by "Click Here", 
          "Move mail of messageKey=A in Inbox to MoveTarget" is requested, because "Click Here" is done at MoveTarget.
          "Delete messageKey=Xa/messageOffset=Xb" is requested at MoveTarget, because download by "Click Here" ended.
In this case, following occurs.
   "msgDBHdr for messageKey=Xa in MoveTarget" is removed, but Expunge bit is not set in MsgStore file(file named MoveTarget).
   "msgDBHdr for messageKey=A  in Inbox"           is removed, but Expunge bit is not set in MsgStore file(file named Inbox).
   "msgDBHdr for moved mail, messageKey=Y at MoveTarget" is created,
   but nothing is appended to MsgStore file for MoveTarget folder(file named MoveTarget).

This "nothing is appended to MsgStore file" part is similar to your phantom mail in Junk/Trash case.
If Date: header of Junk mail is older than 30 days, following may occur at same time after Junk Classification. 
   Junk move from Inbox to Junk by Junk filter
   Automatic Junk mail deletion(move from Inbox to Trash) at Inbox by "delete after 30 days".
   Automatic Junk mail deletion(move from Junk to Trash) at Junk by "delete after 30 days".
Comment 204 WADA 2014-12-11 15:36:17 PST
A consistent method to generate "phantom mail in a local mail folder", and consistent method to produce state of "unable to copy/move to the local mail folder, unable to do Repair Foldwer of the local mail folder", has been discovered.
  Method : Utilize bug 1106225.
  (1) At a local mail folder, Search Messages, Select several mails, at Search Window, "Move To" to local folder named FolderX
        => a phantom mail is generated. messageKey=messageOffset=sizeOnDisk of FolderZ, Size=0, no Subject, 1970/01/01
. (2) At an IMAP mail folder, Search, Select several mails, at Search Window, "Move To" to the local folder named FolderX.
        (Delete model = Just mark it as deleted maybe is neeeded)
        Move itself is normally executed, although duplicated mails are generated.)
  (3) At same Search Window of IMAP folder, Select several mails, "Move To" to the local folder named FolderX.
        => Nothing occurs.
        At any Mbox, ty to copy/move mail to the local FolderX => nothing occurs.
        At FolderX, "Repair Folder" => error is shown, and unable to do "Repair Folder". Restart of Thunderbird is needed.
See bug 1106225 comment #5.
Comment 205 WADA 2014-12-11 16:03:13 PST
(In reply to Ruth Milner from comment #201)
> The only thing different than normal is the NSPR logging.
> I started Tb with the .bat file that sets the necessary environment variables. 
> Could this be some sort of race condition, and the command window/logging changes the timing? A Heisenbug?

IMAP logging, POP3 logging etc. may serialize multiple actions.
Please use timestamo,MsgCopyService:5 only.
Phenomenon of bug 1106225 is multiple "move mails from FolderA to FolderB" requests at same time on same mails in FolderA and same FolderB. Major cause of problems in that bug is "while a job is trying to move a mailX, mailX is deleted by other mail move job". Second cause of problems in that bug is "problem in move of multile IMAP mails to local mail folder".
Junk move requests "move mail#a, mail#b, ..., in Inbox to Junk", and Filter requests "move mail#p, mail#q, ..., in Inbox to FolderX".
"Move request"(CopyMessage, DoCopy) is logged and is queued, so MsgCopyService:5 doesn't affect multi-tasking in Move mails.
MsgCopyService:5 logs "src/dest folder" and "number of mails" only. So you can't know which mails are moved. But you can know whether "move from Inbox to FolderA" and "move from Inbox to FolderB" occurred or not.
Comment 206 WADA 2014-12-11 19:02:39 PST
See Bug 1110577 and Bug 1110583 for phenomenon of "locked folder" and "phantom mail" when mail is deleted by someone while moving the mail.
Comment 207 Ludovic Hirlimann [:Usul] 2015-09-25 05:47:29 PDT
Removing myslef on all the bugs I'm cced on. Please NI me if you need something on MailNews Core bugs from me.

Note You need to log in before you can comment on or make changes to this bug.