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
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 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