Skip to content

Remote IMAP Compliance Failures

Travis McLane edited this page Jul 21, 2017 · 5 revisions

Remote IMAP Compliance Failures

All failures were found using the Dovecot IMAPTest program.

Copy Scenario 1 | Failure to output exists/recent on 'noop'

From: src/tests/copy 16/24 (line 28)

Scenario requires two connections to duplicate. Note: Both connections need to connect to the IMAPD service.

IMAP Session Transcripts

The interposing of the sessions is to signify when each command should be run and on which connection.

Connection 1 (IMAPD):

* OK zcs-dev-one.dev Zimbra IMAP4rev1 server ready
. LOGIN user1 test123
. OK [CAPABILITY IMAP4rev1 ACL BINARY CATENATE CHILDREN CONDSTORE ENABLE ESEARCH ESORT I18NLEVEL=1 ID IDLE LIST-EXTENDED LIST-STATUS LITERAL+ LOGIN-REFERRALS MULTIAPPEND NAMESPACE QRESYNC QUOTA RIGHTS=ektx SASL-IR SEARCHRES SORT THREAD=ORDEREDSUBJECT UIDPLUS UNSELECT WITHIN XLIST] LOGIN completed
. SELECT Inbox
* 0 EXISTS
* 0 RECENT
. APPEND Inbox () {310}
+ send literal data
Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
From: Fred Foobar <[email protected]>
Subject: afternoon meeting
To: [email protected]
Message-Id: <[email protected]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII

Hello Joe, do you think we can meet at 3:30 tomorrow?

* 1 EXISTS
* 1 RECENT
. OK [APPENDUID 1 36924] APPEND completed

Connection 2 (IMAPD):

* OK zcs-dev-one.dev Zimbra IMAP4rev1 server ready
. login user1 test123
. OK [CAPABILITY IMAP4rev1 ACL BINARY CATENATE CHILDREN CONDSTORE ENABLE ESEARCH ESORT I18NLEVEL=1 ID IDLE LIST-EXTENDED LIST-STATUS LITERAL+ LOGIN-REFERRALS MULTIAPPEND NAMESPACE QRESYNC QUOTA RIGHTS=ektx SASL-IR SEARCHRES SORT THREAD=ORDEREDSUBJECT UIDPLUS UNSELECT WITHIN XLIST] LOGIN completed
. DELETE destination
. CREATE destination
. SELECT destination

Connection 1

. COPY 1 destination

Connection 2

Correct response
. NOOP
* 1 EXISTS
* 1 RECENT
. OK NOOP completed
Current (Incorrect) response
. NOOP
. OK NOOP completed

Note: The missing EXISTS and RECENT responses.

Copy Scenario 2 | Range selection failure after 'copy'

From: src/tests/copy 17/24 (line 32)

Scenario requires two connections to duplicate. Note: Both connections need to connect to the IMAPD service.

IMAP Session Transcripts

The interposing of the sessions is to signify when each command should be run and on which connection.

Connection 1 (IMAPD):

* OK zcs-dev-one.dev Zimbra IMAP4rev1 server ready
. LOGIN user1 test123
. OK [CAPABILITY IMAP4rev1 ACL BINARY CATENATE CHILDREN CONDSTORE ENABLE ESEARCH ESOT I18NLEVEL=1 ID IDLE LIST-EXTENDED LIST-STATUS LITERAL+ LOGIN-REFERRALS MULTIAPPEND NAMSPACE QRESYNC QUOTA RIGHTS=ektx SASL-IR SEARCHRES SORT THREAD=ORDEREDSUBJECT UIDPLUS UNSLECT WITHIN XLIST] LOGIN completed
. SELECT Inbox
* 0 EXISTS
* 0 RECENT
. APPEND Inbox () {310}
+ send literal data
Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
From: Fred Foobar <[email protected]>
Subject: afternoon meeting
To: [email protected]
Message-Id: <[email protected]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII

Hello Joe, do you think we can meet at 3:30 tomorrow?

* 1 EXISTS
* 1 RECENT
. OK [APPENDUID 1 36924] APPEND completed
. APPEND Inbox () {310}
+ send literal data
Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
From: Fred Foobar <[email protected]>
Subject: afternoon meeting
To: [email protected]
Message-Id: <[email protected]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII

