[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
|
---|
[fd5d65c] | 15 | cp -R cf/* /etc/mail &&
|
---|
| 16 | cp cf/cf/{submit,sendmail}.mc /etc/mail &&
|
---|
[681ad68] | 17 | newaliases -v</command></userinput></screen>
|
---|
[dbeecd7] | 18 |
|
---|
[547df0bc] | 19 | <para>To start and stop Sendmail on system boot/shutdown create the
|
---|
| 20 | <command>sendmail</command> boot script with the following commands:</para>
|
---|
[dbeecd7] | 21 |
|
---|
[b9e96a3] | 22 | <note><para>The -qNm option, where N is number of minutes, controls
|
---|
[681ad68] | 23 | how often Sendmail will process the mail queue. A default of 5
|
---|
| 24 | minutes is used here. Individual workstation users may want to set
|
---|
[b9e96a3] | 25 | this as low as 1 minute, large installations handling more mail will
|
---|
| 26 | want to set it higher.</para></note>
|
---|
| 27 |
|
---|
[681ad68] | 28 | <screen><userinput><command>cat > /etc/rc.d/init.d/sendmail << "EOF"
|
---|
[dbeecd7] | 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..."
|
---|
[b9e96a3] | 42 | loadproc /usr/sbin/sendmail -bs -bd -q5m start
|
---|
[dbeecd7] | 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
|
---|
[681ad68] | 67 | EOF
|
---|
| 68 | chmod 755 /etc/rc.d/init.d/sendmail</command></userinput></screen>
|
---|
[dbeecd7] | 69 |
|
---|
[a75063d4] | 70 | <para>Create the run level symlinks with the following commands:</para>
|
---|
[dbeecd7] | 71 |
|
---|
[681ad68] | 72 | <screen><userinput><command>cd /etc/rc.d/init.d &&
|
---|
[dbeecd7] | 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 &&
|
---|
[a75063d4] | 79 | ln -sf ../init.d/sendmail ../rc6.d/K25sendmail</command></userinput></screen></sect3>
|
---|
[dbeecd7] | 80 |
|
---|
| 81 | </sect2>
|
---|