#cd /autorespond
#gcc -Wall -o autorespond autorespond.c
#cp autorespond /usr/local/bin/autorespond
3. 安装qmailadmin
#cd /down
#tar zxvf qmailadmin-1.0.6.tar.gz
#cd qmailadmin-1.0.6
#./configure
#make
#make install-strip
4. 汉化qmailadmin的管理页面
#cd /down
#cp en-us /usr/local/share/qmailadmin/html/en
5. 测试qmailamdin
http://mail.localhost.com/cgi-bin/qmailadmin
输入域:mail.localhost.com
输入postmaster的密码,也就是你添加虚拟域mail.localhost.com是的密码
十二. 安装sqwebmail
1. 安装sqwebmail
#cd /down
#tar zxvf sqwebmail-3.5.0-cn.tar.gz
#cd sqwebmail-3.5.0
#./configure --without-authpam --with-db=db --enable-webpass=yes --without-authpwd --without-authshadow --without-authmysql --with-authldap --with-authuserdb --with-authpwd --with-authvchkpw --without-authdaemon
#make configure-check
#make
#make install-strip
#make install-configure
如果你要同时使用系统用户和虚拟用户:
#系统用户采用shadow验证,虚拟域采用vchkpw验证,禁止其他验证方式
echo “authvchkpw authshadow” > /usr/local/share/sqwebmail/authmodulelist
2. 测试sqwebmail
http://mail.localhost.com/cgi-bin/sqwebmail
使用用户test,密码test,看看时候能够登录进取和收发邮件!
3. 修改apache
#cd /usr/local/apache/htdocs
#touch index.html
#ee index.html 输入一下内容:
MAIL SYSTEM
此时你就可以通过:
http://mail.localhost.com
直接来访问sqwebmail了 。
十三. 结束语
至此,一个支持web收发邮件和smtp认证、mail from auth的邮件系统已经建立起来了,该系统支持用户漫游功能,支持web页面管理虚拟域 。
由于本人技术有限,而且没有任何写作功底,错误之处在所难免,如有发现请批评指正,谢谢!
十四. 鸣谢:
感谢网上的很多网友发表的Qmail方面的文档,我的这个安装笔记就是借鉴他们的文档完成的,感谢gadfly对smtp认证和mail from auth方面的帮助 。
十五. 附录
1.Qmail的主要配置文件
badmailfrom none qmail-smtpd 黑名单地址
bouncefrom MAILER-DAEMON qmail-send 退回邮件
bouncehost me qmail-send 退回邮件
concurrencylocal 10 qmail-send 本地同时投递邮件的数目
concurrencyremote 20 qmail-send 同时投递至远程主机的数目
defaultdomain me qmail-inject 默认域名
defaulthost me qmail-inject 默认主机名
databytes 0 qmail-smtpd 邮件的最大容量 (0=无限制)
doublebouncehost me qmail-send
doublebounceto postmaster qmail-send
envnoathost me qmail-send 没有"@"的默认域名
helohost me qmail-remote 主机名
idhost me qmail-inject Message-ID的主机名
localiphost me qmail-smtpd 本地IP的替代名
locals me qmail-send 传递至本地的域名
me 系统正式域名 various
morercpthosts none qmail-smtpd 第二个rcpthosts
percenthack none qmail-send 使用 "%"格式的域名
plusdomain me qmail-inject
qmqpservers none qmail-qmqpc QMQP服务器的IP地址
queuelifetime 604800 qmail-send 在队列中邮件保存的时间(秒)
rcpthosts none qmail-smtpd 接收邮件的域名
smtpgreeting me qmail-smtpd
smtproutes none qmail-remote
timeoutconnect 60 qmail-remote SMTP连接超时时间
timeoutremote 1200 qmail-remote 等待远程主机的时间
timeoutsmtpd 1200 qmail-smtpd SMTP客户连接超时的时间
virtualdomains none qmail-send 虚拟域名
2.vpopmail参数附录:
--enable-roaming-users=n|y
当pop3认证通过后,是否打开对该用户的邮件转发(mail relay),缺省是关闭的 。若设置该选项为y,当某个用户通过了pop3认证,则将其IP地址加入许可通过该邮件服务器进行relay的列表中 。一个名为clearopensmtp的cronjob程序可以用来实现在这一段时间以后从允许转发邮件地址列表中将该IP地址清除 。这个选项要求以-x /etc/tcp.smtp.cdb选项来使用tcpserver运行smtp服务器 。