Hello Joe, do you think we can meet at 3:30 tomorrow?

* 2 EXISTS
* 2 RECENT
. OK [APPENDUID 1 36924] APPEND completed
. APPEND Inbox () {310}
+ send literal data
Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
From: Fred Foobar <[email protected]>
Subject: afternoon meeting
To: [email protected]
Message-Id: <[email protected]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII

Hello Joe, do you think we can meet at 3:30 tomorrow?

* 3 EXISTS
* 3 RECENT
. OK [APPENDUID 1 36924] APPEND completed
. APPEND Inbox () {310}
+ send literal data
Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
From: Fred Foobar <[email protected]>
Subject: afternoon meeting
To: [email protected]
Message-Id: <[email protected]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII

Hello Joe, do you think we can meet at 3:30 tomorrow?

* 4 EXISTS
* 4 RECENT
. OK [APPENDUID 1 36924] APPEND completed

Connection 2 (IMAPD):

* OK zcs-dev-one.dev Zimbra IMAP4rev1 server ready
. login user1 test123
. OK [CAPABILITY IMAP4rev1 ACL BINARY CATENATE CHILDREN CONDSTORE ENABLE ESEARCH ESORT I18NLEVEL=1 ID IDLE LIST-EXTENDED LIST-STATUS LITERAL+ LOGIN-REFERRALS MULTIAPPEND NAMESPACE QRESYNC QUOTA RIGHTS=ektx SASL-IR SEARCHRES SORT THREAD=ORDEREDSUBJECT UIDPLUS UNSELECT WITHIN XLIST] LOGIN completed
. DELETE destination
. CREATE destination
. SELECT destination

Connection 1

. copy 1:2,4 destination
. OK [COPYUID 103266 35796,35809,35866 36931:36933] COPY completed

Connection 2

Correct response
. fetch 1:3 (flags internaldate)
* 1 FETCH (INTERNALDATE "20-Mar-2004 00:42:42 -0600" FLAGS (\Seen))
* 2 FETCH (INTERNALDATE "13-Jul-2017 14:16:17 -0500" FLAGS (\Seen))
* 3 FETCH (INTERNALDATE "02-Apr-2004 13:49:53 -0600" FLAGS ())
. OK FETCH completed
Current (Incorrect) response
. fetch 1:3 (flags internaldate)
* 1 FETCH (INTERNALDATE "20-Mar-2004 00:42:42 -0600" FLAGS (\Seen))
* 2 FETCH (INTERNALDATE "13-Jul-2017 14:16:17 -0500" FLAGS (\Seen))
* 3 FETCH (INTERNALDATE "02-Apr-2004 13:49:53 -0600" FLAGS ())
* 5 FETCH (FLAGS (\Seen $$keyword1 $$keyword2))
. OK FETCH completed
Second fetch produces correct response
 fetch 1:3 (flags internaldate)
* 1 FETCH (INTERNALDATE "20-Mar-2004 00:42:42 -0600" FLAGS (\Seen))
* 2 FETCH (INTERNALDATE "13-Jul-2017 14:16:17 -0500" FLAGS (\Seen))
* 3 FETCH (INTERNALDATE "02-Apr-2004 13:49:53 -0600" FLAGS ())
. OK FETCH completed

Error message

The message below is found in the output file from the imaptest program in relation to this error. Might be helpful in tracking down where in the codebase the issue is originating. Note: I don't see this during manual testing.

 - failed: Expected tagged reply 'ok', got 'BAD parse error: invalid message sequence number: 1:3'

Copy Scenario 3 | Unexpected disconnection

Believe this may be caused by the failure to parse the '1:3' in Copy Scenario 2. Haven't triggered this manually so far.

Copy Scenario 4 | Unfinished

Expunge Scenario 1 | Incorrect flags applied

From: src/tests/expunge (line 15)

Scenario requires one connections to duplicate. Note: Connection needs to connect to the IMAPD service.

IMAP Session Transcripts

Connection 1 (IMAPD):

