Simon Banks | 7 Sep 2007 15:57
Favicon

IMAP4 Flags Modifications

Hi Chaps,

I'm nearly there on the finished product..  Well be going live with a 
major North American Service Provider within the next few weeks.

However I've noticed some interested issues around IMAP4 flags 
modifications and I was wondering if somebody would help me understand 
how libetpan modifies envelope flags.

I've some code which does mailmessage_get_flags() and then after 
applying my modifications calls mailmessage_check() but I'm unsure when 
the flags get updated on the remote system.  Is there a flags flush 
function I can confirm they will be set?

Also whats the difference between mailfolder_check() and 
mailmessage_check(), is one more effient that the other?

Thanks in advance
Simon

--

-- 
Knowledge is a process of piling up facts; wisdom lies in their simplification.

Attachment (sbanks.vcf): text/x-vcard, 732 bytes
Attachment (smime.p7s): application/x-pkcs7-signature, 3977 bytes
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
(Continue reading)

DINH Viêt Hoà | 8 Sep 2007 13:11
Picon
Favicon

Re: IMAP4 Flags Modifications

On 9/7/07, Simon Banks <sbanks@...> wrote:
> Hi Chaps,

Hello,

> I'm nearly there on the finished product..  Well be going live with a
> major North American Service Provider within the next few weeks.

For information, could I be informed about the name of this Service Provider ?
(You can send me by private email)
I would also be interested by a feedback of the use of the library.

> However I've noticed some interested issues around IMAP4 flags
> modifications and I was wondering if somebody would help me understand
> how libetpan modifies envelope flags.
>
> I've some code which does mailmessage_get_flags() and then after
> applying my modifications calls mailmessage_check() but I'm unsure when
> the flags get updated on the remote system.  Is there a flags flush
> function I can confirm they will be set?
>
> Also whats the difference between mailfolder_check() and
> mailmessage_check(), is one more effient that the other?

mailmessage_check() will inform the "mailfolder" object that flags of
a message have changed.
mailfolder_check() will store the flags of the messages on which
mailmessage_check() has been called.

Regards,
(Continue reading)

Simon Banks | 10 Sep 2007 14:40
Favicon

Re: IMAP4 Flags Modifications

DINH Viêt Hoà wrote:
On 9/7/07, Simon Banks <sbanks-cfy2TCaE7SFv+uJa97DSA9BPR1lH4CV8@public.gmane.org> wrote:
I'm nearly there on the finished product.. Well be going live with a major North American Service Provider within the next few weeks.
For information, could I be informed about the name of this Service Provider ? (You can send me by private email) I would also be interested by a feedback of the use of the library.
I can't name the SP in question until they have "officially" launched the service due to legal reasons but once the product has been announced I promise to give you the details.  Other than that we've written a carrier grade backend with a AJAX presentation layer to some existing IMAP4 mailboxes (many millions of subscribers) and libetpan plays a keystone role.

Once the product has been proven we will then start to sell the backend to other SP's around the world.

Feedback I can do once the product has been accepted etc. 
However I've noticed some interested issues around IMAP4 flags modifications and I was wondering if somebody would help me understand how libetpan modifies envelope flags. I've some code which does mailmessage_get_flags() and then after applying my modifications calls mailmessage_check() but I'm unsure when the flags get updated on the remote system. Is there a flags flush function I can confirm they will be set? Also whats the difference between mailfolder_check() and mailmessage_check(), is one more effient that the other?
mailmessage_check() will inform the "mailfolder" object that flags of a message have changed. mailfolder_check() will store the flags of the messages on which mailmessage_check() has been called.
Thanks I've updated my latest package to include the mailfolder_check() after I've finished my get/recalc/check flags loop..

Regards
Simon
-- Knowledge is a process of piling up facts; wisdom lies in their simplification.
Attachment (sbanks.vcf): text/x-vcard, 732 bytes
Attachment (smime.p7s): application/x-pkcs7-signature, 3977 bytes
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Libetpan-users mailing list
Libetpan-users@...
https://lists.sourceforge.net/lists/listinfo/libetpan-users
Osadchuk, Vasily | 12 Sep 2007 10:25
Favicon

problem: mailstream_low_socket_write() and Win32

Hi,

problem using libetpan-0.52 under Win32:

description:
when trying out readmsg test, mailfolder_connect() always returned
MAIL_ERROR_STREAM.

details:
if dig deeper, we can see that inside mailstream_low_socket_write(),
[cancelled] local variable can be set to non-zero value (equal to
decimal value of handle returned by CreateEvent() - mailstream_socket.c,
line 288). Later, there is a check in the code - if (cancelled) then
return -1. Thus, it always returns -1.

workaround/solution
if user doesn't need cancellation support, setting [cancelled] to 0
instead of fds_read.fd_array[r - WAIT_OBJECT_0] will work for him.
Otherwise, further investigation and full-fledged fix is necessary for
this.

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
DINH Viêt Hoà | 21 Sep 2007 00:51
Picon
Favicon

Re: problem: mailstream_low_socket_write() and Win32

On 9/12/07, Osadchuk, Vasily <Osadchuk@...> wrote:
> description:
> when trying out readmsg test, mailfolder_connect() always returned
> MAIL_ERROR_STREAM.

For information, there is a clean fix in the CVS.

--

-- 
DINH Viêt Hoà

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Simon Schwarz | 28 Sep 2007 16:35
Picon
Favicon

documentation of constants

Hi there,

am I blind or are constants like "CONNECTION_TYPE_TRY_STARTTLS"  
aren't documented anywhere? If they are please tell me where.
I know it is not a problem to find them in the source but it is more  
comfortable to have them in the documentation.

If they are not documented, can I help to do so?

Thx
Simon

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
DINH Viêt Hoà | 28 Sep 2007 17:08
Picon
Favicon

Re: documentation of constants

On 9/28/07, Simon Schwarz <schwarz.simon@...> wrote:
> Hi there,
>
> am I blind or are constants like "CONNECTION_TYPE_TRY_STARTTLS"
> aren't documented anywhere? If they are please tell me where.
> I know it is not a problem to find them in the source but it is more
> comfortable to have them in the documentation.
>
> If they are not documented, can I help to do so?

Hello,

Documentation is in the source as you suggested. Though, you are
right. This would be nice if it was on the website.
I'll try to take a step to improve the documentation.

<<
enum {
  CONNECTION_TYPE_PLAIN,        /* when the connection is plain text */
  CONNECTION_TYPE_STARTTLS,     /* when the connection is first plain,
                                   then, we want to switch to
                                   TLS (secure connection) */
  CONNECTION_TYPE_TRY_STARTTLS, /* the connection is first plain,
                                   then, we will try to switch to TLS */
  CONNECTION_TYPE_TLS,          /* the connection is over TLS */
  CONNECTION_TYPE_COMMAND,      /* the connection is over a shell command */
  CONNECTION_TYPE_COMMAND_STARTTLS, /* the connection is over a shell
                                       command and STARTTLS will be used */
  CONNECTION_TYPE_COMMAND_TRY_STARTTLS, /* the connection is over
                                           a shell command and STARTTLS will
                                           be tried */
  CONNECTION_TYPE_COMMAND_TLS  /* the connection is over a shell
                                  command in TLS */
};
>>

--

-- 
DINH Viêt Hoà

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

Gmane