[5e54414] | 1 | <sect2>
|
---|
[547df0bc] | 2 | <title>Configuring <application>qmail</application></title>
|
---|
[5e54414] | 3 |
|
---|
| 4 | <sect3><title>Config files</title>
|
---|
[e80cc95] | 5 | <para><filename>/etc/inetd.conf</filename> and boot scripts</para>
|
---|
[5e54414] | 6 | </sect3>
|
---|
| 7 |
|
---|
| 8 | <sect3><title>Configuration Information</title>
|
---|
| 9 |
|
---|
[547df0bc] | 10 | <para>If <command>inetd</command> is used, the following command will add the qmaild
|
---|
[e61e34e] | 11 | entry to <filename>/etc/inetd.conf</filename>: </para>
|
---|
| 12 |
|
---|
[7319b78] | 13 | <para><screen><userinput>echo "smtp stream tcp nowait qmaild /var/qmail/bin/tcp-env \
|
---|
[4958384] | 14 | tcp-env /var/qmail/bin/qmail-smtpd" >> /etc/inetd.conf</userinput></screen></para>
|
---|
[f7f0d44] | 15 |
|
---|
[547df0bc] | 16 | <para>If <command>xinetd</command> is used, the following command will add the qmaild
|
---|
[e61e34e] | 17 | entry to <filename>/etc/xinetd.conf</filename>: </para>
|
---|
| 18 |
|
---|
[547df0bc] | 19 | <screen><userinput><command>cat >> /etc/xinetd.conf << "EOF"</command>
|
---|
[e61e34e] | 20 | service smtp
|
---|
| 21 | {
|
---|
| 22 | disable = no
|
---|
[94e259f4] | 23 | id = smtp-local
|
---|
[e61e34e] | 24 | socket_type = stream
|
---|
| 25 | protocol = tcp
|
---|
| 26 | wait = no
|
---|
| 27 | user = qmaild
|
---|
| 28 | server = /var/qmail/bin/tcp-env
|
---|
| 29 | server_args = /var/qmail/bin/qmail-smtpd
|
---|
| 30 | env = RELAYCLIENT=
|
---|
| 31 | only_from = 127.0.0.1
|
---|
[94e259f4] | 32 | log_on_failure += USERID
|
---|
[e61e34e] | 33 | }
|
---|
[547df0bc] | 34 | <command>EOF</command></userinput></screen>
|
---|
[e61e34e] | 35 |
|
---|
[547df0bc] | 36 | <para>To automate the running of <application>qmail</application>, use following command to
|
---|
[f7f0d44] | 37 | create the init.d script:</para>
|
---|
| 38 |
|
---|
[547df0bc] | 39 | <screen><userinput><command>cat > /etc/rc.d/init.d/qmail << "EOF"</command>
|
---|
[f7f0d44] | 40 | #!/bin/sh
|
---|
| 41 | # Begin $rc_base/init.d/qmail
|
---|
| 42 |
|
---|
| 43 | # Based on sysklogd script from LFS-3.1 and earlier.
|
---|
| 44 | # Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
---|
| 45 |
|
---|
| 46 | source /etc/sysconfig/rc
|
---|
| 47 | source $rc_functions
|
---|
| 48 |
|
---|
| 49 | case "$1" in
|
---|
| 50 |
|
---|
| 51 | start)
|
---|
| 52 | echo "Starting Qmail..."
|
---|
[896104b1] | 53 | /var/qmail/rc &
|
---|
[f7f0d44] | 54 | ;;
|
---|
| 55 |
|
---|
| 56 | stop)
|
---|
| 57 | echo "Stopping Qmail..."
|
---|
| 58 | killall qmail-send
|
---|
| 59 | ;;
|
---|
| 60 |
|
---|
| 61 | restart)
|
---|
| 62 | $0 stop
|
---|
| 63 | sleep 1
|
---|
| 64 | $0 start
|
---|
| 65 | ;;
|
---|
| 66 |
|
---|
| 67 | *)
|
---|
| 68 | echo "Usage: $0 {start|stop|restart}"
|
---|
| 69 | exit 1
|
---|
| 70 | ;;
|
---|
| 71 | esac
|
---|
| 72 |
|
---|
| 73 | # End $rc_base/init.d/qmail
|
---|
[547df0bc] | 74 | <command>EOF
|
---|
| 75 | chmod 755 /etc/rc.d/init.d/qmail</command></userinput></screen>
|
---|
[f7f0d44] | 76 |
|
---|
[2277d1bb] | 77 | <para>Create the symbolic links to this file in the relevant
|
---|
[547df0bc] | 78 | <filename>rc.d</filename> directory with the following commands:</para>
|
---|
[f7f0d44] | 79 |
|
---|
[547df0bc] | 80 | <screen><userinput><command>cd /etc/rc.d/init.d &&
|
---|
[f7f0d44] | 81 | ln -sf ../init.d/qmail ../rc0.d/K25qmail &&
|
---|
| 82 | ln -sf ../init.d/qmail ../rc1.d/K25qmail &&
|
---|
| 83 | ln -sf ../init.d/qmail ../rc2.d/K25qmail &&
|
---|
| 84 | ln -sf ../init.d/qmail ../rc3.d/S35qmail &&
|
---|
| 85 | ln -sf ../init.d/qmail ../rc4.d/S35qmail &&
|
---|
| 86 | ln -sf ../init.d/qmail ../rc5.d/S35qmail &&
|
---|
[547df0bc] | 87 | ln -sf ../init.d/qmail ../rc6.d/K25qmail</command></userinput></screen>
|
---|
[f7f0d44] | 88 |
|
---|
[5e54414] | 89 | </sect3>
|
---|
| 90 |
|
---|
| 91 | <sect3><title>Configuring mailers to work with qmail</title>
|
---|
| 92 | <para>Configuration information for some commonly used MUAs can be
|
---|
| 93 | found in the <filename>/var/qmail/doc/INSTALL.mbox</filename>
|
---|
| 94 | file. Most MUAs can be configured to use qmail Mailbox format buy
|
---|
[8e6d39f1] | 95 | putting the following in <filename>~/.profile</filename>:</para>
|
---|
[8b220c27] | 96 | <para><screen><userinput>MAIL=$HOME/Mailbox; export MAIL
|
---|
[5e54414] | 97 | </userinput></screen></para></sect3>
|
---|
| 98 |
|
---|
| 99 | </sect2>
|
---|