aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>1998-10-12 16:14:35 +0000
committerEric S. Raymond <esr@thyrsus.com>1998-10-12 16:14:35 +0000
commit0a20a3e954ed0d0b3ab0395bd0b5eef48864110d (patch)
tree7136f4e22956879772ca8cfb51f53ea56c74a6bf
parent94102503da858be0b3e3d1d77a85fba8ef4a4d55 (diff)
downloadfetchmail-0a20a3e954ed0d0b3ab0395bd0b5eef48864110d.tar.gz
fetchmail-0a20a3e954ed0d0b3ab0395bd0b5eef48864110d.tar.bz2
fetchmail-0a20a3e954ed0d0b3ab0395bd0b5eef48864110d.zip
Force MAIL FROM to be an FQDN.
svn path=/trunk/; revision=2085
-rw-r--r--NEWS1
-rw-r--r--driver.c5
2 files changed, 6 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index cefc8201..0c441ae4 100644
--- a/NEWS
+++ b/NEWS
@@ -7,6 +7,7 @@ fetchmail-4.6.1 ():
* Removed -pipe compilation option, it confuses too many non-GCC compilers.
* Major update of SDPS FAQ material from B.Candler@pobox.com.
* Fetchmailconf can deal with zsh now.
+* Append "@localhost" to MAIL FROM if it's not an FQDN.
There are 255 people on fetchmail-friends and 296 on fetchmail-announce.
diff --git a/driver.c b/driver.c
index 3fc82dec..8f2ab2ed 100644
--- a/driver.c
+++ b/driver.c
@@ -753,10 +753,15 @@ int num; /* index of message */
* not trigger bounces if delivery fails. What we *do* need to do is
* make sure we never try to rewrite such a blank Return-Path. We
* handle this with a check for <> in the rewrite logic.
+ *
+ * If the Return-Path header has no host part, tack on "@localhost"
+ * in order to pacify sendmails that want to see an FQDN.
*/
if (!strncasecmp("Return-Path:", line, 12) && (cp = nxtaddr(line)))
{
strcpy(return_path, cp);
+ if (!strchr(return_path, '@'))
+ strcat(return_path, "@localhost");
if (!ctl->mda) {
free(line);
continue;