aboutsummaryrefslogtreecommitdiffstats
path: root/imap.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1999-09-23 12:42:38 +0000
committerEric S. Raymond <esr@thyrsus.com>1999-09-23 12:42:38 +0000
commit7db729877dd255029ce846414ddab872ac8dc146 (patch)
tree2b25a47b5823658788bf2990688802eb5f9d9053 /imap.c
parent33d9765dd84fd3846b833202aa495c7725e88662 (diff)
downloadfetchmail-7db729877dd255029ce846414ddab872ac8dc146.tar.gz
fetchmail-7db729877dd255029ce846414ddab872ac8dc146.tar.bz2
fetchmail-7db729877dd255029ce846414ddab872ac8dc146.zip
Workaround for GroupWise.
svn path=/trunk/; revision=2586
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);
}