.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
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
# 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
# DISABLE_DNSSEC=yes
-#------------------------------------------------------------------------------
-# 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
# GNU/Linux -ldl is also needed.
+#------------------------------------------------------------------------------
+# 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,
#define DISABLE_DKIM
#define DISABLE_PRDR
#define DISABLE_OCSP
-#define DISABLE_SOCKS
#define DISABLE_D_OPTION
#define ENABLE_DISABLE_FSYNC
#define SUPPORT_MBX
#define SUPPORT_MOVE_FROZEN_MESSAGES
#define SUPPORT_PAM
+#define SUPPORT_SOCKS
#define SUPPORT_TLS
#define SUPPORT_TRANSLATE_IP_ADDRESS
#ifndef DISABLE_PRDR
fprintf(f, " PRDR");
#endif
-#ifndef DISABLE_SOCKS
+#ifdef SUPPORT_SOCKS
fprintf(f, " SOCKS");
#endif
#ifdef EXPERIMENTAL_SPF
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
{
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);
/* 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
(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
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
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
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
#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))