Reference documents: The qmail HOWTO v2 by Adam McKennahttp: //www.flounder.net/qmail/qmail-howto.htmlLife with qmailby Dave Sillhttp: //www.lifewithqmail.org/lwq.htmlxx for the system: redhat linux 7.2 (Enigma ) The required software: qmail-1.03.tar.gzqmail-103.patchucspi-TCP-0.88.tardaemontools-0.76.tar.gzmysql-3.22.32-1.i386.rpm mysql-client-3.22.32-1.i386. RPM mysql-share-3.22.32-1.i386.22.32-1.22.32-1.i386.rpmvpopmail-4.9.8.tar.gzvqsignup-0.5.tar.gzsqwebmail-1.2.0.tar.gz All Software is placed in the / home / kingsix directory. The hostname of the test machine is Testmail.com.cn. 1. QMAIL installation completely removes Sendmail before installation KILLALL -TERM SendmailRpm -E --Nodeps sendmail [root @ Testmail Kingsix] # tar zxvf qmail-1.03.tar.gz to qmail qmail qmail [ Root @ Testmail Kingsix] #CP qmail-103.patch qmail-1.03 [root @ Testmail Kingsix] # cd @ Testmail qmail-1.03] #Patch -p1 3. QMAIL Configure to add domain name [root @ Testmail qmail-1.03] #. / Config-fast testmail.com.cn Modify the Locals and RCPTHOST files below / var / control directory. 4. Install qmail alias [root @ Testmail qmail-1.03] #CD / var / qmail / alias [root @ Testmail alias] #echo admin> .qmail-root [root @ Testmail alias] #echo admin> .qmail-postmaster [ Root @ Testmail Alias] #echo admin> .qmail-mailer-daemon5. Assembly Daemontools and Create Control Directory The following settings Automatically start QMail when the system starts. Here you should use the SVCAN tool inside Daemontool. These tools are installed below the / usr / local / bin directory. # mkdir -p / var / qmail / supervise / qmail-send / log # mkdir -p / var / qmail / supervise / qmail-smtpd / log # chmod t / var / qmail / supervise / qmail-send # chmod T / var / qmail / supervise / qmail-smtpd # mkdir -p / var / log / qmail / qmail-send # mkdir -p / var / log / qmail / qmail-smtpd # chown -r qmaill / var / log / qmail Each directory is edited some script files to / var / qmail / supervise / qmail-send directory, create file named Run, the content is as follows: #! / Bin / bash exec / var / qmail / rc to / var / qmail / In the supervise / qmail-send / log directory, create a file called Run, the content is as follows: #! / bin / bash exec / usr / local / bin / setuidgid qmaill / usr / local / bin / multililog T S2500000 / VAR / log / qmail / qmail-send to / var / qmail / supervise / qmail-smtpd directory, create file named Run, the content is as follows: #! / bin / shqmailduid = `id- qmails`nofilesgid =` ID -G qmails `EXEC / USR / local / bin / softlimit -m 2000000 // usr / local / bin / tcpserver -h -r -v -p -x /etc/tcp.smtp.cdb / -u $ qmailduid -g $ nofilesgid 0 SMTP / VAR / QMAIL / BIN / QMAIL-SMTPD 2> & 1 to / VAR / QMAIL / SuperVise / qmail-smtpd / log directory, create file named Run, the content is as follows: #! / bin / shexec / usr / local / bin / setuidgid qmaill / usr / local / bin / multiLog T S2500000 / VAR / log / qmail / qmail-smtpd modification script belong Sex is available to CHMOD X RUN6. Access Control Editing /EtC/tcp.smtp file is 127.0.0.1:Allow ,ylayclient=""192.168.2.:Allow ,ylayclient="": allows to allow local and local LANs Forward.