diff options
author | Thomas Morper <thomas@beingboiled.info> | 2010-04-07 22:30:26 -0500 |
---|---|---|
committer | Robby Workman <rworkman@slackbuilds.org> | 2010-05-15 10:24:20 +0200 |
commit | ffd97168269b59ebcd2b1697cbeedc8fa1329cec (patch) | |
tree | 94dfb67ecd0bac515f5ab185684fa0ce7055ad0f /network/exim/contrib | |
parent | 669ea352d9812695a8921a735bb0ab63ea32414d (diff) |
network/exim: Added. exim is a sendmail replacement.
Diffstat (limited to 'network/exim/contrib')
-rw-r--r-- | network/exim/contrib/exim.cron | 12 | ||||
-rw-r--r-- | network/exim/contrib/exim.logrotate | 8 | ||||
-rw-r--r-- | network/exim/contrib/rc.exim.new | 62 |
3 files changed, 82 insertions, 0 deletions
diff --git a/network/exim/contrib/exim.cron b/network/exim/contrib/exim.cron new file mode 100644 index 0000000000000..94d7442b60c3e --- /dev/null +++ b/network/exim/contrib/exim.cron @@ -0,0 +1,12 @@ +#!/bin/sh + +# Exim's spool directory +SPOOL=/var/spool/exim + +# Check for spool and the tidydb utility +test -d $SPOOL -a -x /usr/sbin/exim_tidydb || exit + +# Tidy up the contents of the hints databases +find $SPOOL/db -name '*.lockfile' -exec basename {} .lockfile \; \ + | xargs -r -n 1 sudo -u exim /usr/sbin/exim_tidydb -t 7d $SPOOL \ + > /dev/null diff --git a/network/exim/contrib/exim.logrotate b/network/exim/contrib/exim.logrotate new file mode 100644 index 0000000000000..8a55fce2ceaaf --- /dev/null +++ b/network/exim/contrib/exim.logrotate @@ -0,0 +1,8 @@ +/var/log/exim/*.log { + missingok + notifempty + sharedscripts + postrotate + /usr/bin/pkill -HUP -u exim + endscript +} diff --git a/network/exim/contrib/rc.exim.new b/network/exim/contrib/rc.exim.new new file mode 100644 index 0000000000000..16d1ca71d0ba4 --- /dev/null +++ b/network/exim/contrib/rc.exim.new @@ -0,0 +1,62 @@ +#!/bin/sh + +# /etc/rc.d/rc.exim - start/stop/restart the exim mail transfer agent. +# +# Thales A. Tsailas <ttsailas@enforcingit.com> +# Thomas Morper <thomas@beingboiled.info> + +PIDFILE=/var/run/exim.pid + +# the TIME option causes Exim to run as a daemon, starting a queue runner +# process at intervals specified by the given time value. (ie 5m, 1h etc). +TIME=15m + +exim_start() { + echo "Starting exim..." + /usr/sbin/exim -bd ${TIME:+-q$TIME} +} + +exim_stop() { + echo "Shutting down exim..." + killall exim + rm -f $PIDFILE +} + +exim_reload() { + echo "Reloading exim configuration..." + if [ -f $PIDFILE ]; then + kill -HUP $(cat $PIDFILE) + fi +} + +exim_status() { + if [ -f /var/run/exim.pid ]; then + echo "exim is running..."; + else + echo "exim is not running..."; + fi +} + +# See how we were called. +case "$1" in + start) + exim_start + ;; + stop) + exim_stop + ;; + restart) + exim_stop + sleep 2 + exim_start + ;; + reload) + exim_reload + ;; + status) + exim_status + ;; + *) + echo $"Usage: $0 {start|stop|restart|reload|status}" + ;; +esac |