"Invalid Command" or "invalid flag: \indexed" errors when copying between IMAP accounts

NEW
Unassigned

Status

MailNews Core
Networking: IMAP
--
major
7 years ago
9 months ago

People

(Reporter: Dimitri Papadopoulos, Unassigned)

Tracking

1.9.2 Branch
x86
Windows XP

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(4 attachments)

(Reporter)

Description

7 years ago
User-Agent:       Mozilla/5.0 (X11; U; Linux x86_64; fr; rv:1.9.2.12) Gecko/20101027 Fedora/3.6.12-1.fc14 Firefox/3.6.12
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6

I sometimes get "Illegal Command" or "invalid flag: \indexed" errors when copying messages from one IMAP account to another one. This seems to happen with old messages only (at least one week) and not with messages recently received.

This used to work without problems. Problems started in the last few weeks, possibly after the release of latest version 3.1.6.

I can reproduce the problem with Thunderbird 3.1.6 on at least two platforms:
* Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101103 Fedora/1.0-0.33.b2pre.fc14 Thunderbird/3.1.6
* Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6

Reproducible: Sometimes

Steps to Reproduce:
1. Start Thunderbird.
2. Select an older message from an IMAP account, in my case an SFR (imap.sfr.fr) account.
3. Drag and drop the message to some other IMAP account, in my case a GMail (gmail.imap.com) or Free (imap.free.fr) account.
Actual Results:  
Error messages such as:
* "parse error: invalid flag: \indexed" (dropping to Free free.imap.fr account)
* "Invalid Command" (dropping to GMail imap.gmail.com account)

Expected Results:  
The message should have been moved to the target IMAP account.
(Reporter)

Comment 1

7 years ago
Created attachment 496091 [details]
error pops up while copying message from SFR account to Gmail

This screen capture shows the "Invalid Command" error message popping up after dropping a message into the Gmail account inbox.
(Reporter)

Comment 2

7 years ago
Created attachment 496094 [details]
error pops up while copying message from SFR account to Free

This screen capture shows the "parse error: invalid flag: \indexed" error message popping up after dropping a message into the Free account inbox.
Can you get us an imap log ( see https://wiki.mozilla.org/MailNews:Logging) ?
Component: General → Networking: IMAP
Product: Thunderbird → MailNews Core
QA Contact: general → networking.imap
Version: unspecified → 1.9.2 Branch
(Reporter)

Comment 4

7 years ago
Created attachment 496101 [details]
IMAP log while moving message from SFR to Gmail

log file generated using:
export NSPR_LOG_MODULES=imap:5
export NSPR_LOG_FILE=/tmp/imap.log
(Reporter)

Comment 5

7 years ago
Created attachment 496102 [details]
IMAP log while moving message from SFR to Free

log file generated using:
export NSPR_LOG_MODULES=imap:5
export NSPR_LOG_FILE=/tmp/imap.log

Comment 6

7 years ago
imap.free.fr claims to support arbitrary keywords as indicated by the \* response in the permanent flags below, but is not allowing us to set the \indexed flag, which sounds like an issue with the server.

52e76800:imap.free.fr:A:SendData: 2 select "INBOX"
1283249920[7f0f52e4fae0]: ReadNextLine [stream=57460510 nb=13 needmore=0]
1283249920[7f0f52e4fae0]: 52e76800:imap.free.fr:A:CreateNewLineFromSocket: * 14 EXISTS
1283249920[7f0f52e4fae0]: ReadNextLine [stream=57460510 nb=12 needmore=0]
1283249920[7f0f52e4fae0]: 52e76800:imap.free.fr:A:CreateNewLineFromSocket: * 1 RECENT
1283249920[7f0f52e4fae0]: ReadNextLine [stream=57460510 nb=51 needmore=0]
1283249920[7f0f52e4fae0]: 52e76800:imap.free.fr:A:CreateNewLineFromSocket: * OK [UNSEEN 14] mailbox contains unseen messages
1283249920[7f0f52e4fae0]: ReadNextLine [stream=57460510 nb=54 needmore=0]
1283249920[7f0f52e4fae0]: 52e76800:imap.free.fr:A:CreateNewLineFromSocket: * OK [UIDVALIDITY 1] UIDs are valid for this mailbox
1283249920[7f0f52e4fae0]: ReadNextLine [stream=57460510 nb=49 needmore=0]
1283249920[7f0f52e4fae0]: 52e76800:imap.free.fr:A:CreateNewLineFromSocket: * OK [UIDNEXT 15364] next expected UID is 15364
1283249920[7f0f52e4fae0]: ReadNextLine [stream=57460510 nb=131 needmore=0]
1283249920[7f0f52e4fae0]: 52e76800:imap.free.fr:A:CreateNewLineFromSocket: * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded $Junk $NotJunk Junk JunkRecorded NonJunk NotJunk)
1283249920[7f0f52e4fae0]: ReadNextLine [stream=57460510 nb=136 needmore=0]
1283249920[7f0f52e4fae0]: 52e76800:imap.free.fr:A:CreateNewLineFromSocket: * OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded $MDNSent Forwarded \*)] junk-related flags are not permanent
1283249920[7f0f52e4fae0]: ReadNextLine [stream=57460510 nb=60 needmore=0]
(Reporter)

Comment 7

7 years ago
I think the issue(s) I'm reporting appeared all of a sudden, both with Free and Gmail. This is why I thought this is a Thunderbird client issue. Now I may be wrong and these may be unrelated issues, I can't tell for sure.

Even if it's a server issue, it would be worth working around it in Thunderbird, at least in the Gmail case.

I can try and contact Free support if you're positive it's an issue with their server.

Comment 8

7 years ago
The basic bug is with the server that's returning the flag \indexed - that's illegal. User-defined keywords can't start with '\'. Only system flags can start with '\', and those are limited to \seen, \answered, \flagged, \deleted, \draft, and \recent. On the other hand, Thunderbird should probably be throwing away those invalid keywords when transferring messages to an other server, but the initial problem is with the imap.sfr.fr server.
Status: UNCONFIRMED → NEW
Ever confirmed: true
(Reporter)

Comment 9

7 years ago
I've added a note on SFR forums in the hope a helpful SFR sysadmin might have a look at it and fix imap.sfr.fr:
http://forum.sfr.fr/c144-adsl-questions-techniques/f129-sfr-mail/f131-utilitaires-de-messagerie/t77070-bug-du-serveur-imap-renvoie-indexed.htm
That's the only way I know of to contact SFR.

Hopefully Thunderbird will be modified to throw away invalid system flags sent by broken IMAP servers.
Removing myslef on all the bugs I'm cced on. Please NI me if you need something on MailNews Core bugs from me.
You need to log in before you can comment on or make changes to this bug.