summaryrefslogtreecommitdiff
path: root/mail
diff options
context:
space:
mode:
authorOliver Eikemeier <eik@FreeBSD.org>2004-07-17 14:21:13 +0000
committerOliver Eikemeier <eik@FreeBSD.org>2004-07-17 14:21:13 +0000
commit32ed790ca91dc62b1295df2d61a54e3a21a284a9 (patch)
tree8f7bfc558cb7847081728c7e048014f93c9ae2fa /mail
parentMark 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')
-rw-r--r--mail/exim/Makefile90
-rw-r--r--mail/exim/distinfo8
-rw-r--r--mail/exim/files/patch-src::EDITME2
-rw-r--r--mail/exim/files/patch-src::daemon.c19
-rw-r--r--mail/exim/files/xpatch-exiscan2616
-rw-r--r--mail/exim/options239
-rw-r--r--mail/exim/pkg-install7
-rw-r--r--mail/exim/pkg-plist5
8 files changed, 922 insertions, 64 deletions
diff --git a/mail/exim/Makefile b/mail/exim/Makefile
index 199132c18d4b..4687393ced69 100644
--- a/mail/exim/Makefile
+++ b/mail/exim/Makefile
@@ -14,18 +14,21 @@ MASTER_SITE_SUBDIR= exim4
DISTNAME= ${PORTNAME}-${EXIM_VERSION}
DIST_SUBDIR= exim
+MAINTAINER= eik@FreeBSD.org
+COMMENT?= High performance MTA for Unix systems on the Internet
+
+.include "options"
+
.if !defined(WITHOUT_EXISCAN)
PATCH_SITES= http://duncanthrax.net/%SUBDIR%/
PATCH_SITE_SUBDIR= exiscan-acl
PATCHFILES= exiscan-acl-${EXIM_VERSION}-${EXISCAN_VERSION}.patch.bz2
PATCH_DIST_STRIP= -p1
+EXTRA_PATCHES+= ${PATCHDIR}/xpatch-exiscan2
.endif
-MAINTAINER= eik@FreeBSD.org
-COMMENT?= High performance MTA for Unix systems on the Internet
-
-EXIM_VERSION= 4.34
-EXISCAN_VERSION=22
+EXIM_VERSION= 4.40
+EXISCAN_VERSION=23
.if !defined(EXIMON_ONLY)
.if defined(PKGNAMESUFFIX)
@@ -66,7 +69,7 @@ PORTDOC_FILES= ChangeLog Exim3.upgrade Exim4.upgrade NewStuff \
OptionLists.txt README README.SIEVE dbm.discuss.txt \
filter.txt pcrepattern.txt pcretest.txt spec.txt
-PORT_EXAMPLES= convert4r3 convert4r4 transport-filter.pl
+PORT_EXAMPLES= convert4r3 convert4r4 pcretest transport-filter.pl
DAILY_SCRIPTS= 150.exim-tidydb 460.exim-mail-rejects
@@ -83,8 +86,6 @@ MAKE_ENV+= OSTYPE=${OPSYS} ARCHTYPE=${MACHINE_ARCH} LOCALBASE=${LOCALBASE}
MAKE_ENV+= INSTALL_ARG="eximon eximon.bin"
.endif
-POSTGRESQL_PORT?= databases/postgresql7
-
EXIM_USER?= mailnull
EXIM_GROUP?= mail
@@ -205,6 +206,10 @@ WITH_DEFAULT_CHARSET?= ISO-8859-1
# Enable Sender Policy Framework (SPF) checking in exiscan-acl
#
#WITH_SPF= yes
+#
+# Enable Sender Rewriting Scheme (SRS)
+#
+#WITH_SRS= yes
# You should not need to fiddle with anything below this point.
@@ -257,8 +262,7 @@ SEDLIST+= -e 's,XX_TCP_WRAPPERS_LIBS_XX,,'
BROKEN= deprecated LDAP option defined, use WITH_OPENLDAP or WITH_OPENLDAP_VER
.endif
-.if defined(WITH_OPENLDAP_VER)
-WITH_OPENLDAP= yes
+.if defined(WITH_OPENLDAP_VER) && ${WITH_OPENLDAP_VER:L} != "auto"
WANT_OPENLDAP_VER= ${WITH_OPENLDAP_VER}
.endif
@@ -300,8 +304,7 @@ BROKEN= WITH_BDB_VER must be either 1, 4, 41 or 42
SEDLIST+= -e 's,XX_DB_LIBS_XX,${DB_LIBS},' \
-e 's,XX_DB_INCLUDES_XX,${DB_INCLUDES},'
-.if defined(WITH_MYSQL_VER)
-WITH_MYSQL= yes
+.if defined(WITH_MYSQL_VER) && ${WITH_MYSQL_VER:L} != "auto"
WANT_MYSQL_VER= ${WITH_MYSQL_VER}
.endif
@@ -352,6 +355,12 @@ SEDLIST+= -e 's,XX_RADIUS_LIBS_XX,-L${LOCALBASE}/lib -lradiusclient,' \
SEDLIST+= -e 's,XX_RADIUS_LIBS_XX,,'
.endif
+.if defined(WITH_POSTGRESQL_PORT) && ${WITH_POSTGRESQL_PORT:L} != "auto"
+POSTGRESQL_PORT= ${WITH_POSTGRESQL_PORT}
+.else
+POSTGRESQL_PORT?= databases/postgresql7
+.endif
+
.if defined(WITH_PGSQL)
LIB_DEPENDS+= pq.3:${PORTSDIR}/${POSTGRESQL_PORT}
SEDLIST+= -e 's,XX_PGSQL_LIBS_XX,-L${LOCALBASE}/lib -lpq,' \
@@ -412,13 +421,21 @@ SEDLIST+= -e 's,^ALT_CONFIG_PREFIX=,\# ALT_CONFIG_PREFIX=,'
.endif
.if defined(WITH_SPF) && !defined(WITHOUT_EXISCAN)
-LIB_DEPENDS+= spf_alt.1:${PORTSDIR}/mail/libspf-alt
+LIB_DEPENDS+= spf2.1:${PORTSDIR}/mail/libspf2
CFLAGS+= -DSPF
-SEDLIST+= -e 's,XX_SPF_LIBS_XX,-lspf_alt,'
+SEDLIST+= -e 's,XX_SPF_LIBS_XX,-lspf2,'
.else
SEDLIST+= -e 's,XX_SPF_LIBS_XX,,'
.endif
+.if defined(WITH_SRS) && !defined(WITHOUT_EXISCAN)
+LIB_DEPENDS+= srs2.0:${PORTSDIR}/mail/libsrs2
+CFLAGS+= -DSRS
+SEDLIST+= -e 's,XX_SRS_LIBS_XX,-lsrs2,'
+.else
+SEDLIST+= -e 's,XX_SRS_LIBS_XX,,'
+.endif
+
.include <bsd.port.pre.mk>
.if defined(EXIMON_ONLY) && ${MASTERDIR} == ${PKGDIR}
@@ -427,20 +444,22 @@ SEDLIST+= -e 's,XX_SPF_LIBS_XX,,'
.if !defined(EXIMON_ONLY)
USE_RC_SUBR= yes
-.if ${OSVERSION} >= 500037
-RC_DIR= ${DESTDIR}/etc/rc.d
+.if defined(WITH_RCORDER) && ${OSVERSION} >= 500037
+RC_DIR= /etc/rc.d
RC_SUFX=
+PLIST_SUB+= RCORDER="" \
+ RC_DIR=${RC_DIR} \
+ RC_SUFX=${RC_SUFX}
.else
RC_DIR= ${PREFIX}/etc/rc.d
RC_SUFX= .sh
+PLIST_SUB+= RCORDER="@comment " \
+ RC_DIR="%D/etc/rc.d" \
+ RC_SUFX=${RC_SUFX}
.endif
-
SED_SCRIPT+= -e 's,%%RC_SUBR%%,${RC_SUBR},g' \
-e 's,%%RC_DIR%%,${RC_DIR},g' \
-e 's,%%RC_SUFX%%,${RC_SUFX},g'
-
-PLIST_SUB+= RC_DIR=${RC_DIR} \
- RC_SUFX=${RC_SUFX}
.endif
.if ${OSVERSION} < 400014
@@ -489,38 +508,39 @@ post-build:
.if !defined(EXIMON_ONLY)
pre-install:
- @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
+ @[ -d "${DESTDIR}/etc" ] || ${MKDIR} "${DESTDIR}/etc"
+ @${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
post-install:
- @${INSTALL_SCRIPT} ${WRKDIR}/exim.sh ${RC_DIR}/exim${RC_SUFX}
- @${MKDIR} ${PREFIX}/etc/periodic/daily
+ @${INSTALL_SCRIPT} ${WRKDIR}/exim.sh ${DESTDIR}${RC_DIR}/exim${RC_SUFX}
+ @${MKDIR} ${DESTDIR}${PREFIX}/etc/periodic/daily
.for script in ${DAILY_SCRIPTS}
- @${INSTALL_SCRIPT} ${WRKDIR}/${script}.sh ${PREFIX}/etc/periodic/daily/${script}
+ @${INSTALL_SCRIPT} ${WRKDIR}/${script}.sh ${DESTDIR}${PREFIX}/etc/periodic/daily/${script}
.endfor
- @[ -f ${PREFIX}/etc/exim/configure ] || \
- ${CP} ${PREFIX}/etc/exim/configure.default ${PREFIX}/etc/exim/configure
+ @[ -f ${DESTDIR}${PREFIX}/etc/exim/configure ] || \
+ ${CP} ${DESTDIR}${PREFIX}/etc/exim/configure.default ${DESTDIR}${PREFIX}/etc/exim/configure
.for manfile in ${MAN8}
- @${INSTALL_MAN} ${WRKSRC}/doc/${manfile} ${MAN8PREFIX}/man/man8
+ @${INSTALL_MAN} ${WRKSRC}/doc/${manfile} ${DESTDIR}${MAN8PREFIX}/man/man8
.endfor
.if !defined(NOPORTDOCS)
- @${MKDIR} ${DOCSDIR}
- @${INSTALL_DATA} ${WRKDIR}/POST-INSTALL-NOTES ${DOCSDIR}
+ @${MKDIR} ${DESTDIR}${DOCSDIR}
+ @${INSTALL_DATA} ${WRKDIR}/POST-INSTALL-NOTES ${DESTDIR}${DOCSDIR}
.if !defined(WITHOUT_EXISCAN)
- @${INSTALL_DATA} ${WRKDIR}/POST-INSTALL-NOTES.clamd ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKDIR}/POST-INSTALL-NOTES.clamd ${DESTDIR}${DOCSDIR}
.endif
.for docfile in ${PORTDOC_BASE}
- @${INSTALL_DATA} ${WRKSRC}/${docfile} ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/${docfile} ${DESTDIR}${DOCSDIR}
.endfor
.for docfile in ${PORTDOC_FILES}
- @${INSTALL_DATA} ${WRKSRC}/doc/${docfile} ${DOCSDIR}
+ @${INSTALL_DATA} ${WRKSRC}/doc/${docfile} ${DESTDIR}${DOCSDIR}
.endfor
- @${MKDIR} ${EXAMPLESDIR}
+ @${MKDIR} ${DESTDIR}${EXAMPLESDIR}
.for example in ${PORT_EXAMPLES}
- @${INSTALL_SCRIPT} ${WRKSRC}/build-${OPSYS}-${MACHINE_ARCH}/${example} ${EXAMPLESDIR}
+ @${INSTALL_SCRIPT} ${WRKSRC}/build-${OPSYS}-${MACHINE_ARCH}/${example} ${DESTDIR}${EXAMPLESDIR}
.endfor
.endif
@${CAT} ${PKGMESSAGE}
- @PKG_PREFIX="${PREFIX}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
+ @${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
.else
diff --git a/mail/exim/distinfo b/mail/exim/distinfo
index 20c85915fdaa..d462acb0635c 100644
--- a/mail/exim/distinfo
+++ b/mail/exim/distinfo
@@ -1,4 +1,4 @@
-MD5 (exim/exim-4.34.tar.bz2) = bab611edc153867334b1c7cffd8fe3c0
-SIZE (exim/exim-4.34.tar.bz2) = 1328742
-MD5 (exim/exiscan-acl-4.34-22.patch.bz2) = 74cf5b787c7344f3b4ef69b8ab54b0db
-SIZE (exim/exiscan-acl-4.34-22.patch.bz2) = 76947
+MD5 (exim/exim-4.40.tar.bz2) = af6db81a995046e1e30bcfda6ed0b357
+SIZE (exim/exim-4.40.tar.bz2) = 1340622
+MD5 (exim/exiscan-acl-4.40-23.patch.bz2) = c068c157b7e885bd4ce79d29d4f38469
+SIZE (exim/exiscan-acl-4.40-23.patch.bz2) = 79849
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
+
diff --git a/mail/exim/options b/mail/exim/options
new file mode 100644
index 000000000000..75bf84258c19
--- /dev/null
+++ b/mail/exim/options
@@ -0,0 +1,239 @@
+# $FreeBSD$
+#
+# Configurable options for mail/exim. Note that the options listed
+# here are the defaults, so if you want to change them you have to
+# specify the opposite version in the command line, e.g.
+# `make WITHOUT_EXISCAN=yes WITH_SASLAUTHD=yes install'
+#
+# `make WITH_EXISCAN=no WITHOUT_SASLAUTHD=no' will not give the expected results.
+
+#WITH_EXISCAN
+# Exim will be built with exiscan email content scanner support.
+
+#WITH_BDB_VER= 1, 4, 41, 42
+# 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,
+# 41 or 42 which depends on the databases/db4[12] ports.
+
+#WITH_DEFAULT_CHARSET= ISO-8859-1, *
+# When Exim is decoding MIME "words" in header lines it converts any foreign
+# character sets to the one that is set in the headers_charset option.
+# The default setting is defined by this setting
+
+#WITH_PERL
+# Embedded Perl interpreter, which allows Perl subroutines to
+# be called during string expansion.
+
+#! lookup types
+
+#WITHOUT_OPENLDAP
+#WITH_OPENLDAP_VER= auto, 21, 22
+# Link against libldap.
+# Define OPENLDAP_VER to specify a particular version of
+# OpenLDAP to use. Valid values are currently auto, 21 and 22.
+# The use of `auto' is recommended to avoid conflicting with
+# other ports that use the OpenLDAP client libraries.
+# Exim also supports NETSCAPE and SOLARIS7 lookup types, but no
+# client libraries exist for these in the ports tree.
+
+#WITHOUT_MYSQL
+#WITH_MYSQL_VER= auto, 323, 40, 41, 50
+#WITHOUT_PGSQL
+#WITH_POSTGRESQL_PORT= auto, databases/postgresql7, databases/postgresql73, databases/postgresql-devel, databases/pgcluster, *
+# Link against libmysqlclient and libpq respectively.
+# Define MYSQL_VER to specify a particular version of MySQL to
+# use. Valid values are auto, 323, 40, 41 and 50.
+# The use of `auto' is recommended to avoid conflicting with
+# other ports linking against MySQL client libraries.
+
+#WITH_CDB
+#WITH_DNSDB
+#WITH_DSEARCH
+#WITH_LSEARCH
+#WITH_NIS
+#WITH_PASSWD
+# Support for CDB-style, DNS-style, directory-list, wildcarded-file, NIS
+# and /etc/passwd lookups respectively.
+
+#! authentication mechanisms
+
+#WITH_PAM
+#WITH_AUTH_CRAM_MD5
+#WITH_AUTH_PLAINTEXT
+#WITH_AUTH_SPA
+# Built-in support for the PAM, RFC 2195, RFC 2595 and
+# Microsoft "Secure Password Authentication" authentication mechanisms,
+# used for SMTP AUTH.
+
+#WITHOUT_SASLAUTHD
+# Enable the use of the Cyrus SASL authentication daemon.
+
+#WITHOUT_PWCHECK
+# As an alternative to SASLAUTHD, you can define PWCHECK to link
+# against libsasl for SMTP AUTH authentication via the Cyrus SASL
+# pwcheck daemon.
+# THIS MECHANISM IS DEPRECATED!
+
+#WITHOUT_AUTH_RADIUS
+# Link against libradius to support radius (RFC 2865) authentication.
+
+#! optional features
+
+#WITH_TLS
+# Link against OpenSSL; required for STARTTLS.
+
+#WITH_IPV6
+# Enable IPv6 support in the compiled exim binary. Exim compiled
+# with IPv6 support will still operate on systems that do not have
+# IPv6 kernel support, so this should not be necessary.
+
+#WITH_MAILDIR
+#WITH_MAILSTORE
+#WITH_MBX
+# Built-in support for additional mailbox formats.
+
+#WITH_LMTP
+# Support for the LMTP (RFC 2033 "SMTP over command pipe") transport.
+
+#WITHOUT_SPF
+# Enable Sender Policy Framework (SPF) checking in exiscan-acl
+
+#WITHOUT_SRS
+# Enable Sender Rewriting Scheme (SRS), a part of the SPF/SRS protocol pair.
+# SRS support depends on exiscan.
+# .
+# Additional options:
+# srs_alwaysrewrite (boolean) Rewrite for all domains
+# srs_hashlength (integer) Hash length to generate
+# srs_hashmin (integer) Hash length to check
+# srs_maxage (integer) Max age for SRS address
+# srs_secrets (string list) List of SRS secrets
+# srs_separator (string*) Separator for SRS addresses
+#
+# Additional expansion variables:
+# srs_orig_recipient (string*) SRS original recipient
+# srs_orig_sender (string*) SRS original sender
+# srs_recipient (string*) SRS recipient
+# srs_status (string*) SRS status
+
+#WITHOUT_TCP_WRAPPERS
+# Link against libwrap to support /etc/hosts.allow access control.
+
+#WITHOUT_EXIMON
+# The eximon monitor, which requires X, will be made a dependency.
+# Note that using EXIMON will cause XFree86 to be installed
+# if it is not present.
+
+#WITHOUT_ALT_CONFIG_PREFIX
+# Allow alternate configuration files not only in ${PREFIX}/etc/exim
+
+#WITHOUT_WISHLIST
+# Include the unsupported patches in ${PATCHDIR}/wishlist-*.patch
+
+#WITHOUT_RCORDER
+# FreeBSD 5.x only: Install the rc.subr(8) script to /etc/rc.d to participate
+# in rcorder(8).
+
+## AUTOMATICALLY GENERATED FILE - DO NOT CHANGE ANYTHING BELOW THIS LINE ##
+# use `make config' to edit the local configuration
+# use `make makeconfig' to edit the defaults (MAINTAINER only)
+
+_OPTIONSNG_READ?=default
+.ifndef WITHOUT_EXISCAN
+WITH_EXISCAN?=yes
+.endif
+WITH_BDB_VER?=1
+WITH_DEFAULT_CHARSET?=ISO-8859-1
+.ifndef WITHOUT_PERL
+WITH_PERL?=yes
+.endif
+.ifndef WITH_OPENLDAP
+WITHOUT_OPENLDAP?=yes
+.endif
+WITH_OPENLDAP_VER?=auto
+.ifndef WITH_MYSQL
+WITHOUT_MYSQL?=yes
+.endif
+WITH_MYSQL_VER?=auto
+.ifndef WITH_PGSQL
+WITHOUT_PGSQL?=yes
+.endif
+WITH_POSTGRESQL_PORT?=auto
+.ifndef WITHOUT_CDB
+WITH_CDB?=yes
+.endif
+.ifndef WITHOUT_DNSDB
+WITH_DNSDB?=yes
+.endif
+.ifndef WITHOUT_DSEARCH
+WITH_DSEARCH?=yes
+.endif
+.ifndef WITHOUT_LSEARCH
+WITH_LSEARCH?=yes
+.endif
+.ifndef WITHOUT_NIS
+WITH_NIS?=yes
+.endif
+.ifndef WITHOUT_PASSWD
+WITH_PASSWD?=yes
+.endif
+.ifndef WITHOUT_PAM
+WITH_PAM?=yes
+.endif
+.ifndef WITHOUT_AUTH_CRAM_MD5
+WITH_AUTH_CRAM_MD5?=yes
+.endif
+.ifndef WITHOUT_AUTH_PLAINTEXT
+WITH_AUTH_PLAINTEXT?=yes
+.endif
+.ifndef WITHOUT_AUTH_SPA
+WITH_AUTH_SPA?=yes
+.endif
+.ifndef WITH_SASLAUTHD
+WITHOUT_SASLAUTHD?=yes
+.endif
+.ifndef WITH_PWCHECK
+WITHOUT_PWCHECK?=yes
+.endif
+.ifndef WITH_AUTH_RADIUS
+WITHOUT_AUTH_RADIUS?=yes
+.endif
+.ifndef WITHOUT_TLS
+WITH_TLS?=yes
+.endif
+.ifndef WITHOUT_IPV6
+WITH_IPV6?=yes
+.endif
+.ifndef WITHOUT_MAILDIR
+WITH_MAILDIR?=yes
+.endif
+.ifndef WITHOUT_MAILSTORE
+WITH_MAILSTORE?=yes
+.endif
+.ifndef WITHOUT_MBX
+WITH_MBX?=yes
+.endif
+.ifndef WITHOUT_LMTP
+WITH_LMTP?=yes
+.endif
+.ifndef WITH_SPF
+WITHOUT_SPF?=yes
+.endif
+.ifndef WITH_SRS
+WITHOUT_SRS?=yes
+.endif
+.ifndef WITH_TCP_WRAPPERS
+WITHOUT_TCP_WRAPPERS?=yes
+.endif
+.ifndef WITH_EXIMON
+WITHOUT_EXIMON?=yes
+.endif
+.ifndef WITH_ALT_CONFIG_PREFIX
+WITHOUT_ALT_CONFIG_PREFIX?=yes
+.endif
+.ifndef WITH_WISHLIST
+WITHOUT_WISHLIST?=yes
+.endif
+.ifndef WITH_RCORDER
+WITHOUT_RCORDER?=yes
+.endif
diff --git a/mail/exim/pkg-install b/mail/exim/pkg-install
index 9011e4b69514..2c5fa39eebe0 100644
--- a/mail/exim/pkg-install
+++ b/mail/exim/pkg-install
@@ -12,10 +12,11 @@
#
PKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%}
+PKG_DESTDIR=${PKG_DESTDIR:=}
user=%%EXIM_USER%%
group=%%EXIM_GROUP%%
-logdir=%%LOGDIR%%
+logdir=$PKG_DESTDIR%%LOGDIR%%
if [ "$2" = "PRE-INSTALL" ]; then
if ! /usr/bin/id ${user} > /dev/null; then
@@ -31,7 +32,7 @@ if [ "$2" = "PRE-INSTALL" ]; then
fi
if [ "$2" = "POST-INSTALL" ]; then
- cf=$PKG_PREFIX/etc/exim/configure
+ cf=$PKG_DESTDIR$PKG_PREFIX/etc/exim/configure
if [ -e $cf ]; then
if /usr/bin/grep -q '^[^#]*hostlist.*relay_from_hosts.*=.*127.0.0.1' $cf
then
@@ -49,7 +50,7 @@ if [ "$2" = "POST-INSTALL" ]; then
echo "============================================================"
fi
fi
- if ! /usr/bin/grep -qs "^exim_enable" /etc/rc.conf
+ if ! /usr/bin/grep -qs "^exim_enable" $PKG_DESTDIR/etc/rc.conf
then
echo
echo "Don't forget to add 'exim_enable=\"YES\"' to rc.conf(5)"
diff --git a/mail/exim/pkg-plist b/mail/exim/pkg-plist
index f4cf537b3eca..a8542ba4ff3d 100644
--- a/mail/exim/pkg-plist
+++ b/mail/exim/pkg-plist
@@ -40,6 +40,7 @@ sbin/exiwhat
%%PORTDOCS%%@unexec rmdir %D/%%DOCSDIR%% 2>/dev/null || true
%%PORTDOCS%%%%EXAMPLESDIR%%/convert4r3
%%PORTDOCS%%%%EXAMPLESDIR%%/convert4r4
+%%PORTDOCS%%%%EXAMPLESDIR%%/pcretest
%%PORTDOCS%%%%EXAMPLESDIR%%/transport-filter.pl
%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
etc/periodic/daily/150.exim-tidydb
@@ -50,6 +51,6 @@ etc/periodic/daily/460.exim-mail-rejects
etc/exim/configure.default
@exec [ -f %B/configure ] || cp %B/%f %B/configure
@unexec rmdir %B 2>/dev/null || true
-@cwd %%RC_DIR%%
-exim%%RC_SUFX%%
+%%RCORDER%%@cwd /
+etc/rc.d/exim%%RC_SUFX%%
@unexec rmdir %%LOGDIR%% 2>/dev/null || true