From 4adb5ed5cc108364f629746ced9e4797f0f94d0f Mon Sep 17 00:00:00 2001 From: Matthias Andree Date: Fri, 3 Mar 2006 20:26:46 +0000 Subject: Remove dead variable and add a few comments on the 'invalid header' issue. svn path=/branches/BRANCH_6-3/; revision=4714 --- transact.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'transact.c') diff --git a/transact.c b/transact.c index fcacc62d..1d5d1990 100644 --- a/transact.c +++ b/transact.c @@ -426,7 +426,6 @@ int readheaders(int sock, for (remaining = fetchlen; remaining > 0 || protocol->delimited; ) { char *line, *rline; - int overlong = FALSE; /* XXX FIXME: this is unused */ line = xmalloc(sizeof(buf)); linelen = 0; @@ -467,7 +466,6 @@ int readheaders(int sock, */ if (n && buf[n-1] != '\n') { - overlong = TRUE; rline = (char *) realloc(line, linelen + 1); if (rline == NULL) { @@ -545,6 +543,16 @@ int readheaders(int sock, * send out robotmail that's missing the RFC822 delimiter blank * line before the body! Without this check fetchmail segfaults. * With it, we treat such messages as spam and refuse them. + * + * Frederic Marchal reported in February 2006 that hotmail + * or something improperly wrapped a very long TO header + * (wrapped without inserting whitespace in the continuation + * line) and found that this code thus refused a message + * that should have been delivered. + * + * XXX FIXME: we should probably wrap the message up as + * message/rfc822 attachment and forward to postmaster (Rob + * MacGregor) */ if (!refuse_mail && !isspace((unsigned char)line[0]) && !strchr(line, ':')) { @@ -603,7 +611,7 @@ int readheaders(int sock, continue; } - /* we see an ordinary (non-header, non-message-delimiter line */ + /* we see an ordinary (non-header, non-message-delimiter) line */ if (linelen != strlen (line)) has_nuls = TRUE; -- cgit v1.2.3