[dbeecd7] | 1 | <sect2>
|
---|
| 2 | <title>Configuring sendmail</title>
|
---|
| 3 |
|
---|
| 4 | <sect3><title>Config files</title>
|
---|
| 5 | <para><userinput>/etc/mail/aliases.db, /etc/mail/sendmail.cf,
|
---|
| 6 | /etc/mail/submit.cf</userinput> and
|
---|
| 7 | <userinput>/etc/mail/local-host-names</userinput></para>
|
---|
| 8 | </sect3>
|
---|
| 9 |
|
---|
| 10 | <sect3><title>Configuring sendmail</title>
|
---|
| 11 | <para><screen><userinput>
|
---|
| 12 | echo `hostname` > /etc/mail/local-host-names
|
---|
| 13 | cat > /etc/mail/aliases << "EOF"
|
---|
| 14 | postmaster: root
|
---|
| 15 | MAILER-DAEMON: root
|
---|
[c3232bb8] | 16 | EOF
|
---|
[f7f0d44] | 17 | cd /etc/mail &&
|
---|
| 18 | cp -R /usr/src/sendmail-8.12.5/cf/* . &&
|
---|
| 19 | cp -R /usr/src/sendmail-8.12.5/cf/cf/submit.mc . &&
|
---|
| 20 | cp -R /usr/src/sendmail-8.12.5/cf/cf/sendmail.mc . &&
|
---|
| 21 | sendmail -v -bi &&
|
---|
[dbeecd7] | 22 | /usr/sbin/sendmail -bs -bd -q1m
|
---|
| 23 | </userinput></screen></para>
|
---|
| 24 |
|
---|
| 25 | <para>To start and stop sendmail on system boot/shutdown create the
|
---|
| 26 | sendmail boot script with the following commands: </para>
|
---|
| 27 |
|
---|
| 28 | <para><screen><userinput>cat > /etc/rc.d/init.d/sendmail << "EOF"</userinput>
|
---|
| 29 | #!/bin/sh
|
---|
| 30 | # Begin $rc_base/init.d/sendmail
|
---|
| 31 |
|
---|
| 32 | # Based on sysklogd script from LFS-3.1 and earlier.
|
---|
| 33 | # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
---|
| 34 |
|
---|
| 35 | source /etc/sysconfig/rc
|
---|
| 36 | source $rc_functions
|
---|
| 37 |
|
---|
| 38 | case "$1" in
|
---|
| 39 |
|
---|
| 40 | start)
|
---|
| 41 | echo "Starting sendmail..."
|
---|
| 42 | loadproc sendmail -bs -bd -q1m start
|
---|
| 43 | ;;
|
---|
| 44 |
|
---|
| 45 | stop)
|
---|
| 46 | echo "Stopping Sendmail..."
|
---|
| 47 | killproc sendmail
|
---|
| 48 | ;;
|
---|
| 49 |
|
---|
| 50 | status)
|
---|
| 51 | statusproc sendmail
|
---|
| 52 | ;;
|
---|
| 53 |
|
---|
| 54 | restart)
|
---|
| 55 | $0 stop
|
---|
| 56 | sleep 1
|
---|
| 57 | $0 start
|
---|
| 58 | ;;
|
---|
| 59 |
|
---|
| 60 | *)
|
---|
| 61 | echo "Usage: $0 {start|stop|status|restart}"
|
---|
| 62 | exit 1
|
---|
| 63 | ;;
|
---|
| 64 | esac
|
---|
| 65 |
|
---|
| 66 | # End $rc_base/init.d/sendmail
|
---|
| 67 | <userinput>EOF
|
---|
| 68 | chmod 755 /etc/rc.d/init.d/sendmail</userinput></screen></para>
|
---|
| 69 |
|
---|
| 70 | <para>Create the run level symlinks with the following commands:
|
---|
| 71 |
|
---|
| 72 | <screen><userinput>cd /etc/rc.d/init.d &&
|
---|
| 73 | ln -sf ../init.d/sendmail ../rc0.d/K25sendmail &&
|
---|
| 74 | ln -sf ../init.d/sendmail ../rc1.d/K25sendmail &&
|
---|
| 75 | ln -sf ../init.d/sendmail ../rc2.d/K25sendmail &&
|
---|
| 76 | ln -sf ../init.d/sendmail ../rc3.d/S35sendmail &&
|
---|
| 77 | ln -sf ../init.d/sendmail ../rc4.d/S35sendmail &&
|
---|
| 78 | ln -sf ../init.d/sendmail ../rc5.d/S35sendmail &&
|
---|
| 79 | ln -sf ../init.d/sendmail ../rc6.d/K25sendmail</userinput></screen></para>
|
---|
| 80 | </sect3>
|
---|
| 81 |
|
---|
| 82 | </sect2>
|
---|