On Thu, 2001-11-08 at 16:58, Eric S. Raymond wrote:
Paul <paul666(_at_)mailandnews(_dot_)com>:
fetchmail-5.9.3/transact.c:484
if (!isspace(line[0]) && !strchr(line, ':'))
{
headers_ok = TRUE;
has_nuls = (linelen != strlen(line));
free(line);
goto process_headers;
}
No. I've looked at the code, and headers_ok==TRUE is not a guarantee that
the headers are RFC822 well-formed.
Ok. Well, in the meantime, I just changed the above to read:
headers_ok = FALSE;
and it nicely disposes of the bogus email for me.
The generic problem here is that somwhere upstream, part of your mail
chain is generating broken headers. Fetchmail cannot be expected to deal
with all such cases gracefully, and there is a narrow limit on the amount
of crocks I am willing to put in the code to make it try. Your proposal,
I am afraid, exceeds it. You should fix whatever is broken in your mail chain
instead.
Well, I certainly agree that it's caused by broken mail headers and
that's not fetchmail's fault. However, the fact that it just hangs,
eventually times out and fails to report or handle the problem at all,
does seem a little lacking. I would think that the minimum it should
do is report the offending mail and skip it. By setting headers_ok
to FALSE it seems to discard the mail which is fine by me, since
I only seem to get the problem from LKML mail.
Cheers,
Paul