Closed Bug 506319 Opened 15 years ago Closed 15 years ago

Tags for messages on IMAP account get set when account is checked from other client.

Categories

(MailNews Core :: Networking: IMAP, defect)

1.9.1 Branch
PowerPC
macOS
defect
Not set
major

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: amicitas, Unassigned)

Details

Attachments

(2 files)

User-Agent:       Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.1.1) Gecko/20090715 Firefox/3.5.1
Build Identifier: Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.4; en-US; rv:1.9.1.1) Gecko/20090715 Thunderbird/3.0b3

The problem is tags being automatically set on messages in an IMAP account.  The type of tag that is set seems random and multiple tags can get set.  Often all tags (important, work, personal, todo, later) get set.  I have only seen this happen on OS X.  This has happened with all beta versions of Thunderbird (I think).

For this to happen Thunderbird must be running on OS X while I check/use the account from a different client.  The tags only show up is OS X.

More details are in the 'Steps to Reproduce' section.

If someone can help me figure out how to diagnose this better, I will be happy to do so.


Reproducible: Sometimes

Steps to Reproduce:
I have not thoroughly tested this.  The steps below are the only way that I know to reproduce the problem, there may be other ways.  I do not know which steps below are important in reproducing the problem.

1. Start Thunderbird 3b3 for OS X on one computer.  One of the accounts must be a IMAP account.

2. Start Thunderbird 2 for linux on a different computer.   This also needs the same IMAP account to be set.

3. Shut down Thunderbird 2 for linux.

4. Check message window on OS X Thunderbird.
Actual Results:  
Some messages in now have tags that I did not set.  Tags seem random and there may be multiple tags.

Expected Results:  
No tags should have been set.


If I make sure to shut down Thunderbird 3 for OS X before starting Thunderbird 2 on linux, then I do not notice any problems.

Sometimes (but not always) when I attempt to remove one of these created tags on OS X, the tag will come back.  I have to restart Thunderbird 3, then remove the tag.
(In reply to comment #0)
> multiple tags can get set.
> Often all tags (important, work, personal, todo, later) get set. 

This is design of Tag of Tb. Please note that { Tag of Tb != former Label }.  
  - Former Label of Tb : Only one label in 5 can be set for a mail.
  - Tag : tags are independent even for important, work, personal, todo, later,
    (implemented as independent $label1 $label2, $label3, $label4, $label5)
    and multiple tags can be assigned to a mail.
    keyword(user defined flag) of IMAP is used for Tb's Tag for IMAP folder.

AFAIK, Tb 2 still has problem in multiple tag handling.
See Bug 450246. Problem your are seeing with Tb 2 may be DUP of Bug 450246.
If Gmail IMAP server, see Bug 450368.
A couple of additional notes:

- I do not have any tags set on any messages before this problem occurs.
- I am not using the Gmail IMAP server.

It seems to me that this problem is different than the above mentioned bugs.  In my case I never set any tags, on any client.  Tags are showing up in my Tb3 client on OS X even though I never set them anywhere.
Characteristics of Tag of Tb:
1. Tags are independent even for important, work, personal, todo, later,
   (implemented as independent $label1 $label2, $label3, $label4, $label5)
    and multiple tags can be assigned to a mail.
2. keyword(user defined flag) of IMAP is used for Tb's Tag for IMAP folder.
3. Tags can be set/displayed only when tags are defined in prefs.js of Tb.
   (Tools/Options/Display/Tag)
4. keyword(user defined flag) of IMAP can be set/displayed only when
   keyword(user defined flag) of IMAP is defined as tag of Tb in prefs.js.
   (Tools/Options/Display/Tag)
5  Tb's Tag is defined by mailnews.tags.<xxxx>.tag=<yyyy> of prefs.js.
     <xxxx> : Internal/real tag name. Used as user defined keyword of IMAP.
     <yyyy> : Displayed string in Tb's tag definition, tag column of mail. 
6. Each Tb has his own prefs.js. So tag definition in prefs.js becomes different
   if you didn't keep same tag definition of all Tb instances.

Check all tag definitions of all your Tb via Config Editor.
I think you are misunderstanding the problem.  I don't have any tags set anywhere, and I do not want any tags at all to be set.  I am not setting any tags in any client.  My issue is that tags are popping up where I do not want them without me setting them anywhere.   If everything was working as expected none of the the messages would have tags set.
(In reply to comment #4)
> I think you are misunderstanding the problem. I don't have any tags set anywhere

I think you don't want to do nothing required for problem analysis.

Even if you didn't intentionally define your own tag, Tb has $lable1 to $label5 as default, unless you intentionally delete them from your prefs.js.
And you said next in your comment #0. 
> Often all tags (important, work, personal, todo, later) get set.
Tag of Tb 2 or later is sucessor of Label till Tb 1.5. If you used Tb 1.5 or before, it is converted to tag of Tb 2 or later(one of $labe1 to $label5) automatically(I don't know wheter Tb's flaw in code exists around it or not.)

To know what happens, at least next two items should be checked.
 a) What tags are REALLY defined in each Tb.
 b) What keyword(s) of IMAP is REALLY set in mails at IMAP server.
