Rename EXPERIMENTAL_SRS to EXPERIMENTAL_SRS_ALT
authorJeremy Harris <jgh146exb@wizmail.org>
Sat, 9 May 2020 19:31:36 +0000 (20:31 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Sat, 9 May 2020 19:42:16 +0000 (20:42 +0100)
18 files changed:
doc/doc-txt/experimental-spec.txt
src/src/EDITME
src/src/config.h.defaults
src/src/deliver.c
src/src/exim.c
src/src/exim.h
src/src/expand.c
src/src/globals.c
src/src/globals.h
src/src/macro_predef.c
src/src/readconf.c
src/src/routers/queryprogram.c
src/src/routers/redirect.c
src/src/routers/redirect.h
src/src/srs.c
src/src/srs.h
src/src/structs.h
src/src/verify.c

index 3beab4b9c9e86d5192a0f3c995e03272d23c68a6..68d04cce76ec0f4af213192978dcbb4c58ae6fef 100644 (file)
@@ -292,61 +292,9 @@ These four steps are explained in more details below.
 
 
 
-SRS (Sender Rewriting Scheme) Support (using libsrs_alt)
---------------------------------------------------------------
-See also below, for an alternative native support implementation.
-
-Exim  currently  includes SRS  support  via Miles  Wilton's
-libsrs_alt library. The current version of the supported
-library is 0.5, there are reports of 1.0 working.
-
-In order to  use SRS, you  must get a  copy of libsrs_alt from
-
-https://opsec.eu/src/srs/
-
-(not the original source, which has disappeared.)
-
-Unpack the tarball, then refer to MTAs/README.EXIM
-to proceed. You need to set
-
-EXPERIMENTAL_SRS=yes
-
-in your Local/Makefile.
-
-The following main-section options become available:
-       srs_config              string
-       srs_hashlength          int
-       srs_hashmin             int
-       srs_maxage              int
-       srs_secrets             string
-       srs_usehash             bool
-       srs_usetimestamp        bool
-
-The redirect router gains these options (all of type string, unset by default):
-       srs
-       srs_alias
-       srs_condition
-       srs_dbinsert
-       srs_dbselect
-
-The following variables become available:
-       $srs_db_address
-       $srs_db_key
-       $srs_orig_recipient
-       $srs_orig_sender
-       $srs_recipient
-       $srs_status
-
-The predefined feature-macro _HAVE_SRS will be present.
-Additional delivery log line elements, tagged with "SRS=" will show the srs sender.    
-For configuration information see https://github.com/Exim/exim/wiki/SRS .
-
-
-
-
 SRS (Sender Rewriting Scheme) Support (native)
 --------------------------------------------------------------
-This is less full-featured than the libsrs_alt version above.
+This is less full-featured than the libsrs_alt version below.
 
 The Exim build needs to be done with this in Local/Makefile:
 EXPERIMENTAL_SRS_NATIVE=yes
@@ -371,7 +319,7 @@ The following are provided:
 Sample usage:
 
   #macro
-  SRS_SECRET = <pick something unique for your site for this>
+  SRS_SECRET = <pick something unique for your site for this. Use on all MXs.>
   
   #routers
 
@@ -414,6 +362,58 @@ Sample usage:
 
 
 
+SRS (Sender Rewriting Scheme) Support (using libsrs_alt)
+--------------------------------------------------------------
+See also above, for an alternative native support implementation.
+
+Exim  currently  includes SRS  support  via Miles  Wilton's
+libsrs_alt library. The current version of the supported
+library is 0.5, there are reports of 1.0 working.
+
+In order to  use SRS, you  must get a  copy of libsrs_alt from
+
+https://opsec.eu/src/srs/
+
+(not the original source, which has disappeared.)
+
+Unpack the tarball, then refer to MTAs/README.EXIM
+to proceed. You need to set
+
+EXPERIMENTAL_SRS_ALT=yes
+
+in your Local/Makefile.
+
+The following main-section options become available:
+       srs_config              string
+       srs_hashlength          int
+       srs_hashmin             int
+       srs_maxage              int
+       srs_secrets             string
+       srs_usehash             bool
+       srs_usetimestamp        bool
+
+The redirect router gains these options (all of type string, unset by default):
+       srs
+       srs_alias
+       srs_condition
+       srs_dbinsert
+       srs_dbselect
+
+The following variables become available:
+       $srs_db_address
+       $srs_db_key
+       $srs_orig_recipient
+       $srs_orig_sender
+       $srs_recipient
+       $srs_status
+
+The predefined feature-macro _HAVE_SRS will be present.
+Additional delivery log line elements, tagged with "SRS=" will show the srs sender.    
+For configuration information see https://github.com/Exim/exim/wiki/SRS .
+
+
+
+
 DCC Support
 --------------------------------------------------------------
 Distributed Checksum Clearinghouse; http://www.rhyolite.com/dcc/
index c6f30b58c8ab877872b271b2cfc1c8b247f4df3c..340d30d76281d23ba5a65b3dd66f8e3e13198270 100644 (file)
@@ -584,19 +584,20 @@ DISABLE_MAL_MKS=yes
 
 # EXPERIMENTAL_DCC=yes
 
-# Uncomment the following lines to add SRS (Sender rewriting scheme) support.
+# Uncomment the following lines to add SRS (Sender rewriting scheme) support
+# using only native facilities.
+# EXPERIMENTAL_SRS_NATIVE=yes
+
+# Uncomment the following lines to add SRS (Sender rewriting scheme) support
+# using the implementation in linbsrs_alt.
 # You need to have libsrs_alt installed on your system (srs.mirtol.com).
 # Depending on where it is installed you may have to edit the CFLAGS and
 # LDFLAGS lines.
 
-# EXPERIMENTAL_SRS=yes
+# EXPERIMENTAL_SRS_ALT=yes
 # CFLAGS  += -I/usr/local/include
 # LDFLAGS += -lsrs_alt
 
-# Uncomment the following lines to add SRS (Sender rewriting scheme) support
-# using only native facilities.
-# EXPERIMENTAL_SRS_NATIVE=yes
-
 # Uncomment the following line to add DMARC checking capability, implemented
 # using libopendmarc libraries. You must have SPF and DKIM support enabled also.
 # SUPPORT_DMARC=yes
index bc3beb931637c6c54207efa8d5d9baeff6e7bb43..5347f7a8e8a48b536d0976bc36613040a92f3f84 100644 (file)
@@ -204,7 +204,7 @@ Do not put spaces between # and the 'define'.
 #define EXPERIMENTAL_DSN_INFO
 #define EXPERIMENTAL_LMDB
 #define EXPERIMENTAL_QUEUEFILE
-#define EXPERIMENTAL_SRS
+#define EXPERIMENTAL_SRS_ALT
 #define EXPERIMENTAL_SRS_NATIVE
 #define EXPERIMENTAL_TLS_RESUME
 
index 85b061b303559810500a27e6927e9b41ca49b99b..b681584d51fd69ef204621a3710cc5bef4b790c8 100644 (file)
@@ -1149,7 +1149,7 @@ if (LOGGING(sender_on_delivery) || msg)
 if (*queue_name)
   g = string_append(g, 2, US" Q=", queue_name);
 
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
 if(addr->prop.srs_sender)
   g = string_append(g, 3, US" SRS=<", addr->prop.srs_sender, US">");
 #endif
@@ -2143,7 +2143,7 @@ has its own return path setting, expand it and replace the existing value. */
 
 if(addr->prop.errors_address)
   return_path = addr->prop.errors_address;
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
 else if (addr->prop.srs_sender)
   return_path = addr->prop.srs_sender;
 #endif
@@ -4429,7 +4429,7 @@ for (int delivery_count = 0; addr_remote; delivery_count++)
 
   if(addr->prop.errors_address)
     return_path = addr->prop.errors_address;
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
   else if(addr->prop.srs_sender)
     return_path = addr->prop.srs_sender;
 #endif
index d8ad1989929a4f5e8af22b0ebdb79d905fe112cd..cd6d253231b21a37aba0d44e31ba26360de5e215 100644 (file)
@@ -1001,7 +1001,7 @@ g = string_cat(NULL, US"Support for:");
 #ifdef EXPERIMENTAL_QUEUEFILE
   g = string_cat(g, US" Experimental_QUEUEFILE");
 #endif
-#if defined(EXPERIMENTAL_SRS) || defined(EXPERIMENTAL_SRS_NATIVE)
+#if defined(EXPERIMENTAL_SRS_ALT) || defined(EXPERIMENTAL_SRS_NATIVE)
   g = string_cat(g, US" Experimental_SRS");
 #endif
 #ifdef EXPERIMENTAL_TLS_RESUME
index 2cc2621c42f515a83ede61abc4e15ed52ed6555c..1ddba187bb99fb8fc51a2484f2f0bba54e28d91b 100644 (file)
@@ -493,7 +493,7 @@ config.h, mytypes.h, and store.h, so we don't need to mention them explicitly.
 #ifdef SUPPORT_SPF
 # include "spf.h"
 #endif
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
 # include "srs.h"
 #endif
 #ifndef DISABLE_DKIM
index 7c9d481000223e2fcd33cff2e24f79f8525a565b..95b5d02e1b32a7c7608499d00d54ddf16dc33afe 100644 (file)
@@ -752,16 +752,16 @@ static var_entry var_table[] = {
   { "spool_directory",     vtype_stringptr,   &spool_directory },
   { "spool_inodes",        vtype_pinodes,     (void *)TRUE },
   { "spool_space",         vtype_pspace,      (void *)TRUE },
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
   { "srs_db_address",      vtype_stringptr,   &srs_db_address },
   { "srs_db_key",          vtype_stringptr,   &srs_db_key },
   { "srs_orig_recipient",  vtype_stringptr,   &srs_orig_recipient },
   { "srs_orig_sender",     vtype_stringptr,   &srs_orig_sender },
 #endif
-#if defined(EXPERIMENTAL_SRS) || defined(EXPERIMENTAL_SRS_NATIVE)
+#if defined(EXPERIMENTAL_SRS_ALT) || defined(EXPERIMENTAL_SRS_NATIVE)
   { "srs_recipient",       vtype_stringptr,   &srs_recipient },
 #endif
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
   { "srs_status",          vtype_stringptr,   &srs_status },
 #endif
   { "thisaddress",         vtype_stringptr,   &filter_thisaddress },
index e9529b493ec9f3701fddb7169350782591d6914b..880db98f47971e68ab76b87b093052f3d03b635b 100644 (file)
@@ -407,7 +407,7 @@ BOOL    spf_result_guessed     = FALSE;
 #endif
 BOOL    split_spool_directory  = FALSE;
 BOOL    spool_wireformat       = FALSE;
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
 BOOL    srs_usehash            = TRUE;
 BOOL    srs_usetimestamp       = TRUE;
 #endif
@@ -596,7 +596,7 @@ address_item address_defaults = {
     .extra_headers =   NULL,
     .remove_headers =  NULL,
     .variables =       NULL,
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
     .srs_sender =      NULL,
 #endif
     .ignore_error =    FALSE,
@@ -1504,7 +1504,7 @@ uschar *spf_smtp_comment       = NULL;
 FILE   *spool_data_file               = NULL;
 uschar *spool_directory        = US SPOOL_DIRECTORY
                            "\0<--------------Space to patch spool_directory->";
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
 uschar *srs_config             = NULL;
 uschar *srs_db_address         = NULL;
 uschar *srs_db_key             = NULL;
@@ -1517,7 +1517,7 @@ uschar *srs_recipient          = NULL;
 uschar *srs_secrets            = NULL;
 uschar *srs_status             = NULL;
 #endif
-#ifdef EXPERIMENTAL_SRS_NATIVE
+#ifdef EXPERIMENTAL_SRS_ALT
 uschar *srs_recipient          = NULL;
 #endif
 int     string_datestamp_offset= -1;
index 95cc25f6a2f2e641ca5f0a43d37c555ea985d20d..3b9e6fb40838b077c86c8ddc0effb828f3383837 100644 (file)
@@ -987,7 +987,7 @@ extern BOOL    split_spool_directory;  /* TRUE to use multiple subdirs */
 extern FILE   *spool_data_file;               /* handle for -D file */
 extern uschar *spool_directory;        /* Name of spool directory */
 extern BOOL    spool_wireformat;       /* can write wireformat -D files */
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
 extern uschar *srs_config;             /* SRS config secret:max age:hash length:use timestamp:use hash */
 extern uschar *srs_db_address;         /* SRS db address */
 extern uschar *srs_db_key;             /* SRS db key */
index 2b3269d9007282f4f99d4580ca6708a8bcb12e3d..17aad2e4ba9d585cc904bd75e07a30f51aa15279 100644 (file)
@@ -183,7 +183,7 @@ due to conflicts with other common macros. */
 #ifdef SUPPORT_SPF
   builtin_macro_create(US"_HAVE_SPF");
 #endif
-#if defined(EXPERIMENTAL_SRS) || defined(EXPERIMENTAL_SRS_NATIVE)
+#if defined(EXPERIMENTAL_SRS_ALT) || defined(EXPERIMENTAL_SRS_NATIVE)
   builtin_macro_create(US"_HAVE_SRS");
 #endif
 #if defined(EXPERIMENTAL_SRS_NATIVE)
index 68079e6f82bc4c525246014e823b757c99bbdc1d..3921ccffb9e644234da81d2e5a23aa2f18efc114 100644 (file)
@@ -334,7 +334,7 @@ static optionlist optionlist_config[] = {
   { "sqlite_dbfile",            opt_stringptr,   {&sqlite_dbfile} },
   { "sqlite_lock_timeout",      opt_int,         {&sqlite_lock_timeout} },
 #endif
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
   { "srs_config",               opt_stringptr,   {&srs_config} },
   { "srs_hashlength",           opt_int,         {&srs_hashlength} },
   { "srs_hashmin",              opt_int,         {&srs_hashmin} },
index 03c84fc8953c026bc588f8b275170a32498f5162..5b206c57298354d59d0412775f624fca71a5ea8e 100644 (file)
@@ -242,7 +242,7 @@ rc = rf_get_munge_headers(addr, rblock, &addr_prop.extra_headers,
   &addr_prop.remove_headers);
 if (rc != OK) return rc;
 
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
 addr_prop.srs_sender = NULL;
 #endif
 
index cd225d8e91f59e44b73c7df5fecabd8a75d62856..13b6e5244684e37aabf0b69479c6a475d4e5e144 100644 (file)
@@ -93,7 +93,7 @@ optionlist redirect_router_options[] = {
   { "sieve_useraddress", opt_stringptr,                LOFF(sieve_useraddress) },
   { "sieve_vacation_directory", opt_stringptr, LOFF(sieve_vacation_directory) },
   { "skip_syntax_errors", opt_bool,            LOFF(skip_syntax_errors) },
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
   { "srs",                opt_stringptr,       LOFF(srs) },
   { "srs_alias",          opt_stringptr,       LOFF(srs_alias) },
   { "srs_condition",      opt_stringptr,       LOFF(srs_condition) },
@@ -149,7 +149,7 @@ redirect_router_options_block redirect_router_option_defaults = {
   NULL,        /* qualify_domain */
   NULL,        /* owners */
   NULL,        /* owngroups */
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
   NULL,        /* srs */
   NULL,        /* srs_alias */
   NULL,        /* srs_condition */
@@ -543,7 +543,7 @@ addr_prop.remove_headers = NULL;
 addr_prop.variables = NULL;
 tree_dup((tree_node **)&addr_prop.variables, addr->prop.variables);
 
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
 addr_prop.srs_sender = NULL;
 #endif
 #ifdef SUPPORT_I18N
@@ -578,7 +578,7 @@ if (!ugid.gid_set && pw != NULL)
   ugid.gid_set = TRUE;
   }
 
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
   /* Perform SRS on recipient/return-path as required  */
 
   if(ob->srs != NULL)
index 74e14af7421957e873ca5a09a4cd279c111d1687..7c9ee1ce0dd68e159b363fb6e3a7a84f107d438a 100644 (file)
@@ -34,7 +34,7 @@ typedef struct {
   uid_t  *owners;
   gid_t  *owngroups;
 
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
   uschar *srs;
   uschar *srs_alias;
   uschar *srs_condition;
index aed88bc62f74337c1e585e128160c471b06d900a..657cd1771d39d028c417c3a8692f6498a814c8d2 100644 (file)
@@ -11,7 +11,7 @@
   License: GPL */
 
 #include "exim.h"
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
 
 #include <srs_alt.h>
 #include "srs.h"
index 99463de97299da816645ac77b30c54423d10ddc3..32404128f5da299fc4cba39f4d7741d9e2c79113 100644 (file)
@@ -10,7 +10,7 @@
 
 #define __SRS_H__ 1
 
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
 
 #include "mytypes.h"
 #include <srs_alt.h>
index c6700d5136803fe8aa91d5fad96cc4e02b4b3517..e1d989af23601210d9eab15740ef17e6a8e39497 100644 (file)
@@ -515,7 +515,7 @@ typedef struct address_item_propagated {
   uschar *remove_headers;         /* list of those to remove */
   void   *variables;             /* router-vasriables */
 
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
   uschar *srs_sender;             /* Change return path when delivering */
 #endif
   BOOL    ignore_error:1;        /* ignore delivery error */
index fba1f6e9e0a96d80c447a9201bddc00ad563cc38..76f6c91673bd8cebc91f0466c208d3360a8e2c37 100644 (file)
@@ -2156,7 +2156,7 @@ for (addr_list = addr_local, i = 0; i < 2; addr_list = addr_remote, i++)
     addr_list = addr->next;
 
     fprintf(fp, "%s", CS addr->address);
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT
     if(addr->prop.srs_sender)
       fprintf(fp, "    [srs = %s]", addr->prop.srs_sender);
 #endif