From 0dc147c15f787f2e381594b96e842d226504bfa4 Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Fri, 19 Sep 1997 23:03:02 +0000 Subject: Temporarily suppress message length check. svn path=/trunk/; revision=1375 --- NEWS | 3 +++ driver.c | 15 +++++++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/NEWS b/NEWS index fb24924d..a449b069 100644 --- a/NEWS +++ b/NEWS @@ -9,12 +9,15 @@ * Autoconfigure the root-mode lockfile location so Solaris will work. * Get with Craig Metz to write a draft RFC on RFC1938 support in IMAP. +* Message length check code (#define MSGLEN) works for IMAP, but not for POP. + How can this be? Release Notes: ------------------------------------------------------------------------------ fetchmail-4.2.4 (Thu Sep 18 16:19:10 EDT 1997) * Small compilation cleanups, thanks to Florian laRoche. +* Removed the length consistency check, it mysteriously fails under POP3. fetchmail-4.2.3 (Thu Sep 18 16:19:10 EDT 1997) * Fix a bug in IMAP message-size retrieval. diff --git a/driver.c b/driver.c index ca89b0ad..04b6683b 100644 --- a/driver.c +++ b/driver.c @@ -83,7 +83,9 @@ static int tagnum; static char *shroud; /* string to shroud in debug output, if non-NULL */ static int mytimeout; /* value of nonreponse timeout */ +#ifdef MSGLEN static int msglen; /* actual message length */ +#endif /* MSGLEN */ static void set_timeout(int timeleft) /* reset the nonresponse-timeout */ @@ -528,7 +530,10 @@ int num; /* index of message */ /* read message headers */ headers = received_for = NULL; from_offs = ctt_offs = env_offs = -1; - oldlen = msglen = 0; + oldlen = 0; +#ifdef MSGLEN + msglen = 0; +#endif /* MSGLEN */ for (remaining = len; remaining > 0 || protocol->delimited; remaining -= linelen) { char *line; @@ -540,7 +545,9 @@ int num; /* index of message */ if ((n = SockRead(sock, buf, sizeof(buf)-1)) == -1) return(PS_SOCKET); linelen += n; +#ifdef MSGLEN msglen += n; +#endif /* MSGLEN */ /* lines may not be properly CRLF terminated; fix this for qmail */ if (ctl->forcecr) @@ -1182,7 +1189,9 @@ flag forward; /* TRUE to forward */ } } len -= linelen; +#ifdef MSGLEN msglen += linelen; +#endif /* MSGLEN */ /* check for end of message */ if (protocol->delimited && *buf == '.') @@ -1655,7 +1664,7 @@ const struct method *proto; /* protocol method table */ { if ((ok=(protocol->fetch_body)(sock,ctl,num,&len))) goto cleanUp; - if (outlevel > O_SILENT && !msgsizes) + if (outlevel > O_SILENT && !wholesize) error_build(" (%d body bytes) ", len); set_timeout(ctl->server.timeout); } @@ -1684,9 +1693,11 @@ const struct method *proto; /* protocol method table */ } } +#ifdef MSGLEN /* check to see if the numbers matched? */ if (msgsizes && msglen != msgsizes[num-1]) error(0, 0, "size of message %d (%d) was not what was expected (%d)", num, msglen, msgsizes[num-1]); +#endif /* MSGLEN */ /* end-of-message processing starts here */ if (outlevel == O_VERBOSE) -- cgit v1.2.3