From 7db729877dd255029ce846414ddab872ac8dc146 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Thu, 23 Sep 1999 12:42:38 +0000 Subject: Workaround for GroupWise. svn path=/trunk/; revision=2586 --- imap.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'imap.c') 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); } -- cgit v1.2.3