summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2015-12-08 16:56:15 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2015-12-08 16:56:15 +0000
commitf0989ec0ec69cc6a881ef9f7f118194c04875a36 (patch)
tree6caf0547ffde0370cbbbb6599b74f7ef53c976e4 /src
parent74f150bf80451e34b2fae10c14019e37d644420a (diff)
SOCKS: downgrade from DISABLE_SOCKS to SUPPORT_SOCKS in Local/Makefile
Diffstat (limited to 'src')
-rw-r--r--src/src/EDITME16
-rw-r--r--src/src/config.h.defaults2
-rw-r--r--src/src/exim.c2
-rw-r--r--src/src/smtp_out.c6
-rw-r--r--src/src/transports/smtp.c4
-rw-r--r--src/src/transports/smtp.h4
-rw-r--r--src/src/transports/smtp_socks.c2
7 files changed, 19 insertions, 17 deletions
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))