My questions is a), before asking you about b).

> I think you are misunderstanding the problem. I don't have any tags set anywhere

I'm not interested in your thought about "what you did do in the past and what you didn't do in the past" or your thought about "Tb's flaw in code or not".
I'm interested in above a) and b) only, to know "what happens", in order to find reason why tags appear even though you say next.
  - I do not have any tags set on any messages before this problem occurs.
  - If everything was working as expected,
    none of the the messages would have tags set.
It'll help to analyze "if Tb's problem is involved, what is it". 

> My issue is that tags are popping up where I do not want them (snip)

What phenomenon do you mean by "popping up"? Where do you mean by "where I do not want them"?
Dialog pops up on unwanted window? (popup menu, popup dialog, ... is often used in  PC world. "where" has multiple meanings, usages.)
Or tag which you think you never set appears in tag column of thread pane or header box of message pane?

> I do not have any tags set on any messages before this problem occurs.

Did you copy mail(which has X-Mozilla-Keys: header with tag data) in local mail folder to IMAP folder in the past?
Check View/Message Source. X-Mozilla-Keys: header exists?
"I think you don't want to do nothing required for problem analysis."

Statements like this are not appropriate.  If I was not trying to help I wouldn't be posting a bug in the first place.  If you want me to help get to the bottom of this, then you need to first understand what it is that I am trying to report.  While I may not be doing a good job explaining what is happening, there is no need to tell me that I am being unwilling to help.
(In reply to comment #6)
> If you want me to help get to the bottom of this, then you need to first understand what it is that I am trying to report.

To analyze problem, it's important to know following two.
  1) What phenomenon occurs with what conition, with what procedure.
  2) What should occur with the condition, with the procedure.
Difference between 2) and 1) == Problem, issue, usually Tb's bug.

For above 1), next is sufficient phenomenon for first step of problem analysis.
  Tags sometimes appear in some occasions, and sometimes doesn't appear in
  some occasions, even though you say next.
  - I do not have any tags set on any messages before this problem occurs.
  - If everything was working as expected,
    none of the the messages would have tags set.
It's sufficiently funny, and flaw in code of Tb is sufficiently suspected.
And, no one can say whether occurred phenomenon is proper or improper without a) and b) in comment #5.
  If IMAP server supports keyword, and if keyword is stored in mail at IMAP
  server, and if it's defined as tag of Tb, it should be displayed in tag column
  of thread pane. 
  If IMAP server supports keyword, and if keyword is not stored in mail at IMAP
  server, it shouldn't be displayed in tag column of thread pane.

I'm not interested in detailed report of funny phenomenon with unclear condition, and with non-concrete procedure to reproduce your problem at this step. Please note that you only have environment which can produce your problem, so we can do nothing to duplicate your problem.

For above 2), at least a) and b) in comment #5 is required.

I asked you about a) in comment #5 twice, but still no answer for it.
You are wanting to talk about detail of funny phenomena you are experiencing? (I believe "No".)
For b) in comment #5, get IMAP log, and check flags returned to Tb by your IMAP server.
> Getting log : https://wiki.mozilla.org/MailNews:Logging
> IMAP command and response : http://tools.ietf.org/html/rfc3501
For b) in comment #5.
There is no need to attach whole log data. Log for specific UID with which your problem occurred is sufficient. 
 - Show "Order Received" column. Column value=UID of mail.
   Write down UID of mail for which you saw phenomenon of comment #0.
 - View log, and find logs for the UID, and check returned flags from IMAP server.
