[ 
https://issues.apache.org/jira/browse/JAMES-3888?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Benoit Tellier updated JAMES-3888:
----------------------------------
    Fix Version/s: 3.8.0

> Enforce sequetial ordering of IMAP requests for each channels
> -------------------------------------------------------------
>
>                 Key: JAMES-3888
>                 URL: https://issues.apache.org/jira/browse/JAMES-3888
>             Project: James Server
>          Issue Type: Improvement
>            Reporter: Benoit Tellier
>            Priority: Major
>             Fix For: 3.8.0
>
>          Time Spent: 20m
>  Remaining Estimate: 0h
>
> Today IMAP requests are not executed in a sequencial order.
> If a MUA sends two requests at once, we are going to execute both in parallel.
> For instance sending `A1 SELECT INBOX\r\nA2 UID FETCH 1:100 (FLAGS)\r\n"` 
> would result in:
> {code:java}
> 06:43:49.002 [INFO ] o.a.j.p.l.n.AbstractConfigurableAsyncServer - IMAP 
> Service bound to: 0.0.0.0:0
> 06:43:49.061 [INFO ] o.a.j.p.l.n.AbstractConfigurableAsyncServer - IMAP 
> Service is running on: interview1-HP-ProBook-440-G6
> 06:43:49.062 [INFO ] o.a.j.p.l.n.AbstractConfigurableAsyncServer - IMAP 
> Service handler hello name is: interview1-HP-ProBook-440-G6
> 06:43:49.063 [INFO ] o.a.j.p.l.n.AbstractConfigurableAsyncServer - IMAP 
> Service handler connection timeout is: 300
> 06:43:49.064 [INFO ] o.a.j.p.l.n.AbstractConfigurableAsyncServer - IMAP 
> Service connection backlog is: 200
> 06:43:49.530 [INFO ] o.a.j.p.l.n.AbstractConfigurableAsyncServer - Init IMAP 
> Service done
> 06:43:49.540 [DEBUG] o.a.j.m.s.StoreMailboxManager - createMailbox 
> #private:u...@domain.org:INBOX
> 06:43:49.722 [DEBUG] o.a.j.m.s.StoreMailboxManager - Loaded mailbox 
> #private:u...@domain.org:INBOX
> 06:43:50.192 [INFO ] o.a.j.i.n.ImapChannelUpstreamHandler - Connection 
> established from 127.0.0.1
> 06:43:50.683 [DEBUG] o.a.j.i.d.m.DefaultImapDecoder - Got <tag>: Tag{value=a0}
> 06:43:50.683 [DEBUG] o.a.j.i.d.m.DefaultImapDecoder - Got <command>: LOGIN
> 06:43:50.706 [DEBUG] o.a.j.i.p.AbstractAuthProcessor - INBOX exists. No need 
> to create it.
> 06:43:50.712 [DEBUG] o.a.j.i.d.m.DefaultImapDecoder - Got <tag>: Tag{value=A1}
> 06:43:50.713 [DEBUG] o.a.j.i.d.m.DefaultImapDecoder - Got <command>: SELECT
> 06:43:50.732 [DEBUG] o.a.j.m.s.StoreMailboxManager - Loaded mailbox 
> #private:u...@domain.org:INBOX
> 06:43:50.835 [DEBUG] o.a.j.i.d.m.DefaultImapDecoder - Got <tag>: Tag{value=A2}
> 06:43:50.836 [DEBUG] o.a.j.i.d.m.DefaultImapDecoder - Got <command>: UID
> 06:43:50.837 [DEBUG] o.a.j.i.d.p.UidCommandParser - Got <command>: UID FETCH
> 06:43:50.859 [DEBUG] o.a.j.m.s.StoreMailboxManager - Loaded mailbox 1 
> #private:u...@domain.org:INBOX
> * 1 FETCH (FLAGS (\Recent) UID 1)
> [...]
> * 100 FETCH (FLAGS (\Recent) UID 100)
> A2 OK FETCH completed.
>                                                                               
>                                                                               
>                                                                               
>                                                                               
>                                                                             * 
> OK [MAILBOXID (1)] Ok
> * FLAGS (\Answered \Deleted \Draft \Flagged \Seen)
> * 137 EXISTS
> * 137 RECENT
> * OK [UIDVALIDITY 1396946597] UIDs valid
> * OK [UNSEEN 1] MailboxMessage 1 is first unseen
> * OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen \*)] Limited
> * OK [HIGHESTMODSEQ 137] Highest
> * OK [UIDNEXT 138] Predicted next UID
> A1 OK [READ-WRITE] SELECT completed.
> {code}
> We see that the FETCH request is incorrectly executed before the SELECT 
> returns.
> This, is not acceptable. As IMAP is a connected protocols, requests are not 
> independant from each others.
> We need a solution to enforce sequencial ordering of IMAP execution at the 
> channel level.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscr...@james.apache.org
For additional commands, e-mail: server-dev-h...@james.apache.org

Reply via email to