Big problem - WeOnlyDo Discussion board

Big problem (General questions)

by ab, Thursday, March 03, 2011, 08:51 (5013 days ago)

Hi! We are legal users of IMAP server, and while we still implementing IMAP server functionality in our system, found some big problem.
The problem is, while IMAP client fetching email-headers from IMAP folder, it also receiving sizes of the each email - body from IMAP server (at least this is behaviour of Outlook client). We have a zipped email bodies in the database, so we just creating email with header and empty body, and provide it to the IMAP server (in ListMessages event). If then client want a actual body, we get it from database, unzip and provide (in ReadMessage event). While in same session, client get it and store without problem, although the size of the body is different. But in the next session, client will get and display email with empty body! After some tests, seems it is because it getting and store exact number of bytes, whitch it was received in the ListMessages event of previous session. In our case is 0. :(
So system cant work properly in the session, other than 1st. Getting actual bodies from db, unzipping it, converting to eml to get actual size can heavily overload our server. SO:
1. Can we (by some way) to force client to get actual size of body in the next sessions?
2. If not, can you provide some way to transmit actual size of body in the ListMessages event, without assigning actual body to the message object?
Any help will be highly appreciated.
Thanx in advance.
Anton, Nordic-IT.

Re: Big problem

by woddrazen, Thursday, March 03, 2011, 10:36 (5013 days ago) @ ab

Hi Anton,


Does it work maybe if you add size of message using ImapMessage object StartPosition and EndPosition Property?

More help for StartPosition Property you can find here:
http://www.weonlydo.com/ImapServer/Help/wodImapServer-ImapMessage-StartPosition.html

More help for EndPosition Property you can find here:
http://www.weonlydo.com/ImapServer/Help/wodImapServer-ImapMessage-EndPosition.html

you can add this properties in your code when you load message header inside wodImapServer.

Let us know how it goes.


Regards,
Drazen

Re: Big problem

by bkv, Thursday, March 03, 2011, 22:11 (5012 days ago) @ woddrazen

Sorry, but how that properties could help?
What we need - is the possibility to provide message body only when it is realy requested.
Situation:
Right now, we provide in ListMessages event only message headers, and in ReadMessage event we provide message bodies.
Outlook 2007 as Imap client.
When user first time open folder, than everything is perfect. First ListMessages event is raized, where we provide the list of messages headers. That list perfectly displayed in Outlook. And ReadMessage event is raized when user is moving from one message in list to another to get the certain email body - working perfect!!!!
But! When user goes to another folder and than switched back to first folder, the ReadMessage event is not raised for messages which body was not loaded befor and Outlook displayes them as empty.
Pls help.

Re: Big problem

by wodDamir, Thursday, March 03, 2011, 22:34 (5012 days ago) @ bkv

Anton,

And what happens if you actually specify Size property of the message (to it's body size) when they are listed?

I assume that Outlook didn't try to receive the body because it's size was 0 at the time it was listed. Can you try the above suggestions?

Regards,
Damba

Re: Big problem

by bkv, Thursday, March 03, 2011, 22:54 (5012 days ago) @ wodDamir

Thanks for quick reply.
We are not able to specify message size because ImapMessage.Size property is readonly.

Re: Big problem

by wodDamir, Friday, March 04, 2011, 00:08 (5012 days ago) @ bkv

Anton,

Sorry, you're right. Is there any chance you could perhaps provide us a sample that we could use to reproduce the problem on our side?

Perhaps modify one of our samples that came with the distribution?

If so, that would make it a lot easier to reproduce and probably resolve the issue. You can send a sample to techsupport@weonlydo.com

Regards,
Damba

Re: Big problem

by ab, Friday, March 04, 2011, 09:10 (5012 days ago) @ wodDamir

Ok, i made a small project in C# and sent to WoD support, with testing scenario.
Please try it and let me know.
Thanx in advance.
Anton Brodsky, Nordic-IT

Re: Big problem

by ab, Wednesday, March 09, 2011, 11:20 (5007 days ago) @ ab

Ok i am just tested new 2.4.1 version. The issue still exist. Please try it with sample project, which was sent.
Anton