summaryrefslogtreecommitdiff
path: root/camel/providers
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2004-03-25 23:02:40 +0000
committerJeffrey Stedfast <fejj@src.gnome.org>2004-03-25 23:02:40 +0000
commit355c2c6c2f9dcebd76d5f029106539c79ada5cd7 (patch)
tree25dee7b5bca92ab5b2027b96ecfb930f8b1b3382 /camel/providers
parentd9001439985ba051ec82accdfc7a11b9976ff59b (diff)
downloadevolution-data-server-355c2c6c2f9dcebd76d5f029106539c79ada5cd7.tar.gz
If the server is imap.web.de, just ask for all the headers rather than
2004-03-25 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-folder.c (imap_update_summary): If the server is imap.web.de, just ask for all the headers rather than "HEADER.FIELDS.NOT (RECEIVED)". Actually, maybe we should always just query for the entire header block? (imap_get_message): If the server is brain-damaged (that's a technical term), always fetch the message in whole, never bother to try and fetch partial messages (Courier-IMAP gives us the wrong BODY responses fairly often). * providers/imap/camel-imap-store.c (connect_to_server): Set store->braindamaged to TRUE if we find the string "Courier-IMAP" in the greeting.
Diffstat (limited to 'camel/providers')
-rw-r--r--camel/providers/imap/camel-imap-folder.c11
-rw-r--r--camel/providers/imap/camel-imap-store.c5
-rw-r--r--camel/providers/imap/camel-imap-store.h7
3 files changed, 16 insertions, 7 deletions
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 95969932a..d6f287083 100644
--- a/camel/providers/imap/camel-imap-folder.c
+++ b/camel/providers/imap/camel-imap-folder.c
@@ -1961,7 +1961,7 @@ imap_get_message (CamelFolder *folder, const char *uid, CamelException *ex)
/* If the server doesn't support IMAP4rev1, or we already have
* the whole thing cached, fetch it in one piece.
*/
- if (store->server_level < IMAP_LEVEL_IMAP4REV1 ||
+ if (store->server_level < IMAP_LEVEL_IMAP4REV1 || store->braindamaged ||
(stream = camel_imap_folder_fetch_data (imap_folder, uid, "", TRUE, NULL)))
return get_message_simple (imap_folder, uid, stream, ex);
@@ -2237,9 +2237,12 @@ imap_update_summary (CamelFolder *folder, int exists,
GData *data;
CAMEL_SERVICE_ASSERT_LOCKED (store, connect_lock);
- if (store->server_level >= IMAP_LEVEL_IMAP4REV1)
- header_spec = "HEADER.FIELDS.NOT (RECEIVED)";
- else
+ if (store->server_level >= IMAP_LEVEL_IMAP4REV1) {
+ if (g_ascii_strcasecmp (((CamelService *) store)->url->host, "imap.web.de") != 0)
+ header_spec = "HEADER.FIELDS.NOT (RECEIVED)";
+ else
+ header_spec = "HEADER";
+ } else
header_spec = "0";
/* Figure out if any of the new messages are already cached (which
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index f60b91c68..32bb41179 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -595,8 +595,13 @@ connect_to_server (CamelService *service, int ssl_mode, int try_starttls, CamelE
return FALSE;
}
+
if (!strncmp(buf, "* PREAUTH", 9))
store->preauthed = TRUE;
+
+ if (strstr (buf, "Courier-IMAP"))
+ store->braindamaged = TRUE;
+
g_free (buf);
/* get the imap server capabilities */
diff --git a/camel/providers/imap/camel-imap-store.h b/camel/providers/imap/camel-imap-store.h
index fe5755365..b197cadda 100644
--- a/camel/providers/imap/camel-imap-store.h
+++ b/camel/providers/imap/camel-imap-store.h
@@ -110,8 +110,8 @@ struct _CamelImapStore {
struct _CamelImapStoreSummary *summary;
/* Information about the command channel / connection status */
- gboolean connected;
- gboolean preauthed;
+ guint connected:1;
+ guint preauthed:1;
char tag_prefix;
guint32 command;
CamelFolder *current_folder;
@@ -119,11 +119,12 @@ struct _CamelImapStore {
/* Information about the server */
CamelImapServerLevel server_level;
guint32 capabilities, parameters;
+ guint braindamaged:1;
/* NB: namespace should be handled by summary->namespace */
char *namespace, dir_sep, *base_url, *storage_path;
GHashTable *authtypes;
- gboolean renaming;
+ guint renaming:1;
};