fetchmail-friends
[Top] [All Lists]

[fetchmail] Patch for "incorrect header line found while scanning headers"

2003-09-08 17:23:50
Fetchmail suddenly started rejecting emails forwarded from my work account. I tried upgrading to 6.2.4, and the situation got worse - not only did fetchmail refuse to download the messages, it deleted them!

A Google search indicates this is a recurring problem, so, in the absence of an official fix, here is my quick hack to transact.c (6.2.4) that fixes the problem for me:

--- transact.c.orig     2003-09-08 17:21:11.000000000 -0700
+++ transact.c  2003-09-08 16:00:56.000000000 -0700
@@ -492,7 +492,13 @@
                line = rline;
                memcpy(line + linelen - n, buf, n + 1);
            }
-
+           if ((line[0] == 0) && (linelen > 0))
+           {
+               if (outlevel > O_SILENT)
+                   report(stdout, GT_("fixed null line\n"));
+               line[0] = ' ';
+               printf("fixed null line\n");
+           }
            /* check for end of headers */
            if (end_of_header(line))
            {


I hope this helps someone.

Philip J. Tait


<Prev in Thread] Current Thread [Next in Thread>
  • [fetchmail] Patch for "incorrect header line found while scanning headers", Philip Tait <=