CC->redirect_len = 0;
CC->redirect_alloc = SIZ;
CtdlOutputMsg(msgnum, MT_RFC822,
- (need_body ? HEADERS_ALL : HEADERS_ONLY),
+ (need_body ? HEADERS_ALL : HEADERS_FAST),
0, 1, NULL, 0);
if (!need_body) cprintf("\r\n"); /* extra trailing newline */
IMAP->cached_rfc822_data = CC->redirect_buffer;
* fields, strip it down.
*/
else if (!strncasecmp(section, "HEADER", 6)) {
- CtdlOutputPreLoadedMsg(msg, MT_RFC822, HEADERS_ONLY, 0, 1, 0);
+ CtdlOutputPreLoadedMsg(msg, MT_RFC822, HEADERS_FAST, 0, 1, 0);
imap_strip_headers(section);
}
CC->redirect_buffer = malloc(SIZ);
CC->redirect_len = 0;
CC->redirect_alloc = SIZ;
- CtdlOutputPreLoadedMsg(msg, MT_RFC822, HEADERS_ONLY, 0, 1, 0);
+ CtdlOutputPreLoadedMsg(msg, MT_RFC822, HEADERS_FAST, 0, 1, 0);
fieldptr = rfc822_fetch_field(CC->redirect_buffer, itemlist[pos+1]);
if (fieldptr != NULL) {
gettimeofday(&tv2, NULL);
total_time = (tv2.tv_usec + (tv2.tv_sec * 1000000)) - (tv1.tv_usec + (tv1.tv_sec * 1000000));
+ CtdlLogPrintf(CTDL_INFO, "IMAP: %s\n", cmdbuf); // FIXME FIXME FIXME REMOVE THIS NOW
CtdlLogPrintf(CTDL_DEBUG, "IMAP command completed in %ld.%ld seconds\n",
(total_time / 1000000),
(total_time % 1000000)
/*
* Grab the message headers so we can feed them to libSieve.
+ * Use HEADERS_ONLY rather than HEADERS_FAST in order to include second-level headers.
*/
CC->redirect_buffer = malloc(SIZ);
CC->redirect_len = 0;
/* FIXME: check message id against msglist for this room */
/*
- * Fetch the message from disk. If we're in any sort of headers
- * only mode, request that we don't even bother loading the body
- * into memory.
+ * Fetch the message from disk. If we're in HEADERS_FAST mode,
+ * request that we don't even bother loading the body into memory.
*/
- if ( (headers_only == HEADERS_FAST) || (headers_only == HEADERS_ONLY) ) {
+ if (headers_only == HEADERS_FAST) {
TheMessage = CtdlFetchMessage(msg_num, 0);
}
else {