[dbeecd7] | 1 | <sect2>
|
---|
[547df0bc] | 2 | <title>Configuring <application>Sendmail</application></title>
|
---|
[dbeecd7] | 3 |
|
---|
| 4 | <sect3><title>Config files</title>
|
---|
[681ad68] | 5 | <para><filename>/etc/mail/*</filename></para>
|
---|
[dbeecd7] | 6 | </sect3>
|
---|
| 7 |
|
---|
[681ad68] | 8 | <sect3><title>Configuration Information</title>
|
---|
| 9 |
|
---|
| 10 | <screen><userinput><command>echo `hostname` > /etc/mail/local-host-names
|
---|
| 11 | cat > /etc/mail/aliases << "EOF"
|
---|
[dbeecd7] | 12 | postmaster: root
|
---|
| 13 | MAILER-DAEMON: root
|
---|
[681ad68] | 14 | EOF
|
---|
[f7f0d44] | 15 | cd /etc/mail &&
|
---|
[2823a46c] | 16 | cp -R /usr/src/sendmail-&sendmail-version;/cf/* . &&
|
---|
| 17 | cp -R /usr/src/sendmail-&sendmail-version;/cf/cf/submit.mc . &&
|
---|
| 18 | cp -R /usr/src/sendmail-&sendmail-version;/cf/cf/sendmail.mc . &&
|
---|
[681ad68] | 19 | newaliases -v</command></userinput></screen>
|
---|
[dbeecd7] | 20 |
|
---|
[547df0bc] | 21 | <para>To start and stop Sendmail on system boot/shutdown create the
|
---|
| 22 | <command>sendmail</command> boot script with the following commands:</para>
|
---|
[dbeecd7] | 23 |
|
---|
[b9e96a3] | 24 | <note><para>The -qNm option, where N is number of minutes, controls
|
---|
[681ad68] | 25 | how often Sendmail will process the mail queue. A default of 5
|
---|
| 26 | minutes is used here. Individual workstation users may want to set
|
---|
[b9e96a3] | 27 | this as low as 1 minute, large installations handling more mail will
|
---|
| 28 | want to set it higher.</para></note>
|
---|
| 29 |
|
---|
[681ad68] | 30 | <screen><userinput><command>cat > /etc/rc.d/init.d/sendmail << "EOF"
|
---|
[dbeecd7] | 31 | #!/bin/sh
|
---|
| 32 | # Begin $rc_base/init.d/sendmail
|
---|
| 33 |
|
---|
| 34 | # Based on sysklogd script from LFS-3.1 and earlier.
|
---|
| 35 | # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
---|
| 36 |
|
---|
| 37 | source /etc/sysconfig/rc
|
---|
| 38 | source $rc_functions
|
---|
| 39 |
|
---|
| 40 | case "$1" in
|
---|
| 41 |
|
---|
| 42 | start)
|
---|
| 43 | echo "Starting sendmail..."
|
---|
[b9e96a3] | 44 | loadproc /usr/sbin/sendmail -bs -bd -q5m start
|
---|
[dbeecd7] | 45 | ;;
|
---|
| 46 |
|
---|
| 47 | stop)
|
---|
| 48 | echo "Stopping Sendmail..."
|
---|
| 49 | killproc sendmail
|
---|
| 50 | ;;
|
---|
| 51 |
|
---|
| 52 | status)
|
---|
| 53 | statusproc sendmail
|
---|
| 54 | ;;
|
---|
| 55 |
|
---|
| 56 | restart)
|
---|
| 57 | $0 stop
|
---|
| 58 | sleep 1
|
---|
| 59 | $0 start
|
---|
| 60 | ;;
|
---|
| 61 |
|
---|
| 62 | *)
|
---|
| 63 | echo "Usage: $0 {start|stop|status|restart}"
|
---|
| 64 | exit 1
|
---|
| 65 | ;;
|
---|
| 66 | esac
|
---|
| 67 |
|
---|
| 68 | # End $rc_base/init.d/sendmail
|
---|
[681ad68] | 69 | EOF
|
---|
| 70 | chmod 755 /etc/rc.d/init.d/sendmail</command></userinput></screen>
|
---|
[dbeecd7] | 71 |
|
---|
[a75063d4] | 72 | <para>Create the run level symlinks with the following commands:</para>
|
---|
[dbeecd7] | 73 |
|
---|
[681ad68] | 74 | <screen><userinput><command>cd /etc/rc.d/init.d &&
|
---|
[dbeecd7] | 75 | ln -sf ../init.d/sendmail ../rc0.d/K25sendmail &&
|
---|
| 76 | ln -sf ../init.d/sendmail ../rc1.d/K25sendmail &&
|
---|
| 77 | ln -sf ../init.d/sendmail ../rc2.d/K25sendmail &&
|
---|
| 78 | ln -sf ../init.d/sendmail ../rc3.d/S35sendmail &&
|
---|
| 79 | ln -sf ../init.d/sendmail ../rc4.d/S35sendmail &&
|
---|
| 80 | ln -sf ../init.d/sendmail ../rc5.d/S35sendmail &&
|
---|
[a75063d4] | 81 | ln -sf ../init.d/sendmail ../rc6.d/K25sendmail</command></userinput></screen></sect3>
|
---|
[dbeecd7] | 82 |
|
---|
| 83 | </sect2>
|
---|