* OK zcs-dev-one.dev Zimbra IMAP4rev1 server ready
. LOGIN user1 test123
. OK [CAPABILITY IMAP4rev1 ACL BINARY CATENATE CHILDREN CONDSTORE ENABLE ESEARCH ESORT I18NLEVEL=1 ID IDLE LIST-EXTENDED LIST-STATUS LITERAL+ LOGIN-REFERRALS MULTIAPPEND NAMESPACE QRESYNC QUOTA RIGHTS=ektx SASL-IR SEARCHRES SORT THREAD=ORDEREDSUBJECT UIDPLUS UNSELECT WITHIN XLIST] LOGIN completed
. SELECT Inbox
* 0 EXISTS
* 0 RECENT
. APPEND Inbox () {310}
+ send literal data
Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
From: Fred Foobar <[email protected]>
Subject: afternoon meeting
To: [email protected]
Message-Id: <[email protected]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII

Hello Joe, do you think we can meet at 3:30 tomorrow?

* 1 EXISTS
* 1 RECENT
. OK [APPENDUID 1 36924] APPEND completed
. APPEND Inbox () {310}
+ send literal data
Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
From: Fred Foobar <[email protected]>
Subject: afternoon meeting
To: [email protected]
Message-Id: <[email protected]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII

Hello Joe, do you think we can meet at 3:30 tomorrow?

* 2 EXISTS
* 2 RECENT
. OK [APPENDUID 1 36924] APPEND completed
. APPEND Inbox () {310}
+ send literal data
Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
From: Fred Foobar <[email protected]>
Subject: afternoon meeting
To: [email protected]
Message-Id: <[email protected]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII

Hello Joe, do you think we can meet at 3:30 tomorrow?

* 3 EXISTS
* 3 RECENT
. OK [APPENDUID 1 36924] APPEND completed
. APPEND Inbox () {310}
+ send literal data
Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)
From: Fred Foobar <[email protected]>
Subject: afternoon meeting
To: [email protected]
Message-Id: <[email protected]>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; CHARSET=US-ASCII

Hello Joe, do you think we can meet at 3:30 tomorrow?

* 4 EXISTS
* 4 RECENT
. OK [APPENDUID 1 36924] APPEND completed
. fetch 1:4 (flags)
* 1 FETCH (FLAGS (\Recent))
* 2 FETCH (FLAGS (\Recent))
* 3 FETCH (FLAGS (\Recent))
* 4 FETCH (FLAGS (\Recent))
. OK FETCH completed
. store 1,3 flags \deleted

Expected response

* 1 fetch (flags (\Recent \deleted))
* 3 fetch (flags (\Recent \deleted))
. store 2,4 flags \seen

Current response

* 1 FETCH (FLAGS (\Seen \Recent))
* 3 FETCH (FLAGS (\Seen \Recent))
. OK STORE completed

Subscribe Scenario 1

From: src/tests/subscribe (line 39)

Scenario requires two connections to duplicate. Note: Connection needs to connect to the IMAPD service.

Please start with a fresh account each time such that no subscriptions remain that would interfere with the results.

IMAP Session Transcripts

Connection 1 (IMAPD):

* OK zcs-dev-one.dev Zimbra IMAP4rev1 server ready
. LOGIN user1 test123
. OK [CAPABILITY IMAP4rev1 ACL BINARY CATENATE CHILDREN CONDSTORE ENABLE ESEARCH ESORT I18NLEVEL=1 ID IDLE LIST-EXTENDED LIST-STATUS LITERAL+ LOGIN-REFERRALS MULTIAPPEND NAMESPACE QRESYNC QUOTA RIGHTS=ektx SASL-IR SEARCHRES SORT THREAD=ORDEREDSUBJECT UIDPLUS UNSELECT WITHIN XLIST] LOGIN completed
. create subscribe-test/
. OK CREATE Completed
. subscribe subscribe-test
. OK SUBSCRIBE Completed

Connection 2 (IMAPD)

Expected response
. lsub "" imaptest/%
* LSUB () "/" "imaptest/test"
. LSUB Completed
Current response
. lsub "" imaptest/%
. LSUB Completed
. lsub "" imaptest/%
* LSUB () "/" "imaptest/test"
. LSUB Completed