环境:vmware下RedHat EL3 x 3
ServerA ip:192.168.0.231 邮件网关server DNS server
ServerB ip:192.168.0.232 邮件系统server
ServerC ip:192.168.0.233 邮件系统server
实验域:
ServerB: wllhc.org ServerC: thiz.net
实验目的:
ServerB和ServerC下的邮件用户用自己的邮件服务器互相收发邮件并通过网关发送,通过ServerA解析对方IP
一、在ServerA上安装邮件网关,配置邮件服务器的DNS
1.安装网关
#wget http://192.168.0.11/pkg/mail_gw/1026/gw_3.6_050430.tar.gz /opt
#tar -zxvf gw_3.6_050430.tar.gz
#cd gw_3.6
#./install.sh
搭建邮件网关与邮件系统
环境:vmware下RedHat EL3 x 3
ServerA ip:192.168.0.231 邮件网关server DNS server
ServerB ip:192.168.0.232 邮件系统server
ServerC ip:192.168.0.233 邮件系统server
实验域:
ServerB: wllhc.org ServerC: thiz.net
实验目的:
ServerB和ServerC下的邮件用户用自己的邮件服务器互相收发邮件并通过网关发送,通过ServerA解析对方IP
1.安装网关
#wget http://192.168.0.11/pkg/mail_gw/1026/gw_3.6_050430.tar.gz /opt
#tar -zxvf gw_3.6_050430.tar.gz
#cd gw_3.6
#./install.sh
2.配置DNS
#vi /etc/named.conf
options {
(本文来源于图老师网站,更多请访问http://m.tulaoshi.com/diannaorumen/)directory "/var/named";
};
zone "." IN {
type hint;
file "named.root";
};
zone "localhost" IN {
type master;
file "localhost.zone";
allow-update { none; };
};
zone "0.0.127.in-addr.arpa" IN {
type master;
file "named.local";
allow-update { none; };
};
zone "wllhc.org" IN {
type master;
file "wllhc.zone";
(本文来源于图老师网站,更多请访问http://m.tulaoshi.com/diannaorumen/)allow-update { none; };
};
zone "0.168.192.in-addr.arpa" IN {
type master;
file "0.168.192";
allow-update { none; };
};
zone "thiz.net" IN {
type master;
file "thiz.zone";
allow-update { none; };
};
controls {
inet 127.0.0.1 port 953
allow { 127.0.0.1; } keys { "rndc-key"; };
};
3,#vi /var/named/wllhc.zone
$TTL 86400
@ IN SOA wllhc.org. root.wllhc.org.(
42 ;serial(d. adams)
3H ;refresh
15M ;retry
1W ;expiry
1D) ;minimum
IN NS wllhc.org.
IN MX 1 mail.wllhc.org.
www IN A 192.168.0.232
mail IN A 192.168.0.232
@ IN A 192.168.0.232
4,#vi /var/named/thiz.zone
$TTL 86400
@ IN SOA thiz.net. root.thiz.net.(
42 ;serial(d. adams)
3H ;refresh
15M ;retry
1W ;expiry
1D) ;minimum
IN NS thiz.net.
IN MX 1 mail.thiz.net.
www IN A 192.168.0.233
mail IN A 192.168.0.233
@ IN A 192.168.0.233
二、在ServerB,ServerC上安装邮件系统并填加相应的域
1.首先要指定ServerB,ServerC的gw和dns为ServerA
ServerB #vi /etc/resolv.conf
nameserver 192.168.0.231
ServerB #vi /etc/sysconfig
NETWORKING=yes
HOSTNAME=localhost.localdomain
GATEWAY=192.168.0.231
ServerC #vi /etc/resolv.conf
nameserver 192.168.0.231
ServerC #vi /etc/sysconfig
NETWORKING=yes
HOSTNAME=localhost.localdomain
GATEWAY=192.168.0.231
2.安装邮件系统
ServerB #wget http://192.168.0.11/pkg/email/410/linux_binary_installer-4.1.0.tar.gz /opt
ServerB #tar -zxvf /opt/linux_binary_installer-4.1.0.tar.gz
ServerB #cd /opt/linux_binary
ServerB #./install.sh
Start Installing……
: Installing BASE PKG……
: Installing HTDOCS……
: Installing BIN PKG……
: UPDATE LIB CONFIG……
: Initial the WEBMAIL……
: Initial MySQL……
: Installed Config file……
: Config Eyou SMTPD……
Now Setting Eyou Mail System, Please Input the RIGHT Value
: me : wllhc.org #我们提供邮件服务的默认域
: hostname : localhost.localdomain #主机名
: usernums : 200 #最大用户数
: time : 2005/06/14 #此系统创建时间
: module : calendar_bookmark_voice_storage #此系统的功能模块
: ip : 127.0.0.1 #此邮件系统的ip地址
: license : NULL #邮件系统序列号
: o_value : localhost.localdomain #
: Start Eyou Mail System……
: Initial LDAP……
: Initial MYSQL……
Install Finished
ServerB #mozilla mail.wllhc.org/admin/ #用管理员身份在此邮件系统中添加wllhc.org这个域
ServerC #wget http://192.168.0.11/pkg/email/410/linux_binary_installer-4.1.0.tar.gz /opt
ServerC #tar -zxvf /opt/linux_binary_installer-4.1.0.tar.gz
ServerC #cd /opt/linux_binary
ServerC #./install.sh
: Installing BASE PKG……
: Installing HTDOCS……
: Installing BIN PKG……
: UPDATE LIB CONFIG……
: Initial the WEBMAIL……
: Initial MySQL……
: Installed Config file……
: Config Eyou SMTPD……
Now Setting Eyou Mail System, Please Input the RIGHT Value
: me : thiz.net
: hostname : localhost.localdomain
: usernums : 200
: time : 2005/06/14
: module : calendar_bookmark_voice_storage
: ip : 127.0.0.1
: license : NULL
: o_value : localhost.localdomain
: Start Eyou Mail System……
: Initial LDAP……
: Initial MYSQL……
Install Finished
ServerC #mozilla mail.thiz.net/admin/ #用管理员身份在此邮件系统中添加thiz.net这个域。
三、将windows环境的网关和DNS指向192.168.0.231,用Foxmail使用默认帐户support。邮件地址分别为support@wllhc.org和support@thiz.net,互相给对方发信测试成功。
PS:注意测试时记得停掉ServerA和ServerB的防火墙,如果之前还运行着其他的MTA如sendmail记得停掉,不然会出现如“端口被占用”类似的错误。
/var/eyou/etc/eyou_smtpd_config
在/var/eyou/openldap/etc/openldap/slapd.conf文件大概在32行,有一个字段: suffix "o=eyou.com",
将eyou.com改成和/var/eyou/etc/eyou_smptd_config文件中sys_dn字段o的值一样,即nttc.edu.cn。
在34行,有一个字段:rootdn "cn=eYouAdmin,o=eyou.com" 也将o=eyou.com改成o=nttc.edu.cn