Novimir - if you aren't setting any tags anywhere - and are seeing tags in the TB UI then we might need to take a look at the exchange of information happeining between your imap server and Thunderbird b3. 

Could you please follow the instructions at https://wiki.mozilla.org/MailNews:Logging and log imap. once done you can clear some information in the log file before attaching it to this bug. 

Thank you in advance.
Component: General → Networking: IMAP
Product: Thunderbird → MailNews Core
QA Contact: general → networking.imap
Version: unspecified → 1.9.1 Branch
(In addition to Comment #7)

For how to enable NSPR logging on Mac OS X.
Example in MailNews:Logging is for Mac OS. See OSX section of next document for how to enable NSPR logging on Mac OS X.
> http://www.mozilla.org/projects/netlib/http/http-debugging.html
First for WADA.  I checked the mailnews.tags.<xxxx>.tag in the config editor of both the tb2 and tb3b3 clients.  The values are exactly identical.


 
So far I have been able to reproducibly make tags appear in tb2 (that is tags that I never set).  While I have continued to see tags appear in tb 3b3, I do not know how to make this happen reproducibly.  It is therefor difficult to make a log catching when it happens.

Below a procedure is described that will (most of the time) get tags (that were never set) to appear on tb2 on linux. At the bottom of this message I am including the log from tb2 recorded while I did the following:

1. Open Tb 3b3 on OS X.
2. Open Tb 2.0.0.22 on linux.

At this point both clients are showing an IMAP inbox.  There are no tags set on any of the messages in either client.

3. Send an email to the given address.  It does not seem to matter where this message is sent from.  I can send from the same address using either client or a web interface, or I can send from an external address.

4. Click the get mail button on tb 3b3.

The message comes up as expected.  No tags are set.

5. Click the get mail button on tb 2.0.0.22.

The message comes up with the tag "Later"

6. Delete a message that did not have any tags on tb 3b3 (but do not compact folders).

Now the message on tb 2 is displayed with strike out and now has the tag 'Later' set.

6. Close tb 2.0.0.22 on linux.

If I check the mail in the opposite order, tb2 first, then tb3, the incoming message would not have a tag on either client.  I have never seen tags appear unless I have both clients running at the same time.

If I were to now re open tb 2 the message would still have the tag "Later" (would be colored purple in the inbox).  This quickly would change to black and the tag would no longer be set.

At one point today when testing things in ways similar to the above procedure A "Later" tag appeared in tb 3b3.  The tag appeared on a messages that was already in the inbox with out any tags (though it was received during the session).  I do not know the order in which I did things to make that happen.


To generate the log file for tb2 on linux I first set:
setenv NSPR_LOG_MODULES imap:5


Here is the truncated log from the session described above
(sorry this is long, I am not really sure what is relevant):

2421056[8d3eeb0]: 9887f88:smtp.gat.com:NA:SetupWithUrl: clearing IMAP_CONNECTION_IS_OPEN
-1220547680[964db38]: ImapThreadMainLoop entering [this=9887f88]
-1220547680[964db38]: 9887f88:smtp.gat.com:NA:ProcessCurrentURL: entering
-1220547680[964db38]: 9887f88:smtp.gat.com:NA:ProcessCurrentURL:imap://antoniuk@smtp.gat.com:143/select%3E/INBOX:  = currentUrl
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=190 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:NA:CreateNewLineFromSocket: * OK [CAPABILITY IMAP4rev1 ACL RIGHTS=texk NAMESPACE LITERAL+ UIDPLUS IDLE UNSELECT MULTIAPPEND QUOTA AUTH=PLAIN] mail.gat.com Sendmail Mail Store IMAP4rev1 (5.4.3/mstore-5-4-3-build-1396)
-1220547680[964db38]: 9887f88:smtp.gat.com:NA:SendData: 1 capability
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=110 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:NA:CreateNewLineFromSocket: * CAPABILITY IMAP4rev1 ACL RIGHTS=texk NAMESPACE LITERAL+ UIDPLUS IDLE UNSELECT MULTIAPPEND QUOTA AUTH=PLAIN
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=16 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:NA:CreateNewLineFromSocket: 1 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:NA:SendData: 2 authenticate plain
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=4 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:NA:CreateNewLineFromSocket: + 
-1220547680[964db38]: 9887f88:smtp.gat.com:NA:SendData: Logging suppressed for this command (it probably contained authentication information)
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=21 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:NA:CreateNewLineFromSocket: 2 OK User logged in
-1220547680[964db38]: 9887f88:smtp.gat.com:A:SendData: 3 namespace
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=73 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: * NAMESPACE (("" "/")) (("Other Users/" "/")) (("Shared Folders/" "/"))
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=16 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: 3 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:A:SendData: 4 lsub "" "*"
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=22 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: * LSUB () "/" Drafts
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=33 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: * LSUB (\Noinferiors) "/" INBOX
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=20 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: * LSUB () "/" Junk
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=20 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: * LSUB () "/" Sent
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=20 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: * LSUB () "/" Spam
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=21 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: * LSUB () "/" Trash
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=16 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: 4 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:A:SendData: 5 lsub "" "Other Users/*"
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=16 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: 5 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:A:SendData: 6 lsub "" "Shared Folders/*"
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=16 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: 6 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:A:SendData: 7 list "" "INBOX"
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=33 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: * LIST (\Noinferiors) "/" INBOX
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=16 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: 7 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:A:SendData: 8 select "INBOX"
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=47 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: * OK [UIDVALIDITY 1180142606] UIDs stay valid
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=30 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: * OK [UIDNEXT 6985] Next UID
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=37 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: * OK [UNSEEN 2086] Not all are seen
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=15 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: * 4124 EXISTS
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=12 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: * 0 RECENT
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=125 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: * FLAGS (\Answered \Flagged \Draft \Deleted \Seen Junk NonJunk $Forwarded $MDNSent $label1 $label3 $label2 $label4 $label5)
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=158 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen Junk NonJunk $Forwarded $MDNSent $label1 $label3 $label2 $label4 $label5 \*)] Permanent flags
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=29 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:A:CreateNewLineFromSocket: 8 OK [READ-WRITE] Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: 9 myrights "INBOX"
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=32 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * MYRIGHTS INBOX lrswipkxcteda
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=16 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 9 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: 10 getacl "INBOX"
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=36 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * ACL INBOX antoniuk lrswipkxcteda
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=17 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 10 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: 11 getquotaroot "INBOX"
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=19 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * QUOTAROOT INBOX
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=17 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 11 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: 12 UID fetch 1:* (FLAGS)
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=41 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * 1 FETCH (FLAGS (\Seen NonJunk) UID 4)

