FreeBSD4.7 Qmail Mysql Vpopmail QmailAdmin Sq…

2008-02-23 08:01:45来源:互联网 阅读 ()

新老客户大回馈,云服务器低至5折



十. 安装apache
下载apache_1.3.26.tar.gz到/down目录
#tar zxvf apache_1.3.26.tar.gz
#cd apache_1.3.26
#./configure --prefix=/usr/local/apache --with-mysql=/usr/local/bin --enable-shared=max
#make
#make install
#/usr/local/apache/bin/apachectl start
#echo “/usr/local/apache/bin/apachectl start” >> /etc/rc.local

十一. 安装qmailadmin

1. 安装ezmlm
#cd /down
#tar zxvf ezmlm-0.53.tar.gz
#cd ezmlm-0.53
#make
#make man
#make setup

或者加入ezmlm的mysql支持
或者加入ezmlm的mysql支持
(ezmlm-idx包含有对ezmlm的修正和补充,他们是一个整体。
tar -zxvf ezmlm-0.53.tar.gz
tar -zxvf ezmlm-idx.0.40.tar.gz
mv ezmlm-idx-0.40/* ezmlm/
cd ezmlm-0.53
patch < idx.patch
make mysql #MySQL 支持
make clean
make man
make ch_GB #汉字GB2312支持
make setup)

以上只是一个方法,我没有安装成功,出现一个小小的问题,由于我得邮件列表不算太大,所以我就没有尝试在此安装,如果你需要mysql支持,你可以试一试!

2. 安装autorespond
#cd /down
#tar zxvf autorespond.tar.gz
#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 输入一下内容:

<html>
<head>
<title>MAIL SYSTEM</title>
<meta http-equiv=”Content-Type” content=”test/html;charset=gb2312”>
<meta http-equiv=”refresh” content=”0;url=http://mail.localhost.com/cgi-bin/sqwebmail”>
</head>
<body bgcolor=”#FFFFFF” test=”#000000”>
</html>

此时你就可以通过:
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服务器。

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:FREEBSD升级及优化全攻略

下一篇:FREEBSD下搭建支持JSP的WEBSERVER