sendmail-8.12.6

Introduction to sendmail


Download location (FTP):        ftp://ftp.sendmail.org/pub/sendmail/sendmail.8.12.6.tar.gz
Download location (HTTP):        http://www.sendmail.org/ftp/sendmail.8.12.6.tar.gz
Version used:                   8.12.6
Package size:                   1.8 MB
Estimated Disk space required:  12 MB

Required Patch (HTTP):        http://www.sendmail.org/patches/smrsh-20020924.patch

The sendmail package contains a Mail Transport Agent (MTA).

sendmail depends on: 
db-4.0.14, procmail-3.22

Installation of sendmail

Before building sendmail, we need to create users, groups and directories that sendmail uses with the following commands:


groupadd -g 18 smmsp &&
groupadd -g 19 mail &&
useradd -g smmsp -G mail -u 18 smmsp &&
chmod 1777 /tmp &&
chmod 1777 /var/mail &&
mkdir /var/spool/mqueue



Install sendmail with the following commands:


cat > devtools/Site/site.config.m4 << "EOF"
define(`confMANGRP',`root')
define(`confMANOWN',`root')
define(`confSBINGRP',`root')
define(`confUBINGRP',`root')
define(`confUBINOWN',`root')
EOF
(cd smrsh/ && patch -Np0 -i ../../smrsh-20020924.patch) &&
cd sendmail &&
sh Build &&
cd ../cf/cf &&
cp generic-linux.mc sendmail.mc &&
mkdir /etc/mail &&
sh Build sendmail.mc &&
sh Build install-cf &&
cd ../../ &&
sh Build install



Configuring sendmail

Config files

/etc/mail/aliases.db, /etc/mail/sendmail.cf, /etc/mail/submit.cf and /etc/mail/local-host-names

Configuring sendmail


echo `hostname` > /etc/mail/local-host-names
cat > /etc/mail/aliases << "EOF"
postmaster: root
MAILER-DAEMON: root
EOF
cd /etc/mail &&
cp -R  /usr/src/sendmail-8.12.6/cf/* . &&
cp -R  /usr/src/sendmail-8.12.6/cf/cf/submit.mc . &&
cp -R  /usr/src/sendmail-8.12.6/cf/cf/sendmail.mc . &&
sendmail -v -bi &&
/usr/sbin/sendmail -bs -bd -q1m



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

cat > /etc/rc.d/init.d/sendmail << "EOF"
#!/bin/sh
# Begin $rc_base/init.d/sendmail
# Based on sysklogd script from LFS-3.1 and earlier.
# Rewritten by Gerard Beekmans  - gerard@linuxfromscratch.org
source /etc/sysconfig/rc
source $rc_functions
case "$1" in
        start)
        echo "Starting sendmail..."
        loadproc /usr/sbin/sendmail -bs -bd -q1m start
        ;;
        stop)
        echo "Stopping Sendmail..."
        killproc sendmail
        ;;
                
        status)
        statusproc sendmail
        ;;
        
        restart)
        $0 stop
        sleep 1
        $0 start
        ;;
        *)
        echo "Usage: $0 {start|stop|status|restart}"
        exit 1
        ;;
esac
# End $rc_base/init.d/sendmail
EOF
chmod 755 /etc/rc.d/init.d/sendmail


Create the run level symlinks with the following commands:

cd /etc/rc.d/init.d &&
ln -sf ../init.d/sendmail ../rc0.d/K25sendmail &&
ln -sf ../init.d/sendmail ../rc1.d/K25sendmail &&
ln -sf ../init.d/sendmail ../rc2.d/K25sendmail &&
ln -sf ../init.d/sendmail ../rc3.d/S35sendmail &&
ln -sf ../init.d/sendmail ../rc4.d/S35sendmail &&
ln -sf ../init.d/sendmail ../rc5.d/S35sendmail &&
ln -sf ../init.d/sendmail ../rc6.d/K25sendmail


Contents

The sendmail package contains mail.local, rmail, smrsh, editmap, makemap, mailq, newaliases, sendmail, vacation, praliases and mailstats.

Description

mail.local

mail.local appends its standard input to a user's mail file.

rmail

rmail interprets incoming mail received via uucp.

smrsh

smrsh is a restricted shell for Sendmail.

editmap

editmap queries and edits Sendmail map files.

makemap

makemap creates Sendmail map files.

mailq

mailq prints a summary of waiting mail messages.

newaliases

newaliases rebuilds /etc/mail/aliases.db.

sendmail

sendmail is the Sendmail mail transport agent.

vacation

vacation is an email auto responder.

praliases

praliases displays current Sendmail aliases.

mailstats

mailstats displays Sendmail statistics.