. . . . .

-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * 4124 FETCH (FLAGS (NonJunk) UID 6984)
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=17 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 12 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: 13 IDLE
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=12 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: + go ahead
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: DONE
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=15 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * 4125 EXISTS
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=40 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * 4125 FETCH (FLAGS (NonJunk $label5))
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=17 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 13 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:ProcessCurrentURL: entering
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:ProcessCurrentURL:imap://antoniuk@smtp.gat.com:143/select%3E/INBOX:  = currentUrl
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: 14 noop
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=17 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 14 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: 15 getquotaroot "INBOX"
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=19 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * QUOTAROOT INBOX
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=17 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 15 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: 16 UID fetch 6985:* (FLAGS)
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=49 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * 4125 FETCH (FLAGS (NonJunk $label5) UID 6985)
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=17 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 16 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: 17 UID fetch 6985 (UID RFC822.SIZE FLAGS BODY.PEEK[HEADER.FIELDS (From To Cc Subject Date Message-ID Priority X-Priority References Newsgroups In-Reply-To Content-Type)])
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=195 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * 4125 FETCH (FLAGS (NonJunk $label5) UID 6985 RFC822.SIZE 1291 BODY[HEADER.FIELDS (From To Cc Subject Date Message-ID Priority X-Priority References Newsgroups In-Reply-To Content-Type)] {283}
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:STREAM:OPEN Size: 1291: Begin Message Download Stream
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=47 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: Message-ID: <4A6E7178.4030505@fusion.gat.com>
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=39 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: Date: Mon, 27 Jul 2009 20:33:12 -0700
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=58 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: From: Novimir Antoniuk Pablant <antoniuk@fusion.gat.com>
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=56 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: To: Novimir Antoniuk Pablant <antoniuk@fusion.gat.com>
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=20 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: Subject: IMAP TEST
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=61 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: Content-Type: text/plain; charset=ISO-8859-1; format=flowed
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=2 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=3 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: )
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:STREAM:CLOSE: Normal Message End Download Stream
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=17 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 17 OK Completed
2421056[8d3eeb0]: queuing url:imap://antoniuk@smtp.gat.com:143/previewBody>UID>/INBOX>6985>2048
2421056[8d3eeb0]: considering playing queued url:imap://antoniuk@smtp.gat.com:143/previewBody>UID>/INBOX>6985>2048
2421056[8d3eeb0]: creating protocol instance to play queued url:imap://antoniuk@smtp.gat.com:143/previewBody>UID>/INBOX>6985>2048
2421056[8d3eeb0]: failed creating protocol instance to play queued url:imap://antoniuk@smtp.gat.com:143/previewBody>UID>/INBOX>6985>2048
2421056[8d3eeb0]: considering playing queued url:imap://antoniuk@smtp.gat.com:143/previewBody>UID>/INBOX>6985>2048
2421056[8d3eeb0]: creating protocol instance to play queued url:imap://antoniuk@smtp.gat.com:143/previewBody>UID>/INBOX>6985>2048
2421056[8d3eeb0]: playing queued url:imap://antoniuk@smtp.gat.com:143/previewBody>UID>/INBOX>6985>2048
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:ProcessCurrentURL: entering
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:ProcessCurrentURL:imap://antoniuk@smtp.gat.com:143/previewBody%3EUID%3E/INBOX%3E6985%3E2048:  = currentUrl
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: 18 UID fetch 6985 (UID BODY.PEEK[HEADER.FIELDS (Content-Type Content-Transfer-Encoding)] BODY.PEEK[TEXT]<0.2048>)
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=90 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * 4125 FETCH (UID 6985 BODY[HEADER.FIELDS (Content-Type Content-Transfer-Encoding)] {96}
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:STREAM:OPEN Size: 0: Begin Message Download Stream
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=61 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: Content-Type: text/plain; charset=ISO-8859-1; format=flowed
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=33 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: Content-Transfer-Encoding: 7bit
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=2 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=21 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket:  BODY[TEXT]<0> {11}
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=11 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: IMAP TEST
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=3 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: )
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:STREAM:CLOSE: Normal Message End Download Stream
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=17 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 18 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: 19 IDLE
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=12 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: + go ahead
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=55 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * 4124 FETCH (FLAGS (\Deleted \Seen NonJunk $label5))
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: DONE
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=17 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 19 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:ProcessCurrentURL: entering
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:ProcessCurrentURL:imap://antoniuk@smtp.gat.com:143/select%3E/INBOX:  = currentUrl
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: 20 noop
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=17 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 20 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: 21 getquotaroot "INBOX"
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=19 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * QUOTAROOT INBOX
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=17 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 21 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: 22 UID fetch 6986:* (FLAGS)
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=49 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * 4125 FETCH (FLAGS (NonJunk $label5) UID 6985)
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=17 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 22 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: 23 IDLE
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=12 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: + go ahead
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: DONE
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=17 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 23 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:ProcessCurrentURL: entering
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:ProcessCurrentURL:imap://antoniuk@smtp.gat.com:143/Expunge%3E/INBOX:  = currentUrl
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: 24 expunge
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=16 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * 4124 EXPUNGE
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=17 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 24 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: 25 getquotaroot "INBOX"
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=19 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * QUOTAROOT INBOX
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=17 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 25 OK Completed
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:SendData: 26 UID fetch 6986:* (FLAGS)
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=49 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * 4124 FETCH (FLAGS (NonJunk $label5) UID 6985)
-1220547680[964db38]: ReadNextLine [stream=964e068 nb=17 needmore=0]
-1220547680[964db38]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 26 OK Completed
2421056[8d3eeb0]: 9887f88:smtp.gat.com:S-INBOX:SendData: 27 logout
2421056[8d3eeb0]: ReadNextLine [stream=964e068 nb=23 needmore=0]
2421056[8d3eeb0]: 9887f88:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * BYE LOGOUT received
2421056[8d3eeb0]: 9887f88:smtp.gat.com:NA:TellThreadToDie: close socket connection
-1220547680[964db38]: ImapThreadMainLoop leaving [this=9887f88]
(In reply to comment #11)

First of all, never paste long data. Save in text file, and attach file to this bug(via "Add an attachment" link o this bug).

> I checked the mailnews.tags.<xxxx>.tag in the config editor of both the tb2 and tb3b3 clients. The values are exactly identical.

What tags are defined? $lable1 to $label5 only? Or other user defined tag exists?

> I have been able to reproducibly make tags appear in tb2 (that is tags that I never set).
> While I have continued to see tags appear in tb 3b3 (snip)

(1) Select command and response
    $label1 $label3 $label2 $label4 $label5 are already created. (probably by Tb)
> 8 select "INBOX"
> * OK [UIDVALIDITY 1180142606] UIDs stay valid
> * OK [UIDNEXT 6985] Next UID
> * OK [UNSEEN 2086] Not all are seen
> * 4124 EXISTS
> * 0 RECENT
> * FLAGS (\Answered \Flagged \Draft \Deleted \Seen Junk NonJunk $Forwarded $MDNSent $label1 $label3 $label2 $label4 $label5)
> * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen Junk NonJunk $Forwarded $MDNSent $label1 $label3 $label2 $label4 $label5 \*)] Permanent flags
> 8 OK [READ-WRITE] Completed

