network/exim: Added to 12.2 repository

This commit is contained in:
Thales A. Tsailas 2010-05-12 23:32:07 +02:00 committed by Michiel van Wessem
parent 54834c8b7d
commit af3d39d47a
9 changed files with 1586 additions and 0 deletions

28
network/exim/README Normal file
View file

@ -0,0 +1,28 @@
Exim is a mail transfer agent (MTA) used on Unix-like operating systems.
It is freely available under the GNU GPL and it aims to be a general
and flexible mailer with extensive facilities for checking incoming e-mail.
Exim was orginally written by Philip Hazel for use in the University
of Cambridge Computing Services e-mail systems.
Exim has no configure but requires the exim.Makefile. This file is included
with the makefile. The exim.Makefile has some of the more important attributes
enabled such as Content scanning, Database integration ((only Mysql), extra
security facilities (such as TCPWRAPPERS) and more.
Also "eximon" (the configuration for this is eximon.Makefile) and has been
included which a nice and simple monitoring tool for X and hence can be used
from any console to monitor your MTA. Please read through both files
and mofidy them as you see fit.
All documentation for exim is included in /usr/doc/exim-*. Another good
source for documentation can be found at http://www.exim-new-users.co.uk/.
To fully integrate Exim with the rest of your system you would have to create
symlinks for sendmail to point to the exim binary. Please *NOTE* that this
might break sendmail from working. If you ever remove exim, you might need to
reinstall Sendmail.
Finally Exim can be integrated with other email tools such as Clamav,
Spamassassin, Bogofilter and others, which are available at Slackbuilds.org.

21
network/exim/doinst.sh Normal file
View file

@ -0,0 +1,21 @@
config() {
NEW="$1"
OLD="$(dirname $NEW)/$(basename $NEW .new)"
# If there's no config file by that name, mv it over:
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "$(cat $OLD | md5sum)" = "$(cat $NEW | md5sum)" ]; then # toss the redundant copy
rm $NEW
fi
# Otherwise, we leave the .new copy for the admin to consider...
}
# Keep same perms on rc.exim.new:
if [ -e etc/rc.d/rc.exim ]; then
cp -a etc/rc.d/rc.exim etc/rc.d/rc.exim.new.incoming
cat etc/rc.d/rc.exim.new > etc/rc.d/rc.exim.new.incoming
mv etc/rc.d/rc.exim.new.incoming etc/rc.d/rc.exim.new
fi
config etc/rc.d/rc.exim.new
config etc/exim/exim.conf.new

