diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2014-02-09 11:39:18 +0200 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2014-02-09 11:39:18 +0200 |
commit | 51edf695f58aa7a390625645d5a3d9fe036a602d (patch) | |
tree | 1ef27d17af72b2595c75051bd93cbc3308e908a7 /main/busybox/0002-sendmail-use-FQDN-in-default-envelope-sender.patch | |
parent | 91f612b206b10b18e8d0acefe5857304da7b06a1 (diff) | |
download | aports-51edf695f58aa7a390625645d5a3d9fe036a602d.tar.bz2 aports-51edf695f58aa7a390625645d5a3d9fe036a602d.tar.xz |
main/busybox: align sendmail patches with upstream
Diffstat (limited to 'main/busybox/0002-sendmail-use-FQDN-in-default-envelope-sender.patch')
-rw-r--r-- | main/busybox/0002-sendmail-use-FQDN-in-default-envelope-sender.patch | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/main/busybox/0002-sendmail-use-FQDN-in-default-envelope-sender.patch b/main/busybox/0002-sendmail-use-FQDN-in-default-envelope-sender.patch new file mode 100644 index 000000000..0c0f3dc78 --- /dev/null +++ b/main/busybox/0002-sendmail-use-FQDN-in-default-envelope-sender.patch @@ -0,0 +1,42 @@ +From 545f970465584ccab628f1528951541f5984aa0c Mon Sep 17 00:00:00 2001 +From: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> +Date: Sun, 9 Feb 2014 09:49:36 +0100 +Subject: [PATCH 2/2] sendmail: use FQDN in default envelope sender + +RFC 5321 requires the return path to be supplied with a proper domain +name. + +Signed-off-by: Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> +Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com> +--- + mailutils/sendmail.c | 6 ++++-- + 1 file changed, 4 insertions(+), 2 deletions(-) + +diff --git a/mailutils/sendmail.c b/mailutils/sendmail.c +index 824109d..9455b4e 100644 +--- a/mailutils/sendmail.c ++++ b/mailutils/sendmail.c +@@ -326,7 +326,6 @@ int sendmail_main(int argc UNUSED_PARAM, char **argv) + // we should start with modern EHLO + if (250 != smtp_checkp("EHLO %s", host, -1)) + smtp_checkp("HELO %s", host, 250); +- free(host); + + // perform authentication + if (opts & OPT_a) { +@@ -353,8 +352,11 @@ int sendmail_main(int argc UNUSED_PARAM, char **argv) + + // got no sender address? use auth name, then UID username as a last resort + if (!opt_from) { +- opt_from = G.user ? G.user : xuid2uname(getuid()); ++ opt_from = xasprintf("%s@%s", ++ G.user ? G.user : xuid2uname(getuid()), ++ xgethostbyname(host)->h_name); + } ++ free(host); + + smtp_checkp("MAIL FROM:<%s>", opt_from, 250); + +-- +1.8.3.1 + |