diff options
author | krion <krion@FreeBSD.org> | 2005-09-28 18:12:53 +0800 |
---|---|---|
committer | krion <krion@FreeBSD.org> | 2005-09-28 18:12:53 +0800 |
commit | 7a9fbd5674d1a53f3ff5b9644e3376b9a460acd2 (patch) | |
tree | 4c5596830510b40110b4bedd8d7d02bdeaba1ee4 /mail | |
parent | ed6588b69bd7eb7907ee30ee4284b9c7f98b9e67 (diff) | |
download | freebsd-ports-gnome-7a9fbd5674d1a53f3ff5b9644e3376b9a460acd2.tar.gz freebsd-ports-gnome-7a9fbd5674d1a53f3ff5b9644e3376b9a460acd2.tar.zst freebsd-ports-gnome-7a9fbd5674d1a53f3ff5b9644e3376b9a460acd2.zip |
Update to 4.53
Diffstat (limited to 'mail')
-rw-r--r-- | mail/exim/Makefile | 30 | ||||
-rw-r--r-- | mail/exim/distinfo | 4 | ||||
-rw-r--r-- | mail/exim/files/patch-src::EDITME | 44 | ||||
-rw-r--r-- | mail/exim/files/patch-src_expand.c | 14 | ||||
-rw-r--r-- | mail/exim/files/patch-src_globals.c | 16 | ||||
-rw-r--r-- | mail/exim/files/patch-src_globals.h | 16 | ||||
-rw-r--r-- | mail/exim/files/patch-src_pcre_Makefile | 14 | ||||
-rw-r--r-- | mail/exim/files/patch-src_readconf.c | 14 | ||||
-rw-r--r-- | mail/exim/files/patch-src_routers_redirect.c | 188 | ||||
-rw-r--r-- | mail/exim/files/patch-src_routers_redirect.h | 16 | ||||
-rw-r--r-- | mail/exim/files/patch-src_srs.c | 320 | ||||
-rw-r--r-- | mail/exim/files/patch-src_srs.h | 29 | ||||
-rw-r--r-- | mail/exim/options | 6 |
13 files changed, 67 insertions, 644 deletions
diff --git a/mail/exim/Makefile b/mail/exim/Makefile index 42dac9eb80e4..9409841955cb 100644 --- a/mail/exim/Makefile +++ b/mail/exim/Makefile @@ -28,7 +28,7 @@ MASTER_SITE_SUBDIR+= sa-exim/:sa_exim DISTFILES+= sa-exim-${SA_EXIM_VERSION}.tar.gz:sa_exim .endif -EXIM_VERSION= 4.52 +EXIM_VERSION= 4.53 SA_EXIM_VERSION=4.2 IGNOREFILES= FAQ.txt.bz2 @@ -37,7 +37,7 @@ IGNOREFILES= FAQ.txt.bz2 .if defined(PKGNAMESUFFIX) CONFLICTS+= ${PKGNAMEPREFIX}${PORTNAME}-4.* .endif -.for suffix in -ldap2 -mysql -postgresql -sa-exim +.for suffix in -ldap2 -mysql -postgresql -sa-exim -sqlite .if !defined(PKGNAMESUFFIX) || ${PKGNAMESUFFIX} != ${suffix} CONFLICTS+= ${PKGNAMEPREFIX}${PORTNAME}${suffix}-4.* .endif @@ -127,16 +127,18 @@ PLIST_SUB= EXIM_VERSION="${EXIM_VERSION}-${PORTREVISION}" \ # overridden at runtime below, but are advised not to remove "root". #WITH_FIXED_NEVER_USERS= root:daemon:bin -# Define WITH_TCP_WRAPPERS, WITH_MYSQL, and WITH_PGSQL to link against -# libwrap, libmysqlclient and libpq respectively. Define -# WITH_SASLAUTHD to enable use of the Cyrus SASL authentication daemon. -# Define WITH_MYSQL_VER to specify a particular version of MySQL to -# use. Valid values are currently 323, 40 and 41. Defining WITH_MYSQL_VER -# implies WITH_MYSQL. +# Define WITH_TCP_WRAPPERS, WITH_MYSQL, WITH_SQLITE and WITH_PGSQL +# to link against libwrap, libmysqlclient, sqlite and libpq +# respectively. Define WITH_SASLAUTHD to enable use of the Cyrus +# SASL authentication daemon. Define WITH_SQLITE to enable use of +# the SQLite support. Define WITH_MYSQL_VER to specify a particular +# version of MySQL to use. Valid values are currently 323, 40 and +# 41. Defining WITH_MYSQL_VER implies WITH_MYSQL. #WITH_TCP_WRAPPERS= yes #WITH_MYSQL= yes #WITH_MYSQL_VER= 40 #WITH_PGSQL= yes +#WITH_SQLITE= yes #WITH_SASLAUTHD= yes # As an alternative to WITH_SASLAUTHD, you can define WITH_PWCHECK to @@ -160,7 +162,7 @@ PLIST_SUB= EXIM_VERSION="${EXIM_VERSION}-${PORTREVISION}" \ # Exim also supports NETSCAPE and SOLARIS7 lookup types, but no # client libraries exist for these in the ports tree. #WITH_OPENLDAP= yes -#WITH_OPENLDAP_VER= 22 +#WITH_OPENLDAP_VER= 23 # WITH_BDB_VER is the version of the Berkeley DB library to use, and # may be 1, which corresponds to version 1.85 in the base system, 4, @@ -464,6 +466,16 @@ SEDLIST+= -e 's,^\# (LOOKUP_NIS=),\1,' SEDLIST+= -e 's,^\# (LOOKUP_PASSWD=),\1,' .endif +.if defined(WITH_SQLITE) +SEDLIST+= -e 's,XX_SQLITE_LIBS_XX,-L${LOCALBASE}/lib -lsqlite3,' \ + -e 's,XX_SQLITE_FLAGS_XX,-I${LOCALBASE}/include,' \ + -e 's,^\# (LOOKUP_SQLITE=),\1,' +LIB_DEPENDS+= sqlite3.8:${PORTSDIR}/databases/sqlite3 +.else +SEDLIST+= -e 's,XX_SQLITE_LIBS_XX,,' \ + -e 's,XX_SQLITE_FLAGS_XX,,' +.endif + .if !defined(WITHOUT_LMTP) SEDLIST+= -e 's,^\# (TRANSPORT_LMTP=),\1,' .endif diff --git a/mail/exim/distinfo b/mail/exim/distinfo index 9da9135f2b55..9e23efcdcf8c 100644 --- a/mail/exim/distinfo +++ b/mail/exim/distinfo @@ -1,5 +1,5 @@ -MD5 (exim/exim-4.52.tar.bz2) = 89601650f3b854d469451f30b369622b -SIZE (exim/exim-4.52.tar.bz2) = 1535866 +MD5 (exim/exim-4.53.tar.bz2) = 674cd9e25c8e1e45351a1ea262776fb3 +SIZE (exim/exim-4.53.tar.bz2) = 1547374 MD5 (exim/sa-exim-4.2.tar.gz) = ad76f73c6b3d01caa88078e3e622745a SIZE (exim/sa-exim-4.2.tar.gz) = 66575 MD5 (exim/FAQ.txt.bz2) = IGNORE diff --git a/mail/exim/files/patch-src::EDITME b/mail/exim/files/patch-src::EDITME index 5cf34605993b..2602f7de9140 100644 --- a/mail/exim/files/patch-src::EDITME +++ b/mail/exim/files/patch-src::EDITME @@ -1,6 +1,9 @@ ---- src/EDITME.orig Mon Dec 1 12:15:41 2003 -+++ src/EDITME Mon Jan 12 12:36:43 2004 -@@ -98,7 +98,7 @@ + +$FreeBSD$ + +--- src/EDITME.orig ++++ src/EDITME +@@ -100,7 +100,7 @@ # /usr/local/sbin. The installation script will try to create this directory, # and any superior directories, if they do not exist. @@ -9,7 +12,7 @@ #------------------------------------------------------------------------------ -@@ -114,7 +114,7 @@ +@@ -116,7 +116,7 @@ # don't exist. It will also install a default runtime configuration if this # file does not exist. @@ -18,7 +21,7 @@ # It is possible to specify a colon-separated list of files for CONFIGURE_FILE. # In this case, Exim will use the first of them that exists when it is run. -@@ -132,7 +132,7 @@ +@@ -134,7 +134,7 @@ # owner of a local mailbox.) Specifying these values as root is very strongly # discouraged. @@ -27,7 +30,7 @@ # If you specify EXIM_USER as a name, this is looked up at build time, and the # uid number is built into the binary. However, you can specify that this -@@ -153,7 +153,7 @@ +@@ -155,7 +155,7 @@ # for EXIM_USER (e.g. EXIM_USER=exim), you don't need to set EXIM_GROUP unless # you want to use a group other than the default group for the given user. @@ -36,7 +39,7 @@ # Many sites define a user called "exim", with an appropriate default group, # and use -@@ -286,6 +286,7 @@ +@@ -295,6 +295,7 @@ # LDAP_LIB_TYPE=OPENLDAP2 # LDAP_LIB_TYPE=NETSCAPE # LDAP_LIB_TYPE=SOLARIS @@ -44,7 +47,7 @@ # If you don't set any of these, Exim assumes the original University of # Michigan (OpenLDAP 1) library. -@@ -299,8 +300,10 @@ +@@ -308,8 +309,10 @@ # specified in INCLUDE. The settings below are just examples; -lpq is for # PostgreSQL, -lgds is for Interbase. @@ -57,16 +60,16 @@ #------------------------------------------------------------------------------ # Compiling the Exim monitor: If you want to compile the Exim monitor, a -@@ -310,7 +313,7 @@ +@@ -319,7 +322,7 @@ # files are defaulted in the OS/Makefile-Default file, but can be overridden in # local OS-specific make files. -EXIM_MONITOR=eximon.bin +# EXIM_MONITOR=eximon.bin - - -@@ -373,6 +376,7 @@ + #------------------------------------------------------------------------------ + # Compiling Exim with content scanning support: If you want to compile Exim +@@ -438,6 +441,7 @@ # ALT_CONFIG_PREFIX=/some/directory/ # ALT_CONFIG_PREFIX=/some/directory/exim.conf- @@ -74,7 +77,7 @@ #------------------------------------------------------------------------------ -@@ -417,7 +421,7 @@ +@@ -491,7 +495,7 @@ # one that is set in the headers_charset option. The default setting is # defined by this setting: @@ -83,7 +86,7 @@ # If you are going to make use of $header_xxx expansions in your configuration # file, or if your users are going to use them in filter files, and the normal -@@ -489,7 +493,7 @@ +@@ -563,7 +567,7 @@ # SUPPORT_TLS=yes # Uncomment this setting if you are using OpenSSL @@ -92,7 +95,7 @@ # Uncomment these settings if you are using GnuTLS # USE_GNUTLS=yes -@@ -540,7 +544,7 @@ +@@ -614,7 +618,7 @@ # Once you have done this, "make install" will build the info files and # install them in the directory you have defined. @@ -101,7 +104,7 @@ #------------------------------------------------------------------------------ -@@ -553,7 +557,7 @@ +@@ -627,7 +631,7 @@ # %s. This will be replaced by one of the strings "main", "panic", or "reject" # to form the final file names. Some installations may want something like this: @@ -110,14 +113,15 @@ # which results in files with names /var/log/exim_mainlog, etc. The directory # in which the log files are placed must exist; Exim does not try to create -@@ -690,12 +694,20 @@ +@@ -795,13 +799,21 @@ + # library for TCP wrappers, so you probably need something like this: # # USE_TCP_WRAPPERS=yes -# CFLAGS=-O -I/usr/local/include -# EXTRALIBS_EXIM=-L/usr/local/lib -lwrap -# -+CFLAGS=XX_CFLAGS_XX XX_SPF_FLAGS_XX XX_SRS_FLAGS_XX -+EXTRALIBS=XX_TCP_WRAPPERS_LIBS_XX XX_PAM_LIBS_XX XX_ICONV_LIBS_XX XX_SPF_LIBS_XX XX_SRS_LIBS_XX XX_RADIUS_LIBS_XX ++CFLAGS=XX_CFLAGS_XX XX_SPF_FLAGS_XX XX_SRS_FLAGS_XX XX_SQLITE_FLAGS_XX ++EXTRALIBS=XX_TCP_WRAPPERS_LIBS_XX XX_PAM_LIBS_XX XX_ICONV_LIBS_XX XX_SPF_LIBS_XX XX_SRS_LIBS_XX XX_RADIUS_LIBS_XX XX_SQLITE_LIBS_XX + # but of course there may need to be other things in CFLAGS and EXTRALIBS_EXIM # as well. @@ -134,7 +138,7 @@ #------------------------------------------------------------------------------ # The default action of the exim_install script (which is run by "make # install") is to install the Exim binary with a unique name such as -@@ -937,7 +939,7 @@ +@@ -1066,7 +1078,7 @@ # (process id) to a file so that it can easily be identified. The path of the # file can be specified here. Some installations may want something like this: diff --git a/mail/exim/files/patch-src_expand.c b/mail/exim/files/patch-src_expand.c deleted file mode 100644 index 2f8b28e43d1d..000000000000 --- a/mail/exim/files/patch-src_expand.c +++ /dev/null @@ -1,14 +0,0 @@ - -$FreeBSD$ - ---- src/expand.c.orig -+++ src/expand.c -@@ -479,8 +479,6 @@ - { "spool_inodes", vtype_pinodes, (void *)TRUE }, - { "spool_space", vtype_pspace, (void *)TRUE }, - #ifdef EXPERIMENTAL_SRS -- { "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 }, - { "srs_recipient", vtype_stringptr, &srs_recipient }, diff --git a/mail/exim/files/patch-src_globals.c b/mail/exim/files/patch-src_globals.c deleted file mode 100644 index 2b2bbbb397a0..000000000000 --- a/mail/exim/files/patch-src_globals.c +++ /dev/null @@ -1,16 +0,0 @@ - -$FreeBSD$ - ---- src/globals.c.orig -+++ src/globals.c -@@ -1056,9 +1056,7 @@ - uschar *spool_directory = US SPOOL_DIRECTORY - "\0<--------------Space to patch spool_directory->"; - #ifdef EXPERIMENTAL_SRS --uschar *srs_config = NULL; --uschar *srs_db_address = NULL; --uschar *srs_db_key = NULL; -+BOOL srs_alwaysrewrite = FALSE; - int srs_hashlength = 6; - int srs_hashmin = -1; - int srs_maxage = 31; diff --git a/mail/exim/files/patch-src_globals.h b/mail/exim/files/patch-src_globals.h deleted file mode 100644 index 07857d01ffd3..000000000000 --- a/mail/exim/files/patch-src_globals.h +++ /dev/null @@ -1,16 +0,0 @@ - -$FreeBSD$ - ---- src/globals.h.orig -+++ src/globals.h -@@ -659,9 +659,7 @@ - extern BOOL split_spool_directory; /* TRUE to use multiple subdirs */ - extern uschar *spool_directory; /* Name of spool directory */ - #ifdef EXPERIMENTAL_SRS --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 */ -+extern BOOL srs_alwaysrewrite; /* Rewrite for all domains */ - extern int srs_hashlength; /* SRS hash length */ - extern int srs_hashmin; /* SRS minimum hash length */ - extern int srs_maxage; /* SRS max age */ diff --git a/mail/exim/files/patch-src_pcre_Makefile b/mail/exim/files/patch-src_pcre_Makefile new file mode 100644 index 000000000000..594edc96689d --- /dev/null +++ b/mail/exim/files/patch-src_pcre_Makefile @@ -0,0 +1,14 @@ + +$FreeBSD$ + +--- src/pcre/Makefile.orig ++++ src/pcre/Makefile +@@ -57,7 +57,7 @@ + @echo "$(CC) pcre_get.c" + $(FE)$(CC) -c $(CFLAGS) pcre_get.c + +-pcre_globals.: pcre_globals.c pcre.h config.h pcre_internal.h Makefile ++pcre_globals.o: pcre_globals.c pcre.h config.h pcre_internal.h Makefile + @echo "$(CC) pcre_globals.c" + $(FE)$(CC) -c $(CFLAGS) pcre_globals.c + diff --git a/mail/exim/files/patch-src_readconf.c b/mail/exim/files/patch-src_readconf.c deleted file mode 100644 index a630c8023e95..000000000000 --- a/mail/exim/files/patch-src_readconf.c +++ /dev/null @@ -1,14 +0,0 @@ - -$FreeBSD$ - ---- src/readconf.c.orig -+++ src/readconf.c -@@ -340,7 +340,7 @@ - { "split_spool_directory", opt_bool, &split_spool_directory }, - { "spool_directory", opt_stringptr, &spool_directory }, - #ifdef EXPERIMENTAL_SRS -- { "srs_config", opt_stringptr, &srs_config }, -+ { "srs_alwaysrewrite", opt_bool, &srs_alwaysrewrite }, - { "srs_hashlength", opt_int, &srs_hashlength }, - { "srs_hashmin", opt_int, &srs_hashmin }, - { "srs_maxage", opt_int, &srs_maxage }, diff --git a/mail/exim/files/patch-src_routers_redirect.c b/mail/exim/files/patch-src_routers_redirect.c deleted file mode 100644 index 35ea407059ce..000000000000 --- a/mail/exim/files/patch-src_routers_redirect.c +++ /dev/null @@ -1,188 +0,0 @@ - -$FreeBSD$ - ---- src/routers/redirect.c.orig -+++ src/routers/redirect.c -@@ -1,4 +1,4 @@ --/* $Cambridge: exim/exim-src/src/routers/redirect.c,v 1.13 2005/06/27 15:11:04 tom Exp $ */ -+/* $Cambridge: exim/exim-src/src/routers/redirect.c,v 1.10 2005/04/28 13:06:32 ph10 Exp $ */ - - /************************************************* - * Exim - an Internet mail transport agent * -@@ -108,14 +108,6 @@ - #ifdef EXPERIMENTAL_SRS - { "srs", opt_stringptr, - (void *)offsetof(redirect_router_options_block, srs) }, -- { "srs_alias", opt_stringptr, -- (void *)offsetof(redirect_router_options_block, srs_alias) }, -- { "srs_condition", opt_stringptr, -- (void *)offsetof(redirect_router_options_block, srs_condition) }, -- { "srs_dbinsert", opt_stringptr, -- (void *)offsetof(redirect_router_options_block, srs_dbinsert) }, -- { "srs_dbselect", opt_stringptr, -- (void *)offsetof(redirect_router_options_block, srs_dbselect) }, - #endif - { "syntax_errors_text", opt_stringptr, - (void *)offsetof(redirect_router_options_block, syntax_errors_text) }, -@@ -154,10 +146,6 @@ - NULL, /* owngroups */ - #ifdef EXPERIMENTAL_SRS - NULL, /* srs */ -- NULL, /* srs_alias */ -- NULL, /* srs_condition */ -- NULL, /* srs_dbinsert */ -- NULL, /* srs_dbselect */ - #endif - 022, /* modemask */ - RDO_REWRITE, /* bit_options */ -@@ -532,10 +520,6 @@ - addr_prop.extra_headers = NULL; - addr_prop.remove_headers = NULL; - --#ifdef EXPERIMENTAL_SRS --addr_prop.srs_sender = NULL; --#endif -- - /* When verifying and testing addresses, the "logwrite" command in filters - must be bypassed. */ - -@@ -562,90 +546,28 @@ - } - - #ifdef EXPERIMENTAL_SRS -- /* Perform SRS on recipient/return-path as required */ -- -- if(ob->srs != NULL) -+ /* For reverse SRS, fill the srs_recipient expandsion variable, -+ on failure, return decline/fail as relevant */ -+if(ob->srs != NULL) - { -- BOOL usesrs = TRUE; -- -- if(ob->srs_condition != NULL) -- usesrs = expand_check_condition(ob->srs_condition, "srs_condition expansion failed", NULL); -- -- if(usesrs) -+ if (Ustrcmp(ob->srs, "reverse") == 0 || Ustrcmp(ob->srs, "reverseandforward") == 0) - { -- int srs_action = 0, n_srs; -- uschar *res; -- uschar *usedomain; -- -- /* What are we doing? */ -- if(Ustrcmp(ob->srs, "forward") == 0) -- srs_action = 1; -- else if(Ustrcmp(ob->srs, "reverseandforward") == 0) -- { -- srs_action = 3; -- -- if((ob->srs_dbinsert == NULL) ^ (ob->srs_dbselect == NULL)) -- return DEFER; -- } -- else if(Ustrcmp(ob->srs, "reverse") == 0) -- srs_action = 2; -- -- /* Reverse SRS */ -- if(srs_action & 2) -- { -- srs_orig_recipient = addr->address; -- -- eximsrs_init(); -- if(ob->srs_dbselect) -- eximsrs_db_set(TRUE, ob->srs_dbselect); --/* Comment this out for now... --// else --// eximsrs_db_set(TRUE, NULL); --*/ -- -- if((n_srs = eximsrs_reverse(&res, addr->address)) == OK) -- { -- srs_recipient = res; -- DEBUG(D_any) -- debug_printf("SRS (reverse): Recipient '%s' rewritten to '%s'\n", srs_orig_recipient, srs_recipient); -- } -- -- eximsrs_done(); -- -- if(n_srs != OK) -- return n_srs; -- } -- -- /* Forward SRS */ -- /* No point in actually performing SRS if we are just verifying a recipient */ -- if((srs_action & 1) && !verify && (sender_address ? sender_address[0] != 0 : FALSE)) -- { -- -- srs_orig_sender = sender_address; -- eximsrs_init(); -- if(ob->srs_dbinsert) -- eximsrs_db_set(FALSE, ob->srs_dbinsert); --/* Comment this out for now... --// else --// eximsrs_db_set(FALSE, NULL); --*/ -- -- if(ob->srs_alias != NULL ? (usedomain = expand_string(ob->srs_alias)) == NULL : 1) -- usedomain = deliver_domain; -- -- if((n_srs = eximsrs_forward(&res, sender_address, usedomain)) == OK) -- { -- addr_prop.srs_sender = res; -- DEBUG(D_any) -- debug_printf("SRS (forward): Sender '%s' rewritten to '%s'\n", srs_orig_sender, res); -- } -- -- eximsrs_done(); -+ uschar *res; -+ int ret; -+ DEBUG(D_route) -+ debug_printf("SRS: (Forward) \n"); - -- if(n_srs != OK) -- return n_srs; -- } -- } -+ srs_orig_recipient = addr->address; -+ eximsrs_init(); -+ ret = eximsrs_reverse(&res, addr->address); -+ if (ret != OK) -+ return ret; -+ srs_recipient = res; -+ eximsrs_done(); -+ DEBUG(D_route) -+ debug_printf("SRS: Recipient '%s' rewritten to '%s'\n", -+ srs_orig_recipient, srs_recipient); -+ } - } - #endif - -@@ -877,6 +799,29 @@ - (addr_prop.errors_address != NULL)? addr_prop.errors_address : US"", - (addr_prop.errors_address != NULL)? "\n" : ""); - } -+ -+#ifdef EXPERIMENTAL_SRS -+ /* On successful redirection, check for SRS forwarding and adjust sender */ -+if(ob->srs != NULL) -+ { -+ if ((Ustrcmp(ob->srs, "forward") == 0 || Ustrcmp(ob->srs, "reverseandforward") == 0) && !verify ) -+ { -+ uschar *res; -+ int ret; -+ DEBUG(D_route) -+ debug_printf("SRS: (Forward) \n"); -+ srs_orig_sender = sender_address; -+ eximsrs_init(); -+ ret = eximsrs_forward(&res, sender_address, deliver_domain); -+ if (ret != OK) -+ return ret; -+ sender_address = res; -+ DEBUG(D_route) -+ debug_printf("SRS: Sender '%s' rewritten to '%s'\n", -+ srs_orig_sender, sender_address); -+ } -+ } -+#endif - - /* Control gets here only when the address has been completely handled. Put the - original address onto the succeed queue so that any retry items that get diff --git a/mail/exim/files/patch-src_routers_redirect.h b/mail/exim/files/patch-src_routers_redirect.h deleted file mode 100644 index 7138438236ec..000000000000 --- a/mail/exim/files/patch-src_routers_redirect.h +++ /dev/null @@ -1,16 +0,0 @@ - -$FreeBSD$ - ---- src/routers/redirect.h.orig -+++ src/routers/redirect.h -@@ -37,10 +37,6 @@ - - #ifdef EXPERIMENTAL_SRS - uschar *srs; -- uschar *srs_alias; -- uschar *srs_condition; -- uschar *srs_dbinsert; -- uschar *srs_dbselect; - #endif - - int modemask; diff --git a/mail/exim/files/patch-src_srs.c b/mail/exim/files/patch-src_srs.c deleted file mode 100644 index 430010abe716..000000000000 --- a/mail/exim/files/patch-src_srs.c +++ /dev/null @@ -1,320 +0,0 @@ - -$FreeBSD$ - ---- src/srs.c.orig -+++ src/srs.c -@@ -1,231 +1,126 @@ --/* $Cambridge: exim/exim-src/src/srs.c,v 1.8 2005/06/27 18:10:30 tom Exp $ */ -+/* $Cambridge: exim/exim-src/src/srs.c,v 1.4 2005/02/17 11:58:26 ph10 Exp $ */ - - /************************************************* - * Exim - an Internet mail transport agent * - *************************************************/ - - /* SRS - Sender rewriting scheme support -- (C)2004 Miles Wilton <miles@mirtol.com> -- -- SRS Support Version: 1.0a -- -+ ©2004 Miles Wilton <miles@mirtol.com> - License: GPL */ - - #include "exim.h" - #ifdef EXPERIMENTAL_SRS - --#include <srs_alt.h> -+#include <srs2.h> - #include "srs.h" - --srs_t *srs = NULL; --uschar *srs_db_forward = NULL; --uschar *srs_db_reverse = NULL; -+#define SRS_WARN_UNLESS(x) do { \ -+ int __ret = (x); \ -+ if (__ret != SRS_SUCCESS) \ -+ DEBUG(D_any) \ -+ debug_printf("srs: %s\n", srs_strerror(__ret)); \ -+ } while(0) - -+srs_t *srs = NULL; - - /* srs_init just initialises libsrs and creates (if necessary) - an srs object to use for all srs calls in this instance */ - --int eximsrs_init() --{ -- uschar *list = srs_config; -- uschar secret_buf[SRS_MAX_SECRET_LENGTH]; -- uschar *secret = NULL; -- uschar sbuf[4]; -- uschar *sbufp; -- -- /* Check if this instance of Exim has not initialized SRS */ -- if(srs == NULL) -- { -- int co = 0; -- int hashlen, maxage; -- BOOL usetimestamp, usehash; -- -- /* Copy config vars */ -- hashlen = srs_hashlength; -- maxage = srs_maxage; -- usetimestamp = srs_usetimestamp; -- usehash = srs_usehash; -- -- /* Pass srs_config var (overrides new config vars) */ -- co = 0; -- if(srs_config != NULL) -- { -- secret = string_nextinlist(&list, &co, secret_buf, SRS_MAX_SECRET_LENGTH); -- -- if((sbufp = string_nextinlist(&list, &co, sbuf, sizeof(sbuf))) != NULL) -- maxage = atoi(sbuf); -- -- if((sbufp = string_nextinlist(&list, &co, sbuf, sizeof(sbuf))) != NULL) -- hashlen = atoi(sbuf); -- -- if((sbufp = string_nextinlist(&list, &co, sbuf, sizeof(sbuf))) != NULL) -- usetimestamp = atoi(sbuf); -- -- if((sbufp = string_nextinlist(&list, &co, sbuf, sizeof(sbuf))) != NULL) -- usehash = atoi(sbuf); -- } -- -- if(srs_hashmin == -1) -- srs_hashmin = hashlen; -- -- /* First secret specified in secrets? */ -- co = 0; -- list = srs_secrets; -- if(secret == NULL || *secret == '\0') -- { -- if((secret = string_nextinlist(&list, &co, secret_buf, SRS_MAX_SECRET_LENGTH)) == NULL) -- { -- log_write(0, LOG_MAIN | LOG_PANIC, -- "SRS Configuration Error: No secret specified"); -- return DEFER; -- } -- } -- -- /* Check config */ -- if(maxage < 0 || maxage > 365) -- { -- log_write(0, LOG_MAIN | LOG_PANIC, -- "SRS Configuration Error: Invalid maximum timestamp age"); -- return DEFER; -- } -- if(hashlen < 1 || hashlen > 20 || srs_hashmin < 1 || srs_hashmin > 20) -- { -- log_write(0, LOG_MAIN | LOG_PANIC, -- "SRS Configuration Error: Invalid hash length"); -- return DEFER; -- } -- -- if((srs = srs_open(secret, Ustrlen(secret), maxage, hashlen, srs_hashmin)) == NULL) -- { -- log_write(0, LOG_MAIN | LOG_PANIC, -- "Failed to allocate SRS memory"); -- return DEFER; -- } -- -- srs_set_option(srs, SRS_OPTION_USETIMESTAMP, usetimestamp); -- srs_set_option(srs, SRS_OPTION_USEHASH, usehash); -- -- /* Extra secrets? */ -- while((secret = string_nextinlist(&list, &co, secret_buf, SRS_MAX_SECRET_LENGTH)) != NULL) -- srs_add_secret(srs, secret, (Ustrlen(secret) > SRS_MAX_SECRET_LENGTH) ? SRS_MAX_SECRET_LENGTH : Ustrlen(secret)); -- -- DEBUG(D_any) -- debug_printf("SRS initialized\n"); -- } -- -- return OK; --} -- -- --int eximsrs_done() -+int -+eximsrs_init() - { -- if(srs != NULL) -- srs_close(srs); -- -- srs = NULL; -- -- return OK; --} -+ char sbuf[1024]; -+ uschar *list; -+ int co; - -+ char *secret; - --int eximsrs_forward(uschar **result, uschar *orig_sender, uschar *domain) --{ -- char res[512]; -- int n; -+ if (srs == NULL) { -+ srs = srs_new(); - -- if((n = srs_forward(srs, orig_sender, domain, res, sizeof(res))) & SRS_RESULT_FAIL) -- { -- DEBUG(D_any) -- debug_printf("srs_forward failed (%s, %s): %s\n", orig_sender, domain, srs_geterrormsg(n)); -- return DEFER; -- } -+ if (srs_secrets == NULL) { -+ log_write(0, LOG_MAIN | LOG_PANIC, -+ "SRS: No secrets specified"); -+ return DEFER; -+ } - -- *result = string_copy(res); -- return OK; --} -+ /* Get config */ -+ list = srs_secrets; - -+ co = 0; -+ while ((secret = string_nextinlist(&list, &co, -+ sbuf, sizeof(sbuf))) != NULL) { -+ SRS_WARN_UNLESS(srs_add_secret(srs, secret)); -+ } - --int eximsrs_reverse(uschar **result, uschar *address) --{ -- char res[512]; -- int n; -+ SRS_WARN_UNLESS(srs_set_alwaysrewrite(srs, srs_alwaysrewrite)); -+ if (srs_hashlength != -1) -+ SRS_WARN_UNLESS(srs_set_hashlength(srs, srs_hashlength)); -+ if (srs_hashmin != -1) -+ SRS_WARN_UNLESS(srs_set_hashmin(srs, srs_hashmin)); -+ if (srs_maxage != -1) -+ SRS_WARN_UNLESS(srs_set_maxage(srs, srs_maxage)); -+ if (srs_separator != NULL) -+ SRS_WARN_UNLESS(srs_set_separator(srs, srs_separator[0])); - -- if((n = srs_reverse(srs, address, res, sizeof(res))) & SRS_RESULT_FAIL) -- { -- DEBUG(D_any) -- debug_printf("srs_reverse failed (%s): %s\n", address, srs_geterrormsg(n)); -- if(n == SRS_RESULT_NOTSRS || n == SRS_RESULT_BADSRS) -- return DECLINE; -- if(n == SRS_RESULT_BADHASH || n == SRS_RESULT_BADTIMESTAMP || n == SRS_RESULT_TIMESTAMPEXPIRED) -- return FAIL; -- return DEFER; -- } -+ DEBUG(D_any) -+ debug_printf("SRS initialised\n"); -+ } - -- *result = string_copy(res); -- return OK; -+ return OK; - } - -- --int eximsrs_db_set(BOOL reverse, uschar *srs_db) -+int -+eximsrs_done() - { -- if(reverse) -- srs_db_reverse = (srs_db == NULL ? NULL : string_copy(srs_db)); -- else -- srs_db_forward = (srs_db == NULL ? NULL : string_copy(srs_db)); -- -- if(srs_set_db_functions(srs, (srs_db_forward ? eximsrs_db_insert : NULL), -- (srs_db_reverse ? eximsrs_db_lookup : NULL)) & SRS_RESULT_FAIL) -- return DEFER; -- -- return OK; -+ if (srs != NULL) -+ srs_free(srs); -+ srs = NULL; -+ return OK; - } - -- --srs_result eximsrs_db_insert(srs_t *srs, char *data, uint data_len, char *result, uint result_len) -+int -+eximsrs_forward(uschar **result, uschar *sender, uschar *domain) - { -- uschar *res; -- uschar buf[64]; -- -- if(srs_db_forward == NULL) -- return SRS_RESULT_DBERROR; -- -- srs_db_address = string_copyn(data, data_len); -- if(srs_generate_unique_id(srs, srs_db_address, buf, 64) & SRS_RESULT_FAIL) -- return SRS_RESULT_DBERROR; -- -- srs_db_key = string_copyn(buf, 16); -- -- if((res = expand_string(srs_db_forward)) == NULL) -- return SRS_RESULT_DBERROR; -- -- if(result_len < 17) -- return SRS_RESULT_DBERROR; -+ char res[1024]; -+ int ret; - -- Ustrncpy(result, srs_db_key, result_len); -+ ret = srs_forward(srs, res, sizeof(res), sender, domain); -+ if (ret != SRS_SUCCESS) { -+ DEBUG(D_any) -+ debug_printf("srs_forward failed (%s, %s): s\n", -+ sender, domain, srs_strerror(ret)); -+ return DEFER; -+ } - -- return SRS_RESULT_OK; -+ *result = string_copy(res); -+ return OK; - } - -- --srs_result eximsrs_db_lookup(srs_t *srs, char *data, uint data_len, char *result, uint result_len) -+int -+eximsrs_reverse(uschar **result, uschar *sender) - { -- uschar *res; -- -- if(srs_db_reverse == NULL) -- return SRS_RESULT_DBERROR; -- -- srs_db_key = string_copyn(data, data_len); -- if((res = expand_string(srs_db_reverse)) == NULL) -- return SRS_RESULT_DBERROR; -+ char res[1024]; -+ int ret; - -- if(Ustrlen(res) >= result_len) -- return SRS_RESULT_ADDRESSTOOLONG; -+ ret = srs_reverse(srs, res, sizeof(res), sender); -+ if (ret != SRS_SUCCESS) { -+ switch (SRS_ERROR_TYPE(ret)) { -+ case SRS_ERRTYPE_CONFIG: -+ /* This should never happen */ -+ return DEFER; -+ case SRS_ERRTYPE_INPUT: -+ /* This should never happen */ -+ return DEFER; -+ case SRS_ERRTYPE_SYNTAX: -+ return DECLINE; -+ case SRS_ERRTYPE_SRS: -+ return FAIL; -+ } -+ } - -- strncpy(result, res, result_len); -+ *result = string_copy(res); - -- return SRS_RESULT_OK; -+ return OK; - } -- -- - #endif -- diff --git a/mail/exim/files/patch-src_srs.h b/mail/exim/files/patch-src_srs.h deleted file mode 100644 index a40755249d89..000000000000 --- a/mail/exim/files/patch-src_srs.h +++ /dev/null @@ -1,29 +0,0 @@ - -$FreeBSD$ - ---- src/srs.h.orig -+++ src/srs.h -@@ -9,22 +9,17 @@ - License: GPL */ - - #ifndef __SRS_H__ -- - #define __SRS_H__ 1 - - #ifdef EXPERIMENTAL_SRS - - #include "mytypes.h" --#include <srs_alt.h> -+#include <srs2.h> - - int eximsrs_init(); - int eximsrs_done(); - int eximsrs_forward(uschar **result, uschar *orig_sender, uschar *domain); - int eximsrs_reverse(uschar **result, uschar *address); --int eximsrs_db_set(BOOL reverse, uschar *srs_db); -- --srs_result eximsrs_db_insert(srs_t *srs, char *data, uint data_len, char *result, uint result_len); --srs_result eximsrs_db_lookup(srs_t *srs, char *data, uint data_len, char *result, uint result_len); - - #endif - diff --git a/mail/exim/options b/mail/exim/options index 66fcb8fc2bee..026e2e8f8d1a 100644 --- a/mail/exim/options +++ b/mail/exim/options @@ -53,6 +53,9 @@ # The use of `auto' is recommended to avoid conflicting with # other ports linking against MySQL client libraries. +#WITHOUT_SQLITE +# Link against libsqlite3 to support sqlite lookups. + #WITH_CDB #WITH_DNSDB #WITH_DSEARCH @@ -192,6 +195,9 @@ WITH_POSTGRESQL_PORT?=auto .ifndef WITHOUT_CDB WITH_CDB?=yes .endif +.ifndef WITH_SQLITE +WITHOUT_SQLITE?=yes +.endif .ifndef WITHOUT_DNSDB WITH_DNSDB?=yes .endif |