(2) Mail of UID=4. keyword(user defined flag, tag of Tb) is not stored.
> 12 UID fetch 1:* (FLAGS)
> * 1 FETCH (FLAGS (\Seen NonJunk) UID 4)

(3) Mail of UID=6985. flag(keyword) of $label5(tag of Tb) is stored.
> 17 UID fetch 6985 (UID RFC822.SIZE FLAGS BODY.PEEK[HEADER.FIELDS (From To Cc Subject Date Message-ID Priority X-Priority References Newsgroups In-Reply-To Content-Type)])
> * 4125 FETCH (FLAGS (NonJunk $label5) UID 6985 RFC822.SIZE 1291 BODY[HEADER.FIELDS (From To Cc Subject Date Message-ID Priority X-Priority References Newsgroups In-Reply-To Content-Type)] {283}

For mail of UID=6985, tag should be appear on both Tb 2 & Tb 3, because flag of $label5(tag of Tb) is stored, and you say "The values are exactly identical".
Have you checked tag column display of both Tb 2 & Tb 3 for mail of UID=6985 with showing "Order Received" column?

> (that is tags that I never set)

What do you mean by "I never set"?
   i) You never added tag to any mail in any mail folder by any your Tb.
  ii) You never added tag to the mail in a mail folder by any your Tb.
 iii) You added a tag for the mail in a mail folder by a Tb, but you removed
      the tag from the mail. So the mail doesn't have tag of Tb(keyword, user
      defined flag).

