mirror of
https://github.com/Zeckmathederg/glfs.git
synced 2025-02-06 00:48:19 +08:00
2277d1bb98
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@868 af4574ff-66df-0310-9fd7-8a98e5e911e0
100 lines
3.0 KiB
XML
100 lines
3.0 KiB
XML
<sect2>
|
|
<title>Configuring qmail</title>
|
|
|
|
<sect3><title>Config files</title>
|
|
<para><filename>/etc/inetd.conf</filename> and boot scripts</para>
|
|
</sect3>
|
|
|
|
<sect3><title>Configuration Information</title>
|
|
|
|
<para>If inetd is used, the following command will add the qmaild
|
|
entry to <filename>/etc/inetd.conf</filename>: </para>
|
|
|
|
<para><screen><userinput>echo "smtp stream tcp nowait qmaild /var/qmail/bin/tcp-env \
|
|
tcp-env /var/qmail/bin/qmail-smtpd" >> /etc/inetd.conf</userinput></screen></para>
|
|
|
|
<para>If xinetd is used, the following command will add the qmaild
|
|
entry to <filename>/etc/xinetd.conf</filename>: </para>
|
|
|
|
<para><screen><userinput>cat >> /etc/xinetd.conf << "EOF"</userinput>
|
|
service smtp
|
|
{
|
|
disable = no
|
|
identifier = smtp-local
|
|
socket_type = stream
|
|
protocol = tcp
|
|
wait = no
|
|
user = qmaild
|
|
server = /var/qmail/bin/tcp-env
|
|
server_args = /var/qmail/bin/qmail-smtpd
|
|
env = RELAYCLIENT=
|
|
only_from = 127.0.0.1
|
|
log_on_failture += USERID
|
|
}
|
|
<userinput>EOF</userinput></screen></para>
|
|
|
|
<para>To automate the running of qmail, use following command to
|
|
create the init.d script:</para>
|
|
|
|
<para><screen><userinput>cat > /etc/rc.d/init.d/qmail << "EOF"</userinput>
|
|
#!/bin/sh
|
|
# Begin $rc_base/init.d/qmail
|
|
|
|
# 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 Qmail..."
|
|
/var/qmail/rc &
|
|
;;
|
|
|
|
stop)
|
|
echo "Stopping Qmail..."
|
|
killall qmail-send
|
|
;;
|
|
|
|
restart)
|
|
$0 stop
|
|
sleep 1
|
|
$0 start
|
|
;;
|
|
|
|
*)
|
|
echo "Usage: $0 {start|stop|restart}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
|
|
# End $rc_base/init.d/qmail
|
|
<userinput>EOF
|
|
chmod 755 /etc/rc.d/init.d/qmail</userinput></screen></para>
|
|
|
|
<para>Create the symbolic links to this file in the relevant
|
|
<filename>rc.d</filename> directory with the following commands:
|
|
|
|
<screen><userinput>cd /etc/rc.d/init.d &&
|
|
ln -sf ../init.d/qmail ../rc0.d/K25qmail &&
|
|
ln -sf ../init.d/qmail ../rc1.d/K25qmail &&
|
|
ln -sf ../init.d/qmail ../rc2.d/K25qmail &&
|
|
ln -sf ../init.d/qmail ../rc3.d/S35qmail &&
|
|
ln -sf ../init.d/qmail ../rc4.d/S35qmail &&
|
|
ln -sf ../init.d/qmail ../rc5.d/S35qmail &&
|
|
ln -sf ../init.d/qmail ../rc6.d/K25qmail</userinput></screen></para>
|
|
|
|
</sect3>
|
|
|
|
<sect3><title>Configuring mailers to work with qmail</title>
|
|
<para>Configuration information for some commonly used MUAs can be
|
|
found in the <filename>/var/qmail/doc/INSTALL.mbox</filename>
|
|
file. Most MUAs can be configured to use qmail Mailbox format buy
|
|
putting the following in <filename>~/.profile</filename>:</para>
|
|
<para><screen><userinput>MAIL=$HOME/Mailbox; export MAIL
|
|
</userinput></screen></para></sect3>
|
|
|
|
</sect2>
|