diff options
author | Oliver Eikemeier <eik@FreeBSD.org> | 2004-07-17 14:21:13 +0000 |
---|---|---|
committer | Oliver Eikemeier <eik@FreeBSD.org> | 2004-07-17 14:21:13 +0000 |
commit | 32ed790ca91dc62b1295df2d61a54e3a21a284a9 (patch) | |
tree | 8f7bfc558cb7847081728c7e048014f93c9ae2fa /mail/exim/files | |
parent | Mark BROKEN on amd64, program crashes after a few seconds (diff) |
- Update to version 4.40
- Support for WITH_SPF and WITH_SRS via libspf2/libsrs2, needs exiscan
- Note for 5.x users: the default location of the start/stop file has changed.
Build WITH_RCORDER=yes when you depend on the old behaviour
- WITH_OPENLDAP_VER and WITH_MYSQL_VER does no longer imply the corresponding WITH_ variable.
- experimental support for optionsng from devel/portmk
Notes
Notes:
svn path=/head/; revision=113825
Diffstat (limited to 'mail/exim/files')
-rw-r--r-- | mail/exim/files/patch-src::EDITME | 2 | ||||
-rw-r--r-- | mail/exim/files/patch-src::daemon.c | 19 | ||||
-rw-r--r-- | mail/exim/files/xpatch-exiscan2 | 616 |
3 files changed, 617 insertions, 20 deletions
diff --git a/mail/exim/files/patch-src::EDITME b/mail/exim/files/patch-src::EDITME index 5fe41bbd1c4b..2a7b4e56107a 100644 --- a/mail/exim/files/patch-src::EDITME +++ b/mail/exim/files/patch-src::EDITME @@ -116,7 +116,7 @@ # CFLAGS=-O -I/usr/local/include -# EXTRALIBS_EXIM=-L/usr/local/lib -lwrap -# -+EXTRALIBS=XX_TCP_WRAPPERS_LIBS_XX XX_PAM_LIBS_XX XX_SPF_LIBS_XX XX_RADIUS_LIBS_XX ++EXTRALIBS=XX_TCP_WRAPPERS_LIBS_XX XX_PAM_LIBS_XX XX_SPF_LIBS_XX XX_SRS_LIBS_XX XX_RADIUS_LIBS_XX + # but of course there may need to be other things in CFLAGS and EXTRALIBS_EXIM # as well. diff --git a/mail/exim/files/patch-src::daemon.c b/mail/exim/files/patch-src::daemon.c deleted file mode 100644 index ab6f3c0f8e82..000000000000 --- a/mail/exim/files/patch-src::daemon.c +++ /dev/null @@ -1,19 +0,0 @@ -# -# fix connection drop handling in a data-acl -# <http://www.exim.org/pipermail/exim-users/Week-of-Mon-20040510/071573.html> -# ---- src/daemon.c.orig Fri May 14 19:25:24 2004 -+++ src/daemon.c Fri May 14 19:26:52 2004 -@@ -452,7 +452,11 @@ - { - BOOL ok = receive_msg(FALSE); - search_tidyup(); /* Close cached databases */ -- if (!ok) _exit(EXIT_SUCCESS); /* Connection was dropped */ -+ if (!ok) -+ { -+ mac_smtp_fflush(); -+ _exit(EXIT_SUCCESS); /* Connection was dropped */ -+ } - if (message_id[0] == 0) continue; /* No message was accepted */ - } - else diff --git a/mail/exim/files/xpatch-exiscan2 b/mail/exim/files/xpatch-exiscan2 new file mode 100644 index 000000000000..42ef6c047293 --- /dev/null +++ b/mail/exim/files/xpatch-exiscan2 @@ -0,0 +1,616 @@ +diff -u doc/exiscan-acl-spec.txt doc/exiscan-acl-spec.txt +--- doc/exiscan-acl-spec.txt Sat Jul 17 11:12:00 2004 ++++ doc/exiscan-acl-spec.txt Sat Jul 17 12:15:36 2004 +@@ -12,7 +12,7 @@ + - Antivirus using 3rd party scanners. + - Anti-spam using SpamAssassin. + - Anti-spam using Brightmail Antispam. +- - SPF support via the libspf_alt library ++ - SPF support via the libspf2 library + - Regular expression match against headers, bodies, raw + MIME parts and decoded MIME parts. + +@@ -1087,9 +1087,9 @@ + need to care. If you don't know what that means, visit the + above mentioned website. + +-SPF support is added via the libspf_alt library. Visit ++SPF support is added via the libspf2 library. Visit + +- http://www.midwestcs.com/spf/libspf-alt/ ++ http://libspf2.org/ + + to obtain a copy, then compile and install it. By default, + this will put headers in /usr/local/include and the static +@@ -1099,9 +1099,9 @@ + Local/Makefile: + + CFLAGS=-DSPF -I/usr/local/include +-EXTRALIBS_EXIM=-L/usr/local/lib -lspf_alt ++EXTRALIBS_EXIM=-L/usr/local/lib -lspf2 + +-This assumes that the libspf_alt files are installed in ++This assumes that the libspf2 files are installed in + their default locations. + + You can now run SPF checks in incoming SMTP by using the "spf" +diff -u scripts/MakeLinks scripts/MakeLinks +--- scripts/MakeLinks Sat Jul 17 11:12:00 2004 ++++ scripts/MakeLinks Sat Jul 17 11:34:48 2004 +@@ -184,7 +184,7 @@ + ln -s ../src/osfunctions.h osfunctions.h + ln -s ../src/spam.h spam.h + ln -s ../src/spf.h spf.h +-ln -s ../src/srs.h srs.h ++ln -s ../src/srs.h srs.h + ln -s ../src/store.h store.h + ln -s ../src/structs.h structs.h + ln -s ../src/tnef.h tnef.h +diff -u src/expand.c src/expand.c +--- src/expand.c Sat Jul 17 11:12:00 2004 ++++ src/expand.c Sat Jul 17 11:37:42 2004 +@@ -452,8 +452,6 @@ + #endif + { "spool_directory", vtype_stringptr, &spool_directory }, + #ifdef 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 -u src/globals.c src/globals.c +--- src/globals.c Sat Jul 17 11:12:00 2004 ++++ src/globals.c Sat Jul 17 11:38:52 2004 +@@ -974,9 +974,12 @@ + uschar *spool_directory = US SPOOL_DIRECTORY + "\0<--------------Space to patch spool_directory->"; + #ifdef SRS +-uschar *srs_config = NULL; +-uschar *srs_db_address = NULL; +-uschar *srs_db_key = NULL; ++BOOL srs_alwaysrewrite = FALSE; ++int srs_hashlength = -1; ++int srs_hashmin = -1; ++int srs_maxage = -1; ++uschar *srs_secrets = NULL; ++uschar *srs_separator = NULL; + uschar *srs_orig_recipient = NULL; + uschar *srs_orig_sender = NULL; + uschar *srs_recipient = NULL; +diff -u src/globals.h src/globals.h +--- src/globals.h Sat Jul 17 11:12:00 2004 ++++ src/globals.h Sat Jul 17 11:43:06 2004 +@@ -589,13 +589,16 @@ + #endif + extern uschar *spool_directory; /* Name of spool directory */ + #ifdef 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 uschar *srs_orig_sender; /* SRS original sender */ +-extern uschar *srs_orig_recipient; /* SRS original recipient */ +-extern uschar *srs_recipient; /* SRS recipient */ +-extern uschar *srs_status; /* SRS staus */ ++extern BOOL srs_alwaysrewrite; /* Rewrite for all domains */ ++extern int srs_hashlength; /* Hash length to generate */ ++extern int srs_hashmin; /* Hash length to check */ ++extern int srs_maxage; /* Max age for SRS address */ ++extern uschar *srs_secrets; /* List of SRS secrets */ ++extern uschar *srs_separator; /* Separator for SRS addresses */ ++extern uschar *srs_orig_sender; /* SRS original sender */ ++extern uschar *srs_orig_recipient; /* SRS original recipient */ ++extern uschar *srs_recipient; /* SRS recipient */ ++extern uschar *srs_status; /* SRS status */ + #endif + extern int string_datestamp_offset;/* After insertion by string_format */ + extern BOOL strip_excess_angle_brackets; /* Surrounding route-addrs */ +diff -u src/readconf.c src/readconf.c +--- src/readconf.c Sat Jul 17 11:12:00 2004 ++++ src/readconf.c Sat Jul 17 11:44:21 2004 +@@ -321,7 +321,12 @@ + { "split_spool_directory", opt_bool, &split_spool_directory }, + { "spool_directory", opt_stringptr, &spool_directory }, + #ifdef 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 }, ++ { "srs_secrets", opt_stringptr, &srs_secrets }, ++ { "srs_separator", opt_stringptr, &srs_separator }, + #endif + { "strip_excess_angle_brackets", opt_bool, &strip_excess_angle_brackets }, + { "strip_trailing_dot", opt_bool, &strip_trailing_dot }, +diff -u src/routers/redirect.c src/routers/redirect.c +--- src/routers/redirect.c Sat Jul 17 11:12:00 2004 ++++ src/routers/redirect.c Sat Jul 17 12:26:47 2004 +@@ -96,11 +96,7 @@ + (void *)offsetof(redirect_router_options_block, skip_syntax_errors) }, + #ifdef SRS + { "srs", opt_stringptr, +- (void *)offsetof(redirect_router_options_block, srs) }, +- { "srs_condition", opt_stringptr, +- (void *)offsetof(redirect_router_options_block, srs) }, +- { "srs_db", opt_stringptr, +- (void *)offsetof(redirect_router_options_block, srs_db) }, ++ (void *)offsetof(redirect_router_options_block, srs) }, + #endif + { "syntax_errors_text", opt_stringptr, + (void *)offsetof(redirect_router_options_block, syntax_errors_text) }, +@@ -136,8 +132,6 @@ + NULL, /* owngroups */ + #ifdef SRS + NULL, /* srs */ +- NULL, /* srs_condition */ +- NULL, /* srs_db */ + #endif + 022, /* modemask */ + RDO_REWRITE, /* bit_options */ +@@ -532,39 +526,33 @@ + ugid.gid_set = TRUE; + } + +- + #ifdef SRS + /* For reverse SRS, fill the srs_recipient expandsion variable, + on failure, return decline/fail as relevant */ + +- if(ob->srs != NULL) ++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) +- { +- uschar *res; +- int n_srs; +- +- srs_orig_recipient = addr->address; +- eximsrs_init(); +- if(ob->srs_db) +- eximsrs_db_set(TRUE, ob->srs_db); +- if((n_srs = eximsrs_reverse(&res, addr->address)) != OK) +- return n_srs; +- srs_recipient = res; +- eximsrs_done(); +- DEBUG(D_any) +- debug_printf("SRS: Recipient '%s' rewriteen to '%s'\n", srs_orig_recipient, srs_recipient); +- } ++ if (Ustrcmp(ob->srs, "reverse") == 0) ++ { ++ uschar *res; ++ int ret; ++ DEBUG(D_route) ++ debug_printf("SRS: (Forward) \n"); ++ ++ 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 + +- + /* Call the function that interprets redirection data, either inline or from a + file. This is a separate function so that the system filter can use it. It will + run the function in a subprocess if necessary. If qualify_preserve_domain is +@@ -792,28 +780,23 @@ + #ifdef SRS + /* On successful redirection, check for SRS forwarding and adjust sender */ + +- if(ob->srs != NULL) ++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, "forward") == 0 )// && !verify) +- { +- uschar *res; +- int n_srs; +- +- srs_orig_sender = sender_address; +- eximsrs_init(); +- if(ob->srs_db) +- eximsrs_db_set(FALSE, ob->srs_db); +- if((n_srs = eximsrs_forward(&res, sender_address, deliver_domain)) != OK) +- return n_srs; +- sender_address = res; +- DEBUG(D_any) +- debug_printf("SRS: Sender '%s' rewritten to '%s'\n", srs_orig_sender, sender_address); ++ if ((Ustrcmp(ob->srs, "forward") == 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 +diff -u src/routers/redirect.h src/routers/redirect.h +--- src/routers/redirect.h Sat Jul 17 11:12:00 2004 ++++ src/routers/redirect.h Sat Jul 17 11:55:47 2004 +@@ -32,8 +32,6 @@ + + #ifdef SRS + uschar *srs; +- uschar *srs_condition; +- uschar *srs_db; + #endif + + int modemask; +diff -u src/spf.h src/spf.h +--- src/spf.h Sat Jul 17 11:12:00 2004 ++++ src/spf.h Sat Jul 17 12:13:52 2004 +@@ -10,9 +10,9 @@ + + #ifdef SPF + +-#include <spf_alt/spf.h> +-#include <spf_alt/spf_dns_resolv.h> +-#include <spf_alt/spf_dns_cache.h> ++#include <spf2/spf.h> ++#include <spf2/spf_dns_resolv.h> ++#include <spf2/spf_dns_cache.h> + + typedef struct spf_result_id { + uschar *name; +diff -u src/srs.c src/srs.c +--- src/srs.c Sat Jul 17 11:12:00 2004 ++++ src/srs.c Sat Jul 17 12:28:31 2004 +@@ -5,205 +5,125 @@ + /* This file is an extension to Exim and is not part of the standard + Exim distribution */ + +-/* ©2004 Miles Wilton <miles@mirtol.com> */ ++/* (c) 2004 Shevek ++ * Based on work by Miles Wilton <miles@mirtol.com> ++ * Updated by Shevek to use libsrs2 ++ * Sorry Miles, I was in a roaring hurry, but we still need the ++ * help! ++ */ + + /* License: GPL */ + ++#include "exim.h" + + #ifdef SRS + +-#include <srs_alt.h> +- +-#include "exim.h" +-#include "srs.h" ++#include <srs2.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() ++int ++eximsrs_init() + { +- int co; +- uschar *list = srs_config; +- char secret_buf[32]; +- char *secret; +- char sbuf[4]; +- char *sbufp; +- int hashlen, maxage; +- +- +- if(!srs) +- { +- // Check config +- if(!srs_config) +- { +- log_write(0, LOG_MAIN | LOG_PANIC, +- "SRS Configuration Error"); +- return DEFER; +- } +- +- // Get config +- co = 0; +- if((secret = string_nextinlist(&list, &co, secret_buf, +- sizeof(secret_buf))) == NULL) +- { +- log_write(0, LOG_MAIN | LOG_PANIC, +- "SRS Configuration Error: No secret specified"); +- return DEFER; +- } +- +- if((sbufp = string_nextinlist(&list, &co, sbuf, sizeof(sbuf))) == NULL) +- maxage = 31; +- else +- maxage = atoi(sbuf); +- if(maxage < 0 || maxage > 365) +- { +- log_write(0, LOG_MAIN | LOG_PANIC, +- "SRS Configuration Error: Invalid maximum timestamp age"); +- return DEFER; +- } ++ char sbuf[1024]; ++ uschar *list; ++ int co; + +- if((sbufp = string_nextinlist(&list, &co, sbuf, sizeof(sbuf))) == NULL) +- hashlen = 6; +- else +- hashlen = atoi(sbuf); +- if(hashlen < 1 || hashlen > 20) +- { +- log_write(0, LOG_MAIN | LOG_PANIC, +- "SRS Configuration Error: Invalid hash length"); +- return DEFER; +- } +- +- +- if((srs = srs_open(secret, strnlen(secret, sizeof(secret)), +- maxage, hashlen, hashlen)) == NULL) +- { +- log_write(0, LOG_MAIN | LOG_PANIC, +- "Failed to allocate SRS memory"); +- return DEFER; +- } ++ char *secret; + ++ if (srs == NULL) { ++ srs = srs_new(); + +- if((sbufp = string_nextinlist(&list, &co, sbuf, sizeof(sbuf))) != NULL) +- srs_set_option(srs, SRS_OPTION_USETIMESTAMP, atoi(sbuf)); +- +- if((sbufp = string_nextinlist(&list, &co, sbuf, sizeof(sbuf))) != NULL) +- srs_set_option(srs, SRS_OPTION_USEHASH, atoi(sbuf)); ++ if (srs_secrets == NULL) { ++ log_write(0, LOG_MAIN | LOG_PANIC, ++ "SRS: No secrets specified"); ++ return DEFER; ++ } + +- DEBUG(D_any) +- debug_printf("SRS initialized\n"); +- } ++ /* Get config */ ++ list = srs_secrets; + +- return OK; +-} ++ co = 0; ++ while ((secret = string_nextinlist(&list, &co, ++ sbuf, sizeof(sbuf))) != NULL) { ++ SRS_WARN_UNLESS(srs_add_secret(srs, secret)); ++ } + ++ 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])); + +-int eximsrs_done() +-{ +- if(srs) +- srs_close(srs); +- +- srs = NULL; ++ DEBUG(D_any) ++ debug_printf("SRS initialised\n"); ++ } + +- return OK; ++ return OK; + } + +- +-int eximsrs_forward(uschar **result, uschar *orig_sender, uschar *domain) ++int ++eximsrs_done() + { +- char res[512]; +- int n; +- +- 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; +- } +- +- *result = string_copy(res); +- return OK; ++ if (srs != NULL) ++ srs_free(srs); ++ srs = NULL; ++ return OK; + } + +- +-int eximsrs_reverse(uschar **result, uschar *address) ++int ++eximsrs_forward(uschar **result, uschar *sender, uschar *domain) + { +- char res[512]; +- int n; +- +- 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; +- } +- +- *result = string_copy(res); +- return OK; +-} ++ char res[1024]; ++ int ret; + ++ 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; ++ } + +-int eximsrs_db_set(BOOL reverse, uschar *srs_db) +-{ +- if(reverse) +- srs_db_reverse = string_copy(srs_db); +- else +- srs_db_forward = string_copy(srs_db); +- +- if(srs_set_db_functions(srs, eximsrs_db_insert, eximsrs_db_lookup) * SRS_RESULT_FAIL) +- return DEFER; +- +- return OK; ++ *result = string_copy(res); ++ return OK; + } + +- +-srs_result eximsrs_db_insert(srs_t *srs, char *data, uint data_len, char *result, uint result_len) ++int ++eximsrs_reverse(uschar **result, uschar *sender) + { +- uschar *res; +- char buf[64]; +- +- srs_db_address = string_copyn(data, data_len); +- if(srs_generate_unique_id(srs, srs_db_address, buf, 64) & SRS_RESULT_FAIL) +- return DEFER; +- +- 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; +- +- strncpy(result, srs_db_key, result_len); +- +- return SRS_RESULT_OK; +-} +- ++ char res[1024]; ++ int ret; + +-srs_result eximsrs_db_lookup(srs_t *srs, char *data, uint data_len, char *result, uint result_len) +-{ +- uschar *res; ++ 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; ++ } ++ } + +- srs_db_key = string_copyn(data, data_len); +- if((res = expand_string(srs_db_reverse)) == NULL) +- return SRS_RESULT_DBERROR; +- +- if(Ustrlen(res) >= result_len) +- return SRS_RESULT_ADDRESSTOOLONG; +- +- strncpy(result, res, result_len); ++ *result = string_copy(res); + +- return SRS_RESULT_OK; ++ return OK; + } +- +- + #endif +- +diff -u src/srs.h src/srs.h +--- src/srs.h Sat Jul 17 11:12:00 2004 ++++ src/srs.h Sat Jul 17 11:58:51 2004 +@@ -5,28 +5,28 @@ + /* This file is an extension to Exim and is not part of the standard + Exim distribution */ + +-/* ©2004 Miles Wilton <miles@mirtol.com> */ ++/* (c) 2004 Shevek ++ * Based on work by Miles Wilton <miles@mirtol.com> ++ * Updated by Shevek to use libsrs2 ++ * Sorry Miles, I was in a roaring hurry, but we still need the ++ * help! ++ */ + + /* License: GPL */ + + #ifndef __SRS_H__ +- + #define __SRS_H__ 1 + +- + #ifdef 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(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 + |