diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-08-02 19:14:55 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-08-02 19:14:55 +0100 |
commit | b24bd25253fe093f722ab576d29fdc41d04cb1ee (patch) | |
tree | 0fcf2afd9f852c4d4c291cf8afaa2c244d598105 /mail-mta/exim | |
parent | 121ed4eec41fbf03e1998d09eede1bf449da63b9 (diff) |
gentoo resync : 02.08.2019
Diffstat (limited to 'mail-mta/exim')
-rw-r--r-- | mail-mta/exim/Manifest | 9 | ||||
-rw-r--r-- | mail-mta/exim/exim-4.92-r2.ebuild | 3 | ||||
-rw-r--r-- | mail-mta/exim/exim-4.92.1.ebuild (renamed from mail-mta/exim/exim-4.91-r2.ebuild) | 65 | ||||
-rw-r--r-- | mail-mta/exim/files/exim-4.74-localscan_dlopen.patch | 262 |
4 files changed, 47 insertions, 292 deletions
diff --git a/mail-mta/exim/Manifest b/mail-mta/exim/Manifest index 8ab654c6a613..f59902974d61 100644 --- a/mail-mta/exim/Manifest +++ b/mail-mta/exim/Manifest @@ -2,7 +2,6 @@ AUX auth_conf.sub 790 BLAKE2B 28ad6e3b494396c0bd42e7ac13de9e8e3cbd553f3e78e78792 AUX exim-4.14-tail.patch 446 BLAKE2B 62e46f052c6d958246570c40ed67819f67c4a4ee74fbfe3c82c6f8494ef98ab65089845dd89ffc01516a0c861d9003ade5e4d67476cb34185d27b99cf233dd86 SHA512 a0365b15f0a48076f9660ebc424d48f68995ac21bbf77f407bdca5103ca65758d7f2241d0151eb5c78476557e240b24a95c23d3b12cfffc1b34ab6f89f2c2110 AUX exim-4.20-maildir.patch 478 BLAKE2B 60feb354143a35631c3a71e46410e069d67cb7eab6643e6b2d4f4cfc15b497b96bb8f69a02ec67c3a6294f4d3c1da9e0787ca996f140713a19ecbcacc8ce0d4d SHA512 2c6f68e3c162a51e62ce6e391db8e79733f11bba20cc8778737650158203b88f9a77b7bbbd2a32b2cf8ae50f039b794fb0996f198acec6a50b94cad6a111f432 AUX exim-4.69-r1.27021.patch 1447 BLAKE2B d1f40f68b056ae49cd78408d3dc54a1f4fb1584fec003c68645c8a7245499ef96c1bc3af8aac57d31ee10cb0d4ff2808a50bf35bb36f17df929b2c24abed90e2 SHA512 45a5b833c698da4690485716c7c45d762a9194d5ae41514028bbad548bbd44373cf7a3a3c6a1c4f635f3f50d1695ac7ead098bf8be15cd1f691c7cc6c7f8d715 -AUX exim-4.74-localscan_dlopen.patch 9280 BLAKE2B 11e1e9bd4700ba4d897cd585b751cfecbc3a9f2058961ed2ef876e42ff43d98357c35ced65e1866927e11a3d4ae2de5012456aab17f1a66ed20d10ff4054ece5 SHA512 bfd35b8fcc7b8bd50a28b2bb7865d358ed1af3978b057da1c83a0be38ba30a737d983b6b5cf829559ba8c490709d28bdb7d679eb825fe7e24798ec223bedc94e AUX exim-4.74-radius-db-ENV-clash.patch 667 BLAKE2B 3cc03dd925333774c08484efbb5daadcebc819cc49283205960146f176d225c8952dacb891e1a1be13046bb68e6d6571a732dbbb7d78c6b1758d93f256e41509 SHA512 040bbdb2259df882569a428b7fef03f89c3685428654ac29e93360a4791bdabe66e52d33d14f0822461fac119295bd31aad5998f63d59d4af057bd26b310a568 AUX exim-4.76-crosscompile.patch 462 BLAKE2B de78322f93760cef0d5a768b8be6c723f00d5c7557da6189ffa6ee34215c41ebe8896a2457b2e6a704d05a1730eab09c8cc73e3ba3140954f9ac32423210b612 SHA512 d4fd4417c1ce727f139999c399795312cdbbb9735d0793d68f8e3150240bc53b31277cb26f9946ba549b34c661fc0a61147d376bda09aa6763cab55d80d62343 AUX exim-4.80-spool-mail-group.patch 946 BLAKE2B a3b6783b77823c5a8373623d16b85e2ba209b419b6724f307c46bf961bc5195690453208cdd40e45bc36e5a070892414c7737a97fa04e653e78050c153c59079 SHA512 24f30e9a9d90dc0f1fe8b3db26f8bc2649182b4e78110dc28a9c0f3a3feb7589f923144a4f1c54a1c46ff8cfe40826a1f2212787753be752f4d15a72d54a143b @@ -18,12 +17,12 @@ AUX exim.rc10 1135 BLAKE2B abc7247ee8171069f30f954d9e4275fa85f09f5488a372f9c4f7f AUX exim.service 229 BLAKE2B 6d6396ef98b8e7c4fcfa28e24223bd58393387abedfb960284dfd1a297d1612deea6b77e2affeca8c5ff6f7db3eb32717893ed0dc1eaf3525e6969520e8589a3 SHA512 a071e9fb74b5fc2fdf0c73ad64ddfbc3954d8f7095d6a363dacf8c75d72a479fbf6821822ec5c8f3846d7687342e1bd447b97f91ca7b0582e5c98008aac30cca AUX exim.socket 139 BLAKE2B bb8281a98fdac1b52031d5250fd1e658bf5a2c32e24b49ed0daa857d0d32285abf6db23c3d717992c43443ab4bcd97a19ec3811f182200a2d99a48ced6cfb6bc SHA512 db621116907ceb573e6f34581f47c91f751bff593054d7ddc32397b34c7f2405bec184bdb0589d2ac457fa3a61bcba072761e3a6293a99c9c764d2d9fd6069ae AUX exim_at.service 140 BLAKE2B 8624f4a555e2acdc7aaf917952c4152ad00dc063a51076aefa1d023d47d5f7fe8b268f3308734f363ed9628cd8551ccac7fc369657e0fdf65507d2e6419f704c SHA512 11c8133ee15b3e5193c9b1c59aed66c81b6e045dd23310bede9fcde6c88905db5ef08afdb798b53b75a7465915ea1247e980edf95db07a7f9b7bb58ce95fbb5a -DIST exim-4.91.tar.xz 1744660 BLAKE2B 8d50a709def02a52f8e76a16fcf51a4fc7e553217d5513a361aa780f58bff336a9ab90d8683e3841a074f54f3c75f2f77bf1a353a849be1207bffdd5fb6e4c51 SHA512 35b34dda8dd0f27c0429e6eb8409756ecd3cf9e535bac421d696b1560db0ff3bf4cd0e4a00bc0b7e32137d31bb5de20776c7c1830ec125aa36b5c4376b0c71a2 +DIST exim-4.92.1.tar.xz 1767976 BLAKE2B fb5bdb8762f16e30c43c7899e5fb5b459bb5e910458f970d20a5cb26cdde842d87a1f8150e4c0f9e931fa277e2f33a0fb8a6d478b5bf871d03a12ebd06c36d67 SHA512 fd43448db0aa5139f8b459322b95e258f232ac8a4bf21a19099c7768329ec20c344c4e0d8dd2e98c33a192a5f97d7666a746de2c87bdfb8da42c625c985d7e05 DIST exim-4.92.tar.xz 1767136 BLAKE2B 6c97578807073a782112218c65de460cc94f046d807eddc7330f2f67266c0ef341ded61050a16aca13c88e606a923a9e08033c8bfb618a7ef34b3d2ea6db32ca SHA512 62c327e6184a358ba7f0dbc38b44d2537234be91727a5bfac97e74af64a8d77e376b3221dcfdd8f6eca7d812f9233595503dc6e50e2972bed40a1b74eb209c31 -DIST exim-pdf-4.91.tar.xz 1973672 BLAKE2B 0b9e3f65c8e8a5f727dd4359d1c5c6c867c0ecfce3b44763d5a24f2d98353bc58c42456e9884994f404d17685909ea287a478189407ba8e7835352274c788980 SHA512 82add9b42749b6d938ff3b44a4dea3dfe84bcb2a1efea8a32b64d81a9ea312033d33023b5c224a44a2c053b18f9042bd1f2834847cf48873d1725a5594704a12 +DIST exim-pdf-4.92.1.tar.xz 2038948 BLAKE2B 6624fb8930944f79e0c7e52a001727cfcff508ac69cb4107247201b8598d6e223cac7c7eda14c3102d0eabc151a547b6cc5ef11a6c4a830f31dfd88e24907c1d SHA512 437b868cd7dedae59e32b9245c8c1ca3375605eb4911846bc3508b627acf32c99bda644b3c3e84eb539a39b3c2cc4f83314eebe55160b3da617ccaec2f1623a2 DIST exim-pdf-4.92.tar.xz 2038812 BLAKE2B d5966a27f980a2ceb31293d92049a6691a08262bd20ae7315f41929f0d7a45b5d66c7000f9596b193e74d0c17f91c56a3262602047673c49649f1cad6b216547 SHA512 3a40818025fceaa7ac17f8e7ce06a61e3cf65267c821aea93e1a1a659782b047ab177b88a38c9b2271c0a296e1dc7939e23fe0f89415a11cd45693cb8af10c15 DIST system_filter.exim.gz 3075 BLAKE2B d05e872b5cef377d29126cda03fc0a74c8777b2119b76ff43da6e8de808035eb9bfcb034a85d81824f135d484e864bfc0629fc1af2c228a7277d5ee7cf9cde79 SHA512 cb358d3ce2499a0bb5920d962a06f2af8486e55ec90c8c928bd8e3aefb279aa57f5f960d5adfcef68bd94110b405eaa144e9629cfe6014a529c79c544600bbf3 -EBUILD exim-4.91-r2.ebuild 13173 BLAKE2B f7ee40c7dbab94fd499c9fae38e385b2a937805ec340ec511c57d0e00e74f5075b0ced2ed35700af35e40702042612127155360b42529f5377eaee09da7c8fdb SHA512 5bc34da80791d5f5a482f31bdb425299a0201fc6e0d13076c63e92be678569bedab1356618662d7b463e96810b8d34de6462243eecc7c637d43bf7a5f1b0b7a3 -EBUILD exim-4.92-r2.ebuild 13505 BLAKE2B a05a8ffc306f5caf3a88d20ebe9e800be819bf95a291446234212070d62d5751561283d278b36576cd2cf5fc561a88119a95e889f46d802bc0a8af8c5dfbf4ab SHA512 93fd77e776669996c73f082ab5d3a027f3866b0c4e2875f013c9b044020d12f769bb21b3fe76bfcfd8a9c8900d584d765d2afcff234f68360389e35bc0c73377 +EBUILD exim-4.92-r2.ebuild 13521 BLAKE2B 46c96a9b259e46d838c6809a60f3846ddce7156712caae4715d9c2ff0917266b502de4a10c0e8a342e839041fd18293c3410d93c40335a86f5c67923bdfa821b SHA512 e51b3108b802a882c9523e30d40b3358de1185333629bbe1fdbfccedda8ed86d3b4e92df2a526b717c69094b2cd5665271a4ae32b79ed62549e2a804e0c60c99 +EBUILD exim-4.92.1.ebuild 13529 BLAKE2B e0232142fc1a3706abcc243f5faebabee2311d8721a2e946523c58091968c9c3b525e7e62eeb89a012ada285600845f5893eb2f2061a05eb9df3a541fc1ffeb4 SHA512 bab630b31bbe51d191311bde0aef9fee9041b3b23d0ea226ed1f711f6bf2830e6eff04f745d37839b825dfad3e3976266bea9d42ea0b25c23bff34c32cfd59dc EBUILD exim-4.92.ebuild 13221 BLAKE2B 1f4ade06d4aee9795a0c1647796fb2976f35f8fd2c2f2c320b03c570cc46b41b09184f0dde19a4cec887a98b20a375f2b11472dee4bc08ee18e91d40b4a97e4d SHA512 b02c7dd557552755d9484fb892bccca708208cb99a6c5e534f1cfc0ec1c9a44230dfb4aeb0548c88171a4d72b67d72c1e26289096c627060b7b79dec0831cdb8 MISC metadata.xml 2457 BLAKE2B c1dcbaedd069b41c4cfb190806b44014229d53cf6d6f72e04b99dc91f223567cb4f30100792aae72658780da0579fa26e6fb8a0266565bcc0c307996d59ac3ed SHA512 9044abccd15525c7676fc218b62d9b663bd155482894eced9c0cfc8a22e8cd7353009adc75a9f3de15b14f267e6ee6b4f4c91d8bd9260931c0b9de6bf48c762f diff --git a/mail-mta/exim/exim-4.92-r2.ebuild b/mail-mta/exim/exim-4.92-r2.ebuild index 3ccacfb418c6..d6949b4d5eb3 100644 --- a/mail-mta/exim/exim-4.92-r2.ebuild +++ b/mail-mta/exim/exim-4.92-r2.ebuild @@ -14,6 +14,7 @@ REQUIRED_USE=" pkcs11? ( ssl ) spf? ( exiscan-acl ) srs? ( exiscan-acl ) + !ssl? ( !dkim ) " # NOTE on USE="gnutls dane", gnutls[dane] is masked in base, unmasked # for x86 and amd64 only, due to this, repoman won't allow depending on @@ -33,7 +34,7 @@ HOMEPAGE="http://www.exim.org/" SLOT="0" LICENSE="GPL-2" -KEYWORDS="alpha amd64 ~arm ~hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-solaris" +KEYWORDS="alpha amd64 arm ~hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-solaris" COMMON_DEPEND=">=sys-apps/sed-4.0.5 ( >=sys-libs/db-3.2:= <sys-libs/db-6:= ) diff --git a/mail-mta/exim/exim-4.91-r2.ebuild b/mail-mta/exim/exim-4.92.1.ebuild index cf587588b81c..9d74e713de0f 100644 --- a/mail-mta/exim/exim-4.91-r2.ebuild +++ b/mail-mta/exim/exim-4.92.1.ebuild @@ -14,6 +14,7 @@ REQUIRED_USE=" pkcs11? ( ssl ) spf? ( exiscan-acl ) srs? ( exiscan-acl ) + !ssl? ( !dkim ) " # NOTE on USE="gnutls dane", gnutls[dane] is masked in base, unmasked # for x86 and amd64 only, due to this, repoman won't allow depending on @@ -33,7 +34,7 @@ HOMEPAGE="http://www.exim.org/" SLOT="0" LICENSE="GPL-2" -KEYWORDS="alpha amd64 arm hppa ia64 ppc ppc64 sparc x86 ~x86-fbsd ~x86-solaris" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd ~x86-solaris" COMMON_DEPEND=">=sys-apps/sed-4.0.5 ( >=sys-libs/db-3.2:= <sys-libs/db-6:= ) @@ -103,12 +104,13 @@ S=${WORKDIR}/${P//rc/RC} src_prepare() { epatch "${FILESDIR}"/exim-4.14-tail.patch - epatch "${FILESDIR}"/exim-4.74-localscan_dlopen.patch + epatch "${FILESDIR}"/exim-4.92-localscan_dlopen.patch epatch "${FILESDIR}"/exim-4.69-r1.27021.patch epatch "${FILESDIR}"/exim-4.74-radius-db-ENV-clash.patch # 287426 epatch "${FILESDIR}"/exim-4.82-makefile-freebsd.patch # 235785 epatch "${FILESDIR}"/exim-4.89-as-needed-ldflags.patch # 352265, 391279 epatch "${FILESDIR}"/exim-4.76-crosscompile.patch # 266591 + epatch "${FILESDIR}"/exim-4.92-fix-eval-expansion-32bit.patch #687554 if use maildir ; then epatch "${FILESDIR}"/exim-4.20-maildir.patch @@ -130,25 +132,27 @@ src_prepare() { src_configure() { # general config and paths - sed -i.orig \ - -e "/SYSTEM_ALIASES_FILE/s'SYSTEM_ALIASES_FILE'${EPREFIX}/etc/mail/aliases'" \ - "${S}"/src/configure.default || die + local aliases="${EPREFIX}/etc/mail/aliases" + sed -i \ + -e "/SYSTEM_ALIASES_FILE/s'SYSTEM_ALIASES_FILE'${aliases}'" \ + src/configure.default || die - sed -i -e 's/^buildname=.*/buildname=exim-gentoo/g' Makefile || die + sed -i -e 's/^buildname=.*/buildname=exim-gentoo/' Makefile || die + if use elibc_musl; then + sed -i -e 's/^LIBS = -lnsl/LIBS =/g' OS/Makefile-Linux || die + fi + + local conffile="${EPREFIX}/etc/exim/exim.conf" sed -e "48i\CFLAGS=${CFLAGS}" \ -e "s:BIN_DIRECTORY=/usr/exim/bin:BIN_DIRECTORY=${EPREFIX}/usr/sbin:" \ -e "s:EXIM_USER=:EXIM_USER=${MAILUSER}:" \ - -e "s:CONFIGURE_FILE=/usr/exim/configure:CONFIGURE_FILE=${EPREFIX}/etc/exim/exim.conf:" \ + -e "s:CONFIGURE_FILE=.*$:CONFIGURE_FILE=${conffile}:" \ -e "s:ZCAT_COMMAND=.*$:ZCAT_COMMAND=${EPREFIX}/bin/zcat:" \ -e "s:COMPRESS_COMMAND=.*$:COMPRESS_COMMAND=${EPREFIX}/bin/gzip:" \ - src/EDITME > Local/Makefile - - if use elibc_musl; then - sed -e 's/^LIBS = -lnsl/LIBS =/g' \ - -i OS/Makefile-Linux - fi + src/EDITME > Local/Makefile || die + # work on Local/Makefile from now on cd Local cat >> Makefile <<- EOC @@ -180,6 +184,7 @@ src_configure() { # # mail storage formats + # # mailstore is Exim's traditional storage format cat >> Makefile <<- EOC @@ -217,14 +222,14 @@ src_configure() { if ! use dnsdb; then # DNSDB lookup is enabled by default - sed -i "s:^LOOKUP_DNSDB=yes:# LOOKUP_DNSDB=yes:" Makefile + sed -i -e 's:^LOOKUP_DNSDB=yes:# LOOKUP_DNSDB=yes:' Makefile || die fi if use ldap; then cat >> Makefile <<- EOC LOOKUP_LDAP=yes LDAP_LIB_TYPE=OPENLDAP2 - LOOKUP_INCLUDE += -I"${EROOT}"usr/include/ldap + LOOKUP_INCLUDE += -I"${EPREFIX}"/usr/include/ldap LOOKUP_LIBS += -lldap -llber EOC fi @@ -244,7 +249,7 @@ src_configure() { EOC if use elibc_glibc ; then cat >> Makefile <<- EOC - CFLAGS += -I/usr/include/tirpc + CFLAGS += -I"${EPREFIX}"/usr/include/tirpc EOC fi fi @@ -271,17 +276,17 @@ src_configure() { EOC fi - # # Exim monitor, enabled by default, controlled via X USE-flag, # disable if not requested, bug #46778 if use X; then cp ../exim_monitor/EDITME eximon.conf || die else - sed -i -e '/^EXIM_MONITOR=/s/^/# /' Makefile + sed -i -e '/^EXIM_MONITOR=/s/^/# /' Makefile || die fi # # features + # # content scanning support if use exiscan-acl; then @@ -316,7 +321,10 @@ src_configure() { # log to syslog if use syslog; then - sed -i "s:LOG_FILE_PATH=/var/log/exim/exim_%s.log:LOG_FILE_PATH=syslog:" Makefile + local eximlog="${EPREFIX}/var/log/exim/exim_%s.log" + sed -i \ + -e "s:LOG_FILE_PATH=${eximlog}:LOG_FILE_PATH=syslog:" \ + Makefile || die cat >> Makefile <<- EOC LOG_FILE_PATH=syslog EOC @@ -364,6 +372,8 @@ src_configure() { if use dlfunc; then cat >> Makefile <<- EOC EXPAND_DLFUNC=yes + HAVE_LOCAL_SCAN=yes + DLOPEN_LOCAL_SCAN=yes EOC fi @@ -391,6 +401,7 @@ src_configure() { # # experimental features + # # Authenticated Receive Chain if use arc; then @@ -427,6 +438,7 @@ src_configure() { # # authentication (SMTP AUTH) + # # standard bits cat >> Makefile <<- EOC @@ -530,9 +542,12 @@ src_install () { newinitd "${FILESDIR}"/exim.rc10 exim newconfd "${FILESDIR}"/exim.confd exim - systemd_dounit "${FILESDIR}"/{exim.service,exim.socket,exim-submission.socket} - systemd_newunit "${FILESDIR}"/exim_at.service 'exim@.service' - systemd_newunit "${FILESDIR}"/exim-submission_at.service 'exim-submission@.service' + systemd_dounit \ + "${FILESDIR}"/{exim.service,exim.socket,exim-submission.socket} + systemd_newunit \ + "${FILESDIR}"/exim_at.service 'exim@.service' + systemd_newunit \ + "${FILESDIR}"/exim-submission_at.service 'exim-submission@.service' diropts -m 0750 -o ${MAILUSER} -g ${MAILGROUP} keepdir /var/log/${PN} @@ -541,8 +556,10 @@ src_install () { pkg_postinst() { if [[ ! -f ${EROOT}etc/exim/exim.conf ]] ; then einfo "${EROOT}etc/exim/system_filter.exim is a sample system_filter." - einfo "${EROOT}etc/exim/auth_conf.sub contains the configuration sub for using smtp auth." - einfo "Please create ${EROOT}etc/exim/exim.conf from ${EROOT}etc/exim/exim.conf.dist." + einfo "${EROOT}etc/exim/auth_conf.sub contains the configuration sub" + einfo "for using smtp auth." + einfo "Please create ${EROOT}etc/exim/exim.conf from" + einfo " ${EROOT}etc/exim/exim.conf.dist." fi if use dcc ; then einfo "DCC support is experimental, you can find some limited" diff --git a/mail-mta/exim/files/exim-4.74-localscan_dlopen.patch b/mail-mta/exim/files/exim-4.74-localscan_dlopen.patch deleted file mode 100644 index 3bb57c1637c6..000000000000 --- a/mail-mta/exim/files/exim-4.74-localscan_dlopen.patch +++ /dev/null @@ -1,262 +0,0 @@ -diff -Naur exim-4.32/src/EDITME exim-4.32-dlopen/src/EDITME ---- src/EDITME 2004-04-15 08:27:01.000000000 +0000 -+++ src/EDITME 2004-05-06 16:15:47.000000000 +0000 -@@ -505,6 +505,24 @@ - - - #------------------------------------------------------------------------------ -+# On systems which support dynamic loading of shared libraries, Exim can -+# load a local_scan function specified in its config file instead of having -+# to be recompiled with the desired local_scan function. For a full -+# description of the API to this function, see the Exim specification. -+ -+DLOPEN_LOCAL_SCAN=yes -+ -+# If you set DLOPEN_LOCAL_SCAN, then you need to include -rdynamic in the -+# linker flags. Without it, the loaded .so won't be able to access any -+# functions from exim. -+ -+LFLAGS = -rdynamic -+ifeq ($(OSTYPE),Linux) -+LFLAGS += -ldl -+endif -+ -+ -+#------------------------------------------------------------------------------ - # The default distribution of Exim contains only the plain text form of the - # documentation. Other forms are available separately. If you want to install - # the documentation in "info" format, first fetch the Texinfo documentation -diff -Naur exim-4.32/src/config.h.defaults exim-4.32-dlopen/src/config.h.defaults ---- src/config.h.defaults 2004-04-15 08:27:01.000000000 +0000 -+++ src/config.h.defaults 2004-05-06 16:16:30.000000000 +0000 -@@ -20,6 +20,8 @@ - #define AUTH_PLAINTEXT - #define AUTH_SPA - -+#define DLOPEN_LOCAL_SCAN -+ - #define BIN_DIRECTORY - - #define CONFIGURE_FILE -diff -Naur exim-4.32/src/globals.c exim-4.32-dlopen/src/globals.c ---- src/globals.c 2004-04-15 08:27:01.000000000 +0000 -+++ src/globals.c 2004-05-06 16:17:07.000000000 +0000 -@@ -109,6 +109,10 @@ - uschar *tls_verify_hosts = NULL; - #endif - -+#ifdef DLOPEN_LOCAL_SCAN -+uschar *local_scan_path = NULL; -+#endif -+ - - /* Input-reading functions for messages, so we can use special ones for - incoming TCP/IP. The defaults use stdin. We never need these for any -diff -Naur exim-4.32/src/globals.h exim-4.32-dlopen/src/globals.h ---- src/globals.h 2004-04-15 08:27:01.000000000 +0000 -+++ src/globals.h 2004-05-06 16:17:50.000000000 +0000 -@@ -73,6 +73,9 @@ - extern uschar *tls_verify_hosts; /* Mandatory client verification */ - #endif - -+#ifdef DLOPEN_LOCAL_SCAN -+extern uschar *local_scan_path; /* Path to local_scan() library */ -+#endif - - /* Input-reading functions for messages, so we can use special ones for - incoming TCP/IP. */ -diff -Naur exim-4.32/src/local_scan.c exim-4.32-dlopen/src/local_scan.c ---- src/local_scan.c 2004-04-15 08:27:01.000000000 +0000 -+++ src/local_scan.c 2004-05-06 16:21:57.000000000 +0000 -@@ -5,60 +5,131 @@ - /* Copyright (c) University of Cambridge 1995 - 2004 */ - /* See the file NOTICE for conditions of use and distribution. */ - -+#include "exim.h" - --/****************************************************************************** --This file contains a template local_scan() function that just returns ACCEPT. --If you want to implement your own version, you should copy this file to, say --Local/local_scan.c, and edit the copy. To use your version instead of the --default, you must set -- --LOCAL_SCAN_SOURCE=Local/local_scan.c -- --in your Local/Makefile. This makes it easy to copy your version for use with --subsequent Exim releases. -- --For a full description of the API to this function, see the Exim specification. --******************************************************************************/ -- -- --/* This is the only Exim header that you should include. The effect of --including any other Exim header is not defined, and may change from release to --release. Use only the documented interface! */ -- --#include "local_scan.h" -- -- --/* This is a "do-nothing" version of a local_scan() function. The arguments --are: -- -- fd The file descriptor of the open -D file, which contains the -- body of the message. The file is open for reading and -- writing, but modifying it is dangerous and not recommended. -- -- return_text A pointer to an unsigned char* variable which you can set in -- order to return a text string. It is initialized to NULL. -- --The return values of this function are: -- -- LOCAL_SCAN_ACCEPT -- The message is to be accepted. The return_text argument is -- saved in $local_scan_data. -- -- LOCAL_SCAN_REJECT -- The message is to be rejected. The returned text is used -- in the rejection message. -- -- LOCAL_SCAN_TEMPREJECT -- This specifies a temporary rejection. The returned text -- is used in the rejection message. --*/ -+#ifdef DLOPEN_LOCAL_SCAN -+#include <dlfcn.h> -+static int (*local_scan_fn)(int fd, uschar **return_text) = NULL; -+static int load_local_scan_library(void); -+#endif - - int - local_scan(int fd, uschar **return_text) - { - fd = fd; /* Keep picky compilers happy */ - return_text = return_text; --return LOCAL_SCAN_ACCEPT; -+#ifdef DLOPEN_LOCAL_SCAN -+/* local_scan_path is defined AND not the empty string */ -+if (local_scan_path && *local_scan_path) -+ { -+ if (!local_scan_fn) -+ { -+ if (!load_local_scan_library()) -+ { -+ char *base_msg , *error_msg , *final_msg ; -+ int final_length = -1 ; -+ -+ base_msg=US"Local configuration error - local_scan() library failure\n"; -+ error_msg = dlerror() ; -+ -+ final_length = strlen(base_msg) + strlen(error_msg) + 1 ; -+ final_msg = (char*)malloc( final_length*sizeof(char) ) ; -+ *final_msg = '\0' ; -+ -+ strcat( final_msg , base_msg ) ; -+ strcat( final_msg , error_msg ) ; -+ -+ *return_text = final_msg ; -+ return LOCAL_SCAN_TEMPREJECT; -+ } -+ } -+ return local_scan_fn(fd, return_text); -+ } -+else -+#endif -+ return LOCAL_SCAN_ACCEPT; -+} -+ -+#ifdef DLOPEN_LOCAL_SCAN -+ -+static int load_local_scan_library(void) -+{ -+/* No point in keeping local_scan_lib since we'll never dlclose() anyway */ -+void *local_scan_lib = NULL; -+int (*local_scan_version_fn)(void); -+int vers_maj; -+int vers_min; -+ -+local_scan_lib = dlopen(local_scan_path, RTLD_NOW); -+if (!local_scan_lib) -+ { -+ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library open failed - " -+ "message temporarily rejected"); -+ return FALSE; -+ } -+ -+local_scan_version_fn = dlsym(local_scan_lib, "local_scan_version_major"); -+if (!local_scan_version_fn) -+ { -+ dlclose(local_scan_lib); -+ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library doesn't contain " -+ "local_scan_version_major() function - message temporarily rejected"); -+ return FALSE; -+ } -+ -+/* The major number is increased when the ABI is changed in a non -+ backward compatible way. */ -+vers_maj = local_scan_version_fn(); -+ -+local_scan_version_fn = dlsym(local_scan_lib, "local_scan_version_minor"); -+if (!local_scan_version_fn) -+ { -+ dlclose(local_scan_lib); -+ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library doesn't contain " -+ "local_scan_version_minor() function - message temporarily rejected"); -+ return FALSE; -+ } -+ -+/* The minor number is increased each time a new feature is added (in a -+ way that doesn't break backward compatibility) -- Marc */ -+vers_min = local_scan_version_fn(); -+ -+ -+if (vers_maj != LOCAL_SCAN_ABI_VERSION_MAJOR) -+ { -+ dlclose(local_scan_lib); -+ local_scan_lib = NULL; -+ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() has an incompatible major" -+ "version number, you need to recompile your module for this version" -+ "of exim (The module was compiled for version %d.%d and this exim provides" -+ "ABI version %d.%d)", vers_maj, vers_min, LOCAL_SCAN_ABI_VERSION_MAJOR, -+ LOCAL_SCAN_ABI_VERSION_MINOR); -+ return FALSE; -+ } -+else if (vers_min > LOCAL_SCAN_ABI_VERSION_MINOR) -+ { -+ dlclose(local_scan_lib); -+ local_scan_lib = NULL; -+ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() has an incompatible minor" -+ "version number, you need to recompile your module for this version" -+ "of exim (The module was compiled for version %d.%d and this exim provides" -+ "ABI version %d.%d)", vers_maj, vers_min, LOCAL_SCAN_ABI_VERSION_MAJOR, -+ LOCAL_SCAN_ABI_VERSION_MINOR); -+ return FALSE; -+ } -+ -+local_scan_fn = dlsym(local_scan_lib, "local_scan"); -+if (!local_scan_fn) -+ { -+ dlclose(local_scan_lib); -+ log_write(0, LOG_MAIN|LOG_REJECT, "local_scan() library doesn't contain " -+ "local_scan() function - message temporarily rejected"); -+ return FALSE; -+ } -+ -+return TRUE; - } - -+#endif /* DLOPEN_LOCAL_SCAN */ -+ - /* End of local_scan.c */ -diff -Naur exim-4.32/src/readconf.c exim-4.32-dlopen/src/readconf.c ---- src/readconf.c 2004-04-15 08:27:01.000000000 +0000 -+++ src/readconf.c 2004-05-06 16:23:12.000000000 +0000 -@@ -223,6 +223,9 @@ - { "local_from_prefix", opt_stringptr, &local_from_prefix }, - { "local_from_suffix", opt_stringptr, &local_from_suffix }, - { "local_interfaces", opt_stringptr, &local_interfaces }, -+#ifdef DLOPEN_LOCAL_SCAN -+ { "local_scan_path", opt_stringptr, &local_scan_path }, -+#endif - { "local_scan_timeout", opt_time, &local_scan_timeout }, - { "local_sender_retain", opt_bool, &local_sender_retain }, - { "localhost_number", opt_stringptr, &host_number_string }, |