aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
Diffstat (limited to 'imap.c')
-rw-r--r--imap.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/imap.c b/imap.c
index ff2d052a..2405bb61 100644
--- a/imap.c
+++ b/imap.c
@@ -1221,11 +1221,15 @@ static int imap_fetch_body(int sock, struct query *ctl, int number, int *lenp)
if (num != number)
return(PS_ERROR);
- /* try to extract a length */
+ /*
+ * Try to extract a length from the FETCH response. RFC2060 requires
+ * it to be present, but at least one IMAP server (Novell GroupWise)
+ * botches this.
+ */
if ((cp = strchr(buf, '{')))
*lenp = atoi(cp + 1);
else
- *lenp = 0;
+ *lenp = -1; /* missing length part in FETCH reponse */
return(PS_SUCCESS);
}