aboutsummaryrefslogtreecommitdiffstats
path: root/driver.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver.c')
-rw-r--r--driver.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/driver.c b/driver.c
index 505bf26c..d05c8ef3 100644
--- a/driver.c
+++ b/driver.c
@@ -922,7 +922,9 @@ static int readheaders(int sock,
else if (from_offs >= 0 && (ap = nxtaddr(msgblk.headers + from_offs)));
else if (reply_to_offs >= 0 && (ap = nxtaddr(msgblk.headers + reply_to_offs)));
else if (app_from_offs >= 0 && (ap = nxtaddr(msgblk.headers + app_from_offs)));
- if (ap) strcpy( msgblk.return_path, ap );
+ /* multi-line MAIL FROM addresses confuse SMTP terribly */
+ if (ap && !strchr(ap, '\n'))
+ strcpy(msgblk.return_path, ap);
}
/* cons up a list of local recipients */