[packages/exim] - rel 8; backport callout_address expansion variable (https://bugs.exim.org/show_bug.cgi?id=1652)

arekm arekm at pld-linux.org
Fri Dec 4 09:40:14 CET 2015


commit bbb9de3e9e3bdd4eaf492bf37442e00c4dc429f2
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Fri Dec 4 09:40:08 2015 +0100

    - rel 8; backport callout_address expansion variable (https://bugs.exim.org/show_bug.cgi?id=1652)

 exim-callout-address.patch | 91 ++++++++++++++++++++++++++++++++++++++++++++++
 exim.spec                  |  4 +-
 2 files changed, 94 insertions(+), 1 deletion(-)
---
diff --git a/exim.spec b/exim.spec
index ad6928c..b6310f4 100644
--- a/exim.spec
+++ b/exim.spec
@@ -21,7 +21,7 @@ Summary(pl.UTF-8):	Agent Transferu Poczty Uniwersytetu w Cambridge
 Summary(pt_BR.UTF-8):	Servidor de correio eletrônico exim
 Name:		exim
 Version:	4.86
-Release:	7
+Release:	8
 Epoch:		2
 License:	GPL
 Group:		Networking/Daemons/SMTP
@@ -56,6 +56,7 @@ Patch4:		%{name}4-Makefile-Default.patch
 Patch5:		localscan_dlopen_%{name}_4.20_or_better.patch
 Patch6:		exim-dkim.patch
 Patch8:		%{name}-spam-timeout.patch
+Patch9:		%{name}-callout-address.patch
 Patch10:	%{name}-force-sigalrm.patch
 
 Patch20:	%{name}4-disableSSLv3.patch
@@ -178,6 +179,7 @@ Pliki nagłówkowe dla Exima.
 %patch6 -p2
 
 %patch8 -p1
+%patch9 -p2
 %patch10 -p1
 
 install %{SOURCE4} exim4.conf
diff --git a/exim-callout-address.patch b/exim-callout-address.patch
new file mode 100644
index 0000000..d394a2b
--- /dev/null
+++ b/exim-callout-address.patch
@@ -0,0 +1,91 @@
+commit 055e2cb463e4e4adf2d9292a50ac274938f9a5ac
+Author: Jeremy Harris <jgh146exb at wizmail.org>
+Date:   Sat Sep 12 15:00:45 2015 +0100
+
+    New $callout_address variable to record spamd (etc) address.  Bug 1652
+
+diff --git a/src/src/expand.c b/src/src/expand.c
+index 1bff521..f9849e6 100644
+--- a/src/src/expand.c
++++ b/src/src/expand.c
+@@ -462,6 +462,7 @@ static var_entry var_table[] = {
+   { "bounce_return_size_limit", vtype_int,    &bounce_return_size_limit },
+   { "caller_gid",          vtype_gid,         &real_gid },
+   { "caller_uid",          vtype_uid,         &real_uid },
++  { "callout_address",     vtype_stringptr,   &callout_address },
+   { "compile_date",        vtype_stringptr,   &version_date },
+   { "compile_number",      vtype_stringptr,   &version_cnumber },
+   { "config_dir",          vtype_stringptr,   &config_main_directory },
+diff --git a/src/src/globals.c b/src/src/globals.c
+index f3b6791..55a101f 100644
+--- a/src/src/globals.c
++++ b/src/src/globals.c
+@@ -478,6 +478,7 @@ int     bounce_return_size_limit = 100*1024;
+ uschar *bounce_sender_authentication = NULL;
+ int     bsmtp_transaction_linecount = 0;
+ 
++uschar *callout_address        = NULL;
+ int     callout_cache_domain_positive_expire = 7*24*60*60;
+ int     callout_cache_domain_negative_expire = 3*60*60;
+ int     callout_cache_positive_expire = 24*60*60;
+diff --git a/src/src/globals.h b/src/src/globals.h
+index 3c69e43..7bfb5aa 100644
+--- a/src/src/globals.h
++++ b/src/src/globals.h
+@@ -255,6 +255,7 @@ extern int     bounce_return_size_limit; /* Max amount to return */
+ extern uschar *bounce_sender_authentication; /* AUTH address for bounces */
+ extern int     bsmtp_transaction_linecount; /* Start of last transaction */
+ 
++extern uschar *callout_address;         /* Address used for a malware/spamd/verify etc. callout */
+ extern int     callout_cache_domain_positive_expire; /* Time for positive domain callout cache records to expire */
+ extern int     callout_cache_domain_negative_expire; /* Time for negative domain callout cache records to expire */
+ extern int     callout_cache_positive_expire; /* Time for positive callout cache records to expire */
+diff --git a/src/src/ip.c b/src/src/ip.c
+index 2d71705..1e3875a 100644
+--- a/src/src/ip.c
++++ b/src/src/ip.c
+@@ -237,7 +237,11 @@ if (running_in_test_harness  && save_errno == ECONNREFUSED && timeout == 999999)
+ 
+ /* Success */
+ 
+-if (rc >= 0) return 0;
++if (rc >= 0)
++  {
++  callout_address = string_sprintf("[%s]:%d", address, port);
++  return 0;
++  }
+ 
+ /* A failure whose error code is "Interrupted system call" is in fact
+ an externally applied timeout if the signal handler has been run. */
+@@ -400,6 +404,7 @@ if (connect(sock, (struct sockaddr *) &server, sizeof(server)) < 0)
+ 		path, strerror(err));
+   return -1;
+   }
++callout_address = string_copy(path);
+ return sock;
+ }
+ 
+diff --git a/src/src/smtp_out.c b/src/src/smtp_out.c
+index c704a0b..88dde83 100644
+--- a/src/src/smtp_out.c
++++ b/src/src/smtp_out.c
+@@ -284,6 +284,8 @@ if (host->port != PORT_NONE)
+   }
+ else host->port = port;    /* Set the port actually used */
+ 
++callout_address = string_sprintf("[%s]:%d", host->address, port);
++
+ HDEBUG(D_transport|D_acl|D_v)
+   {
+   uschar * s = US" ";
+@@ -291,8 +293,7 @@ HDEBUG(D_transport|D_acl|D_v)
+ #ifdef EXPERIMENTAL_SOCKS
+   if (ob->socks_proxy) s = string_sprintf("%svia proxy ", s);
+ #endif
+-  debug_printf("Connecting to %s [%s]:%d%s... ",
+-    host->name, host->address, port, s);
++  debug_printf("Connecting to %s %s%s... ", host->name, callout_address, s);
+   }
+ 
+ /* Create and connect the socket */
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/exim.git/commitdiff/bbb9de3e9e3bdd4eaf492bf37442e00c4dc429f2



More information about the pld-cvs-commit mailing list