glfs/server/mail/sendmail/sendmail-config.xml
Larry Lawrence 547df0bcb6 chapter 22
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@1211 af4574ff-66df-0310-9fd7-8a98e5e911e0
2003-09-26 19:39:35 +00:00

85 lines
2.4 KiB
XML

<sect2>
<title>Configuring <application>Sendmail</application></title>
<sect3><title>Config files</title>
<para><filename>/etc/mail/*</filename></para>
</sect3>
<sect3><title>Configuration Information</title>
<screen><userinput><command>echo `hostname` > /etc/mail/local-host-names
cat &gt; /etc/mail/aliases &lt;&lt; "EOF"
postmaster: root
MAILER-DAEMON: root
EOF
cd /etc/mail &amp;&amp;
cp -R /usr/src/sendmail-&sendmail-version;/cf/* . &amp;&amp;
cp -R /usr/src/sendmail-&sendmail-version;/cf/cf/submit.mc . &amp;&amp;
cp -R /usr/src/sendmail-&sendmail-version;/cf/cf/sendmail.mc . &amp;&amp;
newaliases -v</command></userinput></screen>
<para>To start and stop Sendmail on system boot/shutdown create the
<command>sendmail</command> boot script with the following commands:</para>
<note><para>The -qNm option, where N is number of minutes, controls
how often Sendmail will process the mail queue. A default of 5
minutes is used here. Individual workstation users may want to set
this as low as 1 minute, large installations handling more mail will
want to set it higher.</para></note>
<screen><userinput><command>cat &gt; /etc/rc.d/init.d/sendmail &lt;&lt; "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 -q5m 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</command></userinput></screen>
<para>Create the run level symlinks with the following commands:
<screen><userinput><command>cd /etc/rc.d/init.d &amp;&amp;
ln -sf ../init.d/sendmail ../rc0.d/K25sendmail &amp;&amp;
ln -sf ../init.d/sendmail ../rc1.d/K25sendmail &amp;&amp;
ln -sf ../init.d/sendmail ../rc2.d/K25sendmail &amp;&amp;
ln -sf ../init.d/sendmail ../rc3.d/S35sendmail &amp;&amp;
ln -sf ../init.d/sendmail ../rc4.d/S35sendmail &amp;&amp;
ln -sf ../init.d/sendmail ../rc5.d/S35sendmail &amp;&amp;
ln -sf ../init.d/sendmail ../rc6.d/K25sendmail</command></userinput></screen></para>
</sect3>
</sect2>