commit-mailutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

mailutils ./ChangeLog mailbox/mbx_imap.c


From: Alain Magloire
Subject: mailutils ./ChangeLog mailbox/mbx_imap.c
Date: Wed, 24 Oct 2001 00:23:20 -0400

CVSROOT:        /home/cvs
Module name:    mailutils
Changes by:     Alain Magloire <address@hidden> 01/10/24 00:23:20

Modified files:
        .              : ChangeLog 
        mailbox        : mbx_imap.c 

Log message:
        The message_t object makes no guaranty about the size and the lines
        that it returns, if it is pointing to non-local file messages,
        i.e POP3, IMAP4, the entire message may not have been dowloaded yet.
        IMAP is very susceptible on the size, example:
        A003 APPEND saved-messages (\Seen) {310}
        (1) If the IMAP4 server does not get the right size advertise in the
        string literal, it will misbehave.
        (2) Since we are assuming that the message will be in (unix)native
        file system format meaning ending with NEWLINE, we will have
        to do some calculations about the RFC822.SIZE of the message.
        (3) As pointed about, it is not possible to rely on message_size()
        nor message_lines() to return the right count and even missing by
        one can be deadly.
        So we download the message to a floating message to guaranty that
        we know the exact size when transmitting it back the IMAP server,
        this is the only sane thing to do IMHO.  We could always
        be smart; check if the message is local (i.e from the local file
        system: mbox, mh, etc ..) and was not modified.  If those two
        requirements are true we can assume that the sizes/lines are right.
        But for now do it simple, and create a temporary file/message_t.
        
        * mailbox/mbx_imap.c (imap_append_message):  If the message
        is from the same IMAP server optimize by doing COPY.  If not
        call imap_append_message0() save the original message to a
        floating message i.e. file, and use that floating message for
        the append.  Temporary message is destroyed when finish.
        The drawback is this function is no long nonblocking safe.

CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/mailutils/ChangeLog.diff?cvsroot=OldCVS&tr1=1.305&tr2=1.306&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/mailutils/mailbox/mbx_imap.c.diff?cvsroot=OldCVS&tr1=1.51&tr2=1.52&r1=text&r2=text




reply via email to

[Prev in Thread] Current Thread [Next in Thread]