[exim-cvs] Rename EXPERIMENTAL_SRS to EXPERIMENTAL_SRS_ALT

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Exim Git Commits Mailing List
Datum:  
To: exim-cvs
Betreff: [exim-cvs] Rename EXPERIMENTAL_SRS to EXPERIMENTAL_SRS_ALT
Gitweb: https://git.exim.org/exim.git/commitdiff/989ab7c83d1a69fe6ce454cfe51572c62933a5a3
Commit:     989ab7c83d1a69fe6ce454cfe51572c62933a5a3
Parent:     0725fcc5aa930ce1d9f5e9d37639b2728d9cc260
Author:     Jeremy Harris <jgh146exb@???>
AuthorDate: Sat May 9 20:31:36 2020 +0100
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Sat May 9 20:42:16 2020 +0100


    Rename EXPERIMENTAL_SRS to EXPERIMENTAL_SRS_ALT
---
 doc/doc-txt/experimental-spec.txt | 108 +++++++++++++++++++-------------------
 src/src/EDITME                    |  13 ++---
 src/src/config.h.defaults         |   2 +-
 src/src/deliver.c                 |   6 +--
 src/src/exim.c                    |   2 +-
 src/src/exim.h                    |   2 +-
 src/src/expand.c                  |   6 +--
 src/src/globals.c                 |   8 +--
 src/src/globals.h                 |   2 +-
 src/src/macro_predef.c            |   2 +-
 src/src/readconf.c                |   2 +-
 src/src/routers/queryprogram.c    |   2 +-
 src/src/routers/redirect.c        |   8 +--
 src/src/routers/redirect.h        |   2 +-
 src/src/srs.c                     |   2 +-
 src/src/srs.h                     |   2 +-
 src/src/structs.h                 |   2 +-
 src/src/verify.c                  |   2 +-
 18 files changed, 87 insertions(+), 86 deletions(-)


diff --git a/doc/doc-txt/experimental-spec.txt b/doc/doc-txt/experimental-spec.txt
index 3beab4b..68d04cc 100644
--- a/doc/doc-txt/experimental-spec.txt
+++ b/doc/doc-txt/experimental-spec.txt
@@ -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/
diff --git a/src/src/EDITME b/src/src/EDITME
index c6f30b5..340d30d 100644
--- a/src/src/EDITME
+++ b/src/src/EDITME
@@ -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
diff --git a/src/src/config.h.defaults b/src/src/config.h.defaults
index bc3beb9..5347f7a 100644
--- a/src/src/config.h.defaults
+++ b/src/src/config.h.defaults
@@ -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

diff --git a/src/src/deliver.c b/src/src/deliver.c
index 85b061b..b681584 100644
--- a/src/src/deliver.c
+++ b/src/src/deliver.c
@@ -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
diff --git a/src/src/exim.c b/src/src/exim.c
index d8ad198..cd6d253 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -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
diff --git a/src/src/exim.h b/src/src/exim.h
index 2cc2621..1ddba18 100644
--- a/src/src/exim.h
+++ b/src/src/exim.h
@@ -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
diff --git a/src/src/expand.c b/src/src/expand.c
index 7c9d481..95b5d02 100644
--- a/src/src/expand.c
+++ b/src/src/expand.c
@@ -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 },
diff --git a/src/src/globals.c b/src/src/globals.c
index e9529b4..880db98 100644
--- a/src/src/globals.c
+++ b/src/src/globals.c
@@ -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;
diff --git a/src/src/globals.h b/src/src/globals.h
index 95cc25f..3b9e6fb 100644
--- a/src/src/globals.h
+++ b/src/src/globals.h
@@ -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 */
diff --git a/src/src/macro_predef.c b/src/src/macro_predef.c
index 2b3269d..17aad2e 100644
--- a/src/src/macro_predef.c
+++ b/src/src/macro_predef.c
@@ -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)
diff --git a/src/src/readconf.c b/src/src/readconf.c
index 68079e6..3921ccf 100644
--- a/src/src/readconf.c
+++ b/src/src/readconf.c
@@ -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} },
diff --git a/src/src/routers/queryprogram.c b/src/src/routers/queryprogram.c
index 03c84fc..5b206c5 100644
--- a/src/src/routers/queryprogram.c
+++ b/src/src/routers/queryprogram.c
@@ -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

diff --git a/src/src/routers/redirect.c b/src/src/routers/redirect.c
index cd225d8..13b6e52 100644
--- a/src/src/routers/redirect.c
+++ b/src/src/routers/redirect.c
@@ -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)
diff --git a/src/src/routers/redirect.h b/src/src/routers/redirect.h
index 74e14af..7c9ee1c 100644
--- a/src/src/routers/redirect.h
+++ b/src/src/routers/redirect.h
@@ -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;
diff --git a/src/src/srs.c b/src/src/srs.c
index aed88bc..657cd17 100644
--- a/src/src/srs.c
+++ b/src/src/srs.c
@@ -11,7 +11,7 @@
License: GPL */

#include "exim.h"
-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT

#include <srs_alt.h>
#include "srs.h"
diff --git a/src/src/srs.h b/src/src/srs.h
index 99463de..3240412 100644
--- a/src/src/srs.h
+++ b/src/src/srs.h
@@ -10,7 +10,7 @@

#define __SRS_H__ 1

-#ifdef EXPERIMENTAL_SRS
+#ifdef EXPERIMENTAL_SRS_ALT

 #include "mytypes.h"
 #include <srs_alt.h>
diff --git a/src/src/structs.h b/src/src/structs.h
index c6700d5..e1d989a 100644
--- a/src/src/structs.h
+++ b/src/src/structs.h
@@ -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 */
diff --git a/src/src/verify.c b/src/src/verify.c
index fba1f6e..76f6c91 100644
--- a/src/src/verify.c
+++ b/src/src/verify.c
@@ -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