summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2020-05-09 20:31:36 +0100
committerJeremy Harris <jgh146exb@wizmail.org>2020-05-09 20:42:16 +0100
commit989ab7c83d1a69fe6ce454cfe51572c62933a5a3 (patch)
tree7aedeb3cb50e71913de977ed283b29e14fbd492d /src
parent0725fcc5aa930ce1d9f5e9d37639b2728d9cc260 (diff)
Rename EXPERIMENTAL_SRS to EXPERIMENTAL_SRS_ALT
Diffstat (limited to 'src')
-rw-r--r--src/src/EDITME13
-rw-r--r--src/src/config.h.defaults2
-rw-r--r--src/src/deliver.c6
-rw-r--r--src/src/exim.c2
-rw-r--r--src/src/exim.h2
-rw-r--r--src/src/expand.c6
-rw-r--r--src/src/globals.c8
-rw-r--r--src/src/globals.h2
-rw-r--r--src/src/macro_predef.c2
-rw-r--r--src/src/readconf.c2
-rw-r--r--src/src/routers/queryprogram.c2
-rw-r--r--src/src/routers/redirect.c8
-rw-r--r--src/src/routers/redirect.h2
-rw-r--r--src/src/srs.c2
-rw-r--r--src/src/srs.h2
-rw-r--r--src/src/structs.h2
-rw-r--r--src/src/verify.c2
17 files changed, 33 insertions, 32 deletions
diff --git a/src/src/EDITME b/src/src/EDITME
index c6f30b58c..340d30d76 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 bc3beb931..5347f7a8e 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 85b061b30..b681584d5 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 d8ad19899..cd6d25323 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 2cc2621c4..1ddba187b 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 7c9d48100..95b5d02e1 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 e9529b493..880db98f4 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 95cc25f6a..3b9e6fb40 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 2b3269d90..17aad2e4b 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 68079e6f8..3921ccffb 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 03c84fc89..5b206c572 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 cd225d8e9..13b6e5244 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 74e14af74..7c9ee1ce0 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 aed88bc62..657cd1771 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 99463de97..32404128f 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 c6700d513..e1d989af2 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 fba1f6e9e..76f6c9167 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