> (that is tags that I never set)

Do you share the IMAP account with other people?
... and you made sure there isn't any extension that's causing this?
Novimir Pablant(bug opener), you said next in comment #0(original report of this bug).
> Actual Results:  
> Some messages in now have tags that I did not set.  Tags seem random and there
> may be multiple tags.
> Expected Results:  
> No tags should have been set.
We trusted it before start of problem analysis of your this bug report at B.M.O. 
However, your IMAP log clearly says that $label5 is set at least for mail of UID=6985.
What is reason why $label5 is set at least for mail of UID=6985 even though you said "No tags should have been set"?
What is your base/evidence of "No tags should have been set"?
IMAP log lies?
Attached file Log for tb2 on linux
This log shows a case where a tag appeared in tb2.  See the log from tb3 for comparison.
Attached file Log for tb3 on OSX.
This is the log for tb3b3 where a tag appeared for a message in tb2.  See the log for tb2.
I am attaching logs from both tb2 and tb3b3 for another test where a tag appeared in tb2 but not from tb3b3.  I used the same procedure as I outlined before.  In this case I used tb3 to send a message to myself.  The message for which a "Later" tag appeared in tb2 is 6994.



Answers to some questions:
> you made sure there isn't any extension that's causing this?
Yes, I have no extensions enabled on either Tb.

