]> granicus.if.org Git - mutt/commitdiff
Fix #1548. (The first variant, with $imap_headers specifying
authorTAKAHASHI Tamotsu <ttakah@lapis.plala.or.jp>
Mon, 19 Jul 2004 21:44:23 +0000 (21:44 +0000)
committerTAKAHASHI Tamotsu <ttakah@lapis.plala.or.jp>
Mon, 19 Jul 2004 21:44:23 +0000 (21:44 +0000)
headers that are downloaded in addition to the set required for mutt
to work properly.)

globals.h
imap/message.c
init.h

index 4f3adbb517d53a7aba3fcc3191b42e3149f5e2a9..15ad24917cc7aa5f8e96c6347bdc5a61ff6e43ee 100644 (file)
--- a/globals.h
+++ b/globals.h
@@ -55,6 +55,7 @@ WHERE char *Hostname;
 #ifdef USE_IMAP
 WHERE char *ImapAuthenticators INITVAL (NULL);
 WHERE char *ImapDelimChars INITVAL (NULL);
+WHERE char *ImapHeaders;
 WHERE char *ImapHomeNamespace INITVAL (NULL);
 WHERE char *ImapPass INITVAL (NULL);
 WHERE char *ImapUser INITVAL (NULL);
index 15d0fa5565c4656b930a46b8ee6eda559af4355a..5d302592604e218a444758debb05854509d10489 100644 (file)
@@ -55,19 +55,19 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
   IMAP_HEADER h;
   int rc, mfhrc, oldmsgcount;
   int fetchlast = 0;
-  const char *want_headers = "DATE FROM SUBJECT TO CC MESSAGE-ID REFERENCES CONTENT-TYPE IN-REPLY-TO REPLY-TO LINES X-LABEL";
+  const char *want_headers = "DATE FROM SUBJECT TO CC MESSAGE-ID REFERENCES CONTENT-TYPE CONTENT-DESCRIPTION IN-REPLY-TO REPLY-TO LINES X-LABEL";
 
   ctx = idata->ctx;
 
   if (mutt_bit_isset (idata->capabilities,IMAP4REV1))
   {
-    snprintf (hdrreq, sizeof (hdrreq), "BODY.PEEK[HEADER.FIELDS (%s)]", 
-      want_headers); 
+    snprintf (hdrreq, sizeof (hdrreq), "BODY.PEEK[HEADER.FIELDS (%s %s)]", 
+      want_headers, ImapHeaders); 
   } 
   else if (mutt_bit_isset (idata->capabilities,IMAP4))
   {
-    snprintf (hdrreq, sizeof (hdrreq), "RFC822.HEADER.LINES (%s)", 
-      want_headers);
+    snprintf (hdrreq, sizeof (hdrreq), "RFC822.HEADER.LINES (%s %s)", 
+      want_headers, ImapHeaders);
   }
   else
   {    /* Unable to fetch headers for lower versions */
diff --git a/init.h b/init.h
index 59e1bf91465495c165948de4b596f546f26adfa1..cf40ff3b80954502981b933b97abe1e929a6ca8b 100644 (file)
--- a/init.h
+++ b/init.h
@@ -808,6 +808,15 @@ struct option_t MuttVars[] = {
   ** connecting to IMAP servers.
   */
 # endif
+  { "imap_headers",    DT_STR, R_INDEX, UL &ImapHeaders, UL 0},
+  /*
+  ** .pp
+  ** Mutt requests these header fields in addition to the default headers
+  ** ("DATE FROM SUBJECT TO CC MESSAGE-ID REFERENCES CONTENT-TYPE
+  ** CONTENT-DESCRIPTION IN-REPLY-TO REPLY-TO LINES X-LABEL") from IMAP
+  ** servers before displaying the index menu. You may want to add more
+  ** headers for spam detection. \fBNote:\fP This is a space separated list.
+  */
   { "imap_home_namespace",     DT_STR, R_NONE, UL &ImapHomeNamespace, UL 0},
   /*
   ** .pp