📄 基于linux和postfix的邮件系统的web mail安装手册 linuxsir_org.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0040)http://www.linuxsir.org/main/?q=node/195 -->
<HTML lang=zh-hans xml:lang="zh-hans"
xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>基于Linux和Postfix的邮件系统的web mail安装手册 | LinuxSir.Org</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<STYLE type=text/css media=all>@import url( misc/drupal.css );
</STYLE>
<STYLE type=text/css media=all>@import url( modules/taxonomy_context/taxonomy_context.css );
</STYLE>
<LINK media=screen
href="基于Linux和Postfix的邮件系统的web mail安装手册 LinuxSir_Org.files/menuExpandable3.css"
type=text/css rel=stylesheet>
<SCRIPT
src="基于Linux和Postfix的邮件系统的web mail安装手册 LinuxSir_Org.files/menuExpandable3.js"
type=text/javascript></SCRIPT>
<LINK href="基于Linux和Postfix的邮件系统的web mail安装手册 LinuxSir_Org.files/common.css"
type=text/css rel=stylesheet>
<STYLE type=text/css media=all>@import url( themes/chameleon/marvin/style.css );
</STYLE>
<META content="MSHTML 6.00.2900.2180" name=GENERATOR></HEAD>
<BODY>
<DIV id=header><A title=Home href="http://www.linuxsir.org/main/"><IMG alt=Home
src="基于Linux和Postfix的邮件系统的web mail安装手册 LinuxSir_Org.files/logo.jpg"></A></DIV>
<DIV class=navlinks>
<DIV class=primary><A href="http://www.linuxsir.org/main/?q"><FONT
color=white>首页</FONT></A> | <A
href="http://www.linuxsir.org/main/?q=taxonomy/term/34"><FONT
color=white>事件</FONT></A> | <A
href="http://www.linuxsir.org/main/?q=taxonomy/term/1/25/"><FONT
color=white>文档</FONT></A> | <A
href="http://www.linuxsir.org/main/?q=taxonomy/term/35/48/"><FONT
color=white>资源</FONT></A> | <A
href="http://www.linuxsir.org/main/?q=search"><FONT color=white>搜索</FONT></A> |
<A href="http://www.linuxsir.org/bbs"><FONT color=white>论坛</FONT></A> | <A
href="http://www.linuxsir.org/main/?q=taxonomy/term/38"><FONT
color=white>贡献者</FONT></A> | <A
href="http://www.linuxsir.org/main/?q=node/3"><FONT color=white>关于</FONT></A> |
<A href="http://www.linuxsir.org/main/?q=user"><FONT
color=white>注册/登录</FONT></A></DIV></DIV>
<TABLE id=content>
<TBODY>
<TR>
<TD id=sidebar-left>
<DIV class="block block-block" id=block-block-1>
<H2 class=title>子站索引</H2>
<DIV class=content>
<UL>
<LI><A href="http://fedora.linuxsir.org/" target?_blank?>Fedora中文</A>
<LI><A href="http://debian.linuxsir.org/" target?_blank?>Debian中文</A>
<LI><A href="http://lfs.linuxsir.org/" target?_blank?>LFS 中文</A>
<LI><A href="http://slack.linuxsir.org/">Slackware</A>
<LI><A href="http://gentoo.linuxsir.org/">Gentoo中文</A>
<LI><A href="http://arch.linuxsir.org/">Arch 中文</A> </LI></UL></DIV></DIV>
<DIV class="block block-block" id=block-block-3>
<H2 class=title>重要资讯</H2>
<DIV class=content>
<UL>
<LI><A href="http://www.linuxsir.org/main/?q=taxonomy/term/36">本站公告</A>
<LI><A href="http://www.linuxsir.org/main/?q=taxonomy/term/34">新闻事件</A>
<LI><A href="http://www.linuxsir.org/bbs" target=_blank>本站论坛</A>
<LI><A href="http://www.linuxsir.org/main/?q=taxonomy/term/38">贡 献 者</A>
</LI></UL></DIV></DIV>
<DIV class="block block-block" id=block-block-7>
<H2 class=title>项目索引</H2>
<DIV class=content>
<UL>
<LI><A href="http://www.fcitx.org/" target=_blank>小企鹅输入法</A>
<LI><A href="http://lumaqq.linuxsir.org/" target=_blank>LumaQQ</A>
<LI><A href="http://openq.linuxsir.org/" target=_blank>OpenQ</A>
<LI><A href="http://www.relaxbsd.org/" target=_blank>RelaxBSD</A>
</LI></UL></DIV></DIV>
<DIV class="block block-user" id=block-user-1>
<H2 class=title>站点导航</H2>
<DIV class=content>
<DIV class=menu>
<UL>
<LI class=leaf><A title=注册/登录
href="http://www.linuxsir.org/main/?q=user">注册/登录</A>
<LI class=collapsed><A
href="http://www.linuxsir.org/main/?q=aggregator">新闻聚合</A>
</LI></UL></DIV></DIV></DIV>
<DIV class="block block-aggregator" id=block-aggregator-feed-2>
<H2 class=title>LinuxSir.Org 论坛</H2>
<DIV class=content>
<DIV class=item-list>
<UL>
<LI><A
href="http://www.linuxsir.org/bbs/showthread.php?t=267213&goto=newpost">告别LINUX</A>
<LI><A
href="http://www.linuxsir.org/bbs/showthread.php?t=267212&goto=newpost">suse中国社区(论坛)已正式开放</A>
<LI><A
href="http://www.linuxsir.org/bbs/showthread.php?t=267211&goto=newpost">在文本编辑器中显示乱码</A>
<LI><A
href="http://www.linuxsir.org/bbs/showthread.php?t=267210&goto=newpost">archlinux用最新的ntfs-3g驱动读写ntfs分区</A>
<LI><A
href="http://www.linuxsir.org/bbs/showthread.php?t=267209&goto=newpost">实在是不行了~发帖请教一下,关于samba的中文问题~~~</A>
</LI></UL></DIV>
<DIV class=more-link><A title=查看此feed的最新消息
href="http://www.linuxsir.org/main/?q=aggregator/sources/2">更多</A></DIV></DIV></DIV>
<DIV class="block block-user" id=block-user-2>
<H2 class=title>最新注册</H2>
<DIV class=content>
<DIV class=item-list>
<UL>
<LI>sosopro
<LI>babyvox963
<LI>wanglan0415
<LI>ShiningMoon
<LI>idomiles</LI></UL></DIV></DIV></DIV>
<DIV class="block block-user" id=block-user-3>
<H2 class=title>当前在线</H2>
<DIV class=content>1 用户 和 74 游客 在线
<DIV class=item-list>
<H3>在线用户</H3>
<UL>
<LI>北南南北</LI></UL></DIV></DIV></DIV></TD>
<TD id=main>
<DIV class=breadcrumb><A href="http://www.linuxsir.org/main/?q=">首页</A> »
<A href="http://www.linuxsir.org/main/?q=taxonomy/term/1">Linux</A></DIV>
<H2>基于Linux和Postfix的邮件系统的web mail安装手册</H2><!-- begin content -->
<DIV class=node>
<DIV class=content>
<P><B>作者:</B> 杨廷勇(scyzxp at toping.net)<BR><B>来自:</B>
LinuxSir.Org<BR><B>版权:</B>杨廷勇 Copyright © 2004、2005、2006<BR><B>摘要:</B>
本文介绍使用 Linux + Postfix + Cyrus-sasl + Courier-imap + Tmail3.0 +
spamassassin + Clamav + mailscanner
,来架构一个具有多域名,有邮件列表、webmail、防病毒、防垃圾邮件、web管理界面的邮件系统。</P>
<P>Jacky, $Revision: 4.51 bate $Date: 2006-3-9</P>
<P>系统主要采用 MailScanner + clamav + Spamassassin 来对病毒过滤和垃圾邮件过滤。</P>
<P>本文在CentOS、REDHATas上安装测试通过,病毒过滤放弃采用amavisd。主要采用执行效率更高的MailSanner来对邮件过滤和垃圾邮件过滤,配置更容易,并且降低了系统开消。让系统更加稳定,经过严格病毒邮件测试成功率达到了100%。垃圾邮件过滤基本上达到了95%的成功率。</P>
<P><B>更新日志</B></P>
<P>新增使用mailscanner来对进出邮件进行监管。new<BR>修正上一个版本的一些理解性和文件性错误。<BR>主要“加强”了病毒过滤和垃圾邮件过滤,更加节约系统资源,使系统配置更简单化。<BR>垃圾邮件过滤基本上达到了95%的成功率<BR>本文首次使用MailScanner+Clamav配合对邮件病毒进行过滤。<BR>经过严格病毒邮件测试成功率达到了100%。<BR>翻译了病毒邮件提示为中文提示,让系统更加的人性化。</P>
<P><FONT size=4><B>目录</B></FONT></P>
<UL><A
href="http://www.linuxsir.org/main/?q=node/195#1">0、演示地址</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#1">1、安装系统</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#2">2、关闭selinux</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#3">3、设置YUM</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#4">4、安装mysql</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#5">5、安装apache</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#6">6、安装php</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#7">7、安装phpMyAdmin</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#8">8、设置数据库</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#9">9、增加postfix的用户和组</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#10">10、安装postfix</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#11">11、安装Courier-authlib</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#12">12、设置authlib的环境变量</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#13">13、安装Courier-imap</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#14">14、配置系统</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#15">15、配置sasl认证</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#16">16、配置courier-imap</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#17">17、安装WebMail</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#18">18、启动服务测试</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#19">19、安装Clamav</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#20">20、升级病毒库</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#21">21、安装Spamassassin</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#22">22、安装MailScanner</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#23">23、设置MailScanner</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#24">24、测试病毒邮件</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#25">25、关于本文;</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#26">26、更新日志;</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#27">27、参考文档;</A><BR><A
href="http://www.linuxsir.org/main/?q=node/195#28">28、相关文档;</A> </UL>
<P><FONT
color=blue><B><BR>+++++++++++++++++++++++++++++++++++++++++++<BR>正文<BR>+++++++++++++++++++++++++++++++++++++++++++<BR></B></FONT></P>
<P>0、演示地址:</P>
<P>
<DIV
class=codeblock><CODE>http://mail.toping.net<BR>用户名:demo@toping.net<BR>密 码:demo</CODE></DIV>
<P></P>
<P><FONT id=1 size=4><B><BR>1.、安装系统<BR></B></FONT></P>
<P>安装之前:因用户数据都保存在/var目录下,因此安装系统时/var的空间应尽量大。系统的版本为最小化安装,软件包只安装只装开发包
(development)。在文档中假设服务器的ip地址为192.168.0.2,域名为test.com,主机名为mail.test.com。所需的软件包我都打包好了。</P>
<P>下载地址: http://www.toping.net/soft/src.tar.gz</P>
<P><B>请兄弟们仔细一些,注意空格和TAB。</B></P>
<P><FONT color=blue><B><BR>祝兄弟们好运。本人水平有限。如果发现文章中有什么错误和不当的地方请发邮件:scyz at
toping.net。我会在第一时间给予答复。<BR></B></FONT></P>
<P><FONT id=2 size=4><B><BR>2.关闭selinux<BR></B></FONT></P>
<P>
<DIV class=codeblock><CODE>[root@mail]# vi
/etc/selinux/config</CODE></DIV>
<P></P>
<P>SELINUX=disable</P>
<P>
<DIV class=codeblock><CODE>[root@mail]# reboot</CODE></DIV>
<P></P>
<P><FONT id=3 size=4><B><BR>3、设置YUM<BR></B></FONT></P>
<P>
<DIV class=codeblock><CODE>[root@mail yum.repos.d] vi
CentOS-Base.repo</CODE></DIV><BR><BR>
<P></P><PRE>[base]
name=CentOS-4.2 - Base
baseurl=http://mirror.be10.com/centos/4.2/os/$basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#released updates
[update]
name=CentOS-4.2 - Updates
baseurl=http://mirror.be10.com/centos/4.2/updates/$basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#packages used/produced in the build but not released
[addons]
name=CentOS-4.2 - Addons
baseurl=http://mirror.be10.com/centos/4.2/addons/$basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#additional packages that may be useful
[extras]
name=CentOS-4.2 - Extras
baseurl=http://mirror.be10.com/centos/4.2/extras/$basearch/
gpgcheck=1
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-4.2 - Plus
baseurl=http://mirror.be10.com/centos/4.2/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#contrib - packages by Centos Users
[contrib]
name=CentOS-4.2 - Contrib
baseurl=http://mirror.be10.com/centos/4.2/contrib/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
#packages in testing
[testing]
name=CentOS-4.2 - Testing
baseurl=http://mirror.be10.com/centos/4.2/testing/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirror.be10.com/centos/RPM-GPG-KEY-centos4
[root@mail yum.repos.d]# vi dag.repo
[dag]
name=Dag RPM Repository for Red Hat Enterprise Linux
baseurl=http://apt.sw.be/redhat/el$releasever/en/$basearch/dag
gpgcheck=1
enabled=1
</PRE>
<P>
<DIV class=codeblock><CODE>[root@mail yum.repos.d]# yum
update</CODE></DIV>
<P></P>
<P><FONT id=4 size=4><B><BR>4、安装mysql<BR></B></FONT></P>
<P>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -