exim-4.14

Introduction to exim

Download location (HTTP):       
Download location (FTP):        ftp://ftp.exim.org/pub/exim/exim4/exim-4.14.tar.bz2
Version used:                   4.14
Package size:                   1.2 MB
Estimated Disk space required:  8.7 MB

The exim package contains a Mail Transport Agent written by the University of Cambridge, released under the GNU Public License.

exim depends on:
db-4.1.25

Installation of exim

Before building exim, we need to create a user and group for exim with the following commands:

groupadd exim
useradd -d /dev/null -g exim -s /bin/false exim

Install exim with the following commands:

sed -e 's/^BIN_DIR.*$/BIN_DIRECTORY=\/usr\/sbin/' src/EDITME | \
  sed -e 's/^CONF.*$/CONFIGURE_FILE=\/etc\/exim.conf/' | \
  sed -e 's/^EXIM_USER.*$/EXIM_USER=exim/' | \
  sed -e 's/^EXIM_MONITOR/#EXIM_MONITOR/' > Local/Makefile &&
make &&
make install &&
ln -s /usr/sbin/exim /usr/sbin/sendmail

Configuring exim

Config files

/etc/exim.conf, /etc/aliases

Configuration of exim

Create the exim configuration files with the following commands:

cat >> /etc/aliases << "EOF"
postmaster: root
MAILER-DAEMON: root
EOF
exim -v -bi &&
/usr/sbin/exim -bd -q1m

Note: To protect an existing /etc/aliases file, we will append these aliases to it if it exists. This file should be checked and duplicate aliases removed, if present.

To start and stop exim on system boot/shutdown create the exim boot script with the following commands:

cat > /etc/rc.d/init.d/exim << "EOF"
#!/bin/sh
# Begin $rc_base/init.d/exim

# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans  - [email protected]

source /etc/sysconfig/rc
source $rc_functions

case "$1" in

        start)
        echo "Starting exim..."
        loadproc /usr/sbin/exim -bd -q1m
        ;;

        stop)
        echo "Stopping exim..."
        killproc exim
        ;;
		
	status)
	statusproc exim
	;;
	
        restart)
        $0 stop
        sleep 1
        $0 start
        ;;

        *)
        echo "Usage: $0 {start|stop|status|restart}"
        exit 1
        ;;
esac

# End $rc_base/init.d/exim
EOF
chmod 755 /etc/rc.d/init.d/exim

Create the run level symlinks with the following commands:

cd /etc/rc.d/init.d &&
ln -sf ../init.d/exim ../rc0.d/K25exim &&
ln -sf ../init.d/exim ../rc1.d/K25exim &&
ln -sf ../init.d/exim ../rc2.d/K25exim &&
ln -sf ../init.d/exim ../rc3.d/S35exim &&
ln -sf ../init.d/exim ../rc4.d/S35exim &&
ln -sf ../init.d/exim ../rc5.d/S35exim &&
ln -sf ../init.d/exim ../rc6.d/K25exim

Installation command explanations

groupadd exim
useradd -g exim exim
Create the group and user exim which will run the exim daemon.

sed -e 's/^BIN_DIR.*$/BIN_DIRECTORY=\/usr\/sbin/' src/EDITME | \
  sed -e 's/^CONF.*$/CONFIGURE_FILE=\/etc\/exim.conf/' | \
  sed -e 's/^EXIM_USER.*$/EXIM_USER=exim/' | \
  sed -e 's/^EXIM_MONITOR/#EXIM_MONITOR/' > Local/Makefile
Many of exim's configuration options are compiled in. Here, we specify the minimum set of options, BIN_DIRECTORY, CONFIGURE_FILE and EXIM_USER. We also defer building the exim monitor program, which requires X windows support, by commenting out the EXIM_MONITOR line in the Makefile.

ln -s /usr/sbin/exim /usr/sbin/sendmail : Create a link to sendmail for applications which need it. exim will accept most Sendmail command line options.

Contents

The exim package contains exim, exim_dumpdb, exim_fixdb, exim_tidydb, exinext, exiwhat, exim_dbmbuild, exicyclog, exigrep, eximstats, exiqsumm, exim_lock and exim_checkaccess.

Description

exim

exim is the Mail Transport Agent daemon.

exim_dumpdb

exim_dumpdb writes the contents of exim databases to the standard output .

exim_fixdb

exim_fixdb modifies data in exim databases.

exim_tidydb

exim_tidydb removes old records from exim databases.

exinext

exinext queries remote host retry times.

exiwhat

exiwhat queries running exim processes.

exim_dbmbuild

exim_dbmbuild creates and rebuilds exim databases.

exicyclog

exicyclog cycles exim log files.

exigrep

exigrep searches exim log files.

eximstats

eximstats generates mail statistics from exim log files.

exiqsumm

exiqsumm produces a summary of the messages on the mail queue.

exim_lock

exim_lock locks a mailbox file.

exim_checkaccess

exim_checkaccess states whether a given recipient address from a given host is acceptable or not.