mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-01-25 07:42:13 +08:00
547df0bcb6
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@1211 af4574ff-66df-0310-9fd7-8a98e5e911e0
85 lines
2.1 KiB
XML
85 lines
2.1 KiB
XML
<sect2>
|
|
<title>Configuring Exim</title>
|
|
|
|
<sect3><title>Config files</title>
|
|
|
|
<para><filename>/etc/exim.conf</filename>, <filename>/etc/aliases</filename></para>
|
|
|
|
</sect3>
|
|
|
|
<sect3><title>Configuration Information</title>
|
|
|
|
<para>Create the Exim configuration files with the following commands:</para>
|
|
|
|
<screen><userinput><command>cat >> /etc/aliases << "EOF"</command>
|
|
postmaster: root
|
|
MAILER-DAEMON: root
|
|
<command>EOF
|
|
exim -v -bi &&
|
|
/usr/sbin/exim -bd -q1m</command></userinput></screen>
|
|
|
|
<note><para>To protect an existing <filename>/etc/aliases</filename>
|
|
file, we will append these aliases to it if it exists. This file
|
|
should be checked and duplicate aliases removed, if
|
|
present.</para></note>
|
|
|
|
<para>To start and stop Exim on system boot/shutdown create the
|
|
exim boot script with the following commands:</para>
|
|
|
|
<screen><userinput><command>cat > /etc/rc.d/init.d/exim << "EOF"</command>
|
|
#!/bin/sh
|
|
# Begin $rc_base/init.d/exim
|
|
|
|
# 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 exim..."
|
|
loadproc /usr/sbin/exim -bd -q1m
|
|
;;
|
|
|
|
stop)
|
|
echo "Stopping exim..."
|
|
killproc exim
|
|
;;
|
|
|
|
status)
|
|
statusproc exim
|
|
;;
|
|
|
|
restart)
|
|
$0 stop
|
|
sleep 1
|
|
$0 start
|
|
;;
|
|
|
|
*)
|
|
echo "Usage: $0 {start|stop|status|restart}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
# End $rc_base/init.d/exim
|
|
<command>EOF
|
|
chmod 755 /etc/rc.d/init.d/exim</command></userinput></screen>
|
|
|
|
<para>Create the run level symlinks with the following commands:</para>
|
|
|
|
<screen><userinput><command>cd /etc/rc.d/init.d &&
|
|
ln -sf ../init.d/exim ../rc0.d/K25exim &&
|
|
ln -sf ../init.d/exim ../rc1.d/K25exim &&
|
|
ln -sf ../init.d/exim ../rc2.d/K25exim &&
|
|
ln -sf ../init.d/exim ../rc3.d/S35exim &&
|
|
ln -sf ../init.d/exim ../rc4.d/S35exim &&
|
|
ln -sf ../init.d/exim ../rc5.d/S35exim &&
|
|
ln -sf ../init.d/exim ../rc6.d/K25exim</command></userinput></screen>
|
|
|
|
</sect3>
|
|
|
|
</sect2>
|