aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog17
-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
4 files changed, 32 insertions, 8 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 4d7a32fc37..919c647fc9 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,9 +1,24 @@
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.
+
+2004-03-25 Jeffrey Stedfast <fejj@ximian.com>
+
Fix for bug #55018.
* providers/imap/camel-imap-store.c (create_folder): Don't allow
- the suer to create folders with #, %, * or the directory separator
+ the user to create folders with #, %, * or the directory separator
in the folder name (added the checks for %, * and #).
(get_folder_online): Add a check to make sure the folder name is
sane before sending a CREATE (ie. we want to allow getting of
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c
index 95969932ac..d6f2870833 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 f60b91c683..32bb41179b 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 fe57553658..b197cadda4 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;
};