環境: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 {
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";
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。郵件地址分別為[email protected]和[email protected],互相給對方發信測試成功。
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