]> git.pld-linux.org Git - packages/exim.git/commitdiff
- rel 8; backport callout_address expansion variable (https://bugs.exim.org/show_bug... auto/th/exim-4.86-8
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 4 Dec 2015 08:40:08 +0000 (09:40 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Fri, 4 Dec 2015 08:40:08 +0000 (09:40 +0100)
exim-callout-address.patch [new file with mode: 0644]
exim.spec

diff --git a/exim-callout-address.patch b/exim-callout-address.patch
new file mode 100644 (file)
index 0000000..d394a2b
--- /dev/null
@@ -0,0 +1,91 @@
+commit 055e2cb463e4e4adf2d9292a50ac274938f9a5ac
+Author: Jeremy Harris <jgh146exb@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 */
+
index ad6928c9256624a01e2667acf65c251b08b8e3ee..b6310f4ea0e96d55772ce23014e12dcdc426b6e7 100644 (file)
--- 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
This page took 0.1576 seconds and 4 git commands to generate.