diff options
author | Sheldon Hearn <sheldonh@FreeBSD.org> | 2003-09-10 13:49:09 +0000 |
---|---|---|
committer | Sheldon Hearn <sheldonh@FreeBSD.org> | 2003-09-10 13:49:09 +0000 |
commit | 55c1140415cbe3b10e15ca807f7ec5de81f6cb43 (patch) | |
tree | a8dd22c74108b637fe1a3ae8c91b3b9e61256cd6 /mail/exim/files | |
parent | 12f08c0b4696dab6b36902716201ed752d105f32 (diff) | |
download | ports-55c1140415cbe3b10e15ca807f7ec5de81f6cb43.tar.gz ports-55c1140415cbe3b10e15ca807f7ec5de81f6cb43.zip |
Notes
Diffstat (limited to 'mail/exim/files')
-rw-r--r-- | mail/exim/files/150.exim-tidydb.sh | 34 | ||||
-rw-r--r-- | mail/exim/files/460.exim-mail-rejects.sh | 68 | ||||
-rw-r--r-- | mail/exim/files/POST-INSTALL-NOTES | 10 | ||||
-rw-r--r-- | mail/exim/files/POST-INSTALL-NOTES.clamd | 2 | ||||
-rw-r--r-- | mail/exim/files/POST-INSTALL-NOTES.exiscan-acl | 4 | ||||
-rw-r--r-- | mail/exim/files/exim.sh | 82 |
6 files changed, 168 insertions, 32 deletions
diff --git a/mail/exim/files/150.exim-tidydb.sh b/mail/exim/files/150.exim-tidydb.sh new file mode 100644 index 000000000000..5239368204ee --- /dev/null +++ b/mail/exim/files/150.exim-tidydb.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Exim hints database maintenance +# +# contributed by: Oliver Eikemeier <eikemeier@fillmore-labs.com> +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ]; then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +exim_tidydb_enable=${exim_tidydb_enable:-"YES"} +exim_tidydb=${exim_tidydb:-"/usr/local/sbin/exim_tidydb"} +exim_dbdir=${exim_dbdir:-"/var/spool/exim"} + +case "$exim_tidydb_enable" in + [Yy][Ee][Ss]) + echo "" + echo "Tidying Exim hints databases:" + for db in "$exim_dbdir"/db/*.lockfile; do + echo "" + "$exim_tidydb" "$exim_dbdir" `basename $db .lockfile` + done + rc=1;; + + *) rc=0;; +esac + +exit $rc diff --git a/mail/exim/files/460.exim-mail-rejects.sh b/mail/exim/files/460.exim-mail-rejects.sh new file mode 100644 index 000000000000..f1cdc39babb9 --- /dev/null +++ b/mail/exim/files/460.exim-mail-rejects.sh @@ -0,0 +1,68 @@ +#!/bin/sh +# +# $FreeBSD$ +# +# Check for rejected mail +# Log lines that end with ' : IGNORE' will not be reported +# +# contributed by: Oliver Eikemeier <eikemeier@fillmore-labs.com> +# + +# If there is a global system configuration file, suck it in. +# +if [ -r /etc/defaults/periodic.conf ] +then + . /etc/defaults/periodic.conf + source_periodic_confs +fi + +exim_status_mail_rejects_enable=${exim_status_mail_rejects_enable:-"YES"} +exim_status_mail_rejects_logs=${exim_status_mail_rejects_logs:-2} +exim_rejectlog=${exim_rejectlog:-"/var/log/exim/rejectlog"} + +case "$exim_status_mail_rejects_enable" in + [Yy][Ee][Ss]) + if [ ! -d `dirname "$exim_rejectlog"` ] + then + echo '$exim_status_mail_rejects_enable is set but' \ + "`dirname "$exim_rejectlog"` doesn't exist" + rc=2 + elif [ "$exim_status_mail_rejects_logs" -le 0 ] + then + echo '$exim_status_mail_rejects_enable is set but' \ + '$exim_status_mail_rejects_logs is not greater than zero' + rc=2 + else + echo + echo Checking for rejected mail: + + start=`date -v-1d '+%Y-%m-%d'` + n=$(($exim_status_mail_rejects_logs - 2)) + rc=$({ + while [ $n -ge 0 ] + do + if [ -f "$exim_rejectlog.$n" ] + then + cat "$exim_rejectlog.$n" + elif [ -f "$exim_rejectlog.$n.gz" ] + then + zcat -fc "$exim_rejectlog.$n.gz" + elif [ -f "$exim_rejectlog.$n.bz2" ] + then + bzcat -fc "$exim_rejectlog.$n.bz2" + fi + n=$(($n - 1)) + done + if [ -f "$exim_rejectlog" ] + then + cat "$exim_rejectlog" + fi + } | + grep -e "^$start" | grep -v ' : IGNORE$' | tee /dev/stderr | wc -l) + [ $rc -gt 0 ] && rc=1 + fi;; + + *) rc=0;; +esac + +exit $rc diff --git a/mail/exim/files/POST-INSTALL-NOTES b/mail/exim/files/POST-INSTALL-NOTES index dc6c488fb8e6..cdeacff6f373 100644 --- a/mail/exim/files/POST-INSTALL-NOTES +++ b/mail/exim/files/POST-INSTALL-NOTES @@ -6,22 +6,22 @@ The following documentation has been installed: In addition, plain text versions of these documents have been installed as: - ${PREFIX}/share/doc/exim/filter.txt - ${PREFIX}/share/doc/exim/spec.txt + %%DOCSDIR%%/filter.txt + %%DOCSDIR%%/spec.txt Postscript, PDF, HTML and plain text versions of these documents, as well as a comprehensive FAQ list, are available at http://www.exim.org/ . To use Exim instead of sendmail on startup: -*) Create exim/configure from exim/configure.default . *) Clear the sendmail queue and stop the sendmail daemon. *) Adjust mailer.conf(5) as appropriate. *) Set the 'sendmail_enable' rc.conf(5) variable to 'NONE'. *) Set the 'daily_status_include_submit_mailq' and 'daily_clean_hoststat_enable' periodic.conf(5) variables to 'NO'. -*) Start exim with '${PREFIX}/etc/rc.d/exim.sh start'. +*) Set the 'exim_enable' rc.conf(5) variable to 'YES'. +*) Start exim with '%%RC_DIR%%/exim%%RC_SUFX%% start'. You may also want to configure newsyslog(8) to rotate Exim log files: @@ -36,6 +36,6 @@ now done by routers. Policy controls for incoming mail are now done by Access Control Lists instead of separate options. All this means that pre-4.00 configuration files have to be massively converted. If you are coming from a 3.xx release, please read the document in the file -${PREFIX}/share/doc/exim/Exim4.upgrade, and allow some time to complete +%%DOCSDIR%%/Exim4.upgrade, and allow some time to complete the upgrade. diff --git a/mail/exim/files/POST-INSTALL-NOTES.clamd b/mail/exim/files/POST-INSTALL-NOTES.clamd index cfc7b0ab405e..7ea8aad22694 100644 --- a/mail/exim/files/POST-INSTALL-NOTES.clamd +++ b/mail/exim/files/POST-INSTALL-NOTES.clamd @@ -38,7 +38,7 @@ It is important to follow them in sequence. * Start clamd with /usr/local/etc/rc.d/clamd.sh start . -* Start Exim with /usr/local/etc/rc.d/exim.sh start . +* Start Exim with %%RC_DIR%%/exim%%RC_SUFX%% start . Sheldon Hearn <sheldonh@FreeBSD.org> diff --git a/mail/exim/files/POST-INSTALL-NOTES.exiscan-acl b/mail/exim/files/POST-INSTALL-NOTES.exiscan-acl index 148e6d1fe082..2cd1fc11363c 100644 --- a/mail/exim/files/POST-INSTALL-NOTES.exiscan-acl +++ b/mail/exim/files/POST-INSTALL-NOTES.exiscan-acl @@ -1,11 +1,11 @@ This installation of Exim includes Exiscan content scanning support, from http://duncanthrax.net/exiscan-acl/, which is documented in -${PREFIX}/share/doc/exim/exiscan-acl-spec.txt. The ports tree +%%DOCSDIR%%/exiscan-acl-spec.txt. The ports tree includes various content scanners that might be useful, e.g. mail/p5-Mail-SpamAssassin and security/clamav. Notes for enabling malware scanning with the excellent clamd scanner -are in ${PREFIX}/share/doc/exim/POST-INSTALL-NOTES.clamd. +are in %%DOCSDIR%%/POST-INSTALL-NOTES.clamd. When Exiscan is actually enabled in the Exim configure file, great care should be taken to test upgrades, since Exiscan updates tend diff --git a/mail/exim/files/exim.sh b/mail/exim/files/exim.sh index 3b58c00fa14f..cac669b06d41 100644 --- a/mail/exim/files/exim.sh +++ b/mail/exim/files/exim.sh @@ -2,29 +2,63 @@ # # $FreeBSD$ # -# Note that 'pidfile' may need to be changed if 'args' is altered; see -# the description of the 'pid_file_path' Exim configuration option in -# the Exim Specification. + +# PROVIDE: mail +# REQUIRE: LOGIN +# KEYWORD: FreeBSD shutdown +# we make mail start late, so that things like .forward's are not +# processed until the system is fully operational + +# +# Add the following lines to /etc/rc.conf to enable exim: +# +#exim_enable="YES" # -args='-bd -q30m' -pidfile='/var/run/exim.pid' - -case "$1" in -start) - [ -x /usr/local/sbin/exim ] && /usr/local/sbin/exim ${args} && \ - echo -n ' exim' - ;; -stop) - kill `cat ${pidfile}` && echo -n ' exim' - ;; -reload) - kill -HUP `cat ${pidfile}` && echo -n ' exim' - ;; -*) - echo "Usage: `basename $0` {start|stop|reload}" >&2 - exit 64 - ;; -esac - -exit 0 +# See exim(8) for flags +# + +. %%RC_SUBR%% + +name=exim +rcvar=`set_rcvar` + +command=%%PREFIX%%/sbin/exim +pidfile=/var/run/exim.pid +required_dirs=/var/log/exim +required_files=%%PREFIX%%/etc/exim/configure + +start_precmd=start_precmd +stop_postcmd=stop_postcmd + +extra_commands="reload" + +start_precmd() +{ + case $sendmail_enable in + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + warn "sendmail_enable should be set to NONE" + ;; + [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) + case $sendmail_submit_enable in + [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) + warn "sendmail_submit_enable should be set to NO" + ;; + esac + ;; + [Nn][Oo][Nn][Ee]) + ;; + esac +} + +stop_postcmd() +{ + rm -f $pidfile +} + +# set defaults + +exim_enable=${exim_enable:-"NO"} +exim_flags=${exim_flags:-"-bd -q30m"} +load_rc_config $name +run_rc_command "$1" |