$Log$
+ Revision 614.67 2004/03/08 05:26:49 ajc
+ * When the last argument of an IMAP APPEND command is a binary literal
+ (i.e. all the time), the client will still be sending a CRLF after the
+ literal. Added an extra client_read() after the message input to absorb
+ that extra CRLF, to keep client and server from getting out of sync.
+
Revision 614.66 2004/03/06 05:09:04 ajc
* serv_smtp.c: don't offer the STARTTLS extension if TLS is already
active. Done for to-the-letter compliance with RFC2487.
Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
* Initial CVS import
-
IMAP->transmitted_length = literal_length;
cprintf("+ Transmit message now.\r\n");
+ lprintf(CTDL_DEBUG, "imap_append() expecting %d bytes\n",
+ literal_length);
ret = client_read(IMAP->transmitted_message, literal_length);
IMAP->transmitted_message[literal_length] = 0;
if (ret != 1) {
cprintf("%s NO Read failed.\r\n", parms[0]);
return;
}
+ lprintf(CTDL_DEBUG, "imap_append() finished reading message\n");
+
+ /* I think there's supposed to be a trailing CRLF after the
+ * literal (the message text) is received. This call to
+ * client_gets() absorbs it.
+ */
+ client_gets(buf);
+ lprintf(CTDL_DEBUG, "Trailing CRLF: %s\n", buf);
/* Convert RFC822 newlines (CRLF) to Unix newlines (LF) */
lprintf(CTDL_DEBUG, "Converting newline format\n");