aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-03-16 19:54:13 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-03-16 19:54:13 +0000
commita09d628f66a29063ef3060c1f25b1b23051a7e89 (patch)
tree8569d56c29aca0c83504a95e2ee03ab2987f758f
parent1b15b5049c4ada283e9d53d5a94458d13311384c (diff)
downloadfetchmail-a09d628f66a29063ef3060c1f25b1b23051a7e89.tar.gz
fetchmail-a09d628f66a29063ef3060c1f25b1b23051a7e89.tar.bz2
fetchmail-a09d628f66a29063ef3060c1f25b1b23051a7e89.zip
Cope with empty return-path header.
svn path=/trunk/; revision=1704
-rw-r--r--NEWS1
-rw-r--r--driver.c7
2 files changed, 6 insertions, 2 deletions
diff --git a/NEWS b/NEWS
index 32699b89..8540def7 100644
--- a/NEWS
+++ b/NEWS
@@ -22,6 +22,7 @@ fetchmail-4.4.0 (Fri Mar 13 15:48:27 EST 1998):
* Fix timer-leak problem with the SIGALRM fix, pointed out by Dave Bodenstab.
* Deal with more M$ Exchange braindamage (violating an RFC1939 limit).
* Allow spaces in IMAP usernames (thank Juerg Wanner <juerg.wanner@ubs.com>).
+* Handle empty Return-Path (thank Dmitry Yaitskov <dyaitskov@insystems.com>).
* Improvements in UID handling; should be a cleaner fix for Dick van den Burg.
There are 270 people on fetchmail-friends and 160 on fetchmail-announce.
diff --git a/driver.c b/driver.c
index 018b17cc..e8c51017 100644
--- a/driver.c
+++ b/driver.c
@@ -830,10 +830,13 @@ int num; /* index of message */
* If the SMTP server conforms to the standards, and fetchmail gets the
* envelope sender from the Return-Path, the new Return-Path should be
* exactly the same as the original one.
+ *
+ * Empty Return-Path headers will be ignored.
+ *
*/
- if (!strncasecmp("Return-Path:", line, 12))
+ if (!strncasecmp("Return-Path:", line, 12) && (cp = nxtaddr(line)))
{
- strcpy(return_path, nxtaddr(line));
+ strcpy(return_path, cp);
if (!ctl->mda) {
free(line);
continue;