IMAP: Why are faster IMAP commands not processed instantly?



  • RFC 3501 specifies that clients may send commands without waiting for the previous command to finish: https://tools.ietf.org/html/rfc3501#section-5.5

    While it’s a “MAY”, this would greatly improve performance in some IMAP-based email clients:

    For example, the email client I’m using (“The Bat”) really likes to run UID SEARCH 1:* DELETED.
    I don’t know why, but when looking at the raw IMAP data I see this a lot.

    Now the problem is that this is SLOW for a big folder (19k emails). Takes about 20 seconds for to complete. And I have the strong impression that my email client sends other commands (like fetching the body of a message I want to view) on the same connection while the search command is still running.

    With other IMAP servers (like Dovecot which I’m using for my personal emails), this is not such an issue because if I send a slow command first and then some other command, the client will quickly get the response to the second command. Kopano’s IMAP implementation however waits until the first command finished before running the next one.


Log in to reply