summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJeremy Harris <jgh146exb@wizmail.org>2018-01-05 13:33:42 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2018-01-05 14:06:17 +0000
commit7952eef9f77899f36b23f1b9fa679f459cd52ffd (patch)
tree302d001dd96b8b9164f133f40ccdee4fb34a4c09 /src
parent3249f1b7dc4893c2b896db3813bc6222d2dc9bef (diff)
SPF: promote from Experimental to mainline status
Diffstat (limited to 'src')
-rw-r--r--src/src/EDITME18
-rw-r--r--src/src/acl.c6
-rw-r--r--src/src/config.h.defaults2
-rw-r--r--src/src/dmarc.c4
-rw-r--r--src/src/dmarc.h4
-rw-r--r--src/src/drtables.c4
-rw-r--r--src/src/exim.c6
-rw-r--r--src/src/exim.h2
-rw-r--r--src/src/expand.c2
-rw-r--r--src/src/globals.c2
-rw-r--r--src/src/globals.h2
-rw-r--r--src/src/lookups/spf.c4
-rw-r--r--src/src/macro_predef.c2
-rw-r--r--src/src/readconf.c2
-rw-r--r--src/src/smtp_in.c4
-rw-r--r--src/src/spf.c2
-rw-r--r--src/src/spf.h2
17 files changed, 35 insertions, 33 deletions
diff --git a/src/src/EDITME b/src/src/EDITME
index 3a57fab11..9dcd174ca 100644
--- a/src/src/EDITME
+++ b/src/src/EDITME
@@ -463,14 +463,6 @@ DISABLE_MAL_MKS=yes
# EXPERIMENTAL_DCC=yes
-# Uncomment the following lines to add SPF support. You need to have libspf2
-# installed on your system (www.libspf2.org). Depending on where it is installed
-# you may have to edit the CFLAGS and LDFLAGS lines.
-
-# EXPERIMENTAL_SPF=yes
-# CFLAGS += -I/usr/local/include
-# LDFLAGS += -lspf2
-
# Uncomment the following lines to add SRS (Sender rewriting scheme) support.
# 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
@@ -979,6 +971,16 @@ ZCAT_COMMAND=/usr/bin/zcat
#------------------------------------------------------------------------------
+# Uncomment the following lines to add SPF support. You need to have libspf2
+# installed on your system (www.libspf2.org). Depending on where it is installed
+# you may have to edit the CFLAGS and LDFLAGS lines.
+
+# SUPPORT_SPF=yes
+# CFLAGS += -I/usr/local/include
+# LDFLAGS += -lspf2
+
+
+#------------------------------------------------------------------------------
# Support for authentication via Radius is also available. The Exim support,
# which is intended for use in conjunction with the SMTP AUTH facilities,
# is included only when requested by setting the following parameter to the
diff --git a/src/src/acl.c b/src/src/acl.c
index 045535526..7d54cdd52 100644
--- a/src/src/acl.c
+++ b/src/src/acl.c
@@ -102,7 +102,7 @@ enum { ACLC_ACL,
#ifdef WITH_CONTENT_SCAN
ACLC_SPAM,
#endif
-#ifdef EXPERIMENTAL_SPF
+#ifdef SUPPORT_SPF
ACLC_SPF,
ACLC_SPF_GUESS,
#endif
@@ -312,7 +312,7 @@ static condition_def conditions[] = {
(1<<ACL_WHERE_NOTSMTP)),
},
#endif
-#ifdef EXPERIMENTAL_SPF
+#ifdef SUPPORT_SPF
[ACLC_SPF] = { US"spf", TRUE, FALSE,
(1<<ACL_WHERE_AUTH)|(1<<ACL_WHERE_CONNECT)|
(1<<ACL_WHERE_HELO)|
@@ -3682,7 +3682,7 @@ for (; cb != NULL; cb = cb->next)
break;
#endif
-#ifdef EXPERIMENTAL_SPF
+#ifdef SUPPORT_SPF
case ACLC_SPF:
rc = spf_process(&arg, sender_address, SPF_PROCESS_NORMAL);
break;
diff --git a/src/src/config.h.defaults b/src/src/config.h.defaults
index a9d071765..810d8969b 100644
--- a/src/src/config.h.defaults
+++ b/src/src/config.h.defaults
@@ -147,6 +147,7 @@ Do not put spaces between # and the 'define'.
#define SUPPORT_PAM
#define SUPPORT_PROXY
#define SUPPORT_SOCKS
+#define SUPPORT_SPF
#define SUPPORT_TLS
#define SUPPORT_TRANSLATE_IP_ADDRESS
@@ -196,7 +197,6 @@ Do not put spaces between # and the 'define'.
#define DMARC_TLD_FILE "/etc/exim/opendmarc.tlds"
#define EXPERIMENTAL_LMDB
#define EXPERIMENTAL_QUEUEFILE
-#define EXPERIMENTAL_SPF
#define EXPERIMENTAL_SRS
diff --git a/src/src/dmarc.c b/src/src/dmarc.c
index 6cb5b19fe..37ac9c555 100644
--- a/src/src/dmarc.c
+++ b/src/src/dmarc.c
@@ -12,7 +12,7 @@
#include "exim.h"
#ifdef EXPERIMENTAL_DMARC
-# if !defined EXPERIMENTAL_SPF
+# if !defined SUPPORT_SPF
# error SPF must also be enabled for DMARC
# elif defined DISABLE_DKIM
# error DKIM must also be enabled for DMARC
@@ -632,7 +632,7 @@ if (header_from_sender)
return hdr_tmp;
}
-# endif /* EXPERIMENTAL_SPF */
+# endif /* SUPPORT_SPF */
#endif /* EXPERIMENTAL_DMARC */
/* vi: aw ai sw=2
*/
diff --git a/src/src/dmarc.h b/src/src/dmarc.h
index 78e2a5b7b..764ff88ff 100644
--- a/src/src/dmarc.h
+++ b/src/src/dmarc.h
@@ -12,9 +12,9 @@
#ifdef EXPERIMENTAL_DMARC
# include "opendmarc/dmarc.h"
-# ifdef EXPERIMENTAL_SPF
+# ifdef SUPPORT_SPF
# include "spf2/spf.h"
-# endif /* EXPERIMENTAL_SPF */
+# endif /* SUPPORT_SPF */
/* prototypes */
int dmarc_init();
diff --git a/src/src/drtables.c b/src/src/drtables.c
index d8904ac4f..36bf64261 100644
--- a/src/src/drtables.c
+++ b/src/src/drtables.c
@@ -578,7 +578,7 @@ extern lookup_module_info redis_lookup_module_info;
#if defined(EXPERIMENTAL_LMDB)
extern lookup_module_info lmdb_lookup_module_info;
#endif
-#if defined(EXPERIMENTAL_SPF)
+#if defined(SUPPORT_SPF)
extern lookup_module_info spf_lookup_module_info;
#endif
#if defined(LOOKUP_SQLITE) && LOOKUP_SQLITE!=2
@@ -669,7 +669,7 @@ init_lookup_list(void)
addlookupmodule(NULL, &lmdb_lookup_module_info);
#endif
-#ifdef EXPERIMENTAL_SPF
+#ifdef SUPPORT_SPF
addlookupmodule(NULL, &spf_lookup_module_info);
#endif
diff --git a/src/src/exim.c b/src/src/exim.c
index 2189bc051..01c0e306a 100644
--- a/src/src/exim.c
+++ b/src/src/exim.c
@@ -840,6 +840,9 @@ fprintf(f, "Support for:");
#ifdef SUPPORT_SOCKS
fprintf(f, " SOCKS");
#endif
+#ifdef SUPPORT_SPF
+ fprintf(f, " SPF");
+#endif
#ifdef TCP_FASTOPEN
deliver_init();
if (tcp_fastopen_ok) fprintf(f, " TCP_Fast_Open");
@@ -850,9 +853,6 @@ fprintf(f, "Support for:");
#ifdef EXPERIMENTAL_QUEUEFILE
fprintf(f, " Experimental_QUEUEFILE");
#endif
-#ifdef EXPERIMENTAL_SPF
- fprintf(f, " Experimental_SPF");
-#endif
#ifdef EXPERIMENTAL_SRS
fprintf(f, " Experimental_SRS");
#endif
diff --git a/src/src/exim.h b/src/src/exim.h
index 770fd6333..faeb6455b 100644
--- a/src/src/exim.h
+++ b/src/src/exim.h
@@ -502,7 +502,7 @@ config.h, mytypes.h, and store.h, so we don't need to mention them explicitly.
#ifdef EXPERIMENTAL_BRIGHTMAIL
# include "bmi_spam.h"
#endif
-#ifdef EXPERIMENTAL_SPF
+#ifdef SUPPORT_SPF
# include "spf.h"
#endif
#ifdef EXPERIMENTAL_SRS
diff --git a/src/src/expand.c b/src/src/expand.c
index 3a63a7c78..2b40823c9 100644
--- a/src/src/expand.c
+++ b/src/src/expand.c
@@ -700,7 +700,7 @@ static var_entry var_table[] = {
{ "spam_score", vtype_stringptr, &spam_score },
{ "spam_score_int", vtype_stringptr, &spam_score_int },
#endif
-#ifdef EXPERIMENTAL_SPF
+#ifdef SUPPORT_SPF
{ "spf_guess", vtype_stringptr, &spf_guess },
{ "spf_header_comment", vtype_stringptr, &spf_header_comment },
{ "spf_received", vtype_stringptr, &spf_received },
diff --git a/src/src/globals.c b/src/src/globals.c
index 5df84bd10..346bb0744 100644
--- a/src/src/globals.c
+++ b/src/src/globals.c
@@ -1360,7 +1360,7 @@ uschar *spam_action = NULL;
uschar *spam_score = NULL;
uschar *spam_score_int = NULL;
#endif
-#ifdef EXPERIMENTAL_SPF
+#ifdef SUPPORT_SPF
uschar *spf_guess = US"v=spf1 a/24 mx/24 ptr ?all";
uschar *spf_header_comment = NULL;
uschar *spf_received = NULL;
diff --git a/src/src/globals.h b/src/src/globals.h
index 37d4cada3..0c1b6ccbc 100644
--- a/src/src/globals.h
+++ b/src/src/globals.h
@@ -867,7 +867,7 @@ extern uschar *spam_action; /* the spamd recommended-action */
extern uschar *spam_score; /* the spam score (float) */
extern uschar *spam_score_int; /* spam_score * 10 (int) */
#endif
-#ifdef EXPERIMENTAL_SPF
+#ifdef SUPPORT_SPF
extern uschar *spf_guess; /* spf best-guess record */
extern uschar *spf_header_comment; /* spf header comment */
extern uschar *spf_received; /* Received-SPF: header */
diff --git a/src/src/lookups/spf.c b/src/src/lookups/spf.c
index ad56a2a8d..b32a73e6a 100644
--- a/src/src/lookups/spf.c
+++ b/src/src/lookups/spf.c
@@ -18,7 +18,7 @@
#include "../exim.h"
-#ifndef EXPERIMENTAL_SPF
+#ifndef SUPPORT_SPF
static void dummy(int x);
static void dummy2(int x) { dummy(x-1); }
static void dummy(int x) { dummy2(x-1); }
@@ -118,4 +118,4 @@ static lookup_info _lookup_info = {
static lookup_info *_lookup_list[] = { &_lookup_info };
lookup_module_info spf_lookup_module_info = { LOOKUP_MODULE_INFO_MAGIC, _lookup_list, 1 };
-#endif /* EXPERIMENTAL_SPF */
+#endif /* SUPPORT_SPF */
diff --git a/src/src/macro_predef.c b/src/src/macro_predef.c
index 08028bf5b..47ba3fdd1 100644
--- a/src/src/macro_predef.c
+++ b/src/src/macro_predef.c
@@ -174,7 +174,7 @@ due to conflicts with other common macros. */
#ifdef EXPERIMENTAL_LMDB
builtin_macro_create(US"_HAVE_LMDB");
#endif
-#ifdef EXPERIMENTAL_SPF
+#ifdef SUPPORT_SPF
builtin_macro_create(US"_HAVE_SPF");
#endif
#ifdef EXPERIMENTAL_SRS
diff --git a/src/src/readconf.c b/src/src/readconf.c
index 8d5f38c58..007e8444e 100644
--- a/src/src/readconf.c
+++ b/src/src/readconf.c
@@ -304,7 +304,7 @@ static optionlist optionlist_config[] = {
#ifdef WITH_CONTENT_SCAN
{ "spamd_address", opt_stringptr, &spamd_address },
#endif
-#ifdef EXPERIMENTAL_SPF
+#ifdef SUPPORT_SPF
{ "spf_guess", opt_stringptr, &spf_guess },
#endif
{ "split_spool_directory", opt_bool, &split_spool_directory },
diff --git a/src/src/smtp_in.c b/src/src/smtp_in.c
index 92e4a2908..498cfab5e 100644
--- a/src/src/smtp_in.c
+++ b/src/src/smtp_in.c
@@ -2007,7 +2007,7 @@ deliver_host = deliver_host_address = NULL; /* Can be set by ACL */
#ifndef DISABLE_PRDR
prdr_requested = FALSE;
#endif
-#ifdef EXPERIMENTAL_SPF
+#ifdef SUPPORT_SPF
spf_header_comment = NULL;
spf_received = NULL;
spf_result = NULL;
@@ -4082,7 +4082,7 @@ while (done <= 0)
}
}
-#ifdef EXPERIMENTAL_SPF
+#ifdef SUPPORT_SPF
/* set up SPF context */
spf_init(sender_helo_name, sender_host_address);
#endif
diff --git a/src/src/spf.c b/src/src/spf.c
index ffd278af8..1d4e032e9 100644
--- a/src/src/spf.c
+++ b/src/src/spf.c
@@ -11,7 +11,7 @@
/* Code for calling spf checks via libspf-alt. Called from acl.c. */
#include "exim.h"
-#ifdef EXPERIMENTAL_SPF
+#ifdef SUPPORT_SPF
/* must be kept in numeric order */
static spf_result_id spf_result_id_list[] = {
diff --git a/src/src/spf.h b/src/src/spf.h
index 0d982f336..23ad325f1 100644
--- a/src/src/spf.h
+++ b/src/src/spf.h
@@ -8,7 +8,7 @@
Copyright (c) The Exim Maintainers 2016
*/
-#ifdef EXPERIMENTAL_SPF
+#ifdef SUPPORT_SPF
/* Yes, we do have ns_type. spf.h redefines it if we don't set this. Doh */
#ifndef HAVE_NS_TYPE