Centos 7 搭建 Zimbra 郵件伺服器和foxmail配置
阿新 • • 發佈:2018-12-26
環境配置:
本機ip:192.168.1.41
設定主機名
hostnamectl set-hostname mail.jlkj.com
新增hosts
echo "192.168.1.41 mail.jlkj.com" >> /etc/hosts
關閉防火牆:
sed -i 's/SELINUX=enforcing/SELINUX=disabled/' /etc/sysconfig/selinux setenforce 0 systemctl stop iptables systemctl disable iptables systemctl stop firewalld systemctl disable firewalld
關閉其他郵件服務
systemctl stop postfix.service
systemctl disable postfix.service
安裝依賴:
yum update -y
yum -y install perl perl-core nmap sudo libidn gmp libaio libstdc++ unzip sysstat sqlite nc
設定本地dns:
配置dns伺服器
1.安裝bind
yum -y install bind bind-utils
2.修改主配置檔案
vim /etc/named.conf
新增下面的配置:
zone "jlkj.com" IN { type master; file "jlkj.com"; allow-update { none; }; }; zone "1.168.192.in-addr.arpa" IN { type master; file "192.168.1.arpa"; allow-update { none; }; };
2.配置區域配置檔案
vim /var/named/jlkj.com
$TTL 1D
@ IN SOA @ rname.invalid. (
0 ; serial
1D ; refresh
1H ; retry
1W ; expire
3H ) ; minimum
NS ns.jlkj.com.
MX 10 mail.jlkj.com.
ns A 192.168.1.41
mail A 192.168.1.41
vim /var/named/192.168.1.arpa
$TTL 1D @ IN SOA @ rname.invalid. ( 0 ; serial 1D ; refresh 1H ; retry 1W ; expire 3H ) ; minimum NS ns.jlkj.com. 109 PTR ns.jlkj.com. 109 PTR mail.jlkj.com.
3.重啟bind
systemctl restart named.service
4.使用本地dns伺服器
# [[email protected] named]# cat /etc/resolv.conf
# Generated by NetworkManager
search jlkj.com
nameserver 127.0.0.1
nameserver 192.168.1.1
nameserver 114.114.114.114
測試MX解析:
[[email protected] ~]# nslookup -qt=mx mail.jlkj.com
*** Invalid option: qt=mx
Server: 127.0.0.1
Address: 127.0.0.1#53
Name: mail.jlkj.com
Address: 192.168.1.41
現在就是正常的了
安裝zimbrta
wget https://files.zimbra.com/downloads/8.6.0_GA/zcs-8.6.0_GA_1153.RHEL7_64.20141215151110.tgz
tar -zxvf zcs-8.6.0_GA_1153.RHEL7_64.20141215151110
mv zcs-8.6.0_GA_1153.RHEL7_64.20141215151110 zimbra
cd zimbrta
#開啟一鍵傻瓜式的安裝
./install.sh --platform-override
# su - zimbra //切換到zimbra使用者
# zmcontrol start //啟動zimbra
# zmcontrol status //檢視啟動狀態
# zmcontrol stop //停止zimbra
安裝完畢後: