MBOX-Line: From markrcrispin at live.com  Tue Jul  8 08:16:32 2008
To: imap-protocol@u.washington.edu
From: Mark Crispin <markrcrispin@live.com>
Date: Fri Jun  8 12:34:42 2018
Subject: [Imap-protocol] IMAP server mail transfer simulation
In-Reply-To: <56b1f8870807080802p4bea379bi5185e9aff1b33585@mail.gmail.com>
References: <56b1f8870807080802p4bea379bi5185e9aff1b33585@mail.gmail.com>
Message-ID: <BLU126-W4B7DCBF433E160F8CEE93B8970@phx.gbl>


You're on the correct track, but the response is wrong.  Use "* OK", not "+ OK".

"+" is for command continuation (literals, IDLE, and SASL negotiations), and will confuse clients that do not have any command continuation in progress.

"* OK" is specifically for server-originated babble.  I suggest something like "* OK wait please..." rather than leaving the payload text empty.

-- Mark --



________________________________
Date: Tue, 8 Jul 2008 19:02:25 +0400
From: lozhkarev@googlemail.com
To: imap-protocol@u.washington.edu
Subject: [Imap-protocol] IMAP server mail transfer simulation

Hello, I'm developing IMAP proxy server to check attachments.



(mail client) <-> (my proxy) <-> (real IMAP server)



Proxy does simple work: transmitting client requests and server responses.

Problem appears when client requests some message from server, but proxy can't response to client while it not download full message from real server (Proxy must check attachment before transmitting it). The message may be very large and downloading may take much time. If client has some timeout it may decide that server failed.




I tried to send "+ OK\r\n" periodically to client before real data preparing, and this method is helpful for some mail clients. For example:



C: f fetch 1 (body[])

S: + OK    // server send "+ OK\r\n" by timer while downloading full message

S: + OK

S: + OK

...

S: * 1 FETCH (BODY[] {9876543} ....



but I think this way is not correct.



Is any IMAP protocol feature to simulate message downloading, to prevent client thinking about timeout?



---------------------------------------------------------------

Nickolay Lozhkarev


_________________________________________________________________
Need to know now? Get instant answers with Windows Live Messenger.
http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL_messenger_072008
