aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-06-29 23:13:00 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-06-29 23:13:00 +0000
commit1a0a5c7576a10cb85fd52fc70b0c1cf2fa4195c3 (patch)
tree151b0ab43a5b2a4604f65ca82fa3d15f032d1aca
parentb1bf51f17e1075f29db21dc9eea1617421f58ee3 (diff)
downloadfetchmail-1a0a5c7576a10cb85fd52fc70b0c1cf2fa4195c3.tar.gz
fetchmail-1a0a5c7576a10cb85fd52fc70b0c1cf2fa4195c3.tar.bz2
fetchmail-1a0a5c7576a10cb85fd52fc70b0c1cf2fa4195c3.zip
Discared From_ lines.
svn path=/trunk/; revision=1947
-rw-r--r--NEWS1
-rw-r--r--driver.c21
2 files changed, 14 insertions, 8 deletions
diff --git a/NEWS b/NEWS
index 788c95e0..fec0f8a4 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,7 @@
------------------------------------------------------------------------------
fetchmail-4.5.1 ():
* Checkalias option from Enrico Musio <enrico.musio@spaziozerouno.it>.
+* Discard Unix From_ lines in headers (copes with Debian bug report #23808.
fetchmail-4.5.0bis (Sat Jun 20 10:55:52 EDT 1998):
diff --git a/driver.c b/driver.c
index 8bec7414..cd632afd 100644
--- a/driver.c
+++ b/driver.c
@@ -792,11 +792,15 @@ int num; /* index of message */
/*
* This code prevents fetchmail from becoming an accessory after
- * the fact to upstream sendmails with the `E' option on. This
- * can result in an escaped Unix From_ line at the beginning of
- * the headers. If fetchmail just passes it through, the client
- * listener may think the message has *no* headers (since the first)
- * line it sees doesn't look RFC822-conformant) and fake up a set.
+ * the fact to upstream sendmails with the `E' option on. It also
+ * copes with certain brain-dead POP servers (like NT's) that pass
+ * through Unix from_ lines.
+ *
+ * Either of these bugs can result in a non-RFC822 line at the
+ * beginning of the headers. If fetchmail just passes it
+ * through, the client listener may think the message has *no*
+ * headers (since the first) line it sees doesn't look
+ * RFC822-conformant) and fake up a set.
*
* What the user would see in this case is bogus (synthesized)
* headers, followed by a blank line, followed by the >From,
@@ -804,10 +808,10 @@ int num; /* index of message */
* followed by text.
*
* We forestall this lossage by tossing anything that looks
- * like an escaped From_ line in headers. These aren't RFC822
- * so our conscience is clear...
+ * like an escaped or passed-through From_ line in headers.
+ * These aren't RFC822 so our conscience is clear...
*/
- if (!strncasecmp(line, ">From ", 6))
+ if (!strncasecmp(line, ">From ", 6) || !strncasecmp(line, "From ", 5))
{
free(line);
continue;
@@ -829,6 +833,7 @@ int num; /* index of message */
*/
{
char *cp;
+
if (!strncasecmp(line, "Status:", 7))
cp = line + 7;
else if (!strncasecmp(line, "X-Mozilla-Status:", 17))