OS:RedHat 7.2、7.1(FreeBSD、Solaris平台下还未测试)
所须软件:
qmail-1.03.tar.gz
qmail-smtpd-auth-0.30.tar.gz
ucspi-tcp-0.88.tar.gz
checkpassword-0.90.tar.gz
daemontools-0.70.tar.gz
vpopmail-4.9.10.tar.gz
ezmlm-0.53.tar.gz
autorespond-1.0.0.tar.gz
qmailadmin-0.45.tar.gz
sqwebmail-2.1.1.tar.gz
vqsignup-0.5.tar.gz
1 #mkdir /var/qmail
2 设定组、用户权限
#/usr/sbin/groupadd nofiles
#/usr/sbin/useradd –g nofiles –d /var/qmail/alias alias
#/usr/sbin/useradd –g nofiles –d /var/qmail qmaild
#/usr/sbin/useradd –g nofiles –d /var/qmail qmaill
#/usr/sbin/useradd –g nofiles –d /var/qmail qmailp
#/usr/sbin/groupadd qmail
#/usr/sbin/useradd –g qmail –d /var/qmail qmailq
#/usr/sbin/useradd –g qmail –d /var/qmail qmailr
#/usr/sbin/useradd –g qmail –d /var/qmail qmails
3 安装Qmail-1.03(带smtp认证)
#tar zxvf qmail-1.03.tar.gz
#tar zxvf qmail-smtpd-auth-0.30.tar.gz
#cd qmail-smtp-auth-0.30
#cp base64.c base64.h README.auth ../qmail-1.03/
#patch -d ../qmail-1.03 #cd qmail-1.03#make setup check#./config-fast mail.domain.com4 建立系统别名#cd ~alias; touch .qmail-postmaster .qmail-mailer-daemon .qmail-root#chmod 644 ~alias/.qmail*5#cp /var/qmail/boot/home /var/qmail/rc#chmod 755 /var/qmail/rc#vi /var/qmail/rc修改其中./Mailbox为./Maildir,修改后的如下:#!/bin/sh# Using splogger to send the log through syslog.# Using qmail-local to deliver messages to ~/Maildir by default.exec env - PATH="/var/qmail/bin:$PATH"qmail-start ./Maildir splogger qmail建立样本:#mkdir /etc/skel#/var/qmail/bin/maildirmake /etc/skel/Maildir#echo ./Maildir/~/.qmail6 安装 ucspi-tcp-0.88#tar zxvf ucspi-tcp-0.88.tar.gz#cd ucspi-tcp-0.88#make#make setup check7 安装checkpassword-0.90和cmd5checkpw-0.22.tar.gz#tar zxvf checkpassword-0.90.tar.gz#cd checkpassword-0.90#make#make setup check#chmod 4755 /bin/checkpassword#tar zxvf cmd5checkpw-0.22.tar.gz#mkdir /usr/man#mkdir /usr/man/man8#cd cmd5checkpw-0.22#make#make install如果不对/etc/passwd中的用户开放mail,就不需要安装checkpassword,只要安装vpopmail就可以了。8 安装 daemontools-0.70#tar zxvf daemontools-0.70.tar.gz#cd daemontools-0.70(注:在RedHat 7.1、7.2下需要修改tai64nlocal.c# vi tai64nlocal.c将#include更改为:#include)#make#make setup check#mkdir /var/run/qmail9 安装 vpopmail-4.9.10#/usr/sbin/groupadd vchkpw#/usr/sbin/useradd –g vchkpw vpopmail#mkdir ~vpopmail/etc#echo “:allow”~vpopmail/etc/tcp.smtp#tar zxvf vpopmail-4.9.10.tar.gz#cd vpopmail-4.9.10#./configure --enable-logging=v--enable-roaming-users=y--enable-sqwebmail-pass=n--enable-passwd=n--enable-default-domain=mail.domain.com#make#make install-strip#chmod 6755 /home/vpopmail/bin/vchkpw#crontab –e40 * * * * /home/vpopmail/bin/clearopensmtp 2%26amp;1/dev/null添加域名:#cd /home/vpopmail/bin#./vadddomain domain.com password10 qmailadmin Web方式管理Qmail10.1 安装ezmlm-0.53#tar zxvf ezmlm-0.53.tar.gz#cd ezmlm-0.53#make#make man#make setup10.2 安装autorespond-1.0.0#tar zxvf autorespond-1.0.0.tar.gz#cd autorespond-1.0.0#gcc –Wall –o autorespond autorespond.c#cp autorespond /usr/local/bin/autorespond10.3 安装qmailadmin-0.45在安装之前先确认:·你是否已经安装了vpopmail,并使用vchkpw·Web服务器的cgi目录位置·ezmlm所在目录·autorespond所在目录确认以上的工作已完成,可以开始安装qmailadmin10.4 安装#tar zxvf qmailadmin-0.45.tar.gz#cd qmailadmin-0.45#./configure#make#make install-strip测试:在浏览器中打开http://mail.domain.com/cgi-bin/qmailadmin就可以看到管理 界面了。用户:postmaster域:domain.com口令:password