邮件HA系统(postfix系统的)[1]

[入库:2005年9月21日] [更新:2007年3月24日]

本文简介:


邮件HA系统
NOTE:
This is a project in work, so it can be changed on the fly. There's also no guarantee this setup will work for you. 
本项目正在进行中,随时会有所改变,所以不会保证你的安装是否有效。
Tested on FreeBSD 4.4-RELEASE with Postfix 1.1.4,1 (PCRE, OpenLDAP) and OpenLDAP v2.  0. Description简介
This setup is build with four freebsd boxes, three running postfix, one OpenLDAP. One is "smtp forwarder", reffered to as "forwarder" while other two's are "backend mail storage servers" reffered to as "backends". OpenLDAP server is reffered to as "ldap server". 
本安装需要4个freebsd的系统,3个运行postfix,1个运行OpenLDAP。1个postfix作为smtp转发器,本文以后称作“转发器”,另外两个作为后端邮件存储服务器,本文以后称作“后端”,OpenLDAP服务器本文称作ldap服务器。

The idea is to have N forwarders and M backends, all living inependently. When mail comes to forwarder, mail is sent to all, I repeat, all backend servers. 
设想有N个转发器和M个后端,都独立运行,当邮件到达转发器,将发送到所有的后端。

Forwarder is publicly available, while others (backends and LDAP) are in private network with LAN IP's (10.10.10.0/24). Forwarder has two NIC's between which is no routing - backends and ldap do not have Internet access! 
转发器可以被公共访问,后端和LDAP在私有网段(10.10.10.0/24)。转发器有两个网卡,之间没有路由,后端和ldap不能从internet访问。

This setup allows us to fine-tune access rights for all servers and also to know there's no way for intruders to get to our data (ldap and backends). 
本文介绍的安装可以优化所有服务器的访问权限,禁止入侵者获得我们的数据(ldap和后端)。

Here's a picture: 示意图
 
For failover system we'll use freevrrpd daemon. Installation and setup is described in my previous article (http://uni.x-si.org/vrrpd.html). 
对于故障恢复,我们采用freevrrpd daemon,其安装和设置请参照http://uni.x-si.org/vrrpd.html
1. LDAP server setup(LDAP服务器设置)
Install OpenLDAP2 on ldap server (http://www.openldap.org/software/download/). 
在ldap服务器安装OpenLDAP2
Ldap schema we use: 
#---- start here ----
attributetype ( 2.5.4.80 NAME 'maildrop' SUP mail 

attributetype ( 2.5.4.81 NAME 'mailacceptinggeneralid' SUP mail 

attributetype ( 2.5.4.82 NAME 'mailowner' SUP name 

attributetype ( 2.5.4.83 NAME 'homedir' SUP name 

attributetype ( 2.5.4.90 NAME 'maildrop1' SUP mail 

attributetype ( 2.5.4.91 NAME 'maildrop2' SUP mail 

objectclass ( 2.16.840.1.113730.3.3.1
     NAME 'mailUser'
         DESC 'x-si.org user'
SUP top
STRUCTURAL
MUST ( uid $ mailowner $ mailacceptinggeneralid $ maildrop
$ maildrop1 $ maildrop2 $ homedir 
MAY ( cn $ mail 
)
#---- end here ----

And relevant parts od slapd.conf: 
Od slapd.conf中相关部分:
#---- start here ----
# x-si.org
include /etc/openldap/schema/x-si.schema
database        ldbm
suffix          "dc=x-si,dc=org"
rootdn          "cn=Manager,dc=x-si,dc=org"

本文关键:邮件HA系统(postfix系统的)
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top