diff options
-rw-r--r-- | doc/doc-docbook/spec.xfpt | 3 | ||||
-rw-r--r-- | doc/doc-txt/ChangeLog | 4 | ||||
-rw-r--r-- | src/src/EDITME | 16 | ||||
-rw-r--r-- | src/src/config.h.defaults | 2 | ||||
-rw-r--r-- | src/src/exim.c | 2 | ||||
-rw-r--r-- | src/src/smtp_out.c | 6 | ||||
-rw-r--r-- | src/src/transports/smtp.c | 4 | ||||
-rw-r--r-- | src/src/transports/smtp.h | 4 | ||||
-rw-r--r-- | src/src/transports/smtp_socks.c | 2 |
9 files changed, 23 insertions, 20 deletions
diff --git a/doc/doc-docbook/spec.xfpt b/doc/doc-docbook/spec.xfpt index 677b4ef50..73887d4e7 100644 --- a/doc/doc-docbook/spec.xfpt +++ b/doc/doc-docbook/spec.xfpt @@ -38032,7 +38032,8 @@ Proxies may provide a security, availability or load-distribution function. .cindex SOCKS proxy Exim has support for sending outbound SMTP via a proxy using a protocol called SOCKS5 (defined by RFC1928). -The support can be removed by defining DISABLE_SOCKS=yes in Local/Makefile. +The support can be optionally included by defining SUPPORT_SOCKS=yes in +Local/Makefile. Use of a proxy is enabled by setting the &%socks_proxy%& on an smtp transport. The option value is expanded and should then be a list diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index e78f49cf4..d57c3db00 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -112,8 +112,8 @@ JH/21 Bug 1720: Add support for priority groups and weighted-random proxy JH/22 Bugs 963, 1721: Fix some corner cases in message body canonicalisation for DKIM processing. -JH/23 Move SOCKS5 support from Experimental to mainline. It can be left out - from a build by defining DISABLE_SOCKS. +JH/23 Move SOCKS5 support from Experimental to mainline, enabled for a build + by defining SUPPORT_SOCKS. Exim version 4.86 diff --git a/src/src/EDITME b/src/src/EDITME index 5b17e53d8..c6d693017 100644 --- a/src/src/EDITME +++ b/src/src/EDITME @@ -392,6 +392,7 @@ EXIM_MONITOR=eximon.bin # WITH_OLD_DEMIME=yes +#------------------------------------------------------------------------------ # If you're using ClamAV and are backporting fixes to an old version, instead # of staying current (which is the more usual approach) then you may need to # use an older API which uses a STREAM command, now deprecated, instead of @@ -432,13 +433,6 @@ EXIM_MONITOR=eximon.bin #------------------------------------------------------------------------------ -# By default Exim has support for connecting outbound via a SOCK5 proxy. -# To remove this support uncomment the following line. - -# DISABLE_SOCKS=yes - - -#------------------------------------------------------------------------------ # Compiling Exim with experimental features. These are documented in # experimental-spec.txt. "Experimental" means that the way these features are # implemented may still change. Backward compatibility is not guaranteed. @@ -926,6 +920,14 @@ ZCAT_COMMAND=/usr/bin/zcat #------------------------------------------------------------------------------ +# Proxying. +# If you may want to use outbound (client-side) proxying, uncomment the SOCKS +# line below. + +# SUPPORT_SOCKS=yes + + +#------------------------------------------------------------------------------ # Support for authentication via Radius is also available. The Exim support, # which is intended for use in conjunction with the SMTP AUTH facilities, # is included only when requested by setting the following parameter to the diff --git a/src/src/config.h.defaults b/src/src/config.h.defaults index 9ebb4f8de..54b5598c9 100644 --- a/src/src/config.h.defaults +++ b/src/src/config.h.defaults @@ -45,7 +45,6 @@ it's a default value. */ #define DISABLE_DKIM #define DISABLE_PRDR #define DISABLE_OCSP -#define DISABLE_SOCKS #define DISABLE_D_OPTION #define ENABLE_DISABLE_FSYNC @@ -139,6 +138,7 @@ it's a default value. */ #define SUPPORT_MBX #define SUPPORT_MOVE_FROZEN_MESSAGES #define SUPPORT_PAM +#define SUPPORT_SOCKS #define SUPPORT_TLS #define SUPPORT_TRANSLATE_IP_ADDRESS diff --git a/src/src/exim.c b/src/src/exim.c index a0477faa1..e6777a3db 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -829,7 +829,7 @@ fprintf(f, "Support for:"); #ifndef DISABLE_PRDR fprintf(f, " PRDR"); #endif -#ifndef DISABLE_SOCKS +#ifdef SUPPORT_SOCKS fprintf(f, " SOCKS"); #endif #ifdef EXPERIMENTAL_SPF diff --git a/src/src/smtp_out.c b/src/src/smtp_out.c index abc5b80fe..da4a46f51 100644 --- a/src/src/smtp_out.c +++ b/src/src/smtp_out.c @@ -267,7 +267,7 @@ int smtp_connect(host_item *host, int host_af, int port, uschar *interface, int timeout, transport_instance * tb) { -#ifndef DISABLE_SOCKS +#ifdef SUPPORT_SOCKS smtp_transport_options_block * ob = (smtp_transport_options_block *)tb->options_block; #endif @@ -287,7 +287,7 @@ HDEBUG(D_transport|D_acl|D_v) { uschar * s = US" "; if (interface) s = string_sprintf(" from %s ", interface); -#ifndef DISABLE_SOCKS +#ifdef SUPPORT_SOCKS if (ob->socks_proxy) s = string_sprintf("%svia proxy ", s); #endif debug_printf("Connecting to %s %s%s... ", host->name, callout_address, s); @@ -295,7 +295,7 @@ HDEBUG(D_transport|D_acl|D_v) /* Create and connect the socket */ -#ifndef DISABLE_SOCKS +#ifdef SUPPORT_SOCKS if (ob->socks_proxy) return socks_sock_connect(host, host_af, port, interface, tb, timeout); #endif diff --git a/src/src/transports/smtp.c b/src/src/transports/smtp.c index fc1439e93..30facda00 100644 --- a/src/src/transports/smtp.c +++ b/src/src/transports/smtp.c @@ -159,7 +159,7 @@ optionlist smtp_transport_options[] = { (void *)offsetof(smtp_transport_options_block, serialize_hosts) }, { "size_addition", opt_int, (void *)offsetof(smtp_transport_options_block, size_addition) } -#ifndef DISABLE_SOCKS +#ifdef SUPPORT_SOCKS ,{ "socks_proxy", opt_stringptr, (void *)offsetof(smtp_transport_options_block, socks_proxy) } #endif @@ -249,7 +249,7 @@ smtp_transport_options_block smtp_transport_option_defaults = { FALSE, /* lmtp_ignore_quota */ NULL, /* expand_retry_include_ip_address */ TRUE /* retry_include_ip_address */ -#ifndef DISABLE_SOCKS +#ifdef SUPPORT_SOCKS ,NULL /* socks_proxy */ #endif #ifdef SUPPORT_TLS diff --git a/src/src/transports/smtp.h b/src/src/transports/smtp.h index c77c2c5d9..07b601a96 100644 --- a/src/src/transports/smtp.h +++ b/src/src/transports/smtp.h @@ -59,7 +59,7 @@ typedef struct { BOOL lmtp_ignore_quota; uschar *expand_retry_include_ip_address; BOOL retry_include_ip_address; -#ifndef DISABLE_SOCKS +#ifdef SUPPORT_SOCKS uschar *socks_proxy; #endif #ifdef SUPPORT_TLS @@ -111,7 +111,7 @@ extern int smtp_auth(uschar *, unsigned, address_item *, host_item *, extern BOOL smtp_mail_auth_str(uschar *, unsigned, address_item *, smtp_transport_options_block *); -#ifndef DISABLE_SOCKS +#ifdef SUPPORT_SOCKS extern int socks_sock_connect(host_item *, int, int, uschar *, transport_instance *, int); #endif diff --git a/src/src/transports/smtp_socks.c b/src/src/transports/smtp_socks.c index a7d4e106f..30eded545 100644 --- a/src/src/transports/smtp_socks.c +++ b/src/src/transports/smtp_socks.c @@ -10,7 +10,7 @@ #include "../exim.h" #include "smtp.h" -#ifndef DISABLE_SOCKS /* entire file */ +#ifdef SUPPORT_SOCKS /* entire file */ #ifndef nelem # define nelem(arr) (sizeof(arr)/sizeof(*arr)) |