Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 Oct 2005 13:17:49 +0700
From:      dikshie <dikshie@lapi.itb.ac.id>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/87109: ports/exim update to 4.54 
Message-ID:  <E1EO81l-0002Cc-Rz@linux.ocean.itb.ac.id>
Resent-Message-ID: <200510080620.j986KFDq099807@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         87109
>Category:       ports
>Synopsis:       ports/exim update to 4.54
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Sat Oct 08 06:20:15 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator:     dikshie
>Release:        FreeBSD 5.4-STABLE i386
>Organization:
Institut Teknologi Bandung	
>Environment:
System: FreeBSD linux.ocean.itb.ac.id 5.4-STABLE FreeBSD 5.4-STABLE #0: Fri Jul 29 20:40:44 WIT 2005 root@linux.ocean.itb.ac.id:/usr/obj/usr/src/sys/OCEAN i386


	
>Description:
	Based on exim-announce mailing list:
This release contains a small number of fixes.

As usual, all changes are in the doc/ChangeLog. See also the README.UPDATING
file for changes that might impact on some installations. The number of changes
is so small that it is possible to quote the ChangeLog in full here:

PH/01 The ${base62: operator adjusted itself to base 36 when BASE_62 was
      set to 36 (for Darwin and Cygwin), but the ${base62d: operator did not.
      It now does.

PH/02 Two minor problems detected in Cygwin: the os.{c,h} files had lost */ on
      the CVS lines, and there was a missing #if HAVE_IPV6 in host.c.

PH/03 Typo: missing ".o" in src/pcre/Makefile.

PH/04 Tighten up "personal" tests: Instead of testing for any "List-"
      header line, restrict the check to what is listed in RFCs 2369 and 2929.
      Also, for "Auto-Submitted", treat anything other than "no" as
      non-personal, in accordance with RFC 3834. (Previously it treated
      anything starting "auto-" as non-personal.)
TF/01 The control=submission/name=... option had a problem with syntax
      errors if the name included a slash character. The /name= option
      now slurps the rest of the string, so it can include any characters
      but it must come last in the list of options (after /sender_retain
      or /domain=).

PH/05 Some modifications to the interface to the fake nameserver for the new
      testing suite.

PLEASE NOTE change TF/01 if you are using the /name= option of "control =
submission". Make sure your configuration has it last.

The manual has NOT been updated for this release. However, the versions of
spec.txt and filter.txt and the exim.8 man page that are included in the doc
directory have been generated via the new mechanism that uses DocBook XML as an
intermediate standard format. The contents of these files should be unchanged
from 4.50, but the layout and formatting is different. Please report any typos
or formatting problems.


>How-To-Repeat:
	
>Fix:

	

--- exim.shar begins here ---
# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	exim
#	exim/files
#	exim/files/150.exim-tidydb.sh
#	exim/files/460.exim-mail-rejects.sh
#	exim/files/POST-INSTALL-NOTES
#	exim/files/POST-INSTALL-NOTES.clamd
#	exim/files/exim.sh
#	exim/files/patch-OS::Makefile-FreeBSD
#	exim/files/patch-doc::spec.txt
#	exim/files/patch-scripts::exim_install
#	exim/files/patch-src::EDITME
#	exim/files/patch-src::configure.default
#	exim/options
#	exim/Makefile
#	exim/distinfo
#	exim/pkg-descr
#	exim/pkg-install
#	exim/pkg-message
#	exim/pkg-plist
#	exim/Makefile.orig
#	exim/distinfo.orig
#	exim/Makefile.diff
#	exim/distinfo.diff
#
echo c - exim
mkdir -p exim > /dev/null 2>&1
echo c - exim/files
mkdir -p exim/files > /dev/null 2>&1
echo x - exim/files/150.exim-tidydb.sh
sed 's/^X//' >exim/files/150.exim-tidydb.sh << 'END-of-exim/files/150.exim-tidydb.sh'
X#!/bin/sh
X#
X# $FreeBSD: ports/mail/exim/files/150.exim-tidydb.sh,v 1.2 2004/10/11 23:48:25 eik Exp $
X#
X# Exim hints database maintenance
X# 
X#   contributed by: Oliver Eikemeier <eikemeier@fillmore-labs.com>
X#
X
X# If there is a global system configuration file, suck it in.
X#
Xif [ -r /etc/defaults/periodic.conf ]; then
X    . /etc/defaults/periodic.conf
X    source_periodic_confs
Xfi
X
X: ${exim_tidydb_enable="YES"}
X: ${exim_tidydb="%%PREFIX%%/sbin/exim_tidydb"}
X: ${exim_dbdir="/var/spool/exim"}
X
Xcase "$exim_tidydb_enable" in
X    [Yy][Ee][Ss])
X	echo ""
X	echo "Tidying Exim hints databases:"
X	for db in "$exim_dbdir"/db/*.lockfile; do
X	    [ "$db" = "$exim_dbdir/db/*.lockfile" ] && continue
X	    echo
X	    "$exim_tidydb" "$exim_dbdir" `basename "$db" .lockfile`
X	done
X	rc=1;;
X
X    *)  rc=0;;
Xesac
X
Xexit $rc
END-of-exim/files/150.exim-tidydb.sh
echo x - exim/files/460.exim-mail-rejects.sh
sed 's/^X//' >exim/files/460.exim-mail-rejects.sh << 'END-of-exim/files/460.exim-mail-rejects.sh'
X#!/bin/sh
X#
X# $FreeBSD: ports/mail/exim/files/460.exim-mail-rejects.sh,v 1.3 2004/10/11 23:48:25 eik Exp $
X#
X# Check for rejected mail
X# Log lines that end with ' : IGNORE' will not be reported
X# 
X#   contributed by: Oliver Eikemeier <eikemeier@fillmore-labs.com>
X#
X
X# If there is a global system configuration file, suck it in.
X#
Xif [ -r /etc/defaults/periodic.conf ]
Xthen
X    . /etc/defaults/periodic.conf
X    source_periodic_confs
Xfi
X
X: ${exim_status_mail_rejects_enable="YES"}
X: ${exim_status_mail_rejects_logs=2}
X: ${exim_rejectlog="%%LOGDIR%%/rejectlog"}
X
Xcase "$exim_status_mail_rejects_enable" in
X    [Yy][Ee][Ss])
X	if [ ! -d `dirname "$exim_rejectlog"` ]
X	then
X	    echo '$exim_status_mail_rejects_enable is set but' \
X		"`dirname "$exim_rejectlog"` doesn't exist"
X	    rc=2
X	elif [ "$exim_status_mail_rejects_logs" -le 0 ]
X	then
X	    echo '$exim_status_mail_rejects_enable is set but' \
X		'$exim_status_mail_rejects_logs is not greater than zero'
X	    rc=2
X	else
X	    echo
X	    echo "Checking for rejected mail:"
X
X	    start=`date -v-1d '+%Y-%m-%d'`
X	    n=$(($exim_status_mail_rejects_logs - 2))
X	    rc=$({
X		while [ $n -ge 0 ]
X		do
X		    if [ -f "$exim_rejectlog.$n" ]
X		    then
X			cat "$exim_rejectlog.$n"
X		    elif [ -f "$exim_rejectlog.$n.gz" ]
X		    then
X			zcat -fc "$exim_rejectlog.$n.gz"
X		    elif [ -f "$exim_rejectlog.$n.bz2" ]
X		    then
X			bzcat -fc "$exim_rejectlog.$n.bz2"
X		    fi
X		    n=$(($n - 1))
X		done
X		if [ -f "$exim_rejectlog" ]
X		then
X		    cat "$exim_rejectlog"
X		fi
X	    } |
X		grep -e "^$start" | grep -v ' : IGNORE$' | tee /dev/stderr | wc -l)
X	    [ $rc -gt 0 ] && rc=1
X	fi;;
X
X    *)  rc=0;;
Xesac
X
Xexit $rc
END-of-exim/files/460.exim-mail-rejects.sh
echo x - exim/files/POST-INSTALL-NOTES
sed 's/^X//' >exim/files/POST-INSTALL-NOTES << 'END-of-exim/files/POST-INSTALL-NOTES'
XThe following documentation has been installed:
X
X  man exim                              -> Exim options (command line)
X  %%DOCSDIR%%/spec.txt    -> Exim Specification (User Guide)
X  %%DOCSDIR%%/filter.txt  -> Exim Filter Specification (for end-users)
X
XPostscript, PDF, HTML and texinfo versions of these documents can be
Xinstalled via one of the mail/exim-doc-* ports.
X
XAn online version as well as a comprehensive FAQ and a mailing list
Xarchive is available at:
X
X  http://www.exim.org/
X
XDescriptions of new features not available it the manual, and a listing
Xof all changes, including bug fixes are documented in:
X
X  %%DOCSDIR%%/NewStuff
X  %%DOCSDIR%%/ChangeLog
X
XTo use Exim instead of sendmail on startup:
X
X*) Clear the sendmail queue and stop the sendmail daemon.
X*) Adjust mailer.conf(5) as appropriate.
X*) Set the 'sendmail_enable' rc.conf(5) variable to 'NONE'.
X*) Set the 'daily_status_include_submit_mailq' and
X   'daily_clean_hoststat_enable' periodic.conf(5)
X   variables to 'NO'.
X*) Consider setting 'daily_queuerun_enable' and
X   'daily_submit_queuerun' to "NO" in periodic.conf(5),
X   if you intend to manage queue runners / deliveries closely.
X*) Set the 'exim_enable' rc.conf(5) variable to 'YES'.
X*) Start exim with '%%RC_DIR%%/exim%%RC_SUFX%% start'.
X
XYou may also want to configure newsyslog(8) to rotate Exim log files:
X
X%%LOGDIR%%/mainlog	mailnull:mail 640 7 * @T00 ZN
X%%LOGDIR%%/rejectlog	mailnull:mail 640 7 * @T00 ZN
X
XNOTE TO OPERATORS UPGRADING FROM exim-3.xx:
X
XThere was a big reworking of the way mail routing works for release
X4.00. Previously used "directors" were abolished, and all routing is
Xnow done by routers. Policy controls for incoming mail are now done by
XAccess Control Lists instead of separate options. All this means that
Xpre-4.00 configuration files have to be massively converted. If you
Xare coming from a 3.xx release, please read the document in the file
X%%DOCSDIR%%/Exim4.upgrade, and allow some time to complete
Xthe upgrade.
X
XAdditional scripts to help upgrading are installed in:
X
X  %%EXAMPLESDIR%%
END-of-exim/files/POST-INSTALL-NOTES
echo x - exim/files/POST-INSTALL-NOTES.clamd
sed 's/^X//' >exim/files/POST-INSTALL-NOTES.clamd << 'END-of-exim/files/POST-INSTALL-NOTES.clamd'
XThe following steps will enable clamd malware scanning using exiscan ACLs.
XIt is important to follow them in sequence.
X
X*  Install security/clamav from the ports tree.
X
X*  Confirm that user clamav was added to the mail group in /etc/group.
X
X*  Confirm that /var/log/clamav and /var/run/clamav exist and are owned
X   by clamav:clamav.
X
X*  In Exim's configure file, set av_scanner=clamd:/var/run/clamav/clamd
X
X*  Adjust the exiscan ACLs in Exim's configure file.  Make sure you use
X   the demime option with the malware check, e.g.:
X
X   deny message = This message contains malware ($malware_name)
X	demime  = *
X	malware = *
X
X*  Edit clamav.conf as follows:
X
X	LogFile /var/log/clamav/clamd.log
X	PidFile /var/run/clamav/clamd.pid
X	LocalSocket /var/run/clamav/clamd
X	User clamav
X	AllowSupplementaryGroups
X	ScanArchive
X	ScanMail
X
X   You may wish to make other changes as well.
X
X*  Make sure clamd_enable="YES" has been added to /etc/rc.conf; this is
X   required by the clamav port's startup script,
X   %%RC_DIR%%/clamd%%RC_SUFX%% .
X
X*  Run freshclam.
X
X*  Add a cron job that runs freshclam --daemon-notify --quiet at least
X   once a day.
X
X*  Start clamd with %%RC_DIR%%/clamd%%RC_SUFX%% start .
X
X*  Start Exim with %%RC_DIR%%/exim%%RC_SUFX%% start .
X
XSheldon Hearn <sheldonh@FreeBSD.org>
X
END-of-exim/files/POST-INSTALL-NOTES.clamd
echo x - exim/files/exim.sh
sed 's/^X//' >exim/files/exim.sh << 'END-of-exim/files/exim.sh'
X#!/bin/sh
X#
X# $FreeBSD: ports/mail/exim/files/exim.sh,v 1.8 2004/10/11 23:48:25 eik Exp $
X#
X
X# PROVIDE: mail
X# REQUIRE: LOGIN
X# KEYWORD: FreeBSD shutdown
X#	we make mail start late, so that things like .forward's are not
X#	processed until the system is fully operational
X
X#
X# Add the following lines to /etc/rc.conf to enable exim:
X#
X#exim_enable="YES"
X#
X# See exim(8) for flags
X#
X
X. %%RC_SUBR%%
X
Xname=exim
Xrcvar=`set_rcvar`
X
Xcommand=%%PREFIX%%/sbin/exim
Xpidfile=/var/run/exim.pid
Xrequired_dirs=%%LOGDIR%%
Xrequired_files=%%PREFIX%%/etc/exim/configure
X
Xstart_precmd=start_precmd
Xstop_postcmd=stop_postcmd
X
Xextra_commands="reload"
X
Xstart_precmd()
X{
X  case $sendmail_enable in
X  [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
X    warn "sendmail_enable should be set to NONE"
X    ;;
X  [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0)
X    case $sendmail_submit_enable in
X    [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1)
X      warn "sendmail_submit_enable should be set to NO"
X      ;;
X    esac
X    ;;
X  [Nn][Oo][Nn][Ee])
X    ;;
X  esac
X}
X
Xstop_postcmd()
X{
X  rm -f $pidfile
X}
X
X# read settings, set default values
Xload_rc_config $name
X: ${exim_enable="NO"}
X: ${exim_flags="-bd -q30m"}
X
Xrun_rc_command "$1"
END-of-exim/files/exim.sh
echo x - exim/files/patch-OS::Makefile-FreeBSD
sed 's/^X//' >exim/files/patch-OS::Makefile-FreeBSD << 'END-of-exim/files/patch-OS::Makefile-FreeBSD'
X
X$FreeBSD: ports/mail/exim/files/patch-OS::Makefile-FreeBSD,v 1.7 2005/07/27 09:17:29 krion Exp $
X
X--- OS/Makefile-FreeBSD.orig
X+++ OS/Makefile-FreeBSD
X@@ -7,6 +7,7 @@
X PORTOBJFORMAT!= test -x /usr/bin/objformat && /usr/bin/objformat || echo aout
X 
X CHOWN_COMMAND=/usr/sbin/chown
X+STRIP_COMMAND=/usr/bin/strip
X 
X HAVE_SA_LEN=YES
X 
END-of-exim/files/patch-OS::Makefile-FreeBSD
echo x - exim/files/patch-doc::spec.txt
sed 's/^X//' >exim/files/patch-doc::spec.txt << 'END-of-exim/files/patch-doc::spec.txt'
X
X$FreeBSD: ports/mail/exim/files/patch-doc::spec.txt,v 1.4 2005/07/27 09:17:29 krion Exp $
X
X--- doc/spec.txt.orig
X+++ doc/spec.txt
X@@ -15622,6 +15622,19 @@
X message_prefix = "\1\1\1\1\n"
X message_suffix = "\1\1\1\1\n"
X 
X+However, many clients require that the certificate presented by Exim be a user
X+(also called "leaf" or "site") certificate, and not a self-signed certificate.
X+In this case, the self-signed certificate described above must be installed on
X+the client host as a trusted root certification authority and the certificate
X+used by Exim must be a user certificate signed with that self-signed
X+certificate.
X+
X+For information on creating self-signed CA certificates and using them to sign
X+user certificates, see the "General implementation overview" chapter of the
X+Open-source PKI Book, available online at:
X+
X+     http://ospkibook.sourceforge.net/
X+
X +-----------------------------------------------------------------------------+
X |create_directory     |  Use: appendfile  |  Type: boolean  |    Default: true|
X +-----------------------------------------------------------------------------+
END-of-exim/files/patch-doc::spec.txt
echo x - exim/files/patch-scripts::exim_install
sed 's/^X//' >exim/files/patch-scripts::exim_install << 'END-of-exim/files/patch-scripts::exim_install'
X--- scripts/exim_install.orig	Wed May  5 12:08:35 2004
X+++ scripts/exim_install	Wed May  5 15:07:53 2004
X@@ -357,9 +357,8 @@
X   echo $com ' ' ${CONFIGURE_FILE}
X   echo $com Therefore, skipping automatic installation.
X 
X-elif [ ! -f ${CONFIGURE_FILE} ]; then
X-  echo $com Installing default configuration in ${CONFIGURE_FILE}
X-  echo $com because there is no existing configuration file.
X+else
X+  echo $com Installing default configuration in ${CONFIGURE_FILE}.default
X   if [ "${SYSTEM_ALIASES_FILE}" = "" ] ; then
X     SYSTEM_ALIASES_FILE=/etc/aliases
X     echo $com This configuration has system aliases in ${SYSTEM_ALIASES_FILE}.
X@@ -370,7 +369,7 @@
X 
X   echo sed -e '\\'
X   echo "  \"/SYSTEM_ALIASES_FILE/ s'SYSTEM_ALIASES_FILE'${ACTUAL_SYSTEM_ALIASES_FILE}'\"" '\\'
X-  echo "  ../src/configure.default > \${CONFIGURE_FILE}"
X+  echo "  ../src/configure.default > \${CONFIGURE_FILE}.default"
X 
X   # I can't find a way of writing this using the ${real} feature because
X   # it seems that the output redirection always happens, even when -n was
X@@ -379,7 +378,7 @@
X   if [ "$real" = "" ] ; then
X     sed -e \
X       "/SYSTEM_ALIASES_FILE/ s'SYSTEM_ALIASES_FILE'${ACTUAL_SYSTEM_ALIASES_FILE}'" \
X-      ../src/configure.default > ${CONFIGURE_FILE}
X+      ../src/configure.default > ${CONFIGURE_FILE}.default
X   else
X     true
X   fi
X@@ -399,8 +398,6 @@
X     ${real} ${CP} ../src/aliases.default ${SYSTEM_ALIASES_FILE}
X   fi
X 
X-else
X-  echo $com Configuration file ${CONFIGURE_FILE} already exists
X fi
X 
X # Install info files if the directory is defined and the Texinfo
END-of-exim/files/patch-scripts::exim_install
echo x - exim/files/patch-src::EDITME
sed 's/^X//' >exim/files/patch-src::EDITME << 'END-of-exim/files/patch-src::EDITME'
X
X$FreeBSD: ports/mail/exim/files/patch-src::EDITME,v 1.23 2005/09/28 10:12:53 krion Exp $
X
X--- src/EDITME.orig
X+++ src/EDITME
X@@ -100,7 +100,7 @@
X # /usr/local/sbin. The installation script will try to create this directory,
X # and any superior directories, if they do not exist.
X 
X-BIN_DIRECTORY=/usr/exim/bin
X+BIN_DIRECTORY=XX_PREFIX_XX/sbin
X 
X 
X #------------------------------------------------------------------------------
X@@ -116,7 +116,7 @@
X # don't exist. It will also install a default runtime configuration if this
X # file does not exist.
X 
X-CONFIGURE_FILE=/usr/exim/configure
X+CONFIGURE_FILE=XX_PREFIX_XX/etc/exim/configure
X 
X # It is possible to specify a colon-separated list of files for CONFIGURE_FILE.
X # In this case, Exim will use the first of them that exists when it is run.
X@@ -134,7 +134,7 @@
X # owner of a local mailbox.) Specifying these values as root is very strongly
X # discouraged.
X 
X-EXIM_USER=
X+EXIM_USER=ref:XX_EXIM_USER_XX
X 
X # If you specify EXIM_USER as a name, this is looked up at build time, and the
X # uid number is built into the binary. However, you can specify that this
X@@ -155,7 +155,7 @@
X # for EXIM_USER (e.g. EXIM_USER=exim), you don't need to set EXIM_GROUP unless
X # you want to use a group other than the default group for the given user.
X 
X-# EXIM_GROUP=
X+EXIM_GROUP=XX_EXIM_GROUP_XX
X 
X # Many sites define a user called "exim", with an appropriate default group,
X # and use
X@@ -295,6 +295,7 @@
X # LDAP_LIB_TYPE=OPENLDAP2
X # LDAP_LIB_TYPE=NETSCAPE
X # LDAP_LIB_TYPE=SOLARIS
X+LDAP_LIB_TYPE=XX_LDAP_TYPE_XX
X 
X # If you don't set any of these, Exim assumes the original University of
X # Michigan (OpenLDAP 1) library.
X@@ -308,8 +309,10 @@
X # specified in INCLUDE. The settings below are just examples; -lpq is for
X # PostgreSQL, -lgds is for Interbase.
X 
X-# LOOKUP_INCLUDE=-I /usr/local/ldap/include -I /usr/local/mysql/include -I /usr/local/pgsql/include
X-# LOOKUP_LIBS=-L/usr/local/lib -lldap -llber -lmysqlclient -lpq -lgds
X+INCLUDE=-IXX_LOCALBASE_XX/include XX_DB_INCLUDES_XX
X+LOOKUP_INCLUDE=XX_MYSQL_INCLUDE_XX XX_PGSQL_INCLUDE_XX XX_LDAP_INCLUDE_XX
X+LOOKUP_LIBS=XX_MYSQL_LIBS_XX XX_PGSQL_LIBS_XX XX_LDAP_LIBS_XX
X+DBMLIB=XX_DB_LIBS_XX
X 
X #------------------------------------------------------------------------------
X # Compiling the Exim monitor: If you want to compile the Exim monitor, a
X@@ -319,7 +322,7 @@
X # files are defaulted in the OS/Makefile-Default file, but can be overridden in
X # local OS-specific make files.
X 
X-EXIM_MONITOR=eximon.bin
X+# EXIM_MONITOR=eximon.bin
X 
X #------------------------------------------------------------------------------
X # Compiling Exim with content scanning support: If you want to compile Exim
X@@ -438,6 +441,7 @@
X 
X # ALT_CONFIG_PREFIX=/some/directory/
X # ALT_CONFIG_PREFIX=/some/directory/exim.conf-
X+ALT_CONFIG_PREFIX=XX_PREFIX_XX/etc/exim/
X 
X 
X #------------------------------------------------------------------------------
X@@ -491,7 +495,7 @@
X # one that is set in the headers_charset option. The default setting is
X # defined by this setting:
X 
X-HEADERS_CHARSET="ISO-8859-1"
X+HEADERS_CHARSET="XX_DEFAULT_CHARSET_XX"
X 
X # If you are going to make use of $header_xxx expansions in your configuration
X # file, or if your users are going to use them in filter files, and the normal
X@@ -563,7 +567,7 @@
X # SUPPORT_TLS=yes
X 
X # Uncomment this setting if you are using OpenSSL
X-# TLS_LIBS=-lssl -lcrypto
X+TLS_LIBS=-lssl -lcrypto
X 
X # Uncomment these settings if you are using GnuTLS
X # USE_GNUTLS=yes
X@@ -614,7 +618,7 @@
X # Once you have done this, "make install" will build the info files and
X # install them in the directory you have defined.
X 
X-# INFO_DIRECTORY=/usr/share/info
X+INFO_DIRECTORY=XX_PREFIX_XX/info
X 
X 
X #------------------------------------------------------------------------------
X@@ -627,7 +631,7 @@
X # %s. This will be replaced by one of the strings "main", "panic", or "reject"
X # to form the final file names. Some installations may want something like this:
X 
X-# LOG_FILE_PATH=/var/log/exim_%slog
X+LOG_FILE_PATH=XX_LOG_FILE_PATH_XX
X 
X # which results in files with names /var/log/exim_mainlog, etc. The directory
X # in which the log files are placed must exist; Exim does not try to create
X@@ -795,13 +799,21 @@
X # library for TCP wrappers, so you probably need something like this:
X #
X # USE_TCP_WRAPPERS=yes
X-# CFLAGS=-O -I/usr/local/include
X-# EXTRALIBS_EXIM=-L/usr/local/lib -lwrap
X-#
X+CFLAGS=XX_CFLAGS_XX XX_SPF_FLAGS_XX XX_SRS_FLAGS_XX XX_SQLITE_FLAGS_XX
X+EXTRALIBS=XX_TCP_WRAPPERS_LIBS_XX XX_PAM_LIBS_XX XX_ICONV_LIBS_XX XX_SPF_LIBS_XX XX_SRS_LIBS_XX XX_RADIUS_LIBS_XX XX_SQLITE_LIBS_XX
X+
X # but of course there may need to be other things in CFLAGS and EXTRALIBS_EXIM
X # as well.
X 
X 
X+# IPv6 is coming. Exim has experimental support that has been tried out on
X+# one or two OS. See the file README.IPV6 for the current status of this
X+# support. Do not set this option unless you are working on IPv6 and know
X+# what you are doing.
X+
X+# HAVE_IPV6=YES
X+
X+
X #------------------------------------------------------------------------------
X # The default action of the exim_install script (which is run by "make
X # install") is to install the Exim binary with a unique name such as
X@@ -1066,7 +1078,7 @@
X # (process id) to a file so that it can easily be identified. The path of the
X # file can be specified here. Some installations may want something like this:
X 
X-# PID_FILE_PATH=/var/lock/exim.pid
X+PID_FILE_PATH=/var/run/exim.pid
X 
X # If PID_FILE_PATH is not defined, Exim writes a file in its spool directory
X # using the name "exim-daemon.pid".
END-of-exim/files/patch-src::EDITME
echo x - exim/files/patch-src::configure.default
sed 's/^X//' >exim/files/patch-src::configure.default << 'END-of-exim/files/patch-src::configure.default'
X--- src/configure.default.orig	Wed May  5 12:08:35 2004
X+++ src/configure.default	Wed May  5 15:09:40 2004
X@@ -56,7 +56,7 @@
X 
X domainlist local_domains = @
X domainlist relay_to_domains =
X-hostlist   relay_from_hosts = 127.0.0.1
X+hostlist   relay_from_hosts = localhost
X 
X # Most straightforward access control requirements can be obtained by
X # appropriate settings of the above options. In more complicated situations, you
X@@ -153,6 +153,8 @@
X # as if it were a normal user. This isn't usually a problem, as most sites have
X # an alias for root that redirects such mail to a human administrator.
X 
X+exim_user = XX_EXIM_USER_XX
X+exim_group = XX_EXIM_GROUP_XX
X never_users = root
X 
X 
X@@ -412,7 +414,8 @@
X   allow_fail
X   allow_defer
X   data = ${lookup{$local_part}lsearch{SYSTEM_ALIASES_FILE}}
X-# user = exim
X+  user = XX_EXIM_USER_XX
X+  group = XX_EXIM_GROUP_XX
X   file_transport = address_file
X   pipe_transport = address_pipe
X 
X@@ -454,6 +457,7 @@
X   file_transport = address_file
X   pipe_transport = address_pipe
X   reply_transport = address_reply
X+  condition = ${if exists{$home/.forward} {yes} {no} }
X 
X 
X # This router matches local user mailboxes. If the router fails, the error
X@@ -506,8 +510,10 @@
X   delivery_date_add
X   envelope_to_add
X   return_path_add
X-# group = mail
X-# mode = 0660
X+  group = XX_EXIM_GROUP_XX
X+  user = $local_part
X+  mode = 0660
X+  no_mode_fail_narrower
X 
X 
X # This transport is used for handling pipe deliveries generated by alias or
END-of-exim/files/patch-src::configure.default
echo x - exim/options
sed 's/^X//' >exim/options << 'END-of-exim/options'
X# $FreeBSD: ports/mail/exim/options,v 1.6 2005/09/28 10:12:53 krion Exp $
X#
X# Configurable options for mail/exim. Note that the options listed
X# here are the defaults, so if you want to change them you have to
X# specify the opposite version in the command line, e.g.
X# `make WITH_CONTENT_SCAN=yes WITH_SASLAUTHD=yes install'
X#
X# `make WITHOUT_CONTENT_SCAN=yes WITHOUT_SASLAUTHD=no' will not give the expected results.
X
X#WITHOUT_CONTENT_SCAN
X# Exim will be built without exiscan email content scanner support.
X
X#WITH_OLD_DEMIME
X# Enable old, deprecated "demime" ACL condition, in addition
X# to all the other content-scanning features.
X
X#WITHOUT_SA_EXIM
X# SA-Exim support (<http://marc.merlins.org/linux/exim/sa.html>)
X
X#WITH_BDB_VER=		1, 4, 41, 42, 43
X# BDB_VER is the version of the Berkeley DB library to use, and
X# may be 1, which corresponds to version 1.85 in the base system, 4,
X# 41, 42 or 43 which depends on the databases/db4[123] ports.
X
X#WITH_DEFAULT_CHARSET=	ISO-8859-1, *
X# When Exim is decoding MIME "words" in header lines it converts any foreign
X# character sets to the one that is set in the headers_charset option.
X# The default setting is defined by this setting
X
X#WITH_PERL
X# Embedded Perl interpreter, which allows Perl subroutines to
X# be called during string expansion.
X
X#! lookup types
X
X#WITHOUT_OPENLDAP
X#WITH_OPENLDAP_VER=	auto, 21, 22, 23
X# Link against libldap.
X# Define OPENLDAP_VER to specify a particular version of
X# OpenLDAP to use. Valid values are currently auto, 21, 22 and 23.
X# The use of `auto' is recommended to avoid conflicting with
X# other ports that use the OpenLDAP client libraries.
X# Exim also supports NETSCAPE and SOLARIS7 lookup types, but no
X# client libraries exist for these in the ports tree.
X
X#WITHOUT_MYSQL
X#WITH_MYSQL_VER=	auto, 323, 40, 41, 50
X#WITHOUT_PGSQL
X#WITH_POSTGRESQL_PORT=	auto, databases/postgresql7, databases/postgresql73, databases/postgresql-devel, databases/pgcluster, *
X# Link against libmysqlclient and libpq respectively.
X# Define MYSQL_VER to specify a particular version of MySQL to
X# use.  Valid values are auto, 323, 40, 41 and 50.
X# The use of `auto' is recommended to avoid conflicting with
X# other ports linking against MySQL client libraries.
X
X#WITHOUT_SQLITE
X# Link against libsqlite3 to support sqlite lookups.
X
X#WITH_CDB
X#WITH_DNSDB
X#WITH_DSEARCH
X#WITH_LSEARCH
X#WITH_NIS
X#WITH_PASSWD
X# Support for CDB-style, DNS-style, directory-list, wildcarded-file, NIS
X# and /etc/passwd lookups respectively.
X
X#! authentication mechanisms
X
X#WITH_PAM
X#WITH_AUTH_CRAM_MD5
X#WITH_AUTH_PLAINTEXT
X#WITH_AUTH_SPA
X# Built-in support for the PAM, RFC 2195, RFC 2595 and
X# Microsoft "Secure Password Authentication" authentication mechanisms,
X# used for SMTP AUTH.
X
X#WITHOUT_AUTH_SASL
X# Enable the use of the Cyrus SASL authentication library.
X
X#WITHOUT_SASLAUTHD
X# Enable the use of the Cyrus SASL authentication daemon.
X
X#WITHOUT_PWCHECK
X# As an alternative to SASLAUTHD, you can define PWCHECK to link
X# against libsasl for SMTP AUTH authentication via the Cyrus SASL
X# pwcheck daemon.
X# THIS MECHANISM IS DEPRECATED!
X
X#WITHOUT_AUTH_RADIUS
X# Link against a radius library o support radius (RFC 2865) authentication.
X#WITH_RADIUS_TYPE=	RADLIB, RADIUSCLIENT
X# Choose between the system library (RADLIB) or port net/freeradius (RADIUSCLIENT).
X
X#! optional features
X
X#WITH_TLS
X# Link against OpenSSL; required for STARTTLS.
X
X#WITH_IPV6
X# Enable IPv6 support in the compiled exim binary.  Exim compiled
X# with IPv6 support will still operate on systems that do not have
X# IPv6 kernel support, so this should not be necessary.
X
X#WITH_MAILDIR
X#WITH_MAILSTORE
X#WITH_MBX
X# Built-in support for additional mailbox formats.
X
X#WITH_LMTP
X# Support for the LMTP (RFC 2033 "SMTP over command pipe") transport.
X
X#WITHOUT_SPF
X# Enable Sender Policy Framework (SPF) checking in exiscan-acl
X
X#WITHOUT_SRS
X# Enable Sender Rewriting Scheme (SRS), a part of the SPF/SRS protocol pair.
X# SRS support depends on exiscan.
X# .
X# Additional options:
X# srs_alwaysrewrite   (boolean)      Rewrite for all domains
X# srs_hashlength      (integer)      Hash length to generate
X# srs_hashmin         (integer)      Hash length to check
X# srs_maxage          (integer)      Max age for SRS address
X# srs_secrets         (string list)  List of SRS secrets
X# srs_separator       (string*)      Separator for SRS addresses
X#
X# Additional expansion variables:
X# srs_orig_recipient  (string*)     SRS original recipient
X# srs_orig_sender     (string*)     SRS original sender
X# srs_recipient       (string*)     SRS recipient
X# srs_status          (string*)     SRS status
X
X#WITHOUT_TCP_WRAPPERS
X# Link against libwrap to support /etc/hosts.allow access control.
X
X#WITHOUT_EXIMON
X# The eximon monitor, which requires X, will be made a dependency.  
X# Note that using EXIMON will cause XFree86 to be installed
X# if it is not present.
X
X#WITHOUT_ALT_CONFIG_PREFIX
X# Allow alternate configuration files not only in ${PREFIX}/etc/exim
X
X#WITHOUT_WISHLIST
X# Include the unsupported patches in ${PATCHDIR}/wishlist-*.patch
X
X#WITHOUT_RCORDER
X# FreeBSD 5.x only: Install the rc.subr(8) script to /etc/rc.d to participate
X# in rcorder(8).
X
X#WITHOUT_READLINE
X# readline(3) library for the test expansion option.
X
X#WITH_SUID
X# Install the exim binary suid root (usually required)
X
X#WITH_DAEMON
X# Don't install scripts to run exim as a daemon
X
X#WITH_ICONV
X# Link with libiconv to enable header charset conversion
X
X## AUTOMATICALLY GENERATED FILE - DO NOT CHANGE ANYTHING BELOW THIS LINE ##
X# use `make config' to edit the local configuration
X# use `make makeconfig' to edit the defaults (MAINTAINER only)
X
X_OPTIONSNG_READ?=default
X.ifndef WITH_CONTENT_SCAN
XWITHOUT_CONTENT_SCAN?=yes
X.endif
X.ifndef WITHOUT_OLD_DEMIME
XWITH_OLD_DEMIME?=yes
X.endif
X.ifndef WITH_SA_EXIM
XWITHOUT_SA_EXIM?=yes
X.endif
XWITH_BDB_VER?=1
XWITH_DEFAULT_CHARSET?=ISO-8859-1
X.ifndef WITHOUT_PERL
XWITH_PERL?=yes
X.endif
X.ifndef WITH_OPENLDAP
XWITHOUT_OPENLDAP?=yes
X.endif
XWITH_OPENLDAP_VER?=auto
X.ifndef WITH_MYSQL
XWITHOUT_MYSQL?=yes
X.endif
XWITH_MYSQL_VER?=auto
X.ifndef WITH_PGSQL
XWITHOUT_PGSQL?=yes
X.endif
XWITH_POSTGRESQL_PORT?=auto
X.ifndef WITHOUT_CDB
XWITH_CDB?=yes
X.endif
X.ifndef WITH_SQLITE
XWITHOUT_SQLITE?=yes
X.endif
X.ifndef WITHOUT_DNSDB
XWITH_DNSDB?=yes
X.endif
X.ifndef WITHOUT_DSEARCH
XWITH_DSEARCH?=yes
X.endif
X.ifndef WITHOUT_LSEARCH
XWITH_LSEARCH?=yes
X.endif
X.ifndef WITHOUT_NIS
XWITH_NIS?=yes
X.endif
X.ifndef WITHOUT_PASSWD
XWITH_PASSWD?=yes
X.endif
X.ifndef WITHOUT_PAM
XWITH_PAM?=yes
X.endif
X.ifndef WITHOUT_AUTH_CRAM_MD5
XWITH_AUTH_CRAM_MD5?=yes
X.endif
X.ifndef WITHOUT_AUTH_PLAINTEXT
XWITH_AUTH_PLAINTEXT?=yes
X.endif
X.ifndef WITHOUT_AUTH_SPA
XWITH_AUTH_SPA?=yes
X.endif
X.ifndef WITH_AUTH_SASL
XWITHOUT_AUTH_SASL?=yes
X.endif
X.ifndef WITH_SASLAUTHD
XWITHOUT_SASLAUTHD?=yes
X.endif
X.ifndef WITH_PWCHECK
XWITHOUT_PWCHECK?=yes
X.endif
X.ifndef WITH_AUTH_RADIUS
XWITHOUT_AUTH_RADIUS?=yes
X.endif
XWITH_RADIUS_TYPE?=RADLIB
X.ifndef WITHOUT_TLS
XWITH_TLS?=yes
X.endif
X.ifndef WITHOUT_IPV6
XWITH_IPV6?=yes
X.endif
X.ifndef WITHOUT_MAILDIR
XWITH_MAILDIR?=yes
X.endif
X.ifndef WITHOUT_MAILSTORE
XWITH_MAILSTORE?=yes
X.endif
X.ifndef WITHOUT_MBX
XWITH_MBX?=yes
X.endif
X.ifndef WITHOUT_LMTP
XWITH_LMTP?=yes
X.endif
X.ifndef WITH_SPF
XWITHOUT_SPF?=yes
X.endif
X.ifndef WITH_SRS
XWITHOUT_SRS?=yes
X.endif
X.ifndef WITH_TCP_WRAPPERS
XWITHOUT_TCP_WRAPPERS?=yes
X.endif
X.ifndef WITH_EXIMON
XWITHOUT_EXIMON?=yes
X.endif
X.ifndef WITH_ALT_CONFIG_PREFIX
XWITHOUT_ALT_CONFIG_PREFIX?=yes
X.endif
X.ifndef WITH_WISHLIST
XWITHOUT_WISHLIST?=yes
X.endif
X.ifndef WITH_RCORDER
XWITHOUT_RCORDER?=yes
X.endif
X.ifndef WITH_READLINE
XWITHOUT_READLINE?=yes
X.endif
X.ifndef WITHOUT_SUID
XWITH_SUID?=yes
X.endif
X.ifndef WITHOUT_DAEMON
XWITH_DAEMON?=yes
X.endif
X.ifndef WITHOUT_ICONV
XWITH_ICONV?=yes
X.endif
END-of-exim/options
echo x - exim/Makefile
sed 's/^X//' >exim/Makefile << 'END-of-exim/Makefile'
X# New ports collection makefile for:	exim
X# Date created:		23 June 1996
X# Whom:			markm@FreeBSD.org
X#
X# $FreeBSD: ports/mail/exim/Makefile,v 1.208 2005/09/28 10:12:53 krion Exp $
X#
X
XPORTNAME=	exim
XPORTVERSION?=	${EXIM_VERSION}
XPORTREVISION=	0
XCATEGORIES=	mail
XMASTER_SITES=	${MASTER_SITE_EXIM:S/$/:exim/}
XMASTER_SITE_SUBDIR=	exim4/:exim
XDISTNAME=	${PORTNAME}-${EXIM_VERSION}
XDISTFILES=	${DISTNAME}${EXTRACT_SUFX}:exim FAQ.txt.bz2:exim
XDIST_SUBDIR=	exim
XEXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
X
XMAINTAINER=	krion@FreeBSD.org
XCOMMENT?=	High performance MTA for Unix systems on the Internet
X
X.include "options"
X
X.if defined(WITH_SA_EXIM)
XMASTER_SITES+=	http://marc.merlins.org/linux/exim/files/:sa_exim \
X		${MASTER_SITE_SOURCEFORGE_EXTENDED:S/$/:sa_exim/}
XMASTER_SITE_SUBDIR+=	sa-exim/:sa_exim
XDISTFILES+=	sa-exim-${SA_EXIM_VERSION}.tar.gz:sa_exim
X.endif
X
XEXIM_VERSION=	4.54
XSA_EXIM_VERSION=4.2
X
XIGNOREFILES=	FAQ.txt.bz2
X
X.if !defined(EXIMON_ONLY)
X.if defined(PKGNAMESUFFIX)
XCONFLICTS+=	${PKGNAMEPREFIX}${PORTNAME}-4.*
X.endif
X.for suffix in -ldap2 -mysql -postgresql -sa-exim -sqlite
X.if !defined(PKGNAMESUFFIX) || ${PKGNAMESUFFIX} != ${suffix}
XCONFLICTS+=	${PKGNAMEPREFIX}${PORTNAME}${suffix}-4.*
X.endif
X.endfor
X.if defined(WITH_EXIMON)
XCONFLICTS+=	${PKGNAMEPREFIX}${PORTNAME}-monitor-4.*
X.endif
X.else
XWITH_EXIMON=	yes
X.endif
X
X.if defined(WITH_EXIMON)
XUSE_XLIB=	yes
X.endif
X
XUSE_BZIP2=	yes
XUSE_REINPLACE=	yes
X
X.if !defined(EXIMON_ONLY)
XMAN8=		exim.8
X.else
XNO_INSTALL_MANPAGES=	yes
X.endif
X
XPORTDOC_BASE=	ACKNOWLEDGMENTS FAQ NOTICE README.UPDATING
XPORTDOC_FILES=	ChangeLog Exim3.upgrade Exim4.upgrade NewStuff \
X		OptionLists.txt README README.SIEVE dbm.discuss.txt \
X		experimental-spec.txt filter.txt pcrepattern.txt \
X		pcretest.txt spec.txt
X
XPORT_EXAMPLES=	convert4r3 convert4r4 pcretest transport-filter.pl
X
XDAILY_SCRIPTS=	150.exim-tidydb 460.exim-mail-rejects
X
XPKGINSTALL=	${WRKDIR}/pkg-install
X
X.if defined(NOPORTDOCS) && !defined(EXIMON_ONLY)
XPKGMESSAGE=	${WRKDIR}/POST-INSTALL-NOTES
X.else
XPKGMESSAGE=	${WRKDIR}/pkg-message
X.endif
X
XMAKE_ENV+=	OSTYPE="${OPSYS}" ARCHTYPE="${ARCH}" DUMMY_LDFLAGS="${DUMMY_LDFLAGS}"
X.if defined(EXIMON_ONLY)
XMAKE_ENV+=	INSTALL_ARG="eximon eximon.bin"
X.elif defined(WITHOUT_SUID)
XMAKE_ENV+=	INSTALL_ARG="-no_chown"
X.endif
X
XEXIM_USER?=	mailnull
XEXIM_GROUP?=	mail
X
XLOGDIR?=	/var/log/exim
XLOG_FILE_PATH?=	${LOGDIR}/%slog
X
XSED_SCRIPT=	-e 's,%%PREFIX%%,${PREFIX},g' \
X		-e 's,%%DOCSDIR%%,${DOCSDIR},g' \
X		-e 's,%%EXAMPLESDIR%%,${EXAMPLESDIR},g' \
X		-e 's,%%EXIM_USER%%,${EXIM_USER},g' \
X		-e 's,%%EXIM_GROUP%%,${EXIM_GROUP},g' \
X		-e 's,%%LOGDIR%%,${LOGDIR},g'
X
XPLIST_SUB=	EXIM_VERSION="${EXIM_VERSION}-${PORTREVISION}" \
X		EXIM_USER=${EXIM_USER} \
X		EXIM_GROUP=${EXIM_GROUP} \
X		LOGDIR="${LOGDIR}"
X
X# Define it to enabale malware and spam scanning in the DATA ACL,
X# and the MIME ACL.
X#WITH_CONTENT_SCAN=	yes
X
X# Enable old, deprecated "demime" ACL condition, in addition
X# to all the other content-scanning features.
X#WITHOUT_OLD_DEMIME=	yes
X
X# If WITH_EXIMON is defined, the eximon monitor, which requires X,
X# will be made a dependency.  Note that using WITH_EXIMON will cause
X# XFree86 to be installed if it is not present.
X#WITH_EXIMON=	yes
X
X# If WITH_SA_EXIM is defined, exim will be built with the SA-Exim
X# local_scan function (<http://marc.merlins.org/linux/exim/sa.html>)
X#WITH_SA_EXIM=		yes
X
X# Exim refuses to run local deliveries as root by default.  You can
X# add other users to this colon-separated list that cannot be
X# overridden at runtime below, but are advised not to remove "root".
X#WITH_FIXED_NEVER_USERS=	root:daemon:bin
X
X# Define WITH_TCP_WRAPPERS, WITH_MYSQL, WITH_SQLITE and WITH_PGSQL
X# to link against libwrap, libmysqlclient, sqlite and libpq
X# respectively.  Define WITH_SASLAUTHD to enable use of the Cyrus
X# SASL authentication daemon.  Define WITH_SQLITE to enable use of
X# the SQLite support.  Define WITH_MYSQL_VER to specify a particular
X# version of MySQL to use.  Valid values are currently 323, 40 and
X# 41.  Defining WITH_MYSQL_VER implies WITH_MYSQL.
X#WITH_TCP_WRAPPERS=	yes
X#WITH_MYSQL=		yes
X#WITH_MYSQL_VER=	40
X#WITH_PGSQL=		yes
X#WITH_SQLITE=		yes
X#WITH_SASLAUTHD=	yes
X
X# As an alternative to WITH_SASLAUTHD, you can define WITH_PWCHECK to
X# link against libsasl for SMTP AUTH authentication via the Cyrus SASL
X# pwcheck daemon.
X################################
X# THIS MECHANISM IS DEPRECATED #
X################################
X#WITH_PWCHECK=		yes
X
X# Define WITHOUT_IPV6 to exclude IPv6 support from the compiled exim
X# binary.  Exim compiled with IPv6 support will still operate on
X# systems that do not have IPv6 kernel support, so this should not
X# be necessary.
X#WITHOUT_IPV6=		yes
X
X# Define WITH_OPENLDAP or WITH_OPENLDAP_VER to link against libldap.
X# Define WITH_OPENLDAP_VER to specify a particular version of
X# OpenLDAP to use. Valid values are currently 21, 22 and 23.
X# Defining WITH_OPENLDAP_VER implies WITH_OPENLDAP.
X# Exim also supports NETSCAPE and SOLARIS7 lookup types, but no
X# client libraries exist for these in the ports tree.
X#WITH_OPENLDAP=		yes
X#WITH_OPENLDAP_VER=	23
X
X# WITH_BDB_VER is the version of the Berkeley DB library to use, and
X# may be 1, which corresponds to version 1.85 in the base system, 4,
X# 41, 42 or 43 which depends on the databases/db4[123] ports.
XWITH_BDB_VER?=1
X
X# When Exim is decoding MIME "words" in header lines it converts any foreign
X# character sets to the one that is set in the headers_charset option.
X# The default setting is defined by this setting:
XWITH_DEFAULT_CHARSET?=	ISO-8859-1
X
X# The following options may be defined to turn off support for various
X# features that this port enables by default.
X#
X# Do not link against OpenSSL; disables STARTTLS.
X#WITHOUT_TLS=	yes
X#
X# Disable the embedded Perl interpreter, which allows Perl subroutines to
X# be called during string expansion.
X#WITHOUT_PERL=	yes
X#
X# Disable built-in Exim support for the PAM, RFC 2195, RFC 2595 and
X# Microsoft "Secure Password Authentication" authentication mechanisms,
X# used for SMTP AUTH.
X#WITHOUT_PAM=			yes
X#WITHOUT_AUTH_CRAM_MD5=		yes
X#WITHOUT_AUTH_PLAINTEXT=	yes
X#WITHOUT_AUTH_SPA=		yes
X#
X# Enable support for authenticating via the Cyrus SASL library
X#WITH_AUTH_SASL=		yes
X#
X# Enable built-in Exim support for radius (RFC 2865) authentication
X# RADIUS_TYPE can either be RADLIB (to use the radius library supplied
X# with FreeBSD) or RADIUSCLIENT (to use port net/radiusclient)
X#WITH_AUTH_RADIUS=		yes
X#WITH_RADIUS_TYPE=		RADLIB
X#
X# Disable built-in Exim support for additional mailbox formats.
X#WITHOUT_MAILDIR=	yes
X#WITHOUT_MAILSTORE=	yes
X#WITHOUT_MBX=		yes
X#
X# Define WITHOUT_CDB, WITHOUT_DNSDB, WITHOUT_DSEARCH, WITHOUT_LSEARCH,
X# WITHOUT_NIS and WITHOUT_PASSWD to disable support for CDB-style, DNS-style,
X# directory-list, wildcarded-file, NIS and /etc/passwd lookups respectively.
X#WITHOUT_CDB=		yes
X#WITHOUT_DNSDB=		yes
X#WITHOUT_DSEARCH=	yes
X#WITHOUT_LSEARCH=	yes
X#WITHOUT_NIS=		yes
X#WITHOUT_PASSWD=	yes
X#
X# Disable support for the LMTP (RFC 2033 "SMTP over command pipe")
X# transport.
X#WITHOUT_LMTP=		yes
X#
X# Allow alternate configuration files not only in ${PREFIX}/etc/exim
X#WITHOUT_ALT_CONFIG_PREFIX=	yes
X#
X# Include the unsupported patches in ${PATCHDIR}/wishlist-*.patch
X#WITH_WISHLIST=		yes
X#
X# Enable Sender Policy Framework (SPF) checking in exiscan-acl
X#WITH_SPF=		yes
X#
X# Enable Sender Rewriting Scheme (SRS)
X#WITH_SRS=		yes
X#
X# Use the readline(3) library for the test expansion option
X#WITH_READLINE=		yes
X#
X# Don't install the exim binary suid root
X#WITHOUT_SUID=		yes
X#
X# Don't install scripts to run exim as a daemon
X# (for example when using option mua_wrapper)
X#WITHOUT_DAEMON=	yes
X
X# You should not need to fiddle with anything below this point.
X
X.if defined(WITH_WISHLIST)
XEXTRA_PATCHES+=	`${FIND} ${PATCHDIR} -name 'wishlist-*.patch'`
X.endif
X
XSEDLIST+=	-e 's,XX_CFLAGS_XX,${CFLAGS},' \
X		-e 's,XX_PREFIX_XX,${PREFIX},' \
X		-e 's,XX_LOCALBASE_XX,${LOCALBASE},' \
X		-e 's,XX_LOG_FILE_PATH_XX,${LOG_FILE_PATH},' \
X		-e 's,XX_EXIM_USER_XX,${EXIM_USER},' \
X		-e 's,XX_EXIM_GROUP_XX,${EXIM_GROUP},' \
X		-e 's,XX_DEFAULT_CHARSET_XX,${WITH_DEFAULT_CHARSET},'
X
X.if defined(WITH_FIXED_NEVER_USERS)
XSEDLIST+=	-e 's,^(FIXED_NEVER_USERS=).*,\1${WITH_FIXED_NEVER_USERS},'
X.endif
X
X.if defined(WITH_EXIMON)
XSEDLIST+=	-e 's,^\# (EXIM_MONITOR=),\1,'
XPLIST_SUB+=	EXIMON=""
X.else
XPLIST_SUB+=	EXIMON="@comment "
X.endif
X
X.if !defined(WITHOUT_TLS)
XUSE_OPENSSL=	yes
XSEDLIST+=	-e 's,^\# (SUPPORT_TLS=),\1,'
X.else
XSEDLIST+=	-e 's,^(TLS_LIBS=),\# \1,'
X.endif
X
X.if !defined(WITHOUT_PERL)
XUSE_PERL5=	yes
XSEDLIST+=	-e 's,^\# (EXIM_PERL=),\1,'
X.endif
X
X.if defined(WITH_TCP_WRAPPERS)
XSEDLIST+=	-e 's,XX_TCP_WRAPPERS_LIBS_XX,-lwrap,' \
X		-e 's,^\# (USE_TCP_WRAPPERS=),\1,'
X.else
XSEDLIST+=	-e 's,XX_TCP_WRAPPERS_LIBS_XX,,'
X.endif
X
X.if !defined(WITHOUT_ICONV)
XUSE_ICONV=	yes
XSEDLIST+=	-e 's,XX_ICONV_LIBS_XX,-L${LOCALBASE}/lib -liconv,' \
X		-e 's,^\# (HAVE_ICONV=),\1,'
X.else
XSEDLIST+=	-e 's,XX_ICONV_LIBS_XX,,'
X.endif
X
X.if defined(WITH_LDAP) || defined(LDAP_LIB_TYPE) \
X	|| defined(WITH_OPENLDAP1) || defined(WITH_OPENLDAP2) \
X	|| defined(WITH_OPENLDAP20) || defined(WITH_OPENLDAP21)
XBROKEN=		"deprecated LDAP option defined, use WITH_OPENLDAP or WITH_OPENLDAP_VER"
X.endif
X
X.if defined(WITH_OPENLDAP_VER) && ${WITH_OPENLDAP_VER:L} != "auto"
XWANT_OPENLDAP_VER=	${WITH_OPENLDAP_VER}
X.endif
X
X.if defined(WITH_OPENLDAP)
XUSE_OPENLDAP=	yes
XLDAP_LIB_TYPE=	OPENLDAP2
XSEDLIST+=	-e 's,XX_LDAP_LIBS_XX,-L${LOCALBASE}/lib -llber -lldap,' \
X		-e 's,XX_LDAP_INCLUDE_XX,-I${LOCALBASE}/include,' \
X		-e 's,XX_LDAP_TYPE_XX,${LDAP_LIB_TYPE},' \
X		-e 's,^\# (LOOKUP_LDAP=),\1,'
X.else
XSEDLIST+=	-e 's,XX_LDAP_[^ ]*_XX,,' \
X		-e 's,^(LDAP_LIB_TYPE=),\# \1,'
X.endif
X
X.if defined(DB_LIB_VERSION)
XBROKEN=		"deprecated option DB_LIB_VERSION used, use WITH_BDB_VER"
X.endif
X
X.if ${WITH_BDB_VER} == 1
XDB_LIBS=
XDB_INCLUDES=
XSEDLIST+=	-e 's,^(DBMLIB=),\# \1,'
X.elif (${WITH_BDB_VER} == 4)
XDB_LIBS=	-L${LOCALBASE}/lib -ldb4
XDB_INCLUDES=	-I${LOCALBASE}/include/db4
XLIB_DEPENDS+=	db4.0:${PORTSDIR}/databases/db4
X.elif (${WITH_BDB_VER} == 41)
XDB_LIBS=	-L${LOCALBASE}/lib -ldb41
XDB_INCLUDES=	-I${LOCALBASE}/include/db41
XLIB_DEPENDS+=	db41.1:${PORTSDIR}/databases/db41
X.elif (${WITH_BDB_VER} == 42)
XDB_LIBS=	-L${LOCALBASE}/lib -ldb-4.2
XDB_INCLUDES=	-I${LOCALBASE}/include/db42
XLIB_DEPENDS+=	db-4.2.2:${PORTSDIR}/databases/db42
X.elif (${WITH_BDB_VER} == 43)
XDB_LIBS=	-L${LOCALBASE}/lib -ldb-4.3
XDB_INCLUDES=	-I${LOCALBASE}/include/db43
XLIB_DEPENDS+=	db-4.3.0:${PORTSDIR}/databases/db43
X.else
XBROKEN=		"WITH_BDB_VER must be either 1, 4, 41, 42 or 43"
X.endif
XSEDLIST+=	-e 's,XX_DB_LIBS_XX,${DB_LIBS},' \
X		-e 's,XX_DB_INCLUDES_XX,${DB_INCLUDES},'
X
X.if defined(WITH_MYSQL_VER) && ${WITH_MYSQL_VER:L} != "auto"
XWANT_MYSQL_VER=	${WITH_MYSQL_VER}
X.else
X.undef WITH_MYSQL_VER
X.endif
X
X.if defined(WITH_MYSQL)
XUSE_MYSQL=	yes
XSEDLIST+=	-e 's,XX_MYSQL_LIBS_XX,-L${LOCALBASE}/lib/mysql -lmysqlclient,' \
X		-e 's,XX_MYSQL_INCLUDE_XX,-I${LOCALBASE}/include/mysql,' \
X		-e 's,^\# (LOOKUP_MYSQL=),\1,'
X.else
XSEDLIST+=	-e 's,XX_MYSQL_[^ ]*_XX,,'
X.endif
X
X.if defined(WITH_SASLAUTHD)
XRUN_DEPENDS+=	${LOCALBASE}/sbin/saslauthd:${PORTSDIR}/security/cyrus-sasl2-saslauthd
XSEDLIST+=	-e 's,^\# (CYRUS_SASLAUTHD_SOCKET=),\1,'
X.endif
X
X.if defined(WITH_PWCHECK)
XRUN_DEPENDS+=	${LOCALBASE}/sbin/pwcheck:${PORTSDIR}/security/cyrus-sasl
XSEDLIST+=	-e 's,^\# (SUPPORT_CYRUS_PWCHECK=),\1,' \
X		-e 's,^\# (CYRUS_PWCHECK_SOCKET=),\1,'
X.endif
X
X.if !defined(WITHOUT_PAM)
XSEDLIST+=	-e 's,XX_PAM_LIBS_XX,-lpam,' \
X		-e 's,^\# (SUPPORT_PAM=),\1,'
X.else
XSEDLIST+=	-e 's,XX_PAM_LIBS_XX,,'
X.endif
X
X.if !defined(WITHOUT_AUTH_CRAM_MD5)
XSEDLIST+=	-e 's,^\# (AUTH_CRAM_MD5=),\1,'
X.endif
X
X.if !defined(WITHOUT_AUTH_PLAINTEXT)
XSEDLIST+=	-e 's,^\# (AUTH_PLAINTEXT=),\1,'
X.endif
X
X.if !defined(WITHOUT_AUTH_SPA)
XSEDLIST+=	-e 's,^\# (AUTH_SPA=),\1,'
X.endif
X
X.if defined(WITH_AUTH_SASL)
XLIB_DEPENDS=	sasl2.2:${PORTSDIR}/security/cyrus-sasl2
XSEDLIST+=	-e 's,^\# (AUTH_CYRUS_SASL=),\1,' \
X		-e 's,^\# (AUTH_LIBS=),\1,'
X.endif
X
X.if defined(WITH_AUTH_RADIUS)
XWITH_RADIUS_TYPE?=	RADLIB
X.if ${WITH_RADIUS_TYPE:L} == radlib
XSEDLIST+=	-e 's,XX_RADIUS_LIBS_XX,-lradius,' \
X		-e 's,^\# (RADIUS_CONFIG_FILE=).*,\1/etc/radius.conf,' \
X		-e 's,^\# (RADIUS_LIB_TYPE=).*,\1RADLIB,'
X.elif ${WITH_RADIUS_TYPE:L} == radiusclient
XLIB_DEPENDS+=	radiusclient.0:${PORTSDIR}/net/radiusclient
XSEDLIST+=	-e 's,XX_RADIUS_LIBS_XX,-L${LOCALBASE}/lib -lradiusclient,' \
X		-e 's,^\# (RADIUS_CONFIG_FILE=).*,\1${LOCALBASE}/etc/radiusclient.conf,' \
X		-e 's,^\# (RADIUS_LIB_TYPE=).*,\1RADIUSCLIENT,'
X.else
XIGNORE=		WITH_RADIUS_TYPE must be either RADLIB or RADIUSCLIENT
X.endif
X.else
XSEDLIST+=	-e 's,XX_RADIUS_LIBS_XX,,'
X.endif
X
X.if defined(WITH_PGSQL)
XUSE_PGSQL=	yes
XSEDLIST+=	-e 's,XX_PGSQL_LIBS_XX,-L${LOCALBASE}/lib -lpq,' \
X		-e 's,XX_PGSQL_INCLUDE_XX,-I${LOCALBASE}/include/pgsql,' \
X		-e 's,^\# (LOOKUP_PGSQL=),\1,'
X.else
XSEDLIST+=	-e 's,XX_PGSQL_[^ ]*_XX,,'
X.endif
X
X.if !defined(WITH_PGSQL) && !defined(WITH_MYSQL) && !defined(LDAP_LIB_TYPE) && \
X    ${WITH_BDB_VER} == 1
XSEDLIST+=	-e 's,^(LOOKUP_LIBS=),\# \1,' \
X		-e 's,^(LOOKUP_INCLUDE=),\# \1,'
X.endif
X
X.if !defined(WITHOUT_DNSDB)
XSEDLIST+=	-e 's,^\# (LOOKUP_DNSDB=),\1,'
X.endif
X
X.if !defined(WITHOUT_MAILDIR)
XSEDLIST+=	-e 's,^\# (SUPPORT_MAILDIR=),\1,'
X.endif
X
X.if !defined(WITHOUT_MAILSTORE)
XSEDLIST+=	-e 's,^\# (SUPPORT_MAILSTORE=),\1,'
X.endif
X
X.if !defined(WITHOUT_MBX)
XSEDLIST+=	-e 's,^\# (SUPPORT_MBX=),\1,'
X.endif
X
X.if !defined(WITHOUT_CDB)
XSEDLIST+=	-e 's,^\# (LOOKUP_CDB=),\1,'
X.endif
X
X.if !defined(WITHOUT_DSEARCH)
XSEDLIST+=	-e 's,^\# (LOOKUP_DSEARCH=),\1,'
X.endif
X
X.if defined(WITHOUT_LSEARCH)
XSEDLIST+=	-e 's,^(LOOKUP_LSEARCH=),\# \1,'
X.endif
X
X.if !defined(WITHOUT_NIS)
XSEDLIST+=	-e 's,^\# (LOOKUP_NIS=),\1,'
X.endif
X
X.if !defined(WITHOUT_PASSWD)
XSEDLIST+=	-e 's,^\# (LOOKUP_PASSWD=),\1,'
X.endif
X
X.if defined(WITH_SQLITE)
XSEDLIST+=	-e 's,XX_SQLITE_LIBS_XX,-L${LOCALBASE}/lib -lsqlite3,' \
X		-e 's,XX_SQLITE_FLAGS_XX,-I${LOCALBASE}/include,' \
X		-e 's,^\# (LOOKUP_SQLITE=),\1,'
XLIB_DEPENDS+=	sqlite3.8:${PORTSDIR}/databases/sqlite3
X.else
XSEDLIST+=	-e 's,XX_SQLITE_LIBS_XX,,' \
X		-e 's,XX_SQLITE_FLAGS_XX,,'
X.endif
X
X.if !defined(WITHOUT_LMTP)
XSEDLIST+=	-e 's,^\# (TRANSPORT_LMTP=),\1,'
X.endif
X
X.if defined(WITHOUT_ALT_CONFIG_PREFIX)
XSEDLIST+=	-e 's,^(ALT_CONFIG_PREFIX=),\# \1,'
X.endif
X
X.if defined(WITH_SPF)
XLIB_DEPENDS+=	spf2.2:${PORTSDIR}/mail/libspf2
XSEDLIST+=	-e 's,XX_SPF_FLAGS_XX,-DSPF,' \
X		-e 's,XX_SPF_LIBS_XX,-lspf2 ${PTHREAD_LIBS},' \
X		-e 's,^\# (EXPERIMENTAL_SPF=),\1,'
X.else
XSEDLIST+=	-e 's,XX_SPF_FLAGS_XX,,' \
X		-e 's,XX_SPF_LIBS_XX,,'
X.endif
X
X.if defined(WITH_SRS)
XLIB_DEPENDS+=	srs2.0:${PORTSDIR}/mail/libsrs2
XSEDLIST+=	-e 's,XX_SRS_FLAGS_XX,-DSRS,' \
X		-e 's,XX_SRS_LIBS_XX,-lsrs2,'
X.else
XSEDLIST+=	-e 's,XX_SRS_FLAGS_XX,,' \
X		-e 's,XX_SRS_LIBS_XX,,'
X.endif
X
X.if defined(WITH_SA_EXIM)
XRUN_DEPENDS+=	${LOCALBASE}/bin/spamc:${PORTSDIR}/mail/p5-Mail-SpamAssassin
XPLIST_SUB+=	SA_EXIM=""
X.else
XPLIST_SUB+=	SA_EXIM="@comment "
X.endif
X
X.if defined(WITH_READLINE)
XSEDLIST+=	-e 's,^\# (USE_READLINE=),\1,'
X.endif
X
X.if defined(WITH_CONTENT_SCAN)
XSEDLIST+=	-e 's,^\# (WITH_CONTENT_SCAN=),\1,'
X.endif
X
X.if !defined(WITHOUT_OLD_DEMIME)
XSEDLIST+=	-e 's,^\# (WITH_OLD_DEMIME=),\1,'
X.endif
X
X.include <bsd.port.pre.mk>
X
X.if defined(EXIMON_ONLY) && ${MASTERDIR} == ${PKGDIR}
X.error EXIMON_ONLY is not user settable
X.endif
X
X.if !defined(EXIMON_ONLY) && !defined(WITHOUT_DAEMON)
XUSE_RC_SUBR=	yes
X.if defined(WITH_RCORDER) && ${OSVERSION} >= 500037
XRC_DIR=		/etc/rc.d
XRC_SUFX=
XPLIST_SUB+=	RCORDER="" \
X		RC_DIR=${RC_DIR} \
X		RC_SUFX=${RC_SUFX}
X.else
XRC_DIR=		${PREFIX}/etc/rc.d
XRC_SUFX=	.sh
XPLIST_SUB+=	RCORDER="@comment " \
X		RC_DIR="%D/etc/rc.d" \
X		RC_SUFX=${RC_SUFX}
X.endif
XSED_SCRIPT+=	-e 's,%%RC_SUBR%%,${RC_SUBR},g' \
X		-e 's,%%RC_DIR%%,${RC_DIR},g' \
X		-e 's,%%RC_SUFX%%,${RC_SUFX},g'
XPLIST_SUB+=	DAEMON=""
X.else
XPLIST_SUB+=	DAEMON="@comment "
X.endif
X
X.if ${OSVERSION} < 400014
XWITHOUT_IPV6=	yes
X.endif
X
X.if !defined(WITHOUT_IPV6)
XSEDLIST+=	-e 's,^\# (HAVE_IPV6=),\1,'
X.endif
X
XDUMMY_LDFLAGS!=	${ECHO_CMD} ${LDFLAGS} | ${SED} -e 's|-Wl,-rpath|-Wl,-DUMMYrpath|g; s|-rpath|-Wl,-rpath|g; s|-DUMMYrpath|-rpath|g'
X
Xpre-everything::
X.if empty(.MAKEFLAGS:M-s) && defined(WITH_WISHLIST)
X	@${ECHO} ''
X	@${ECHO} 'Included extra patches:'
X	@${FIND} ${PATCHDIR} -name 'wishlist-*.patch' \
X	    -exec ${SED} -ne 's,^# , ,p' {} \;
X	@${ECHO} ''
X.endif
X
Xpost-extract:
X	@${BZCAT} ${_DISTDIR}/FAQ.txt.bz2 > ${WRKSRC}/FAQ
X.if defined(WITH_SA_EXIM)
X	@cd ${WRKDIR} && ${GZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/sa-exim-${SA_EXIM_VERSION}.tar.gz ${EXTRACT_AFTER_ARGS}
X.endif
X
Xdo-configure:
X	@${MKDIR} ${WRKSRC}/Local
X	@${SED} -E ${SEDLIST} ${WRKSRC}/src/EDITME > ${WRKSRC}/Local/Makefile
X.if defined(WITH_EXIMON)
X	@${CP} ${WRKSRC}/exim_monitor/EDITME ${WRKSRC}/Local/eximon.conf
X.endif
X	@[ ! -f ${PKGDIR}/pkg-install ] || ${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-install > ${PKGINSTALL}
X	@${REINPLACE_CMD} -E ${SEDLIST} ${WRKSRC}/src/configure.default
X	@${REINPLACE_CMD} -e 's/$$(LDFLAGS)/$$(DUMMY_LDFLAGS)/' ${WRKSRC}/OS/Makefile-Base
X	@${REINPLACE_CMD} -e 's/"(Exim $$version_number)\\n\\t"/"(Exim $$version_number (${OPSYS}))\\n\\t"/' \
X		${WRKSRC}/src/globals.c
X	@${REINPLACE_CMD} -e 's/Exim version %s \(#%s \)\{0,1\}/&(${OPSYS} ${OSREL}) /' ${WRKSRC}/src/exim.c
X	@${REINPLACE_CMD} -e 's/^#include "cnumber\.h"$$/${PORTREVISION}/' ${WRKSRC}/src/version.c
X	@${REINPLACE_CMD} -E -e 's/^(PERL_COMMAND=).*/\1${PERL:S,/,\/,g}/' \
X		-e 's/^(CC=).*/\1${CC:S,/,\/,g}/' ${WRKSRC}/OS/Makefile-Default
X.if defined(WITH_SA_EXIM)
X	@${REINPLACE_CMD} -E -e 's/^(LOCAL_SCAN_SOURCE=).*/\1Local\/sa-exim.c/' \
X		${WRKSRC}/OS/Makefile-Default
X	@${CP} ${WRKDIR}/sa-exim-${SA_EXIM_VERSION}/sa-exim.c ${WRKSRC}/Local
X	@{ \
X	    ${ECHO_CMD} "char *version=\"${SA_EXIM_VERSION}\";"; \
X	    ${ECHO_CMD} "#define SPAMC_LOCATION		\"${LOCALBASE}/bin/spamc\""; \
X	    ${ECHO_CMD} "#define SPAMASSASSIN_CONF	\"${PREFIX}/etc/exim/sa-exim.conf\""; \
X	} > ${WRKSRC}/Local/sa-exim.h
X	@${REINPLACE_CMD} -e 's,/usr/bin/spamc,${LOCALBASE}/bin/spamc,' \
X	    ${WRKDIR}/sa-exim-${SA_EXIM_VERSION}/sa-exim.conf
X.endif
X	@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} configure)
X
Xpost-build:
X.for script in exim ${DAILY_SCRIPTS}
X	@${SED} ${SED_SCRIPT} ${FILESDIR}/${script}.sh > ${WRKDIR}/${script}.sh
X.endfor
X	@${SED} ${SED_SCRIPT} ${FILESDIR}/POST-INSTALL-NOTES > \
X		${WRKDIR}/POST-INSTALL-NOTES
X	@${SED} ${SED_SCRIPT} ${FILESDIR}/POST-INSTALL-NOTES.clamd > ${WRKDIR}/POST-INSTALL-NOTES.clamd
X	@${SED} ${SED_SCRIPT} ${FILESDIR}/POST-INSTALL-NOTES > ${WRKDIR}/POST-INSTALL-NOTES
X	@[ ! -f ${PKGDIR}/pkg-message ] || ${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-message > ${WRKDIR}/pkg-message
X
X.if !defined(EXIMON_ONLY)
X
Xpre-install:
X	@[ -d "${DESTDIR}/etc" ] || ${MKDIR} "${DESTDIR}/etc"
X	@${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
X
Xpost-install:
X.if !defined(WITHOUT_DAEMON)
X	@${INSTALL_SCRIPT} ${WRKDIR}/exim.sh ${DESTDIR}${RC_DIR}/exim${RC_SUFX}
X	@${MKDIR} ${DESTDIR}${PREFIX}/etc/periodic/daily
X.for script in ${DAILY_SCRIPTS}
X	@${INSTALL_SCRIPT} ${WRKDIR}/${script}.sh ${DESTDIR}${PREFIX}/etc/periodic/daily/${script}
X.endfor
X.endif
X	@[ -f ${DESTDIR}${PREFIX}/etc/exim/configure ] || \
X		${CP} ${DESTDIR}${PREFIX}/etc/exim/configure.default ${DESTDIR}${PREFIX}/etc/exim/configure
X.for manfile in ${MAN8}
X	@${INSTALL_MAN} ${WRKSRC}/doc/${manfile} ${DESTDIR}${MAN8PREFIX}/man/man8
X.endfor
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DESTDIR}${DOCSDIR}
X	@${INSTALL_DATA} ${WRKDIR}/POST-INSTALL-NOTES ${DESTDIR}${DOCSDIR}
X	@${INSTALL_DATA} ${WRKDIR}/POST-INSTALL-NOTES.clamd ${DESTDIR}${DOCSDIR}
X.for docfile in ${PORTDOC_BASE}
X	@${INSTALL_DATA} ${WRKSRC}/${docfile} ${DESTDIR}${DOCSDIR}
X.endfor
X.for docfile in ${PORTDOC_FILES}
X	@${INSTALL_DATA} ${WRKSRC}/doc/${docfile} ${DESTDIR}${DOCSDIR}
X.endfor
X	@${MKDIR} ${DESTDIR}${EXAMPLESDIR}
X.for example in ${PORT_EXAMPLES}
X	@${INSTALL_SCRIPT} ${WRKSRC}/build-${OPSYS}-${ARCH}/${example} ${DESTDIR}${EXAMPLESDIR}
X.endfor
X.endif
X.if defined(WITH_SA_EXIM)
X	@${INSTALL_DATA} ${WRKDIR}/sa-exim-${SA_EXIM_VERSION}/sa-exim.conf \
X		${DESTDIR}${PREFIX}/etc/exim/sa-exim.conf.default
X	@[ -f ${DESTDIR}${PREFIX}/etc/exim/sa-exim.conf ] || \
X	    ${CP} ${DESTDIR}${PREFIX}/etc/exim/sa-exim.conf.default \
X	    ${DESTDIR}${PREFIX}/etc/exim/sa-exim.conf
X.endif
X	@${CAT} ${PKGMESSAGE}
X	@${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
X
X.else
X
Xpost-install:
X	@${CAT} ${PKGMESSAGE}
X
X.endif
X
X.include <bsd.port.post.mk>
END-of-exim/Makefile
echo x - exim/distinfo
sed 's/^X//' >exim/distinfo << 'END-of-exim/distinfo'
XMD5 (exim/exim-4.54.tar.bz2) = f3cdf5292f4bbb1ee2de42d4338b3b9f
XSIZE (exim/exim-4.54.tar.bz2) = 1547608
XMD5 (exim/FAQ.txt.bz2) = IGNORE
END-of-exim/distinfo
echo x - exim/pkg-descr
sed 's/^X//' >exim/pkg-descr << 'END-of-exim/pkg-descr'
XExim is a mail transfer agent for Unix systems connected to the Internet.
XIt is a monolithic MTA designed to be a command line compatible drop-in
Xreplacement for Sendmail.
X
XExim is an excellent mailer for an ISP, as its control and flexibility
Xare very good and its requeueing and retry algorithms are very powerful.
XExim's configuration syntax is well documented.
X
XWWW: http://www.exim.org/
END-of-exim/pkg-descr
echo x - exim/pkg-install
sed 's/^X//' >exim/pkg-install << 'END-of-exim/pkg-install'
X#!/bin/sh
X#
X# Since FreeBSD does not supply a user for running an MTA in a sandbox
X# by default, use user 'exim', adding it if it does not exist.  Even
X# if FreeBSD supplied an MTA user, it's neglected to do so for so long
X# that every sandboxed MTA under the sun uses its own user, so user
X# 'exim' should probably be used forever.
X#
X# Modern FreeBSD systems already have a group mail.
X#
X# $FreeBSD: ports/mail/exim/pkg-install,v 1.12 2004/07/17 14:21:13 eik Exp $
X#
X
XPKG_PREFIX=${PKG_PREFIX:=%%PREFIX%%}
XPKG_DESTDIR=${PKG_DESTDIR:=}
X
Xuser=%%EXIM_USER%%
Xgroup=%%EXIM_GROUP%%
Xlogdir=$PKG_DESTDIR%%LOGDIR%%
X
Xif [ "$2" = "PRE-INSTALL" ]; then
X	if ! /usr/bin/id ${user} > /dev/null; then
X		echo "Exim requires user ${user}.  Please update your system." 1>&2
X		exit 1
X	fi
X	if ! /usr/bin/grep -q "^${group}:" /etc/group; then
X		echo "Exim requires group ${group}.  Please update your system." 1>&2
X		exit 1
X	fi
X	/bin/mkdir -p ${logdir}
X	/usr/sbin/chown ${user}:${group} ${logdir}
Xfi
X
Xif [ "$2" = "POST-INSTALL" ]; then
X	cf=$PKG_DESTDIR$PKG_PREFIX/etc/exim/configure
X	if [ -e $cf ]; then
X		if /usr/bin/grep -q '^[^#]*hostlist.*relay_from_hosts.*=.*127.0.0.1' $cf
X		    then
X			echo
X			echo "============================================================"
X			echo "                     !!! WARNING !!!                        "
X			echo "============================================================"
X			echo
X			echo "Existing configure file $cf"
X			echo "contains 127.0.0.1 in relay_from_hosts hostlist!"
X			echo "Use of localhost instead of 127.0.0.1 is highly recommended."
X			echo
X			echo "============================================================"
X			echo "                     !!! WARNING !!!                        "
X			echo "============================================================"
X		fi
X	fi
X	if ! /usr/bin/grep -qs "^exim_enable" $PKG_DESTDIR/etc/rc.conf
X	    then
X		echo
X		echo "Don't forget to add 'exim_enable=\"YES\"' to rc.conf(5)"
X		echo
X	fi
Xfi
END-of-exim/pkg-install
echo x - exim/pkg-message
sed 's/^X//' >exim/pkg-message << 'END-of-exim/pkg-message'
X
XIMPORTANT NOTE:
X===============
X
XPlease read %%DOCSDIR%%/POST-INSTALL-NOTES for important
Xinformation regarding your Exim installation.
X
END-of-exim/pkg-message
echo x - exim/pkg-plist
sed 's/^X//' >exim/pkg-plist << 'END-of-exim/pkg-plist'
X@comment $FreeBSD: ports/mail/exim/pkg-plist,v 1.42 2005/03/02 21:50:48 krion Exp $
X%%DAEMON%%@unexec [ ! -f /var/run/exim.pid ] || %%RC_DIR%%/exim%%RC_SUFX%% stop || true
Xsbin/exim
Xsbin/exim-%%EXIM_VERSION%%
Xsbin/exim_checkaccess
Xsbin/exim_dbmbuild
Xsbin/exim_dumpdb
Xsbin/exim_fixdb
Xsbin/exim_lock
Xsbin/exim_tidydb
Xsbin/exicyclog
Xsbin/exigrep
Xsbin/eximstats
Xsbin/exinext
Xsbin/exipick
Xsbin/exiqgrep
Xsbin/exiqsumm
Xsbin/exiwhat
X%%EXIMON%%sbin/eximon
X%%EXIMON%%sbin/eximon.bin
X%%PORTDOCS%%%%DOCSDIR%%/ACKNOWLEDGMENTS
X%%PORTDOCS%%%%DOCSDIR%%/FAQ
X%%PORTDOCS%%%%DOCSDIR%%/NOTICE
X%%PORTDOCS%%%%DOCSDIR%%/README.UPDATING
X%%PORTDOCS%%%%DOCSDIR%%/ChangeLog
X%%PORTDOCS%%%%DOCSDIR%%/Exim3.upgrade
X%%PORTDOCS%%%%DOCSDIR%%/Exim4.upgrade
X%%PORTDOCS%%%%DOCSDIR%%/NewStuff
X%%PORTDOCS%%%%DOCSDIR%%/OptionLists.txt
X%%PORTDOCS%%%%DOCSDIR%%/POST-INSTALL-NOTES
X%%PORTDOCS%%%%DOCSDIR%%/POST-INSTALL-NOTES.clamd
X%%PORTDOCS%%%%DOCSDIR%%/README
X%%PORTDOCS%%%%DOCSDIR%%/README.SIEVE
X%%PORTDOCS%%%%DOCSDIR%%/dbm.discuss.txt
X%%PORTDOCS%%%%DOCSDIR%%/experimental-spec.txt
X%%PORTDOCS%%%%DOCSDIR%%/filter.txt
X%%PORTDOCS%%%%DOCSDIR%%/pcrepattern.txt
X%%PORTDOCS%%%%DOCSDIR%%/pcretest.txt
X%%PORTDOCS%%%%DOCSDIR%%/spec.txt
X%%PORTDOCS%%@unexec rmdir %D/%%DOCSDIR%% 2>/dev/null || true
X%%PORTDOCS%%%%EXAMPLESDIR%%/convert4r3
X%%PORTDOCS%%%%EXAMPLESDIR%%/convert4r4
X%%PORTDOCS%%%%EXAMPLESDIR%%/pcretest
X%%PORTDOCS%%%%EXAMPLESDIR%%/transport-filter.pl
X%%PORTDOCS%%@dirrm %%EXAMPLESDIR%%
X%%DAEMON%%etc/periodic/daily/150.exim-tidydb
X%%DAEMON%%etc/periodic/daily/460.exim-mail-rejects
X%%DAEMON%%@unexec rmdir %D/etc/periodic/daily 2>/dev/null || true
X%%DAEMON%%@unexec rmdir %D/etc/periodic 2>/dev/null || true
X@unexec if cmp -s %D/etc/exim/configure %D/etc/exim/configure.default; then rm -f %D/etc/exim/configure; fi
Xetc/exim/configure.default
X@exec [ -f %B/configure ] || cp %B/%f %B/configure
X%%SA_EXIM%%@unexec if cmp -s %D/etc/exim/sa-exim.conf %D/etc/exim/sa-exim.conf.default; then rm -f %D/etc/exim/sa-exim.conf; fi
X%%SA_EXIM%%etc/exim/sa-exim.conf.default
X%%SA_EXIM%%@exec [ -f %B/sa-exim.conf ] || cp %B/%f %B/sa-exim.conf
X@unexec rmdir %B 2>/dev/null || true
X%%DAEMON%%%%RCORDER%%@cwd /
X%%DAEMON%%etc/rc.d/exim%%RC_SUFX%%
X@unexec rmdir %%LOGDIR%% 2>/dev/null || true
END-of-exim/pkg-plist
echo x - exim/Makefile.orig
sed 's/^X//' >exim/Makefile.orig << 'END-of-exim/Makefile.orig'
X# New ports collection makefile for:	exim
X# Date created:		23 June 1996
X# Whom:			markm@FreeBSD.org
X#
X# $FreeBSD: ports/mail/exim/Makefile,v 1.208 2005/09/28 10:12:53 krion Exp $
X#
X
XPORTNAME=	exim
XPORTVERSION?=	${EXIM_VERSION}
XPORTREVISION=	0
XCATEGORIES=	mail
XMASTER_SITES=	${MASTER_SITE_EXIM:S/$/:exim/}
XMASTER_SITE_SUBDIR=	exim4/:exim
XDISTNAME=	${PORTNAME}-${EXIM_VERSION}
XDISTFILES=	${DISTNAME}${EXTRACT_SUFX}:exim FAQ.txt.bz2:exim
XDIST_SUBDIR=	exim
XEXTRACT_ONLY=	${DISTNAME}${EXTRACT_SUFX}
X
XMAINTAINER=	krion@FreeBSD.org
XCOMMENT?=	High performance MTA for Unix systems on the Internet
X
X.include "options"
X
X.if defined(WITH_SA_EXIM)
XMASTER_SITES+=	http://marc.merlins.org/linux/exim/files/:sa_exim \
X		${MASTER_SITE_SOURCEFORGE_EXTENDED:S/$/:sa_exim/}
XMASTER_SITE_SUBDIR+=	sa-exim/:sa_exim
XDISTFILES+=	sa-exim-${SA_EXIM_VERSION}.tar.gz:sa_exim
X.endif
X
XEXIM_VERSION=	4.53
XSA_EXIM_VERSION=4.2
X
XIGNOREFILES=	FAQ.txt.bz2
X
X.if !defined(EXIMON_ONLY)
X.if defined(PKGNAMESUFFIX)
XCONFLICTS+=	${PKGNAMEPREFIX}${PORTNAME}-4.*
X.endif
X.for suffix in -ldap2 -mysql -postgresql -sa-exim -sqlite
X.if !defined(PKGNAMESUFFIX) || ${PKGNAMESUFFIX} != ${suffix}
XCONFLICTS+=	${PKGNAMEPREFIX}${PORTNAME}${suffix}-4.*
X.endif
X.endfor
X.if defined(WITH_EXIMON)
XCONFLICTS+=	${PKGNAMEPREFIX}${PORTNAME}-monitor-4.*
X.endif
X.else
XWITH_EXIMON=	yes
X.endif
X
X.if defined(WITH_EXIMON)
XUSE_XLIB=	yes
X.endif
X
XUSE_BZIP2=	yes
XUSE_REINPLACE=	yes
X
X.if !defined(EXIMON_ONLY)
XMAN8=		exim.8
X.else
XNO_INSTALL_MANPAGES=	yes
X.endif
X
XPORTDOC_BASE=	ACKNOWLEDGMENTS FAQ NOTICE README.UPDATING
XPORTDOC_FILES=	ChangeLog Exim3.upgrade Exim4.upgrade NewStuff \
X		OptionLists.txt README README.SIEVE dbm.discuss.txt \
X		experimental-spec.txt filter.txt pcrepattern.txt \
X		pcretest.txt spec.txt
X
XPORT_EXAMPLES=	convert4r3 convert4r4 pcretest transport-filter.pl
X
XDAILY_SCRIPTS=	150.exim-tidydb 460.exim-mail-rejects
X
XPKGINSTALL=	${WRKDIR}/pkg-install
X
X.if defined(NOPORTDOCS) && !defined(EXIMON_ONLY)
XPKGMESSAGE=	${WRKDIR}/POST-INSTALL-NOTES
X.else
XPKGMESSAGE=	${WRKDIR}/pkg-message
X.endif
X
XMAKE_ENV+=	OSTYPE="${OPSYS}" ARCHTYPE="${ARCH}" DUMMY_LDFLAGS="${DUMMY_LDFLAGS}"
X.if defined(EXIMON_ONLY)
XMAKE_ENV+=	INSTALL_ARG="eximon eximon.bin"
X.elif defined(WITHOUT_SUID)
XMAKE_ENV+=	INSTALL_ARG="-no_chown"
X.endif
X
XEXIM_USER?=	mailnull
XEXIM_GROUP?=	mail
X
XLOGDIR?=	/var/log/exim
XLOG_FILE_PATH?=	${LOGDIR}/%slog
X
XSED_SCRIPT=	-e 's,%%PREFIX%%,${PREFIX},g' \
X		-e 's,%%DOCSDIR%%,${DOCSDIR},g' \
X		-e 's,%%EXAMPLESDIR%%,${EXAMPLESDIR},g' \
X		-e 's,%%EXIM_USER%%,${EXIM_USER},g' \
X		-e 's,%%EXIM_GROUP%%,${EXIM_GROUP},g' \
X		-e 's,%%LOGDIR%%,${LOGDIR},g'
X
XPLIST_SUB=	EXIM_VERSION="${EXIM_VERSION}-${PORTREVISION}" \
X		EXIM_USER=${EXIM_USER} \
X		EXIM_GROUP=${EXIM_GROUP} \
X		LOGDIR="${LOGDIR}"
X
X# Define it to enabale malware and spam scanning in the DATA ACL,
X# and the MIME ACL.
X#WITH_CONTENT_SCAN=	yes
X
X# Enable old, deprecated "demime" ACL condition, in addition
X# to all the other content-scanning features.
X#WITHOUT_OLD_DEMIME=	yes
X
X# If WITH_EXIMON is defined, the eximon monitor, which requires X,
X# will be made a dependency.  Note that using WITH_EXIMON will cause
X# XFree86 to be installed if it is not present.
X#WITH_EXIMON=	yes
X
X# If WITH_SA_EXIM is defined, exim will be built with the SA-Exim
X# local_scan function (<http://marc.merlins.org/linux/exim/sa.html>)
X#WITH_SA_EXIM=		yes
X
X# Exim refuses to run local deliveries as root by default.  You can
X# add other users to this colon-separated list that cannot be
X# overridden at runtime below, but are advised not to remove "root".
X#WITH_FIXED_NEVER_USERS=	root:daemon:bin
X
X# Define WITH_TCP_WRAPPERS, WITH_MYSQL, WITH_SQLITE and WITH_PGSQL
X# to link against libwrap, libmysqlclient, sqlite and libpq
X# respectively.  Define WITH_SASLAUTHD to enable use of the Cyrus
X# SASL authentication daemon.  Define WITH_SQLITE to enable use of
X# the SQLite support.  Define WITH_MYSQL_VER to specify a particular
X# version of MySQL to use.  Valid values are currently 323, 40 and
X# 41.  Defining WITH_MYSQL_VER implies WITH_MYSQL.
X#WITH_TCP_WRAPPERS=	yes
X#WITH_MYSQL=		yes
X#WITH_MYSQL_VER=	40
X#WITH_PGSQL=		yes
X#WITH_SQLITE=		yes
X#WITH_SASLAUTHD=	yes
X
X# As an alternative to WITH_SASLAUTHD, you can define WITH_PWCHECK to
X# link against libsasl for SMTP AUTH authentication via the Cyrus SASL
X# pwcheck daemon.
X################################
X# THIS MECHANISM IS DEPRECATED #
X################################
X#WITH_PWCHECK=		yes
X
X# Define WITHOUT_IPV6 to exclude IPv6 support from the compiled exim
X# binary.  Exim compiled with IPv6 support will still operate on
X# systems that do not have IPv6 kernel support, so this should not
X# be necessary.
X#WITHOUT_IPV6=		yes
X
X# Define WITH_OPENLDAP or WITH_OPENLDAP_VER to link against libldap.
X# Define WITH_OPENLDAP_VER to specify a particular version of
X# OpenLDAP to use. Valid values are currently 21, 22 and 23.
X# Defining WITH_OPENLDAP_VER implies WITH_OPENLDAP.
X# Exim also supports NETSCAPE and SOLARIS7 lookup types, but no
X# client libraries exist for these in the ports tree.
X#WITH_OPENLDAP=		yes
X#WITH_OPENLDAP_VER=	23
X
X# WITH_BDB_VER is the version of the Berkeley DB library to use, and
X# may be 1, which corresponds to version 1.85 in the base system, 4,
X# 41, 42 or 43 which depends on the databases/db4[123] ports.
XWITH_BDB_VER?=1
X
X# When Exim is decoding MIME "words" in header lines it converts any foreign
X# character sets to the one that is set in the headers_charset option.
X# The default setting is defined by this setting:
XWITH_DEFAULT_CHARSET?=	ISO-8859-1
X
X# The following options may be defined to turn off support for various
X# features that this port enables by default.
X#
X# Do not link against OpenSSL; disables STARTTLS.
X#WITHOUT_TLS=	yes
X#
X# Disable the embedded Perl interpreter, which allows Perl subroutines to
X# be called during string expansion.
X#WITHOUT_PERL=	yes
X#
X# Disable built-in Exim support for the PAM, RFC 2195, RFC 2595 and
X# Microsoft "Secure Password Authentication" authentication mechanisms,
X# used for SMTP AUTH.
X#WITHOUT_PAM=			yes
X#WITHOUT_AUTH_CRAM_MD5=		yes
X#WITHOUT_AUTH_PLAINTEXT=	yes
X#WITHOUT_AUTH_SPA=		yes
X#
X# Enable support for authenticating via the Cyrus SASL library
X#WITH_AUTH_SASL=		yes
X#
X# Enable built-in Exim support for radius (RFC 2865) authentication
X# RADIUS_TYPE can either be RADLIB (to use the radius library supplied
X# with FreeBSD) or RADIUSCLIENT (to use port net/radiusclient)
X#WITH_AUTH_RADIUS=		yes
X#WITH_RADIUS_TYPE=		RADLIB
X#
X# Disable built-in Exim support for additional mailbox formats.
X#WITHOUT_MAILDIR=	yes
X#WITHOUT_MAILSTORE=	yes
X#WITHOUT_MBX=		yes
X#
X# Define WITHOUT_CDB, WITHOUT_DNSDB, WITHOUT_DSEARCH, WITHOUT_LSEARCH,
X# WITHOUT_NIS and WITHOUT_PASSWD to disable support for CDB-style, DNS-style,
X# directory-list, wildcarded-file, NIS and /etc/passwd lookups respectively.
X#WITHOUT_CDB=		yes
X#WITHOUT_DNSDB=		yes
X#WITHOUT_DSEARCH=	yes
X#WITHOUT_LSEARCH=	yes
X#WITHOUT_NIS=		yes
X#WITHOUT_PASSWD=	yes
X#
X# Disable support for the LMTP (RFC 2033 "SMTP over command pipe")
X# transport.
X#WITHOUT_LMTP=		yes
X#
X# Allow alternate configuration files not only in ${PREFIX}/etc/exim
X#WITHOUT_ALT_CONFIG_PREFIX=	yes
X#
X# Include the unsupported patches in ${PATCHDIR}/wishlist-*.patch
X#WITH_WISHLIST=		yes
X#
X# Enable Sender Policy Framework (SPF) checking in exiscan-acl
X#WITH_SPF=		yes
X#
X# Enable Sender Rewriting Scheme (SRS)
X#WITH_SRS=		yes
X#
X# Use the readline(3) library for the test expansion option
X#WITH_READLINE=		yes
X#
X# Don't install the exim binary suid root
X#WITHOUT_SUID=		yes
X#
X# Don't install scripts to run exim as a daemon
X# (for example when using option mua_wrapper)
X#WITHOUT_DAEMON=	yes
X
X# You should not need to fiddle with anything below this point.
X
X.if defined(WITH_WISHLIST)
XEXTRA_PATCHES+=	`${FIND} ${PATCHDIR} -name 'wishlist-*.patch'`
X.endif
X
XSEDLIST+=	-e 's,XX_CFLAGS_XX,${CFLAGS},' \
X		-e 's,XX_PREFIX_XX,${PREFIX},' \
X		-e 's,XX_LOCALBASE_XX,${LOCALBASE},' \
X		-e 's,XX_LOG_FILE_PATH_XX,${LOG_FILE_PATH},' \
X		-e 's,XX_EXIM_USER_XX,${EXIM_USER},' \
X		-e 's,XX_EXIM_GROUP_XX,${EXIM_GROUP},' \
X		-e 's,XX_DEFAULT_CHARSET_XX,${WITH_DEFAULT_CHARSET},'
X
X.if defined(WITH_FIXED_NEVER_USERS)
XSEDLIST+=	-e 's,^(FIXED_NEVER_USERS=).*,\1${WITH_FIXED_NEVER_USERS},'
X.endif
X
X.if defined(WITH_EXIMON)
XSEDLIST+=	-e 's,^\# (EXIM_MONITOR=),\1,'
XPLIST_SUB+=	EXIMON=""
X.else
XPLIST_SUB+=	EXIMON="@comment "
X.endif
X
X.if !defined(WITHOUT_TLS)
XUSE_OPENSSL=	yes
XSEDLIST+=	-e 's,^\# (SUPPORT_TLS=),\1,'
X.else
XSEDLIST+=	-e 's,^(TLS_LIBS=),\# \1,'
X.endif
X
X.if !defined(WITHOUT_PERL)
XUSE_PERL5=	yes
XSEDLIST+=	-e 's,^\# (EXIM_PERL=),\1,'
X.endif
X
X.if defined(WITH_TCP_WRAPPERS)
XSEDLIST+=	-e 's,XX_TCP_WRAPPERS_LIBS_XX,-lwrap,' \
X		-e 's,^\# (USE_TCP_WRAPPERS=),\1,'
X.else
XSEDLIST+=	-e 's,XX_TCP_WRAPPERS_LIBS_XX,,'
X.endif
X
X.if !defined(WITHOUT_ICONV)
XUSE_ICONV=	yes
XSEDLIST+=	-e 's,XX_ICONV_LIBS_XX,-L${LOCALBASE}/lib -liconv,' \
X		-e 's,^\# (HAVE_ICONV=),\1,'
X.else
XSEDLIST+=	-e 's,XX_ICONV_LIBS_XX,,'
X.endif
X
X.if defined(WITH_LDAP) || defined(LDAP_LIB_TYPE) \
X	|| defined(WITH_OPENLDAP1) || defined(WITH_OPENLDAP2) \
X	|| defined(WITH_OPENLDAP20) || defined(WITH_OPENLDAP21)
XBROKEN=		"deprecated LDAP option defined, use WITH_OPENLDAP or WITH_OPENLDAP_VER"
X.endif
X
X.if defined(WITH_OPENLDAP_VER) && ${WITH_OPENLDAP_VER:L} != "auto"
XWANT_OPENLDAP_VER=	${WITH_OPENLDAP_VER}
X.endif
X
X.if defined(WITH_OPENLDAP)
XUSE_OPENLDAP=	yes
XLDAP_LIB_TYPE=	OPENLDAP2
XSEDLIST+=	-e 's,XX_LDAP_LIBS_XX,-L${LOCALBASE}/lib -llber -lldap,' \
X		-e 's,XX_LDAP_INCLUDE_XX,-I${LOCALBASE}/include,' \
X		-e 's,XX_LDAP_TYPE_XX,${LDAP_LIB_TYPE},' \
X		-e 's,^\# (LOOKUP_LDAP=),\1,'
X.else
XSEDLIST+=	-e 's,XX_LDAP_[^ ]*_XX,,' \
X		-e 's,^(LDAP_LIB_TYPE=),\# \1,'
X.endif
X
X.if defined(DB_LIB_VERSION)
XBROKEN=		"deprecated option DB_LIB_VERSION used, use WITH_BDB_VER"
X.endif
X
X.if ${WITH_BDB_VER} == 1
XDB_LIBS=
XDB_INCLUDES=
XSEDLIST+=	-e 's,^(DBMLIB=),\# \1,'
X.elif (${WITH_BDB_VER} == 4)
XDB_LIBS=	-L${LOCALBASE}/lib -ldb4
XDB_INCLUDES=	-I${LOCALBASE}/include/db4
XLIB_DEPENDS+=	db4.0:${PORTSDIR}/databases/db4
X.elif (${WITH_BDB_VER} == 41)
XDB_LIBS=	-L${LOCALBASE}/lib -ldb41
XDB_INCLUDES=	-I${LOCALBASE}/include/db41
XLIB_DEPENDS+=	db41.1:${PORTSDIR}/databases/db41
X.elif (${WITH_BDB_VER} == 42)
XDB_LIBS=	-L${LOCALBASE}/lib -ldb-4.2
XDB_INCLUDES=	-I${LOCALBASE}/include/db42
XLIB_DEPENDS+=	db-4.2.2:${PORTSDIR}/databases/db42
X.elif (${WITH_BDB_VER} == 43)
XDB_LIBS=	-L${LOCALBASE}/lib -ldb-4.3
XDB_INCLUDES=	-I${LOCALBASE}/include/db43
XLIB_DEPENDS+=	db-4.3.0:${PORTSDIR}/databases/db43
X.else
XBROKEN=		"WITH_BDB_VER must be either 1, 4, 41, 42 or 43"
X.endif
XSEDLIST+=	-e 's,XX_DB_LIBS_XX,${DB_LIBS},' \
X		-e 's,XX_DB_INCLUDES_XX,${DB_INCLUDES},'
X
X.if defined(WITH_MYSQL_VER) && ${WITH_MYSQL_VER:L} != "auto"
XWANT_MYSQL_VER=	${WITH_MYSQL_VER}
X.else
X.undef WITH_MYSQL_VER
X.endif
X
X.if defined(WITH_MYSQL)
XUSE_MYSQL=	yes
XSEDLIST+=	-e 's,XX_MYSQL_LIBS_XX,-L${LOCALBASE}/lib/mysql -lmysqlclient,' \
X		-e 's,XX_MYSQL_INCLUDE_XX,-I${LOCALBASE}/include/mysql,' \
X		-e 's,^\# (LOOKUP_MYSQL=),\1,'
X.else
XSEDLIST+=	-e 's,XX_MYSQL_[^ ]*_XX,,'
X.endif
X
X.if defined(WITH_SASLAUTHD)
XRUN_DEPENDS+=	${LOCALBASE}/sbin/saslauthd:${PORTSDIR}/security/cyrus-sasl2-saslauthd
XSEDLIST+=	-e 's,^\# (CYRUS_SASLAUTHD_SOCKET=),\1,'
X.endif
X
X.if defined(WITH_PWCHECK)
XRUN_DEPENDS+=	${LOCALBASE}/sbin/pwcheck:${PORTSDIR}/security/cyrus-sasl
XSEDLIST+=	-e 's,^\# (SUPPORT_CYRUS_PWCHECK=),\1,' \
X		-e 's,^\# (CYRUS_PWCHECK_SOCKET=),\1,'
X.endif
X
X.if !defined(WITHOUT_PAM)
XSEDLIST+=	-e 's,XX_PAM_LIBS_XX,-lpam,' \
X		-e 's,^\# (SUPPORT_PAM=),\1,'
X.else
XSEDLIST+=	-e 's,XX_PAM_LIBS_XX,,'
X.endif
X
X.if !defined(WITHOUT_AUTH_CRAM_MD5)
XSEDLIST+=	-e 's,^\# (AUTH_CRAM_MD5=),\1,'
X.endif
X
X.if !defined(WITHOUT_AUTH_PLAINTEXT)
XSEDLIST+=	-e 's,^\# (AUTH_PLAINTEXT=),\1,'
X.endif
X
X.if !defined(WITHOUT_AUTH_SPA)
XSEDLIST+=	-e 's,^\# (AUTH_SPA=),\1,'
X.endif
X
X.if defined(WITH_AUTH_SASL)
XLIB_DEPENDS=	sasl2.2:${PORTSDIR}/security/cyrus-sasl2
XSEDLIST+=	-e 's,^\# (AUTH_CYRUS_SASL=),\1,' \
X		-e 's,^\# (AUTH_LIBS=),\1,'
X.endif
X
X.if defined(WITH_AUTH_RADIUS)
XWITH_RADIUS_TYPE?=	RADLIB
X.if ${WITH_RADIUS_TYPE:L} == radlib
XSEDLIST+=	-e 's,XX_RADIUS_LIBS_XX,-lradius,' \
X		-e 's,^\# (RADIUS_CONFIG_FILE=).*,\1/etc/radius.conf,' \
X		-e 's,^\# (RADIUS_LIB_TYPE=).*,\1RADLIB,'
X.elif ${WITH_RADIUS_TYPE:L} == radiusclient
XLIB_DEPENDS+=	radiusclient.0:${PORTSDIR}/net/radiusclient
XSEDLIST+=	-e 's,XX_RADIUS_LIBS_XX,-L${LOCALBASE}/lib -lradiusclient,' \
X		-e 's,^\# (RADIUS_CONFIG_FILE=).*,\1${LOCALBASE}/etc/radiusclient.conf,' \
X		-e 's,^\# (RADIUS_LIB_TYPE=).*,\1RADIUSCLIENT,'
X.else
XIGNORE=		WITH_RADIUS_TYPE must be either RADLIB or RADIUSCLIENT
X.endif
X.else
XSEDLIST+=	-e 's,XX_RADIUS_LIBS_XX,,'
X.endif
X
X.if defined(WITH_PGSQL)
XUSE_PGSQL=	yes
XSEDLIST+=	-e 's,XX_PGSQL_LIBS_XX,-L${LOCALBASE}/lib -lpq,' \
X		-e 's,XX_PGSQL_INCLUDE_XX,-I${LOCALBASE}/include/pgsql,' \
X		-e 's,^\# (LOOKUP_PGSQL=),\1,'
X.else
XSEDLIST+=	-e 's,XX_PGSQL_[^ ]*_XX,,'
X.endif
X
X.if !defined(WITH_PGSQL) && !defined(WITH_MYSQL) && !defined(LDAP_LIB_TYPE) && \
X    ${WITH_BDB_VER} == 1
XSEDLIST+=	-e 's,^(LOOKUP_LIBS=),\# \1,' \
X		-e 's,^(LOOKUP_INCLUDE=),\# \1,'
X.endif
X
X.if !defined(WITHOUT_DNSDB)
XSEDLIST+=	-e 's,^\# (LOOKUP_DNSDB=),\1,'
X.endif
X
X.if !defined(WITHOUT_MAILDIR)
XSEDLIST+=	-e 's,^\# (SUPPORT_MAILDIR=),\1,'
X.endif
X
X.if !defined(WITHOUT_MAILSTORE)
XSEDLIST+=	-e 's,^\# (SUPPORT_MAILSTORE=),\1,'
X.endif
X
X.if !defined(WITHOUT_MBX)
XSEDLIST+=	-e 's,^\# (SUPPORT_MBX=),\1,'
X.endif
X
X.if !defined(WITHOUT_CDB)
XSEDLIST+=	-e 's,^\# (LOOKUP_CDB=),\1,'
X.endif
X
X.if !defined(WITHOUT_DSEARCH)
XSEDLIST+=	-e 's,^\# (LOOKUP_DSEARCH=),\1,'
X.endif
X
X.if defined(WITHOUT_LSEARCH)
XSEDLIST+=	-e 's,^(LOOKUP_LSEARCH=),\# \1,'
X.endif
X
X.if !defined(WITHOUT_NIS)
XSEDLIST+=	-e 's,^\# (LOOKUP_NIS=),\1,'
X.endif
X
X.if !defined(WITHOUT_PASSWD)
XSEDLIST+=	-e 's,^\# (LOOKUP_PASSWD=),\1,'
X.endif
X
X.if defined(WITH_SQLITE)
XSEDLIST+=	-e 's,XX_SQLITE_LIBS_XX,-L${LOCALBASE}/lib -lsqlite3,' \
X		-e 's,XX_SQLITE_FLAGS_XX,-I${LOCALBASE}/include,' \
X		-e 's,^\# (LOOKUP_SQLITE=),\1,'
XLIB_DEPENDS+=	sqlite3.8:${PORTSDIR}/databases/sqlite3
X.else
XSEDLIST+=	-e 's,XX_SQLITE_LIBS_XX,,' \
X		-e 's,XX_SQLITE_FLAGS_XX,,'
X.endif
X
X.if !defined(WITHOUT_LMTP)
XSEDLIST+=	-e 's,^\# (TRANSPORT_LMTP=),\1,'
X.endif
X
X.if defined(WITHOUT_ALT_CONFIG_PREFIX)
XSEDLIST+=	-e 's,^(ALT_CONFIG_PREFIX=),\# \1,'
X.endif
X
X.if defined(WITH_SPF)
XLIB_DEPENDS+=	spf2.2:${PORTSDIR}/mail/libspf2
XSEDLIST+=	-e 's,XX_SPF_FLAGS_XX,-DSPF,' \
X		-e 's,XX_SPF_LIBS_XX,-lspf2 ${PTHREAD_LIBS},' \
X		-e 's,^\# (EXPERIMENTAL_SPF=),\1,'
X.else
XSEDLIST+=	-e 's,XX_SPF_FLAGS_XX,,' \
X		-e 's,XX_SPF_LIBS_XX,,'
X.endif
X
X.if defined(WITH_SRS)
XLIB_DEPENDS+=	srs2.0:${PORTSDIR}/mail/libsrs2
XSEDLIST+=	-e 's,XX_SRS_FLAGS_XX,-DSRS,' \
X		-e 's,XX_SRS_LIBS_XX,-lsrs2,'
X.else
XSEDLIST+=	-e 's,XX_SRS_FLAGS_XX,,' \
X		-e 's,XX_SRS_LIBS_XX,,'
X.endif
X
X.if defined(WITH_SA_EXIM)
XRUN_DEPENDS+=	${LOCALBASE}/bin/spamc:${PORTSDIR}/mail/p5-Mail-SpamAssassin
XPLIST_SUB+=	SA_EXIM=""
X.else
XPLIST_SUB+=	SA_EXIM="@comment "
X.endif
X
X.if defined(WITH_READLINE)
XSEDLIST+=	-e 's,^\# (USE_READLINE=),\1,'
X.endif
X
X.if defined(WITH_CONTENT_SCAN)
XSEDLIST+=	-e 's,^\# (WITH_CONTENT_SCAN=),\1,'
X.endif
X
X.if !defined(WITHOUT_OLD_DEMIME)
XSEDLIST+=	-e 's,^\# (WITH_OLD_DEMIME=),\1,'
X.endif
X
X.include <bsd.port.pre.mk>
X
X.if defined(EXIMON_ONLY) && ${MASTERDIR} == ${PKGDIR}
X.error EXIMON_ONLY is not user settable
X.endif
X
X.if !defined(EXIMON_ONLY) && !defined(WITHOUT_DAEMON)
XUSE_RC_SUBR=	yes
X.if defined(WITH_RCORDER) && ${OSVERSION} >= 500037
XRC_DIR=		/etc/rc.d
XRC_SUFX=
XPLIST_SUB+=	RCORDER="" \
X		RC_DIR=${RC_DIR} \
X		RC_SUFX=${RC_SUFX}
X.else
XRC_DIR=		${PREFIX}/etc/rc.d
XRC_SUFX=	.sh
XPLIST_SUB+=	RCORDER="@comment " \
X		RC_DIR="%D/etc/rc.d" \
X		RC_SUFX=${RC_SUFX}
X.endif
XSED_SCRIPT+=	-e 's,%%RC_SUBR%%,${RC_SUBR},g' \
X		-e 's,%%RC_DIR%%,${RC_DIR},g' \
X		-e 's,%%RC_SUFX%%,${RC_SUFX},g'
XPLIST_SUB+=	DAEMON=""
X.else
XPLIST_SUB+=	DAEMON="@comment "
X.endif
X
X.if ${OSVERSION} < 400014
XWITHOUT_IPV6=	yes
X.endif
X
X.if !defined(WITHOUT_IPV6)
XSEDLIST+=	-e 's,^\# (HAVE_IPV6=),\1,'
X.endif
X
XDUMMY_LDFLAGS!=	${ECHO_CMD} ${LDFLAGS} | ${SED} -e 's|-Wl,-rpath|-Wl,-DUMMYrpath|g; s|-rpath|-Wl,-rpath|g; s|-DUMMYrpath|-rpath|g'
X
Xpre-everything::
X.if empty(.MAKEFLAGS:M-s) && defined(WITH_WISHLIST)
X	@${ECHO} ''
X	@${ECHO} 'Included extra patches:'
X	@${FIND} ${PATCHDIR} -name 'wishlist-*.patch' \
X	    -exec ${SED} -ne 's,^# , ,p' {} \;
X	@${ECHO} ''
X.endif
X
Xpost-extract:
X	@${BZCAT} ${_DISTDIR}/FAQ.txt.bz2 > ${WRKSRC}/FAQ
X.if defined(WITH_SA_EXIM)
X	@cd ${WRKDIR} && ${GZIP_CMD} ${EXTRACT_BEFORE_ARGS} ${_DISTDIR}/sa-exim-${SA_EXIM_VERSION}.tar.gz ${EXTRACT_AFTER_ARGS}
X.endif
X
Xdo-configure:
X	@${MKDIR} ${WRKSRC}/Local
X	@${SED} -E ${SEDLIST} ${WRKSRC}/src/EDITME > ${WRKSRC}/Local/Makefile
X.if defined(WITH_EXIMON)
X	@${CP} ${WRKSRC}/exim_monitor/EDITME ${WRKSRC}/Local/eximon.conf
X.endif
X	@[ ! -f ${PKGDIR}/pkg-install ] || ${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-install > ${PKGINSTALL}
X	@${REINPLACE_CMD} -E ${SEDLIST} ${WRKSRC}/src/configure.default
X	@${REINPLACE_CMD} -e 's/$$(LDFLAGS)/$$(DUMMY_LDFLAGS)/' ${WRKSRC}/OS/Makefile-Base
X	@${REINPLACE_CMD} -e 's/"(Exim $$version_number)\\n\\t"/"(Exim $$version_number (${OPSYS}))\\n\\t"/' \
X		${WRKSRC}/src/globals.c
X	@${REINPLACE_CMD} -e 's/Exim version %s \(#%s \)\{0,1\}/&(${OPSYS} ${OSREL}) /' ${WRKSRC}/src/exim.c
X	@${REINPLACE_CMD} -e 's/^#include "cnumber\.h"$$/${PORTREVISION}/' ${WRKSRC}/src/version.c
X	@${REINPLACE_CMD} -E -e 's/^(PERL_COMMAND=).*/\1${PERL:S,/,\/,g}/' \
X		-e 's/^(CC=).*/\1${CC:S,/,\/,g}/' ${WRKSRC}/OS/Makefile-Default
X.if defined(WITH_SA_EXIM)
X	@${REINPLACE_CMD} -E -e 's/^(LOCAL_SCAN_SOURCE=).*/\1Local\/sa-exim.c/' \
X		${WRKSRC}/OS/Makefile-Default
X	@${CP} ${WRKDIR}/sa-exim-${SA_EXIM_VERSION}/sa-exim.c ${WRKSRC}/Local
X	@{ \
X	    ${ECHO_CMD} "char *version=\"${SA_EXIM_VERSION}\";"; \
X	    ${ECHO_CMD} "#define SPAMC_LOCATION		\"${LOCALBASE}/bin/spamc\""; \
X	    ${ECHO_CMD} "#define SPAMASSASSIN_CONF	\"${PREFIX}/etc/exim/sa-exim.conf\""; \
X	} > ${WRKSRC}/Local/sa-exim.h
X	@${REINPLACE_CMD} -e 's,/usr/bin/spamc,${LOCALBASE}/bin/spamc,' \
X	    ${WRKDIR}/sa-exim-${SA_EXIM_VERSION}/sa-exim.conf
X.endif
X	@(cd ${WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} configure)
X
Xpost-build:
X.for script in exim ${DAILY_SCRIPTS}
X	@${SED} ${SED_SCRIPT} ${FILESDIR}/${script}.sh > ${WRKDIR}/${script}.sh
X.endfor
X	@${SED} ${SED_SCRIPT} ${FILESDIR}/POST-INSTALL-NOTES > \
X		${WRKDIR}/POST-INSTALL-NOTES
X	@${SED} ${SED_SCRIPT} ${FILESDIR}/POST-INSTALL-NOTES.clamd > ${WRKDIR}/POST-INSTALL-NOTES.clamd
X	@${SED} ${SED_SCRIPT} ${FILESDIR}/POST-INSTALL-NOTES > ${WRKDIR}/POST-INSTALL-NOTES
X	@[ ! -f ${PKGDIR}/pkg-message ] || ${SED} ${SED_SCRIPT} ${PKGDIR}/pkg-message > ${WRKDIR}/pkg-message
X
X.if !defined(EXIMON_ONLY)
X
Xpre-install:
X	@[ -d "${DESTDIR}/etc" ] || ${MKDIR} "${DESTDIR}/etc"
X	@${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" ${SH} ${PKGINSTALL} ${PKGNAME} PRE-INSTALL
X
Xpost-install:
X.if !defined(WITHOUT_DAEMON)
X	@${INSTALL_SCRIPT} ${WRKDIR}/exim.sh ${DESTDIR}${RC_DIR}/exim${RC_SUFX}
X	@${MKDIR} ${DESTDIR}${PREFIX}/etc/periodic/daily
X.for script in ${DAILY_SCRIPTS}
X	@${INSTALL_SCRIPT} ${WRKDIR}/${script}.sh ${DESTDIR}${PREFIX}/etc/periodic/daily/${script}
X.endfor
X.endif
X	@[ -f ${DESTDIR}${PREFIX}/etc/exim/configure ] || \
X		${CP} ${DESTDIR}${PREFIX}/etc/exim/configure.default ${DESTDIR}${PREFIX}/etc/exim/configure
X.for manfile in ${MAN8}
X	@${INSTALL_MAN} ${WRKSRC}/doc/${manfile} ${DESTDIR}${MAN8PREFIX}/man/man8
X.endfor
X.if !defined(NOPORTDOCS)
X	@${MKDIR} ${DESTDIR}${DOCSDIR}
X	@${INSTALL_DATA} ${WRKDIR}/POST-INSTALL-NOTES ${DESTDIR}${DOCSDIR}
X	@${INSTALL_DATA} ${WRKDIR}/POST-INSTALL-NOTES.clamd ${DESTDIR}${DOCSDIR}
X.for docfile in ${PORTDOC_BASE}
X	@${INSTALL_DATA} ${WRKSRC}/${docfile} ${DESTDIR}${DOCSDIR}
X.endfor
X.for docfile in ${PORTDOC_FILES}
X	@${INSTALL_DATA} ${WRKSRC}/doc/${docfile} ${DESTDIR}${DOCSDIR}
X.endfor
X	@${MKDIR} ${DESTDIR}${EXAMPLESDIR}
X.for example in ${PORT_EXAMPLES}
X	@${INSTALL_SCRIPT} ${WRKSRC}/build-${OPSYS}-${ARCH}/${example} ${DESTDIR}${EXAMPLESDIR}
X.endfor
X.endif
X.if defined(WITH_SA_EXIM)
X	@${INSTALL_DATA} ${WRKDIR}/sa-exim-${SA_EXIM_VERSION}/sa-exim.conf \
X		${DESTDIR}${PREFIX}/etc/exim/sa-exim.conf.default
X	@[ -f ${DESTDIR}${PREFIX}/etc/exim/sa-exim.conf ] || \
X	    ${CP} ${DESTDIR}${PREFIX}/etc/exim/sa-exim.conf.default \
X	    ${DESTDIR}${PREFIX}/etc/exim/sa-exim.conf
X.endif
X	@${CAT} ${PKGMESSAGE}
X	@${SETENV} PKG_PREFIX="${PREFIX}" PKG_DESTDIR="${DESTDIR}" ${SH} ${PKGINSTALL} ${PKGNAME} POST-INSTALL
X
X.else
X
Xpost-install:
X	@${CAT} ${PKGMESSAGE}
X
X.endif
X
X.include <bsd.port.post.mk>
END-of-exim/Makefile.orig
echo x - exim/distinfo.orig
sed 's/^X//' >exim/distinfo.orig << 'END-of-exim/distinfo.orig'
XMD5 (exim/exim-4.53.tar.bz2) = 674cd9e25c8e1e45351a1ea262776fb3
XSIZE (exim/exim-4.53.tar.bz2) = 1547374
XMD5 (exim/sa-exim-4.2.tar.gz) = ad76f73c6b3d01caa88078e3e622745a
XSIZE (exim/sa-exim-4.2.tar.gz) = 66575
XMD5 (exim/FAQ.txt.bz2) = IGNORE
END-of-exim/distinfo.orig
echo x - exim/Makefile.diff
sed 's/^X//' >exim/Makefile.diff << 'END-of-exim/Makefile.diff'
X--- Makefile.orig	Sat Oct  8 12:58:38 2005
X+++ Makefile	Sat Oct  8 12:59:33 2005
X@@ -28,7 +28,7 @@
X DISTFILES+=	sa-exim-${SA_EXIM_VERSION}.tar.gz:sa_exim
X .endif
X 
X-EXIM_VERSION=	4.53
X+EXIM_VERSION=	4.54
X SA_EXIM_VERSION=4.2
X 
X IGNOREFILES=	FAQ.txt.bz2
END-of-exim/Makefile.diff
echo x - exim/distinfo.diff
sed 's/^X//' >exim/distinfo.diff << 'END-of-exim/distinfo.diff'
X--- distinfo.orig	Sat Oct  8 12:58:42 2005
X+++ distinfo	Sat Oct  8 13:04:16 2005
X@@ -1,5 +1,3 @@
X-MD5 (exim/exim-4.53.tar.bz2) = 674cd9e25c8e1e45351a1ea262776fb3
X-SIZE (exim/exim-4.53.tar.bz2) = 1547374
X-MD5 (exim/sa-exim-4.2.tar.gz) = ad76f73c6b3d01caa88078e3e622745a
X-SIZE (exim/sa-exim-4.2.tar.gz) = 66575
X+MD5 (exim/exim-4.54.tar.bz2) = f3cdf5292f4bbb1ee2de42d4338b3b9f
X+SIZE (exim/exim-4.54.tar.bz2) = 1547608
X MD5 (exim/FAQ.txt.bz2) = IGNORE
END-of-exim/distinfo.diff
exit
--- exim.shar ends here ---


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1EO81l-0002Cc-Rz>