TurboEx 异地分布式配置手册
使用手册
TurboEx异地分布式配置
使用手册
版权所有 © 。 保留一切权利。
目录
TurboEx异地分布式系统
绪论
许多大型企业都有很多子公司,分布全国各地甚至海外,传统的邮件系统集中部署在总公司内,由于子公司与总公司的物理距离远,网络连接通常是低带宽、不可靠的,导致子公司访问邮箱的速度和稳定性难以保障,常常影响工作。
针对这样的情况,TurboEx可为大型企业提供异地部署的整体邮件解决方案,通过在总公司建立中心节点,各分支子公司建立分支节点的方式,解决目前大型企业的子公司访问邮箱的问题。
适用环境
TurboEx异地分布式系统适合以下情况:
公司有不通分支机构或较小的分散站点与公司总部的网络连接通常是低带宽、高滞后或不可靠。
公司总部网络无法承载集中分发的服务流量。
分支机构有自己的服务器、企业网络、域控制。
要求各区域管理员维护所属区域用户成员。
用户要求有更快的邮箱访问速度、更好提供用户体验。
TurboEx异地分布式配置
拓扑结构
各地区分支机构再自己服务器上部署一套TurboEx邮件系统,所有分支统一采用相同的域名,各区域的用户名不允许相同,下图为两地分支机构的部署架构图。
图 11 TurboEx分布式部署架构拓扑图
优点:
不同地域的用户只需通过当地部署的邮件服务器进行邮件的收发,减少由于通讯线路引起的异地用户通过集中服务器收发的故障问题。
通过分布式邮件系统的异地投递功能,增加投递邮件的成功率。由于近年来垃圾邮件不断泛滥,很多邮件服务器会带有反垃圾功能,通过IP方式对邮件进行阻断或拦截等。采用分布式系统,可当某地的服务器IP被拦截后系统自动投递到其他可用服务器进行投递处理。
对异地分布式处理要点:
自动同步用户信息
不同服务器上的用户信息自动定期的同步到群内所有的其他服务器上,以保证其他服务器能及时正确的识别该服务器的用户资料。
自动路由异地邮件
本地服务器通过群的用户列表,以判断邮件接收人所在的服务器,然后进行正确的投递。
自动转投邮件
本地服务器根据设定,自动把本服务器投递不成功的邮件转由群内其他服务器进行再次投递。
域名解析记录设置
假如公司域名为turbo.cn,公司有两个个分支机构,分别在广州、北京,各自的邮件服务器主机域名为gz.turbo.cn,bj.turbo.cn,需要把域名的MX记录同时指向各地区的邮件服务器。对应的公网IP如下表所示:
域名地址
公网IP
gz.turbo.cn
218.136.204.48
bj.turbo.cn
119.20.14.48
turbo.cn 的 域名解析记录应该设置如下:
主机名
类型
记录值
优先级
TTL
@
MX
gz.turbo.cn
10
300
@
MX
bj.turbo.cn
10
300
gz
A
218.136.204.48
-
300
bj
A
119.20.14.48
-
300
@
TXT
v=spf1 include:spf.turbo.cn -all
-
300
spf
TXT
v=spf1 ip4:218.136.204.48 ip4:119.20.14.48 a:all.turborelay.com -all
-
300
设置服务器节点
节点信息列表配置
使用管理员依次打开“系统设置”-》“分布式节点”,所示如下图,需要在各分支机构分别增加两个节点id,如分别gz,bj。
图 22 节点列表信息
列表说明:
节点id:标识节点ID,服务引用的节点ID编号。
节点名称:说明节点ID的名称信息。
设置节点主机
根据用户分支机构配置所属节点id。如分支机构所属广州设置节点名称为:gz,分支机构所属北京则设置bj。
使用管理员账户依次进入“系统设置”-》“基本设置”,如下图所示。
广州分支机构节点设置截图:
图 23 广州节点ID设置
北京分支机构节点设置截图:
图 24 北京节点ID设置
分布式服务配置
编辑 /turboex/turbomail/conf/cbserver_smtpserver.xml,增加如下CallBean,如广州节点增加如下:
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:t xml:space="preserve"> <bean id="distbj class="callbeanclient" init-method="init">
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:lastRenderedPageBreak/><w:t xml:space="preserve"> <property name="servers" value="119.20.14.48:8999" />
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:t xml:space="preserve"> <property name="connecttimeout" value="16" />
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:t xml:space="preserve"> </bean>
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:t xml:space="preserve"> <bean id="mail.server.dlv.dist.bj" class="remoteagent">
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:t xml:space="preserve"> <property name="remotebeanid" value="mail.server.dlv.dist" />
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:t xml:space="preserve"> <property name="serverid" value="distbj" />
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:t xml:space="preserve"> </bean>
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:t xml:space="preserve"> <bean id="mail.server.dlv.dist" class="mail.server.dlv.dist">
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:t xml:space="preserve"> </bean>
同样,在bj 节点的增加如下:
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:t xml:space="preserve"> <bean id="distgz class="callbeanclient" init-method="init">
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:t xml:space="preserve"> <property name="servers" value="218.136.204.48:8999" />
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:t xml:space="preserve"> <property name="connecttimeout" value="16" />
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:t xml:space="preserve"> </bean>
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:t xml:space="preserve"> <bean id="mail.server.dlv.dist.gz" class="remoteagent">
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:t xml:space="preserve"> <property name="remotebeanid" value="mail.server.dlv.dist" />
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:t xml:space="preserve"> <property name="serverid" value="distgz" />
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:t xml:space="preserve"> </bean>
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:t xml:space="preserve"> <bean id="mail.server.dlv.dist" class="mail.server.dlv.dist">
<w:left w:val="single" w:sz="4" w:space="4" w:color="auto"/><w:bottom w:val="single" w:sz="4" w:space="1" w:color="auto"/><w:right w:val="single" w:sz="4" w:space="4" w:color="auto"/></w:pBdr><w:shd w:val="clear" w:color="auto" w:fill="BFBFBF" w:themeFill="background1" w:themeFillShade="BF"/><w:rPr><w:rFonts w:hint="eastAsia"/><w:sz w:val="22"/></w:rPr></w:pPr><w:r w:rsidRPr="00965D04"><w:rPr><w:sz w:val="22"/></w:rPr><w:t xml:space="preserve"> </bean>
配置完成后,需要启动turbodist分布式服务。
镜像服务配置
用户信息同步主要通过镜像服务完成,如将用户属性、账户、名称等信息推送到远端服务器,镜像服务包含turbomirrorserver、turbomirrorclient服务。
镜像服务主要通过修改turbomirrorclient配置,各节点分别设置对端节点服务连接信息,并启动turbomirrorserver服务。
如广州分支机构节点在turbomirrorclient/conf/applicationContext.xml增加如下配置:
<bean id="bj" class="turbotech.callbean.client.CallBeanClient" init-method="init">
<w:t><property name="servers" value="119.20.14.48:8633" />
<w:t><property name="stay" value="true" /><w:t xml:space="preserve">
</bean>
<bean id="callbean.mirror.server" class="turbotech.callbean.remote.Agent">
<property name="serverid" value="bj" />
</bean>
北京分支机构节点在turbomirrorclient/conf/applicationContext.xml增加如下配置:
<bean id="gz" class="turbotech.callbean.client.CallBeanClient" init-method="init">
<w:t><property name="servers" value="218.136.204.48:8633" />
</w:r><w:r w:rsidR="00A93FBB"><w:t><property name="stay" value="true" /><w:t xml:space="preserve">
</bean>
<bean id="callbean.mirror.server" class="turbotech.callbean.remote.Agent">
<property name="serverid" value="gz" />
</bean>
配置完成后,需要启动turbomirrorserver和turbomirrorclient服务即可。
