aboutsummaryrefslogtreecommitdiff
path: root/network/ssmtp/patches/03-557741-remote-addr.patch
diff options
context:
space:
mode:
authorB. Watson <yalhcru@gmail.com>2021-09-25 21:51:21 -0400
committerWilly Sudiarto Raharjo <willysr@slackbuilds.org>2021-10-13 00:52:25 +0700
commitdb8b3116f44dfa1d452286e71d11dc255e4d3322 (patch)
tree838346ebc91e9e7fc73ba956763412a684283051 /network/ssmtp/patches/03-557741-remote-addr.patch
parentacb39512988979a2006e89fc5aee1c8f04dd792d (diff)
network/ssmtp: Clean up build.
Signed-off-by: B. Watson <yalhcru@gmail.com> Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'network/ssmtp/patches/03-557741-remote-addr.patch')
-rw-r--r--network/ssmtp/patches/03-557741-remote-addr.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/network/ssmtp/patches/03-557741-remote-addr.patch b/network/ssmtp/patches/03-557741-remote-addr.patch
new file mode 100644
index 000000000000..03efa81cd6cf
--- /dev/null
+++ b/network/ssmtp/patches/03-557741-remote-addr.patch
@@ -0,0 +1,28 @@
+http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=557741
+
+Patch by Victor Sudakov <sudakov@sibptus.tomsk.ru>
+Modified by Anibal Monsalve Salazar <anibal@debian.org>
+
+Index: ssmtp-2.64/ssmtp.c
+===================================================================
+--- ssmtp-2.64.orig/ssmtp.c
++++ ssmtp-2.64/ssmtp.c
+@@ -1421,6 +1421,7 @@ ssmtp() -- send the message (exactly one
+ int ssmtp(char *argv[])
+ {
+ char b[(BUF_SZ + 2)], *buf = b+1, *p, *q;
++ char *remote_addr;
+ #ifdef MD5AUTH
+ char challenge[(BUF_SZ + 1)];
+ #endif
+@@ -1624,6 +1625,10 @@ int ssmtp(char *argv[])
+ outbytes += smtp_write(sock, "From: %s", from);
+ }
+
++ if(remote_addr=getenv("REMOTE_ADDR")) {
++ outbytes += smtp_write(sock, "X-Originating-IP: %s", remote_addr);
++ }
++
+ if(have_date == False) {
+ outbytes += smtp_write(sock, "Date: %s", arpadate);
+ }