aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1997-02-13 00:23:43 +0000
committerEric S. Raymond <esr@thyrsus.com>1997-02-13 00:23:43 +0000
commit60c4abd04949ce1e69e3298dad9ad83ac37e104e (patch)
tree3cc1dbe85feb7924688dc89a7183854bb0a77dd2 /driver.c
parent84c5cac3005dd6bd18827176b5f39988fc59d8a8 (diff)
downloadfetchmail-60c4abd04949ce1e69e3298dad9ad83ac37e104e.tar.gz
fetchmail-60c4abd04949ce1e69e3298dad9ad83ac37e104e.tar.bz2
fetchmail-60c4abd04949ce1e69e3298dad9ad83ac37e104e.zip
Deal with headerless mail.
svn path=/trunk/; revision=870
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/driver.c b/driver.c
index 6ef30419..9999985d 100644
--- a/driver.c
+++ b/driver.c
@@ -525,6 +525,19 @@ char *realname; /* real name of host */
}
/*
+ * Hack time. If the first line of the message was blank, with no headers
+ * (this happens occasionally due to bad gatewaying software) cons up
+ * a set of fake headers.
+ */
+ if (headers == (char *)NULL)
+ {
+ sprintf(buf,
+"From: FETCHMAIL-DAEMON\r\nTo: %s\r\nSubject: Headerless mail from %s@%s\r\n",
+ ctl->localnames->id, ctl->remotename, realname);
+ headers = xstrdup(buf);
+ }
+
+ /*
* We can now process message headers before reading the text.
* In fact we have to, as this will tell us where to forward to.
*/