1137
network/exim/exim.Makefile Normal file

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,123 @@
#!/bin/sh
# Slackware build script for Exim
# http://www.exim.org/
# Copyright 2008 Thales A. Tsailas (ttsailas@enforcingit.com)
# All rights reserved.
#
# Redistribution and use of this script, with or without modification, is
# permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ''AS IS'' AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# *Extensively* edited by the SlackBuilds.org project. -michiel.
PRGNAM=exim
VERSION=4.69
ARCH=${ARCH:-i486}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
CWD=$(pwd)
TMP=${TMP:-/tmp/SBo}
PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
EXIMUSER=${EXIMUSER:-exim}
EXIMGROUP=${EXIMGROUP:-exim}
EXIMUID=${EXIMUID:-222}
EXIMGID=${EXIMGID:-222}
if [ "$ARCH" = "i486" ]; then
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
elif [ "$ARCH" = "i686" ]; then
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
elif [ "$ARCH" = "x86_64" ]; then
SLKCFLAGS="-O2 -fPIC"
fi
# Exit on most errors
set -e
# Check if the exim and user group exist. If not, then bail
if ! grep ^${EXIMGROUP}: /etc/group 2>&1 > /dev/null; then
cat << EOF
You must have a ${EXIMGROUP} group to run this script.
For example: groupadd -g ${EXIMGID} ${EXIMGROUP}
EOF
exit
elif ! grep ^${EXIMUSER}: /etc/passwd 2>&1 > /dev/null; then
cat << EOF
You must have a ${EXIMUSER} user to run this script.
For example: useradd -u ${EXIMUID} -d /var/spool/exim -s /bin/false -g ${EXIMGROUP} ${EXIMUSER}
EOF
exit
fi
rm -rf $PKG
mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $PRGNAM-$VERSION
tar xvf $CWD/$PRGNAM-$VERSION.tar.gz
cd $PRGNAM-$VERSION
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
-exec chmod 755 {} \; -o \
\( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \
-exec chmod 644 {} \;
# Set the right compiler flags and settings.
# Edit {exim,eximon.Makefile} if you want to change any of these.
sed -e "s/#SLKCFLAGS#/$SLKCFLAGS/" $CWD/exim.Makefile > $TMP/$PRGNAM-$VERSION/Local/Makefile
sed -e "s/#SLKCFLAGS#/$SLKCFLAGS/" $CWD/eximon.Makefile > $TMP/$PRGNAM-$VERSION/Local/eximon.conf
make all
make install DESTDIR=$PKG
( cd $PKG
find . | xargs file | grep "executable" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
find . | xargs file | grep "shared object" | grep ELF | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null
)
mkdir -p $PKG/usr/man/man8
cat doc/$PRGNAM.8 > $PKG/usr/man/man8/$PRGNAM.8
gzip -9 $PKG/usr/man/man8/$PRGNAM.8
mkdir -p $PKG/etc/{logrotate.d,rc.d}
cat $CWD/rc.exim.new > $PKG/etc/rc.d/rc.exim.new
cat $CWD/$PRGNAM.logrotate > $PKG/etc/logrotate.d/$PRGNAM
mv $PKG/etc/exim/exim.conf $PKG/etc/exim/exim.conf.new
mv $PKG/etc/aliases $PKG/etc/aliases.new
mkdir -p $PKG/var/log/exim
mkdir -p -m 0750 $PKG/var/spool/exim/
mkdir -p -m 0750 $PKG/var/spool/exim/{db,input,msglog}
chown -R $EXIMUSER:$EXIMGROUP $PKG/var/{log,spool}/exim
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
cp -a ABOUT ACKNOWLEDGMENTS LICENCE CHANGES doc/* $PKG/usr/doc/$PRGNAM-$VERSION
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc
cat $CWD/doinst.sh > $PKG/install/doinst.sh
cd $PKG
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.tgz

8
network/exim/exim.info Normal file
View file

@ -0,0 +1,8 @@
PRGNAM="exim"
VERSION="4.69"
HOMEPAGE="http://www.exim.org/"
DOWNLOAD="ftp://ftp.exim.org/pub/exim/exim4/exim-4.69.tar.gz"
MD5SUM="56e8db1dfe31e0ee4cef85e8940ceedc"
MAINTAINER="Thales A. Tsailas"
EMAIL="ttsailas@enforcingit.com"
APPROVED="michiel"

View file

@ -0,0 +1,7 @@
# daemon does not need restarting after log rotate
/var/log/exim/*log {
missingok
notifempty
delaycompress
}

View file

@ -0,0 +1,182 @@
# $Cambridge: exim/exim-src/exim_monitor/EDITME,v 1.1 2004/10/07 10:39:01 ph10 Exp $
##################################################
# The Exim Monitor #
##################################################
# This is the template for the Exim monitor's main build-time configuration
# file. It contains settings that are independent of any operating system. It
# should be edited and then saved to a file called Local/eximon.conf before
# running the make command to build the monitor, if any settings are required.
# Local/eximon.conf can be empty if no changes are needed. The examples given
# here (commented out) are the default settings.
# Any settings made in the configuration file can be overridden at run time
# by setting up an environment variable with the same name as any of these
# options, but preceded by EXIMON_, for example, EXIMON_WINDOW_TITLE.
CFLAGS="##SLKCFLAGS#"
##################################################################
# Set these variables as appropriate for your system #
##################################################################
# The qualifying name for your domain. The only use made of this is for
# testing that certain addresses are the same when displaying the
# log tail, and for shortening sender addresses in the queue display.
# QUALIFY_DOMAIN=
# The default minimum width and height for the whole window are 103 and
# 162 pixels respectively. This is enough to hold the left-most stripchart
# and the quit button. The values can be changed here.
# MIN_HEIGHT=162
# MIN_WIDTH=103
# If you uncomment the following setting, the window will start up at
# its minimum size, instead of the default maximum. There may be a quick
# flash during the start-up process. Defining it this way allows it to be
# overridden by an environment variable.
# START_SMALL=${EXIMON_START_SMALL-yes}
# The title for eximon's main display window. It is possible to have
# host name of the machine you are running on substituted into the
# title string. If you include the string ${fullhostname} then the
# complete name is used. If you include ${hostname} then the full
# host name will have the string contained in the DOMAIN variable
# stripped from its right-hand end before being substituted. Any other
# shell or environment variables may also be included.
# If you use any substitutions, remember to ensure that the $ and {}
# characters are escaped from the shell, e.g. by using single quotes.
# WINDOW_TITLE="${hostname} eximon"
# The domain that you want to be stripped from the machine's full hostname
# when forming the short host name for the eximon window title, as
# described above.
# DOMAIN=
# Parameters for the rolling display of the tail of the exim log file.
# The width and depth are measured in pixels; LOG_BUFFER specifies the
# amount of store to set aside for holding the log tail, which is displayed
# in a scrolling window. When this store is full, the earlier 50% of it
# is discarded - this is much more efficient that throwing it away line
# by line. The number given can be followed by the letter K to indicate
# that the value is in kilobytes. A minimum value of 1K is enforced.
# LOG_DEPTH=300
# LOG_WIDTH=950
# LOG_BUFFER=20K
# The font which is used in the log tail display. This is defined in
# the normal X manner. It must be a "character cell" font, because this
# is required by the text widget.
# LOG_FONT=-misc-fixed-medium-r-normal-*-14-140-*-*-*-*-iso8859-1
# Parameters for the display of message that are on the exim queue.
# The width and depth are measured in pixels.
# QUEUE_DEPTH=200
# QUEUE_WIDTH=950
# The font which is used in the queue display.
# QUEUE_FONT=$LOG_FONT
# When a message has more than one undelivered address, they are listed
# one below the other. A limit can be placed on the number of addresses
# displayed for any one message. If there are more, then "..." is used
# to indicate this.
# QUEUE_MAX_ADDRESSES=10
# The display of the contents of the queue is updated every QUEUE_INTERVAL
# seconds by default (there is a button to request update).
# QUEUE_INTERVAL=300
# The size of the popup text window that is used for looking at the
# contents of messages, etc.
# TEXT_DEPTH=200
# The keystroke/mouse-operation that is used to pop up the menu in the
# queue window is configurable. The default is Shift with the lefthand
# mouse button. The name of an alternative can be specified in the standard
# X way of naming these things. With the default configuration for the monitor,
# individuals can override this by setting the EXIMON_MENU_EVENT environment
# variable.
# MENU_EVENT='Shift<Btn1Down>'
# When the menu is used to perform an operation on a message, the result of the
# operation is normally visible in the log window, so Eximon doesn't display
# the output of the generated Exim command. However, you can request that
# this output be shown in a separate window by setting ACTION_OUTPUT to "yes".
# This does not apply to the output generated from attempting to deliver a
# message, which is always shown.
# ACTION_OUTPUT=no
# When some action is taken on a message, such as freezing it, or changing
# its recipients, the queue display is normally automatically updated. On
# systems that have very large queues, this can take some time and be dis-
# tracting. If this option is set to "no", the queue display is no longer
# automatically updated after an action is applied to a message.
# ACTION_QUEUE_UPDATE=yes
# When the menu item to display a message's body is invoked, the amount
# of data is limited to BODY_MAX bytes. This limit is a safety precaution
# to save the screen scrolling for ever on an enormous message.
# BODY_MAX=20000
# The stripcharts are updated every STRIPCHART_INTERVAL seconds.
# STRIPCHART_INTERVAL=60
# A stripchart showing the count of messages in the queue is always
# displayed on the left of eximon's window. Its name is "queue" by
# default, but can be changed by this variable.
# QUEUE_STRIPCHART_NAME=queue
# The following variable may be set to the name of a disc partition. If
# it is, a stripchart showing the percentage fullness of the partition
# will be displayed as the second stripchart. This can be used to keep
# a display of a mail spool partition on the screen.
# SIZE_STRIPCHART=/var/mail
# The name of the size stripchart will be the last component of SIZE_STRIPCHART
# unless the following variable is set to override it.
# SIZE_STRIPCHART_NAME=space
# The following variable contains a specification of which stripcharts
# you want eximon to display based on log entries. The string consists of
# pairs of strings, delimited by slash characters. The first string in each
# pair is a regular expression that matches some distinguishing feature in a
# exim log entry.
# Entries that match the expression will be counted and displayed in a
# stripchart whose title is given by the second string. The string may
# be continued over several input lines, provided that it is split
# after a slash, and an additional slash (optionally preceded by white
# space) is included at the start of the continuation line.
# Stripcharts configured by the following parameter are displayed to the
# right of the queue and size stripcharts, in the order defined here.
# LOG_STRIPCHARTS='/ <= /in/
# / => /out/
# / => .+ R=local/local/
# / => .+ T=[^ ]*smtp/smtp/'
# End of exim_monitor/EDITME

61
network/exim/rc.exim.new Normal file
View file

@ -0,0 +1,61 @@
#!/bin/sh
# /etc/rc.d/rc.exim - start/stop/restart the exim mail transfer agent.
# To make exim start automatically at boot, make this
# file executable: chmod 755 /etc/rc.d/rc.exim
#
# Thales A. Tsailas <ttsailas@enforcingit.com>
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() {
# Make sure that we have the right ownerships permissions.
if [ -f /var/log/exim/main.log ]; then
if [ "exim" != "$(/bin/stat -c%G /var/log/exim/main.log)" ]; then
chown -R exim:exim /var/{log,spool}/exim
fi
fi
# Lets start the Exim daemon
echo -en "Starting exim... \n"
/usr/sbin/exim -bd -q$TIME
}
exim_stop() {
echo -en "Shutting down exim...\n"
killall exim
rm -f $PIDFILE
}
exim_status() {
if [ -f /var/run/exim.pid ]; then
echo "exim (pid: $(cat $PIDFILE) 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
;;
status)
status
;;
*)
echo $"Usage: $0 {start|stop|restart|status}"
exit 1
esac

19
network/exim/slack-desc Normal file
View file

@ -0,0 +1,19 @@
# HOW TO EDIT THIS FILE:
# The "handy ruler" below makes it easier to edit a package description. Line
# up the first '|' above the ':' following the base package name, and the '|'
# on the right side marks the last column you can put a character in. You must
# make exactly 11 lines for the formatting to be correct. It's also
# customary to leave one space after the ':'.
|-----handy-ruler------------------------------------------------------|
exim: exim (the exim mail transfer agent)
exim:
exim: Exim is a mail transfer agent (MTA) used on Unix-like operating systems.
exim: It is freely available under the GNU GPL and it aims to be a general
exim: and flexible mailer with extensive facilities for checking incoming
exim: e-mail. Exim was written by Philip Hazel for use in the University of
exim: Cambridge Computing Services e-mail systems.
exim:
exim:
exim: Homepage: http://www.exim.org/
exim: