summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2015-12-07 15:22:38 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2015-12-07 15:22:38 +0000
commit74f150bf80451e34b2fae10c14019e37d644420a (patch)
tree5a29e51aa433e9675206bbfca5ebd5e9e6bd5514 /src
parent6ae08012cf21a8e168bc8e89f56e43c96604da2c (diff)
SOCKS: move from Experimental to mainline
Diffstat (limited to 'src')
-rw-r--r--src/src/EDITME10
-rw-r--r--src/src/config.h.defaults4
-rw-r--r--src/src/exim.c16
-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, 25 insertions, 21 deletions
diff --git a/src/src/EDITME b/src/src/EDITME
index c2d95ff40..5b17e53d8 100644
--- a/src/src/EDITME
+++ b/src/src/EDITME
@@ -432,6 +432,13 @@ 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.
@@ -497,9 +504,6 @@ EXIM_MONITOR=eximon.bin
# Note: Enabling this unconditionally overrides DISABLE_DNSSEC
# EXPERIMENTAL_DANE=yes
-# Uncomment the following line to add SOCKS support
-# EXPERIMENTAL_SOCKS=yes
-
# Uncomment the following to add Internationalisation features. You need to
# have the IDN library installed.
# EXPERIMENTAL_INTERNATIONAL=yes
diff --git a/src/src/config.h.defaults b/src/src/config.h.defaults
index 6af3b4d43..9ebb4f8de 100644
--- a/src/src/config.h.defaults
+++ b/src/src/config.h.defaults
@@ -41,10 +41,11 @@ it's a default value. */
#define DEFAULT_CRYPT crypt
#define DELIVER_IN_BUFFER_SIZE 8192
#define DELIVER_OUT_BUFFER_SIZE 8192
+#define DISABLE_DNSSEC
#define DISABLE_DKIM
#define DISABLE_PRDR
#define DISABLE_OCSP
-#define DISABLE_DNSSEC
+#define DISABLE_SOCKS
#define DISABLE_D_OPTION
#define ENABLE_DISABLE_FSYNC
@@ -178,7 +179,6 @@ it's a default value. */
#define EXPERIMENTAL_INTERNATIONAL
#define EXPERIMENTAL_PROXY
#define EXPERIMENTAL_REDIS
-#define EXPERIMENTAL_SOCKS
#define EXPERIMENTAL_SPF
#define EXPERIMENTAL_SRS
diff --git a/src/src/exim.c b/src/src/exim.c
index 27b73b764..a0477faa1 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -814,20 +814,23 @@ fprintf(f, "Support for:");
#ifdef WITH_CONTENT_SCAN
fprintf(f, " Content_Scanning");
#endif
-#ifndef DISABLE_DKIM
- fprintf(f, " DKIM");
-#endif
#ifdef WITH_OLD_DEMIME
fprintf(f, " Old_Demime");
#endif
+#ifndef DISABLE_DKIM
+ fprintf(f, " DKIM");
+#endif
#ifndef DISABLE_DNSSEC
fprintf(f, " DNSSEC");
#endif
+#ifndef DISABLE_OCSP
+ fprintf(f, " OCSP");
+#endif
#ifndef DISABLE_PRDR
fprintf(f, " PRDR");
#endif
-#ifndef DISABLE_OCSP
- fprintf(f, " OCSP");
+#ifndef DISABLE_SOCKS
+ fprintf(f, " SOCKS");
#endif
#ifdef EXPERIMENTAL_SPF
fprintf(f, " Experimental_SPF");
@@ -862,9 +865,6 @@ fprintf(f, "Support for:");
#ifdef EXPERIMENTAL_REDIS
fprintf(f, " Experimental_Redis");
#endif
-#ifdef EXPERIMENTAL_SOCKS
- fprintf(f, " Experimental_SOCKS");
-#endif
fprintf(f, "\n");
fprintf(f, "Lookups (built-in):");
diff --git a/src/src/smtp_out.c b/src/src/smtp_out.c
index d32ef89b5..abc5b80fe 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)
{
-#ifdef EXPERIMENTAL_SOCKS
+#ifndef DISABLE_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);
-#ifdef EXPERIMENTAL_SOCKS
+#ifndef DISABLE_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 */
-#ifdef EXPERIMENTAL_SOCKS
+#ifndef DISABLE_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 66d632fad..fc1439e93 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) }
-#ifdef EXPERIMENTAL_SOCKS
+#ifndef DISABLE_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 */
-#ifdef EXPERIMENTAL_SOCKS
+#ifndef DISABLE_SOCKS
,NULL /* socks_proxy */
#endif
#ifdef SUPPORT_TLS
diff --git a/src/src/transports/smtp.h b/src/src/transports/smtp.h
index 2aeab9add..c77c2c5d9 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;
-#ifdef EXPERIMENTAL_SOCKS
+#ifndef DISABLE_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 *);
-#ifdef EXPERIMENTAL_SOCKS
+#ifndef DISABLE_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 6d4e072eb..a7d4e106f 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"
-#ifdef EXPERIMENTAL_SOCKS /* entire file */
+#ifndef DISABLE_SOCKS /* entire file */
#ifndef nelem
# define nelem(arr) (sizeof(arr)/sizeof(*arr))