summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mail-mta/exim/Manifest17
-rw-r--r--mail-mta/exim/exim-4.69.ebuild321
-rw-r--r--mail-mta/exim/files/auth_conf.sub25
-rw-r--r--mail-mta/exim/files/exim-4.14-tail.patch11
-rw-r--r--mail-mta/exim/files/exim-4.20-maildir.patch14
-rw-r--r--mail-mta/exim/files/exim-4.30-conf.patch19
-rw-r--r--mail-mta/exim/files/exim-4.43-r2-localscan_dlopen.patch259
-rw-r--r--mail-mta/exim/files/exim-4.69-r1.27021.patch57
-rw-r--r--mail-mta/exim/files/exim-4.69-r1.boolean_redefine_protect.152706.patch21
-rw-r--r--mail-mta/exim/files/exim-BJA-buildconfig-HOSTCC.diff13
-rw-r--r--mail-mta/exim/files/exim.confd2
-rw-r--r--mail-mta/exim/files/exim.logrotate14
-rw-r--r--mail-mta/exim/files/exim.rc629
-rw-r--r--mail-mta/exim/files/mailer.conf10
-rw-r--r--mail-mta/exim/files/pam.d-exim3
-rw-r--r--mail-mta/exim/files/system_filter.exim220
16 files changed, 1035 insertions, 0 deletions
diff --git a/mail-mta/exim/Manifest b/mail-mta/exim/Manifest
new file mode 100644
index 00000000..8ae9ff90
--- /dev/null
+++ b/mail-mta/exim/Manifest
@@ -0,0 +1,17 @@
+AUX auth_conf.sub 790 RMD160 5d6a71cf9fb593fc34ddce8dc421fcd843356c82 SHA1 5744531af5ee282ae29bdbb4e89fbee16c0034a7 SHA256 d0631d487f115c07a178d48bc7168cd16d7b22c8879b1e926923152cde95ba78
+AUX exim-4.14-tail.patch 446 RMD160 685e27ff995710f3b8d77d8785b04503170e7e27 SHA1 d52b5d10656ead546beda128068ed2f9dbc67200 SHA256 74d1044bb94e167180fd8f8aba7449ca3d2b09b1ce170a1a2e4e54ca0cd660da
+AUX exim-4.20-maildir.patch 478 RMD160 50c6a1dd6ae3f7bb1776696d3d0d7a161c351fce SHA1 c8287f7e44d93b0ca8761b8f7111974cfe1280a5 SHA256 2704c4db67bb7c58c2421656d942f533d1eedf1df187e76297ab72d2c2a2fb4c
+AUX exim-4.30-conf.patch 887 RMD160 4e50bdb4f3a9f061c7f4da763ad5e427b9cbea26 SHA1 cf7ecab19aba3b758d736c584b98fa4be2338050 SHA256 a33425492f246c6afe3be21e83e0dc20ecd5ea300a172d877f666d077648eedf
+AUX exim-4.43-r2-localscan_dlopen.patch 9236 RMD160 d33f7bcf72f947e8d1a3d917713630100c175491 SHA1 e4239a1bf0261f99491b4a29b26bbe8d9beffbd8 SHA256 3ec15d2dfdf251c70647c3def09711385f23983eceeecb6ec9d42b39f54b198d
+AUX exim-4.69-r1.27021.patch 1738 RMD160 fbe33030e0a9462cc91b46799347d77b20b39b7e SHA1 8e03c8b52d02d55cb5307ea646e1e59d9a526353 SHA256 8d0b2c8a23d92a2b78d2aee459c347abcf417cbfb06e4a06a58b3abe10eb1d9d
+AUX exim-4.69-r1.boolean_redefine_protect.152706.patch 473 RMD160 f3a18c0d338d673a3bc216d19152c9c7c43e29d6 SHA1 ba08af4b635418ca4a81e6343da875f0b86daabd SHA256 85d1e7554dac8204e1d2e71a10d73a2172610190d74d005b152191e865e85108
+AUX exim-BJA-buildconfig-HOSTCC.diff 490 RMD160 e11995013a6d84ff117b5652d8cc8d48d7ee5217 SHA1 1d609be62efeec2a3e5800fe8955eb98ee344344 SHA256 beeddf7e45a8329f389862b2cd52a448c33405ed35c36defe89916a023eb8b08
+AUX exim.confd 62 RMD160 d8dcabf184ffb9066ad45c3e77cce1ec0392a143 SHA1 c56feda3c3193fad26852310da8ef24ef91f60f6 SHA256 668f912565a59926957090c6143f669f0e9de2cf441507d3c05fcd046865b401
+AUX exim.logrotate 194 RMD160 a92ecf3088d66e712797180a229a76c8130d7dae SHA1 0186763995134f2ce11d9562e0ac8c89a061543c SHA256 2265e5b73d8268575dbbc79d85b36dcd4724cb5da399d91e6225760cf524c1a4
+AUX exim.rc6 738 RMD160 6935a02ff63db979a71cd834675f1aff066b296b SHA1 a4504387906a8386904a40c0aabadd69cb8a4c2a SHA256 db96d7bf9b11dcac4d9d9dab0d111a9d8a36910473918d8903ade9a03963bffd
+AUX mailer.conf 259 RMD160 6412ac421b836f9425af443084dbaa49feb14df6 SHA1 690b15bdb334ed2bfda927a156227385823353f2 SHA256 c1dfa59d617c5744ebd119c37b408d7135f1fa6be4322d2f77db8ba9cb30d359
+AUX pam.d-exim 101 RMD160 8ad4e0a05068ae20d5e8d401146456945d068322 SHA1 bdca3fb37937baa5da5e656c07ec333abfaa0f7d SHA256 80d94cb0b3ded20ed1513f4d5627969c4ce85d3006c702eb24920ffa01eec674
+AUX system_filter.exim 8120 RMD160 267545af6dd333e0e5f05e1d4d02a0e8ee638d45 SHA1 a9eaf04538cd35eae726e2920cb0d115bc2ab2e0 SHA256 35539f6d20f2847b4093824618797b4d602dcc5b7d920e49bf5c26f0fd89858e
+DIST exim-4.69.tar.bz2 1658939 RMD160 ae97c807c63f858ba4a0ab402677225da9337d05 SHA1 321e238b6e6b32498110511ce72a911538305a39 SHA256 18e856cfdb682ba8e8ccb943ab538734d34d0ecefd63465ecc5430bc15915069
+DIST exiscan.conf 22113 RMD160 e52b77f656b3ba2105e833075d1368f41e414d64 SHA1 74dc6e30f49402f5e6fefc280ea325d17f6af8c4 SHA256 f8cc731d3225a902461e05c0997df23bfd231ea8d5bf33a9aba5783bc6e0c964
+EBUILD exim-4.69.ebuild 9919 RMD160 4b52d5ee49cc79ffd918f5ca95e7ff7b7ee15cef SHA1 916137aa8992a21e4c11dc2cbac581bdc6991d9e SHA256 458e6ba17b2f593715da17a0a403a708689dcea1a70f89ff0067e2dcb12e804a
diff --git a/mail-mta/exim/exim-4.69.ebuild b/mail-mta/exim/exim-4.69.ebuild
new file mode 100644
index 00000000..d19712a9
--- /dev/null
+++ b/mail-mta/exim/exim-4.69.ebuild
@@ -0,0 +1,321 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/exim/exim-4.69.ebuild,v 1.10 2008/07/16 16:34:18 chtekk Exp $
+
+inherit eutils
+
+IUSE="tcpd ssl postgres mysql ldap pam exiscan-acl mailwrapper lmtp ipv6 sasl dnsdb perl mbx mbox X exiscan nis syslog spf srs gnutls sqlite dovecot-sasl radius domainkeys"
+
+DESCRIPTION="A highly configurable, drop-in replacement for sendmail"
+SRC_URI="ftp://ftp.exim.org/pub/exim/exim4/${P}.tar.bz2 mirror://gentoo/exiscan.conf"
+HOMEPAGE="http://www.exim.org/"
+
+SLOT="0"
+LICENSE="GPL-2"
+KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
+
+PROVIDE="virtual/mta"
+DEPEND=">=sys-apps/sed-4.0.5
+ perl? ( sys-devel/libperl )
+ >=sys-libs/db-3.2
+ pam? ( virtual/pam )
+ tcpd? ( sys-apps/tcp-wrappers )
+ ssl? ( >=dev-libs/openssl-0.9.6 )
+ gnutls? ( net-libs/gnutls
+ dev-libs/libtasn1 )
+ ldap? ( >=net-nds/openldap-2.0.7 )
+ mysql? ( virtual/mysql )
+ postgres? ( virtual/postgresql-base )
+ sasl? ( >=dev-libs/cyrus-sasl-2.1.14 )
+ spf? ( >=mail-filter/libspf2-1.2.5-r1 )
+ srs? ( mail-filter/libsrs_alt )
+ X? ( x11-proto/xproto
+ x11-libs/libX11
+ x11-libs/libXmu
+ x11-libs/libXt
+ x11-libs/libXaw
+ )
+ sqlite? ( dev-db/sqlite )
+ radius? ( net-dialup/radiusclient )
+ domainkeys? ( mail-filter/libdomainkeys )
+ virtual/libiconv
+ "
+ # added X check for #57206
+RDEPEND="${DEPEND}
+ mailwrapper? ( >=net-mail/mailwrapper-0.2 )
+ !mailwrapper? ( !virtual/mta )
+ >=net-mail/mailbase-0.00-r5
+ virtual/logger"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ local myconf
+
+ epatch "${FILESDIR}"/exim-4.14-tail.patch
+ epatch "${FILESDIR}"/exim-4.43-r2-localscan_dlopen.patch
+ epatch "${FILESDIR}"/exim-BJA-buildconfig-HOSTCC.diff
+
+ if ! use mbox; then
+ einfo "Patching maildir support into exim.conf"
+ epatch "${FILESDIR}"/exim-4.20-maildir.patch
+ fi
+ sed -i "/SYSTEM_ALIASES_FILE/ s'SYSTEM_ALIASES_FILE'/etc/mail/aliases'" "${S}"/src/configure.default
+ cp "${S}"/src/configure.default "${S}"/src/configure.default.orig
+
+ # Includes Typo fix for bug 47106
+ sed -e "48i\CFLAGS=${CFLAGS}" \
+ -e "s:# AUTH_CRAM_MD5=yes:AUTH_CRAM_MD5=yes:" \
+ -e "s:# AUTH_PLAINTEXT=yes:AUTH_PLAINTEXT=yes:" \
+ -e "s:BIN_DIRECTORY=/usr/exim/bin:BIN_DIRECTORY=/usr/sbin:" \
+ -e "s:COMPRESS_COMMAND=/usr/bin/gzip:COMPRESS_COMMAND=/bin/gzip:" \
+ -e "s:ZCAT_COMMAND=/usr/bin/zcat:ZCAT_COMMAND=/bin/zcat:" \
+ -e "s:CONFIGURE_FILE=/usr/exim/configure:CONFIGURE_FILE=/etc/exim/exim.conf:" \
+ -e "s:EXIM_MONITOR=eximon.bin:# EXIM_MONITOR=eximon.bin:" \
+ -e "s:# INFO_DIRECTORY=/usr/local/info:INFO_DIRECTORY=/usr/share/info:" \
+ -e "s:# LOG_FILE_PATH=/var/log/exim_%slog:LOG_FILE_PATH=/var/log/exim/exim_%s.log:" \
+ -e "s:# PID_FILE_PATH=/var/lock/exim.pid:PID_FILE_PATH=/var/run/exim.pid:" \
+ -e "s:# SPOOL_DIRECTORY=/var/spool/exim:SPOOL_DIRECTORY=/var/spool/exim:" \
+ -e "s:# SUPPORT_MAILDIR=yes:SUPPORT_MAILDIR=yes:" \
+ -e "s:# SUPPORT_MAILSTORE=yes:SUPPORT_MAILSTORE=yes:" \
+ -e "s:EXIM_USER=:EXIM_USER=mail:" \
+ -e "s:# AUTH_SPA=yes:AUTH_SPA=yes:" \
+ -e "s:^ZCAT_COMMAND.*$:ZCAT_COMMAND=/bin/zcat:" \
+ -e "s:# LOOKUP_PASSWD=yes:LOOKUP_PASSWD=yes:" \
+ src/EDITME > Local/Makefile
+
+ # exiscan-acl is now integrated - enabled it when use-flag set
+ if use exiscan-acl; then
+ sed -i "s:# WITH_CONTENT_SCAN=yes:WITH_CONTENT_SCAN=yes:" Local/Makefile
+ sed -i "s:# WITH_OLD_DEMIME=yes:WITH_OLD_DEMIME=yes:" Local/Makefile
+ elif (use spf || use srs ) then
+ eerror SPF and SRS support require exiscan-acl to be enabled, please add
+ eerror to your USE settings.
+ exit 1
+ fi
+ if use spf; then
+ myconf="${myconf} -lspf2"
+ sed -i "s:# EXPERIMENTAL_SPF=yes:EXPERIMENTAL_SPF=yes:" Local/Makefile
+ mycflags="${mycflags} -DEXPERIMENTAL_SPF"
+ fi
+ if use srs; then
+ myconf="${myconf} -lsrs_alt"
+ sed -i "s:# EXPERIMENTAL_SRS=yes:EXPERIMENTAL_SRS=yes:" Local/Makefile
+ fi
+
+ cd Local
+ # enable optional exim_monitor support via X use flag bug #46778
+ if use X; then
+ einfo "Configuring eximon"
+ cp ../exim_monitor/EDITME eximon.conf
+ sed -i "s:# EXIM_MONITOR=eximon.bin:EXIM_MONITOR=eximon.bin:" Makefile
+ fi
+ #These next two should resolve 37964
+ if use perl; then
+ sed -i "s:# EXIM_PERL=perl.o:EXIM_PERL=perl.o:" Makefile
+ fi
+ # mbox useflag renamed, see bug 110741
+ if use mbx; then
+ sed -i "s:# SUPPORT_MBX=yes:SUPPORT_MBX=yes:" Makefile
+ fi
+ if use pam; then
+ sed -i "s:# \(SUPPORT_PAM=yes\):\1:" Makefile
+ myconf="${myconf} -lpam"
+ fi
+ if use sasl; then
+ sed -i "s:# CYRUS_SASLAUTHD_SOCKET=/var/state/saslauthd/mux:CYRUS_SASLAUTHD_SOCKET=/var/lib/sasl2/mux:" Makefile
+ sed -i "s:# AUTH_CYRUS_SASL=yes:AUTH_CYRUS_SASL=yes:" Makefile
+ myconf="${myconf} -lsasl2"
+ fi
+ if use tcpd; then
+ sed -i "s:# \(USE_TCP_WRAPPERS=yes\):\1:" Makefile
+ myconf="${myconf} -lwrap"
+ fi
+ if use lmtp; then
+ sed -i "s:# \(TRANSPORT_LMTP=yes\):\1:" Makefile
+ fi
+ if use ipv6; then
+ echo "HAVE_IPV6=YES" >> Makefile
+ #To fix bug 41196
+ echo "IPV6_USE_INET_PTON=yes" >> Makefile
+ fi
+
+ if use dovecot-sasl; then
+ sed -i "s:# AUTH_DOVECOT=yes:AUTH_DOVECOT=yes:" Makefile
+ fi
+ if use radius; then
+ myconf="${myconf} -lradiusclient"
+ sed -i "s:# RADIUS_CONFIG_FILE=/etc/radiusclient/radiusclient.conf:RADIUS_CONFIG_FILE=/etc/radiusclient/radiusclient.conf:" Local/Makefile
+ sed -i "s:# RADIUS_LIB_TYPE=RADIUSCLIENT$:RADIUS_LIB_TYPE=RADIUSCLIENT:" Local/Makefile
+ fi
+
+ if [ -n "$myconf" ] ; then
+ echo "EXTRALIBS=${myconf} ${LDFLAGS}" >> Makefile
+ fi
+
+ echo "CC=$(tc-getCC ${CBUILD})" >> Makefile
+
+ cd "${S}"
+ if use ssl; then
+ sed -i \
+ -e "s:# \(SUPPORT_TLS=yes\):\1:" Local/Makefile
+ if use gnutls; then
+ sed -i \
+ -e "s:# \(USE_GNUTLS=yes\):\1:" \
+ -e "s:# \(TLS_LIBS=-lgnutls -ltasn1 -lgcrypt\):\1:" Local/Makefile
+ else
+ sed -i \
+ -e "s:# \(TLS_LIBS=-lssl -lcrypto\):\1:" Local/Makefile
+ fi
+ fi
+
+ LOOKUP_INCLUDE=
+ LOOKUP_LIBS=
+
+ if use ldap; then
+ sed -i \
+ -e "s:# \(LOOKUP_LDAP=yes\):\1:" \
+ -e "s:# \(LDAP_LIB_TYPE=OPENLDAP2\):\1:" Local/Makefile
+ LOOKUP_INCLUDE="-I/usr/include/ldap"
+ LOOKUP_LIBS="-L/usr/lib -lldap -llber"
+ fi
+
+ if use mysql; then
+ sed -i "s:# LOOKUP_MYSQL=yes:LOOKUP_MYSQL=yes:" Local/Makefile
+ LOOKUP_INCLUDE="$LOOKUP_INCLUDE -I/usr/include/mysql"
+ LOOKUP_LIBS="$LOOKUP_LIBS -L/usr/lib -lmysqlclient"
+ fi
+
+ if use postgres; then
+ sed -i "s:# LOOKUP_PGSQL=yes:LOOKUP_PGSQL=yes:" Local/Makefile
+ LOOKUP_INCLUDE="$LOOKUP_INCLUDE -I/usr/include/postgresql"
+ LOOKUP_LIBS="$LOOKUP_LIBS -lpq"
+ fi
+ if use sqlite; then
+ sed -i "s:# LOOKUP_SQLITE=yes: LOOKUP_SQLITE=yes:" Local/Makefile
+ LOOKUP_INCLUDE="$LOOKUP_INCLUDE -I/usr/include/sqlite"
+ LOOKUP_LIBS="$LOOKUP_LIBS -lsqlite3"
+ fi
+ if [ -n "$LOOKUP_INCLUDE" ]; then
+ sed -i "s:# LOOKUP_INCLUDE=-I /usr/local/ldap/include -I /usr/local/mysql/include -I /usr/local/pgsql/include:LOOKUP_INCLUDE=$LOOKUP_INCLUDE:" \
+ Local/Makefile
+ fi
+
+ if [ -n "$LOOKUP_LIBS" ]; then
+ sed -i "s:# LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq -lgds -lsqlite3:LOOKUP_LIBS=$LOOKUP_LIBS:" \
+ Local/Makefile
+ fi
+
+ sed -i -e 's/^buildname=.*/buildname=exim-gentoo/g' Makefile
+
+ sed -i "s:# LOOKUP_DSEARCH=yes:LOOKUP_DSEARCH=yes:" Local/Makefile
+
+ if use dnsdb; then
+ sed -i "s:# LOOKUP_DNSDB=yes:LOOKUP_DNSDB=yes:" Local/Makefile
+ fi
+ sed -i "s:# LOOKUP_CDB=yes:LOOKUP_CDB=yes:" Local/Makefile
+
+ if use nis; then
+ sed -i "s:# LOOKUP_NIS=yes:LOOKUP_NIS=yes:" Local/Makefile
+ sed -i "s:# LOOKUP_NISPLUS=yes:LOOKUP_NISPLUS=yes:" Local/Makefile
+ fi
+ if use syslog; then
+ sed -i "s:LOG_FILE_PATH=/var/log/exim/exim_%s.log:LOG_FILE_PATH=syslog:" Local/Makefile
+ fi
+ if use domainkeys; then
+ echo "
+ EXPERIMENTAL_DOMAINKEYS=yes
+ CFLAGS += -I/usr/include/libdomainkeys
+ LDFLAGS += -lcrypto -ldomainkeys -L/usr/lib/libdomainkeys" >> Local/Makefile
+ fi
+
+# Use the "native" interface to the DBM library
+ echo "USE_DB=yes" >> "${S}"/Local/Makefile
+}
+
+src_compile() {
+ make || die "make failed"
+}
+
+src_install () {
+ cd "${S}"/build-exim-gentoo
+ exeinto /usr/sbin
+ doexe exim
+ if use X; then
+ doexe eximon.bin
+ doexe eximon
+ fi
+ fperms 4755 /usr/sbin/exim
+
+ dodir /usr/bin /usr/sbin /usr/lib
+ if \[ ! -e /usr/lib/sendmail \];
+ then
+ dosym /usr/sbin/sendmail /usr/lib/sendmail
+ fi
+
+ if use mailwrapper
+ then
+ insinto /etc/mail
+ doins "${FILESDIR}"/mailer.conf
+ else
+ dosym exim /usr/sbin/sendmail
+ dosym /usr/sbin/exim /usr/bin/mailq
+ dosym /usr/sbin/exim /usr/bin/newaliases
+ einfo "The Exim ebuild will no longer touch /usr/bin/mail, so as not to interfere with mailx/nail."
+ dosym exim /usr/sbin/rsmtp
+ dosym exim /usr/sbin/rmail
+ fi
+
+ exeinto /usr/sbin
+ for i in exicyclog exim_dbmbuild exim_dumpdb exim_fixdb exim_lock \
+ exim_tidydb exinext exiwhat exigrep eximstats exiqsumm exiqgrep \
+ convert4r3 convert4r4 exipick
+ do
+ doexe $i
+ done
+
+ dodoc "${S}"/doc/*
+ doman "${S}"/doc/exim.8
+
+ # conf files
+ insinto /etc/exim
+ newins "${S}"/src/configure.default.orig exim.conf.dist
+ if use exiscan-acl; then
+ newins "${S}"/src/configure.default exim.conf.exiscan-acl
+ fi
+ doins "${FILESDIR}"/system_filter.exim
+ doins "${FILESDIR}"/auth_conf.sub
+ if use exiscan; then
+ newins "${S}"/src/configure.default exim.conf.exiscan
+ doins "${FILESDIR}"/exiscan.conf
+ fi
+
+ if use pam
+ then
+ # INSTALL a pam.d file for SMTP AUTH that works with gentoo's pam
+ insinto /etc/pam.d
+ newins "${FILESDIR}"/pam.d-exim exim
+ fi
+
+ newinitd "${FILESDIR}"/exim.rc6 exim
+
+ newconfd "${FILESDIR}"/exim.confd exim
+
+ DIROPTIONS="--mode=0750 --owner=mail --group=mail"
+ dodir /var/log/${PN}
+}
+
+pkg_postinst() {
+ einfo "/etc/exim/system_filter.exim is a sample system_filter."
+ einfo "/etc/exim/auth_conf.sub contains the configuration sub for using smtp auth."
+ einfo "Please create /etc/exim/exim.conf from /etc/exim/exim.conf.dist."
+
+ if ! use mailwrapper && [[ -e /etc/mailer.conf ]]
+ then
+ einfo
+ einfo "Since you emerged $PN without mailwrapper in USE,"
+ einfo "you probably want to 'emerge -C mailwrapper' now."
+ einfo
+ fi
+}
diff --git a/mail-mta/exim/files/auth_conf.sub b/mail-mta/exim/files/auth_conf.sub
new file mode 100644
index 00000000..24434a71
--- /dev/null
+++ b/mail-mta/exim/files/auth_conf.sub
@@ -0,0 +1,25 @@
+######################################################################
+# AUTHENTICATION CONFIGURATION #
+######################################################################
+# If you're using PAM to authenticate, lifes real simple.
+# This plain directive works for nearly everything except windows MUA's the
+# login directive will allow you to authenticate your Outlook 2000 and
+# outlook express clients.
+
+
+
+plain:
+ driver = plaintext
+ public_name = PLAIN
+ server_condition = "${if pam{$2:$3}{1}{0}}"
+ server_set_id = $2
+
+login:
+ driver = plaintext
+ public_name = LOGIN
+ server_prompts = "Username:: : Password::"
+ server_condition = "${if pam{$1:${sg{$2}{:}{::}}}{1}{0}}"
+ server_set_id = $1
+#
+# FIXME
+# Need to add authenticator for SPA!!
diff --git a/mail-mta/exim/files/exim-4.14-tail.patch b/mail-mta/exim/files/exim-4.14-tail.patch
new file mode 100644
index 00000000..481dca9b
--- /dev/null
+++ b/mail-mta/exim/files/exim-4.14-tail.patch
@@ -0,0 +1,11 @@
+--- scripts/Configure-config.h.orig 2003-07-17 18:01:19.000000000 -0400
++++ scripts/Configure-config.h 2003-07-17 18:01:25.000000000 -0400
+@@ -41,7 +41,7 @@
+
+ # Double-check that config.h is complete.
+
+-if [ "`tail -1 config.h`" != "/* End of config.h */" ] ; then
++if [ "`tail -n 1 config.h`" != "/* End of config.h */" ] ; then
+ echo "*** config.h appears to be incomplete"
+ echo "*** unexpected failure in buildconfig program"
+ exit 1
diff --git a/mail-mta/exim/files/exim-4.20-maildir.patch b/mail-mta/exim/files/exim-4.20-maildir.patch
new file mode 100644
index 00000000..3cb198d5
--- /dev/null
+++ b/mail-mta/exim/files/exim-4.20-maildir.patch
@@ -0,0 +1,14 @@
+diff -urN ./exim-4.20.orig/src/configure.default exim-4.20/src/configure.default
+--- ./exim-4.20.orig/src/configure.default 2003-06-27 16:48:22.000000000 -0700
++++ exim-4.20/src/configure.default 2003-06-27 16:52:20.000000000 -0700
+@@ -451,7 +451,9 @@
+
+ local_delivery:
+ driver = appendfile
+- file = /var/mail/$local_part
++# file = /var/mail/$local_part
++ directory = /home/$local_part/.maildir
++ maildir_format
+ delivery_date_add
+ envelope_to_add
+ return_path_add
diff --git a/mail-mta/exim/files/exim-4.30-conf.patch b/mail-mta/exim/files/exim-4.30-conf.patch
new file mode 100644
index 00000000..5d154b96
--- /dev/null
+++ b/mail-mta/exim/files/exim-4.30-conf.patch
@@ -0,0 +1,19 @@
+--- src/configure.default.orig 2004-03-29 22:48:24.000000000 +0100
++++ src/configure.default.orig.patch-01 2004-03-29 22:57:10.000000000 +0100
+@@ -41,6 +41,16 @@
+ # MAIN CONFIGURATION SETTINGS #
+ ######################################################################
+
++# This Sets up the default log location to syslog, specifically to the "mail"
++# Facility. Please note that you may want to change this, as other mail,
++# relatively noisy mail programs also log to the mail facility (eg. courier)
++
++# Note:
++# If exim cannot log to syslog it will try to log to, /var/log/exim/exim_%s.log
++log_file_path=syslog
++
++
++
+ # Specify your host's canonical name here. This should normally be the fully
+ # qualified "official" name of your host. If this option is not set, the
+ # uname() function is called to obtain the name. In many cases this does
diff --git a/mail-mta/exim/files/exim-4.43-r2-localscan_dlopen.patch b/mail-mta/exim/files/exim-4.43-r2-localscan_dlopen.patch
new file mode 100644
index 00000000..146606a1
--- /dev/null
+++ b/mail-mta/exim/files/exim-4.43-r2-localscan_dlopen.patch
@@ -0,0 +1,259 @@
+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,21 @@
+
+
+ #------------------------------------------------------------------------------
++# 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 -ldl
++
++
++#------------------------------------------------------------------------------
+ # 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 },
diff --git a/mail-mta/exim/files/exim-4.69-r1.27021.patch b/mail-mta/exim/files/exim-4.69-r1.27021.patch
new file mode 100644
index 00000000..72b04863
--- /dev/null
+++ b/mail-mta/exim/files/exim-4.69-r1.27021.patch
@@ -0,0 +1,57 @@
+diff -urN exim-4.69.orig/src/configure.default exim-4.69/src/configure.default
+--- exim-4.69.orig/src/configure.default 2008-05-05 10:17:44.000000000 +0100
++++ exim-4.69/src/configure.default 2008-05-05 10:18:26.000000000 +0100
+@@ -592,6 +592,22 @@
+ pipe_transport = address_pipe
+ reply_transport = address_reply
+
++# This router runs procmail if users have a .procmailrc file
++procmail:
++ check_local_user
++ driver = accept
++ transport = procmail_pipe
++ require_files = ${local_part}:+${home}:+${home}/.procmailrc:+/usr/bin/procmail
++ no_verify
++
++# This router runs maildrop if users have a .mailfilter file
++maildrop:
++ check_local_user
++ driver = accept
++ transport = maildrop_pipe
++ require_files = ${local_part}:+${home}:+${home}/.mailfilter:+/usr/bin/maildrop
++ no_verify
++
+
+ # This router matches local user mailboxes. If the router fails, the error
+ # message is "Unknown user".
+@@ -600,7 +616,7 @@
+ # or "+" characters as if the suffixes did not exist, uncomment the two local_
+ # part_suffix options. Then, for example, xxxx-foo@your.domain will be treated
+ # in the same way as xxxx@your.domain by this router.
+-
++m
+ localuser:
+ driver = accept
+ check_local_user
+@@ -676,6 +692,21 @@
+ address_reply:
+ driver = autoreply
+
++# This transport is used for procmail
++procmail_pipe:
++ driver = pipe
++ command = "/usr/bin/procmail -d ${local_part}"
++ return_path_add
++ delivery_date_add
++ envelope_to_add
++
++# This transport is used for courier-maildrop filtering (Maildir filter system)
++maildrop_pipe:
++ driver = pipe
++ command = "/usr/bin/maildrop -d ${local_part}"
++ return_path_add
++ delivery_date_add
++ envelope_to_add
+
+
+ ######################################################################
diff --git a/mail-mta/exim/files/exim-4.69-r1.boolean_redefine_protect.152706.patch b/mail-mta/exim/files/exim-4.69-r1.boolean_redefine_protect.152706.patch
new file mode 100644
index 00000000..eba3cb18
--- /dev/null
+++ b/mail-mta/exim/files/exim-4.69-r1.boolean_redefine_protect.152706.patch
@@ -0,0 +1,21 @@
+diff -urN exim-4.69.orig/src/mytypes.h exim-4.69/src/mytypes.h
+--- exim-4.69.orig/src/mytypes.h 2007-01-08 10:50:18.000000000 +0000
++++ exim-4.69/src/mytypes.h 2008-05-05 10:48:09.000000000 +0100
+@@ -16,9 +16,17 @@
+ #define MYTYPES_H
+
+
++#ifndef FALSE
+ #define FALSE 0
++#endif
++
++#ifndef TRUE
+ #define TRUE 1
++#endif
++
++#ifndef TRUE_UNSET
+ #define TRUE_UNSET 2
++#endif
+
+
+ /* If gcc is being used to compile Exim, we can use its facility for checking
diff --git a/mail-mta/exim/files/exim-BJA-buildconfig-HOSTCC.diff b/mail-mta/exim/files/exim-BJA-buildconfig-HOSTCC.diff
new file mode 100644
index 00000000..ee876516
--- /dev/null
+++ b/mail-mta/exim/files/exim-BJA-buildconfig-HOSTCC.diff
@@ -0,0 +1,13 @@
+--- OS/Makefile-Base.ori 2009-04-17 23:31:07.000000000 +0200
++++ OS/Makefile-Base 2009-04-17 23:31:41.000000000 +0200
+@@ -114,8 +114,8 @@
+
+ # Targets for special-purpose configuration header builders
+ buildconfig: buildconfig.c
+- @echo "$(CC) buildconfig.c"
+- $(FE)$(CC) $(CFLAGS) $(INCLUDE) -o buildconfig buildconfig.c $(LIBS)
++ @echo "$(HOSTCC) buildconfig.c"
++ $(FE)$(HOSTCC) $(HOSTCFLAGS) $(INCLUDE) -o buildconfig buildconfig.c $(LIBS)
+
+
+ # Target for the exicyclog utility script
diff --git a/mail-mta/exim/files/exim.confd b/mail-mta/exim/files/exim.confd
new file mode 100644
index 00000000..a3974d33
--- /dev/null
+++ b/mail-mta/exim/files/exim.confd
@@ -0,0 +1,2 @@
+# Command-line options for running exim
+EXIM_OPTS="-bd -q15m"
diff --git a/mail-mta/exim/files/exim.logrotate b/mail-mta/exim/files/exim.logrotate
new file mode 100644
index 00000000..d33e8dc8
--- /dev/null
+++ b/mail-mta/exim/files/exim.logrotate
@@ -0,0 +1,14 @@
+/var/log/exim/exim*.log {
+ daily
+ missingok
+ rotate 28
+ compress
+ delaycompress
+ notifempty
+ create 640 mail mail
+ sharedscripts
+ postrotate
+ /etc/init.d/exim restart > /dev/null
+ endscript
+}
+
diff --git a/mail-mta/exim/files/exim.rc6 b/mail-mta/exim/files/exim.rc6
new file mode 100644
index 00000000..13b1d66f
--- /dev/null
+++ b/mail-mta/exim/files/exim.rc6
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/mail-mta/exim/files/exim.rc6,v 1.7 2007/05/03 19:57:50 peitolm Exp $
+opts="${opts} reload"
+
+depend() {
+ need logger
+ use antivirus net
+ provide mta
+}
+
+start() {
+ ebegin "Starting exim"
+ start-stop-daemon --start --quiet --exec /usr/sbin/exim --pidfile /var/run/exim.pid -- ${EXIM_OPTS:--bd -q15m}
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping exim"
+ start-stop-daemon --stop --quiet --pidfile /var/run/exim.pid --name exim
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading exim"
+ start-stop-daemon --stop --signal 1 --quiet --pidfile /var/run/exim.pid --name exim
+ eend $?
+}
diff --git a/mail-mta/exim/files/mailer.conf b/mail-mta/exim/files/mailer.conf
new file mode 100644
index 00000000..7dbf79b3
--- /dev/null
+++ b/mail-mta/exim/files/mailer.conf
@@ -0,0 +1,10 @@
+# Execute the "real" sendmail program from exim,
+# named /usr/sbin/exim
+#
+sendmail /usr/sbin/exim
+mailq /usr/sbin/exim
+newaliases /usr/sbin/exim
+rmail /usr/sbin/exim
+send-mail /usr/sbin/exim
+rsmtp /usr/sbin/exim
+mail /usr/sbin/exim
diff --git a/mail-mta/exim/files/pam.d-exim b/mail-mta/exim/files/pam.d-exim
new file mode 100644
index 00000000..9b3a1d21
--- /dev/null
+++ b/mail-mta/exim/files/pam.d-exim
@@ -0,0 +1,3 @@
+# You may need to remove the "md5"
+auth required pam_unix.so shadow md5
+account required pam_unix.so
diff --git a/mail-mta/exim/files/system_filter.exim b/mail-mta/exim/files/system_filter.exim
new file mode 100644
index 00000000..8817cc00
--- /dev/null
+++ b/mail-mta/exim/files/system_filter.exim
@@ -0,0 +1,220 @@
+# Exim filter
+## Version: 0.13
+# $Id: system_filter.exim,v 1.1 2004/05/30 02:35:58 robbat2 Exp $
+
+## If you haven't worked with exim filters before, read
+## the install notes at the end of this file.
+
+#
+# Only run any of this stuff on the first pass through the
+# filter - this is an optomisation for messages that get
+# queued and have several delivery attempts
+#
+# we express this in reverse so we can just bail out
+# on inappropriate messages
+#
+if not first_delivery
+then
+ finish
+endif
+
+# Check for MS buffer overruns as per latest BUGTRAQ.
+# http://www.securityfocus.com/frames/?content=/templates/article.html%3Fid%3D61
+# This could happen in error messages, hence its placing
+# here...
+# We substract the first n characters of the date header
+# and test if its the same as the date header... which
+# is a lousy way of checking if the date is longer than
+# n chars long
+if ${length_80:$header_date:} is not $header_date:
+then
+ fail text "This message has been rejected because it has\n\
+ \tan overlength date field which can be used\n\
+ \tto subvert Microsoft mail programs\n\
+ \tThe following URL has further information\n\
+ \thttp://www.securityfocus.com/frames/?content=/templates/article.html%3Fid%3D61"
+ seen finish
+endif
+
+# This is a nasty compromise.
+# This crud is now being sent with a <> envelope sender, but
+# blocking all error messages that pattern match prevents
+# bounces getting back.... so we fudge it somewhat
+if $header_from: contains "@sexyfun.net"
+then
+ fail text "This message has been rejected since it has\n\
+ \tthe signature of a known virus in the header."
+ seen finish
+endif
+if error_message and $header_from: contains "Mailer-Daemon@"
+then
+ # looks like a real error message - just ignore it
+ finish
+endif
+
+# Look for single part MIME messages with suspicious name extensions
+# Check Content-Type header using quoted filename [content_type_quoted_fn_match]
+if $header_content-type: matches "(?:file)?name=(\"[^\"]+\\\\.(?:vb[se]|ws[fh]|jse?|exe|com|cmd|shs|hta|bat|scr|pif)\")"
+then
+ fail text "This message has been rejected because it has\n\
+ \tpotentially executable content $1\n\
+ \tThis form of attachment has been used by\n\
+ \trecent viruses or other malware.\n\
+ \tIf you meant to send this file then please\n\
+ \tpackage it up as a zip file and resend it."
+ seen finish
+endif
+# same again using unquoted filename [content_type_unquoted_fn_match]
+if $header_content-type: matches "(?:file)?name=([\\\\w.-]+\\\\.(?:vb[se]|ws[fh]|jse?|exe|com|cmd|shs|hta|bat|scr|pif))"
+then
+ fail text "This message has been rejected because it has\n\
+ \tpotentially executable content $1\n\
+ \tThis form of attachment has been used by\n\
+ \trecent viruses or other malware.\n\
+ \tIf you meant to send this file then please\n\
+ \tpackage it up as a zip file and resend it."
+ seen finish
+endif
+
+
+# Attempt to catch embedded VBS attachments
+# in emails. These were used as the basis for
+# the ILOVEYOU virus and its variants
+# Quoted filename - [body_quoted_fn_match]
+if $message_body matches "(?:Content-(?:Type:(?>\\\\s*)[\\\\w-]+/[\\\\w-]+|Disposition:(?>\\\\s*)attachment);(?>\\\\s*)(?:file)?name=|begin(?>\\\\s+)[0-7]{3,4}(?>\\\\s+))(\"[^\"]+\\\\.(?:vb[se]|ws[fh]|jse?|exe|com|cmd|shs|hta|bat|scr|pif)\")[\\\\s;]"
+then
+ fail text "This message has been rejected because it has\n\
+ \ta potentially executable attachment $1\n\
+ \tThis form of attachment has been used by\n\
+ \trecent viruses or other malware.\n\
+ \tIf you meant to send this file then please\n\
+ \tpackage it up as a zip file and resend it."
+ seen finish
+endif
+# same again using unquoted filename [body_unquoted_fn_match]
+if $message_body matches "(?:Content-(?:Type:(?>\\\\s*)[\\\\w-]+/[\\\\w-]+|Disposition:(?>\\\\s*)attachment);(?>\\\\s*)(?:file)?name=|begin(?>\\\\s+)[0-7]{3,4}(?>\\\\s+))([\\\\w.-]+\\\\.(?:vb[se]|ws[fh]|jse?|exe|com|cmd|shs|hta|bat|scr|pif))[\\\\s;]"
+then
+ fail text "This message has been rejected because it has\n\
+ \ta potentially executable attachment $1\n\
+ \tThis form of attachment has been used by\n\
+ \trecent viruses or other malware.\n\
+ \tIf you meant to send this file then please\n\
+ \tpackage it up as a zip file and resend it."
+ seen finish
+endif
+
+#### Version history
+#
+# 0.01 5 May 2000
+# Initial release
+# 0.02 8 May 2000
+# Widened list of content-types accepted, added WSF extension
+# 0.03 8 May 2000
+# Embedded the install notes in for those that don't do manuals
+# 0.04 9 May 2000
+# Check global content-type header. Efficiency mods to REs
+# 0.05 9 May 2000
+# More minor efficiency mods, doc changes
+# 0.06 20 June 2000
+# Added extension handling - thx to Douglas Gray Stephens & Jeff Carnahan
+# 0.07 19 July 2000
+# Latest MS Outhouse bug catching
+# 0.08 19 July 2000
+# Changed trigger length to 80 chars, fixed some spelling
+# 0.09 29 September 2000
+# More extensions... its getting so we should just allow 2 or 3 through
+# 0.10 18 January 2001
+# Removed exclusion for error messages - this is a little nasty
+# since it has other side effects, hence we do still exclude
+# on unix like error messages
+# 0.11 20 March, 2001
+# Added CMD extension, tidied docs slightly, added RCS tag
+# ** Missed changing version number at top of file :-(
+# 0.12 10 May, 2001
+# Added HTA extension
+# 0.13 22 May, 2001
+# Reformatted regexps and code to build them so that they are
+# shorter than the limits on pre exim 3.20 filters. This will
+# make them significantly less efficient, but I am getting so
+# many queries about this that requiring 3.2x appears unsupportable.
+#
+#### Install Notes
+#
+# Exim filters run the exim filter language - a very primitive
+# scripting language - in place of a user .forward file, or on
+# a per system basis (on all messages passing through).
+# The filtering capability is documented in the main set of manuals
+# a copy of which can be found on the exim web site
+# http://www.exim.org/
+#
+# To install, copy the filter file (with appropriate permissions)
+# to /etc/exim/system_filter.exim and add to your exim config file
+# [location is installation depedant - typicaly /etc/exim/config ]
+# at the top the line:-
+# message_filter = /etc/exim/system_filter.exim
+# message_body_visible = 5000
+#
+# You may also want to set the message_filter_user & message_filter_group
+# options, but they default to the standard exim user and so can
+# be left untouched. The other message_filter_* options are only
+# needed if you modify this to do other functions such as deliveries.
+# The main exim documentation is quite thorough and so I see no need
+# to expand it here...
+#
+# Any message that matches the filter will then be bounced.
+# If you wish you can change the error message by editing it
+# in the section above - however be careful you don't break it.
+#
+# After install exim should be restarted - a kill -HUP to the
+# daemon will do this.
+#
+#### LIMITATIONS
+#
+# This filter tries to parse MIME with a regexp... that doesn't
+# work too well. It will also only see the amount of the body
+# specified in message_body_visible
+#
+#### BASIS
+#
+# The regexp that is used to pickup MIME/uuencoded parts is replicated
+# below (in perl format). You need to remember that exim converts
+# newlines to spaces in the message_body variable.
+#
+# (?:Content- # start of content header
+# (?:Type: (?>\s*) # rest of c/t header
+# [\w-]+/[\w-]+ # content-type (any)
+# |Disposition: (?>\s*) # content-disposition hdr
+# attachment) # content-disposition
+# ;(?>\s*) # ; space or newline
+# (?:file)?name= # filename=/name=
+# |begin (?>\s+) [0-7]{3,4} (?>\s+)) # begin octal-mode
+# (\"[^\"]+\. # quoted filename.
+# (?:vb[se] # list of extns
+# |ws[fh]
+# |jse?
+# |exe
+# |com
+# |cmd
+# |shs
+# |hta
+# |bat
+# |scr
+# |pif)
+# \" # end quote
+# |[\w.-]+\. # unquoted filename.ext
+# (?:vb[se] # list of extns
+# |ws[fh]
+# |jse?
+# |exe
+# |com
+# |cmd
+# |shs
+# |hta
+# |bat
+# |scr
+# |pif)
+# ) # end of filename capture
+# [\s;] # trailing ;/space/newline
+#
+#
+### [End]