diff options
author | Jeremy Harris <jgh146exb@wizmail.org> | 2015-12-13 17:12:43 +0000 |
---|---|---|
committer | Jeremy Harris <jgh146exb@wizmail.org> | 2015-12-18 14:58:06 +0000 |
commit | de78e2d59e3924238648b8fb363a1412fa9e499d (patch) | |
tree | 4f3c67c80445114ff721864947cf7b5f1c2ca448 /src | |
parent | 42653575e8539e76698610e2fc36c5ebc653f074 (diff) |
Redis: move from Experimental to mainlineexim-4_87_RC2
Diffstat (limited to 'src')
-rwxr-xr-x | src/scripts/lookups-Makefile | 10 | ||||
-rw-r--r-- | src/src/EDITME | 17 | ||||
-rw-r--r-- | src/src/config.h.defaults | 2 | ||||
-rw-r--r-- | src/src/deliver.c | 2 | ||||
-rw-r--r-- | src/src/drtables.c | 8 | ||||
-rw-r--r-- | src/src/exim.c | 6 | ||||
-rw-r--r-- | src/src/expand.c | 20 | ||||
-rw-r--r-- | src/src/globals.c | 2 | ||||
-rw-r--r-- | src/src/globals.h | 2 | ||||
-rw-r--r-- | src/src/lookups/redis.c | 8 | ||||
-rw-r--r-- | src/src/readconf.c | 2 | ||||
-rw-r--r-- | src/src/route.c | 2 |
12 files changed, 34 insertions, 47 deletions
diff --git a/src/scripts/lookups-Makefile b/src/scripts/lookups-Makefile index 61493c632..4e69a9a77 100755 --- a/src/scripts/lookups-Makefile +++ b/src/scripts/lookups-Makefile @@ -161,7 +161,7 @@ sed -n "1,/$tag_marker/p" < "$input" for name_mod in \ CDB DBM:dbmdb DNSDB DSEARCH IBASE LSEARCH MYSQL NIS NISPLUS ORACLE \ - PASSWD PGSQL SQLITE TESTDB WHOSON + PASSWD PGSQL REDIS SQLITE TESTDB WHOSON do emit_module_rule $name_mod done @@ -177,14 +177,6 @@ fi OBJ="${OBJ} spf.o" -# Because the variable is EXPERIMENTAL_REDIS and not LOOKUP_REDIS we -# use a different function to check for EXPERIMENTAL_* features -# requested. Don't use the SPF method with dummy functions above. -if want_experimental REDIS -then - OBJ="${OBJ} redis.o" -fi - echo "MODS = $MODS" echo "OBJ = $OBJ" diff --git a/src/src/EDITME b/src/src/EDITME index 7cdcfc93a..ab7f18588 100644 --- a/src/src/EDITME +++ b/src/src/EDITME @@ -288,6 +288,11 @@ TRANSPORT_SMTP=yes # library. # NOTE: LDAP cannot be built as a module! # +# For Redis you need to have hiredis installed on your system +# (https://github.com/redis/hiredis). +# Depending on where it is installed you may have to edit the CFLAGS +# (often += -I/usr/local/include) and LDFLAGS (-lhiredis) lines. + # If your system has pkg-config then the _INCLUDE/_LIBS setting can be # handled for you automatically by also defining the _PC variable to reference # the name of the pkg-config package, if such is available. @@ -306,6 +311,7 @@ LOOKUP_DNSDB=yes # LOOKUP_ORACLE=yes # LOOKUP_PASSWD=yes # LOOKUP_PGSQL=yes +# LOOKUP_REDIS=yes # LOOKUP_SQLITE=yes # LOOKUP_SQLITE_PC=sqlite3 # LOOKUP_WHOSON=yes @@ -357,7 +363,8 @@ PCRE_CONFIG=yes # the command for linking Exim itself, not on any auxiliary programs. You # don't need to set LOOKUP_INCLUDE if the relevant directories are already # specified in INCLUDE. The settings below are just examples; -lpq is for -# PostgreSQL, -lgds is for Interbase, -lsqlite3 is for SQLite. +# PostgreSQL, -lgds is for Interbase, -lsqlite3 is for SQLite, -lhiredis +# is for Redis. # # You do not need to use this for any lookup information added via pkg-config. @@ -480,14 +487,6 @@ EXIM_MONITOR=eximon.bin # CFLAGS += -I/usr/local/include # LDFLAGS += -lopendmarc - -# Uncomment the following line to add Redis lookup support -# You need to have hiredis installed on your system (https://github.com/redis/hiredis). -# Depending on where it is installed you may have to edit the CFLAGS and LDFLAGS lines. -# EXPERIMENTAL_REDIS=yes -# CFLAGS += -I/usr/local/include -# LDFLAGS += -lhiredis - # Uncomment the following line to enable support for checking certificate # ownership # EXPERIMENTAL_CERTNAMES=yes diff --git a/src/src/config.h.defaults b/src/src/config.h.defaults index 35c5559fb..14de083fe 100644 --- a/src/src/config.h.defaults +++ b/src/src/config.h.defaults @@ -95,6 +95,7 @@ it's a default value. */ #define LOOKUP_ORACLE #define LOOKUP_PASSWD #define LOOKUP_PGSQL +#define LOOKUP_REDIS #define LOOKUP_SQLITE #define LOOKUP_TESTDB #define LOOKUP_WHOSON @@ -177,7 +178,6 @@ it's a default value. */ #define EXPERIMENTAL_DCC #define EXPERIMENTAL_DSN_INFO #define EXPERIMENTAL_DMARC -#define EXPERIMENTAL_REDIS #define EXPERIMENTAL_SPF #define EXPERIMENTAL_SRS diff --git a/src/src/deliver.c b/src/src/deliver.c index d85f010e6..e67c06183 100644 --- a/src/src/deliver.c +++ b/src/src/deliver.c @@ -1085,9 +1085,7 @@ if (addr->message) ) && ( Ustrstr(s, "mysql") != NULL || Ustrstr(s, "pgsql") != NULL -#ifdef EXPERIMENTAL_REDIS || Ustrstr(s, "redis") != NULL -#endif || Ustrstr(s, "sqlite") != NULL || Ustrstr(s, "ldap:") != NULL || Ustrstr(s, "ldapdn:") != NULL diff --git a/src/src/drtables.c b/src/src/drtables.c index 3e978243d..ec4e72683 100644 --- a/src/src/drtables.c +++ b/src/src/drtables.c @@ -465,15 +465,15 @@ extern lookup_module_info sqlite_lookup_module_info; #ifdef EXPERIMENTAL_SPF extern lookup_module_info spf_lookup_module_info; #endif -#ifdef EXPERIMENTAL_REDIS -extern lookup_module_info redis_lookup_module_info; -#endif #if defined(LOOKUP_PGSQL) && LOOKUP_PGSQL!=2 extern lookup_module_info pgsql_lookup_module_info; #endif #if defined(LOOKUP_PASSWD) && LOOKUP_PASSWD!=2 extern lookup_module_info passwd_lookup_module_info; #endif +#if defined(LOOKUP_REDIS) && LOOKUP_REDIS!=2 +extern lookup_module_info redis_lookup_module_info; +#endif #if defined(LOOKUP_ORACLE) && LOOKUP_ORACLE!=2 extern lookup_module_info oracle_lookup_module_info; #endif @@ -576,7 +576,7 @@ void init_lookup_list(void) addlookupmodule(NULL, &pgsql_lookup_module_info); #endif -#ifdef EXPERIMENTAL_REDIS +#if defined(LOOKUP_REDIS) && LOOKUP_REDIS!=2 addlookupmodule(NULL, &redis_lookup_module_info); #endif diff --git a/src/src/exim.c b/src/src/exim.c index f8cfda8a8..28617a510 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -862,9 +862,6 @@ fprintf(f, "Support for:"); #ifdef EXPERIMENTAL_DSN_INFO fprintf(f, " Experimental_DSN_info"); #endif -#ifdef EXPERIMENTAL_REDIS - fprintf(f, " Experimental_Redis"); -#endif fprintf(f, "\n"); fprintf(f, "Lookups (built-in):"); @@ -907,6 +904,9 @@ fprintf(f, "Lookups (built-in):"); #if defined(LOOKUP_PGSQL) && LOOKUP_PGSQL!=2 fprintf(f, " pgsql"); #endif +#if defined(LOOKUP_REDIS) && LOOKUP_REDIS!=2 + fprintf(f, " redis"); +#endif #if defined(LOOKUP_SQLITE) && LOOKUP_SQLITE!=2 fprintf(f, " sqlite"); #endif diff --git a/src/src/expand.c b/src/src/expand.c index f09271782..a51dac570 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -7482,22 +7482,22 @@ for (i = 1; i < argc; i++) if (Ustrspn(argv[i], "abcdefghijklmnopqrtsuvwxyz0123456789-.:/") == Ustrlen(argv[i])) { - #ifdef LOOKUP_LDAP +#ifdef LOOKUP_LDAP eldap_default_servers = argv[i]; - #endif - #ifdef LOOKUP_MYSQL +#endif +#ifdef LOOKUP_MYSQL mysql_servers = argv[i]; - #endif - #ifdef LOOKUP_PGSQL +#endif +#ifdef LOOKUP_PGSQL pgsql_servers = argv[i]; - #endif - #ifdef EXPERIMENTAL_REDIS +#endif +#ifdef LOOKUP_REDIS redis_servers = argv[i]; - #endif +#endif } - #ifdef EXIM_PERL +#ifdef EXIM_PERL else opt_perl_startup = argv[i]; - #endif +#endif } printf("Testing string expansion: debug_level = %d\n\n", debug_level); diff --git a/src/src/globals.c b/src/src/globals.c index 0edb16962..14a821a19 100644 --- a/src/src/globals.c +++ b/src/src/globals.c @@ -83,7 +83,7 @@ uschar *oracle_servers = NULL; uschar *pgsql_servers = NULL; #endif -#ifdef EXPERIMENTAL_REDIS +#ifdef LOOKUP_REDIS uschar *redis_servers = NULL; #endif diff --git a/src/src/globals.h b/src/src/globals.h index eb85eefa9..9ae78a920 100644 --- a/src/src/globals.h +++ b/src/src/globals.h @@ -62,7 +62,7 @@ extern uschar *oracle_servers; /* List of servers and connect info */ extern uschar *pgsql_servers; /* List of servers and connect info */ #endif -#ifdef EXPERIMENTAL_REDIS +#ifdef LOOKUP_REDIS extern uschar *redis_servers; /* List of servers and connect info */ #endif diff --git a/src/src/lookups/redis.c b/src/src/lookups/redis.c index 5f677ff06..7bab34971 100644 --- a/src/src/lookups/redis.c +++ b/src/src/lookups/redis.c @@ -7,7 +7,7 @@ #include "../exim.h" -#ifdef EXPERIMENTAL_REDIS +#ifdef LOOKUP_REDIS #include "lf_functions.h" @@ -118,7 +118,7 @@ if (sdata[2][0] == 0) sdata[2] = NULL; /* See if we have a cached connection to the server */ -for (cn = redis_connections; cn != NULL; cn = cn->next) +for (cn = redis_connections; cn; cn = cn->next) if (Ustrcmp(cn->server, server_copy) == 0) { redis_handle = cn->handle; @@ -458,11 +458,11 @@ static lookup_info redis_lookup_info = { }; #ifdef DYNLOOKUP -#define redis_lookup_module_info _lookup_module_info +# define redis_lookup_module_info _lookup_module_info #endif /* DYNLOOKUP */ static lookup_info *_lookup_list[] = { &redis_lookup_info }; lookup_module_info redis_lookup_module_info = { LOOKUP_MODULE_INFO_MAGIC, _lookup_list, 1 }; -#endif /* EXPERIMENTAL_REDIS */ +#endif /* LOOKUP_REDIS */ /* End of lookups/redis.c */ diff --git a/src/src/readconf.c b/src/src/readconf.c index f2bf23bbb..6f97dad69 100644 --- a/src/src/readconf.c +++ b/src/src/readconf.c @@ -375,7 +375,7 @@ static optionlist optionlist_config[] = { { "recipient_unqualified_hosts", opt_stringptr, &recipient_unqualified_hosts }, { "recipients_max", opt_int, &recipients_max }, { "recipients_max_reject", opt_bool, &recipients_max_reject }, -#ifdef EXPERIMENTAL_REDIS +#ifdef LOOKUP_REDIS { "redis_servers", opt_stringptr, &redis_servers }, #endif { "remote_max_parallel", opt_int, &remote_max_parallel }, diff --git a/src/src/route.c b/src/src/route.c index 0d96e2365..b289b0f34 100644 --- a/src/src/route.c +++ b/src/src/route.c @@ -1904,9 +1904,7 @@ if ( yield == DEFER ) && ( Ustrstr(addr->message, "mysql") != NULL || Ustrstr(addr->message, "pgsql") != NULL -#ifdef EXPERIMENTAL_REDIS || Ustrstr(addr->message, "redis") != NULL -#endif || Ustrstr(addr->message, "sqlite") != NULL || Ustrstr(addr->message, "ldap:") != NULL || Ustrstr(addr->message, "ldapdn:") != NULL |