> What tags are defined? $lable1 to $label5 only?
The only tags that are defined are $label1 through $label5.

> Have you checked tag column display of both Tb 2 & Tb 3.
Yes, the UID is the same for the message in tb2 & tb3.
The tag only appeared in tb2.

> What do you mean by "I never set"?
I mean i).  I have never added any tags to any emails in any folders by any Tb.

> Do you share the IMAP account with other people?
I do not share this account with anyone. 

> What is your base/evidence of "No tags should have been set"?
This is explained by looking at my step by step procedure for recreating the problem.

> IMAP log lies?
It appears to.  Remember that if I close and reopen tb2, the tags disappear.
fetching the preview text seems to make the server temporarily think the $label5 flag is set on the message - that looks very much like a server bug.

-1241527392[96efe38]: 992a468:smtp.gat.com:S-INBOX:SendData: 18 UID fetch 6994 (UID BODY.PEEK[HEADER.FIELDS (Content-Type Content-Transfer-Encoding)] BODY.PEEK[TEXT]<0.2048>)
-1241527392[96efe38]: ReadNextLine [stream=96f0368 nb=90 needmore=0]
-1241527392[96efe38]: 992a468:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * 4132 FETCH (UID 6994 BODY[HEADER.FIELDS (Content-Type Content-Transfer-Encoding)] {96}
-1241527392[96efe38]: 992a468:smtp.gat.com:S-INBOX:STREAM:OPEN Size: 0: Begin Message Download Stream
-1241527392[96efe38]: ReadNextLine [stream=96f0368 nb=61 needmore=0]
-1241527392[96efe38]: 992a468:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: Content-Type: text/plain; charset=ISO-8859-1; format=flowed
-1241527392[96efe38]: ReadNextLine [stream=96f0368 nb=33 needmore=0]
-1241527392[96efe38]: 992a468:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: Content-Transfer-Encoding: 7bit
-1241527392[96efe38]: ReadNextLine [stream=96f0368 nb=2 needmore=0]
-1241527392[96efe38]: 992a468:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 
-1241527392[96efe38]: ReadNextLine [stream=96f0368 nb=21 needmore=0]
-1241527392[96efe38]: 992a468:smtp.gat.com:S-INBOX:CreateNewLineFromSocket:  BODY[TEXT]<0> {12}
-1241527392[96efe38]: ReadNextLine [stream=96f0368 nb=12 needmore=0]
-1241527392[96efe38]: 992a468:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: IMAP Test.
-1241527392[96efe38]: ReadNextLine [stream=96f0368 nb=3 needmore=0]
-1241527392[96efe38]: 992a468:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: )
-1241527392[96efe38]: 992a468:smtp.gat.com:S-INBOX:STREAM:CLOSE: Normal Message End Download Stream
-1241527392[96efe38]: ReadNextLine [stream=96f0368 nb=49 needmore=0]
-1241527392[96efe38]: 992a468:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: * 4132 FETCH (FLAGS (NonJunk $label5) UID 6994)
-1241527392[96efe38]: ReadNextLine [stream=96f0368 nb=17 needmore=0]
-1241527392[96efe38]: 992a468:smtp.gat.com:S-INBOX:CreateNewLineFromSocket: 18 OK Completed

TB 3 may not fetch the preview text because auto sync of offline stores might make it unnecessary in some situations.
Status: UNCONFIRMED → RESOLVED
Closed: 15 years ago
Resolution: --- → INVALID
That sounds reasonable, and might explain why the order in which the tb2 & tb3 clients pick up the mail is important.
(In reply to comment #17)
> > What do you mean by "I never set"?
> I mean i).  I have never added any tags to any emails in any folders by any Tb.

Question to avoid going to wrong direction.
Is there any message filter rule which sets tag?

> > Have you checked tag column display of both Tb 2 & Tb 3.
> Yes, the UID is the same for the message in tb2 & tb3.
> The tag only appeared in tb2.

It's not surprising. Rewriting my comment #1.
> AFAIK, Tb 2 still has problem in multiple tag handling.
> See Bug 450246. Problem you are seeing with Tb 2 may be DUP of Bug 450246.
Once Tb 2 knows about $label5, and status becomes "$label5 only", it'll never be cleared by Tb 2 until rebuild-index or addition of other tag.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: