MDA
MTA:postfix,sendmail,qmail,使用smtp协议(tcp 25)
MUA:foxmail,thunderbird,使用pop3(110),imap(143)协议来接收邮件。
zimbra邮件系统
mta用postfix来实现
//zimbra卸载
[root@mail zcs-8.0.6_GA_5922.RHEL6_64.20131203103705]# ./install.sh -u
//默认安装目录
[root@mail zimbra]# /opt/zimbra
####安装zimbra
1.网络架构图
dns server:10.10.54.61
mail server:10.10.54.69(/opt >= 5GB)
2.配置DNS(54.61)
[root@gyf ~]# vi /etc/named.conf
options {
listen-on port 53 {any; };
listen-on-v6 port 53 { ::1; };
directory "/var/named";
dump-file "/var/named/data/cache_dump.db";
statistics-file "/var/named/data/named_stats.txt";
memstatistics-file "/var/named/data/named_mem_stats.txt";
allow-query {any; };
recursion yes;
# forward only;
# forwarders{
# 8.8.8.8;
#
# };
#acl intranet {10.10.54.0/24;};
#acl internet {! 10.10.54.0/24;any};
# dnssec-enable yes;
# dnssec-validation yes;
# dnssec-lookaside auto;
/* Path to ISC DLV key */
# bindkeys-file "/etc/named.iscdlv.key";
# managed-keys-directory "/var/named/dynamic";
};
logging {
channel default_debug {
file "data/named.run";
severity dynamic;
};
};
#view "lan" {
#match-clients{"internet";};
zone "." IN {
type hint;
file "named.ca";
};
zone "ssr.com" IN {
type master;
file "named.ssr.com";
#allow-transfer{10.10.54.64;};
};
zone "54.10.10.in-addr.arpa" IN {
type master;
file "named.10.10.54";
#allow-transfer{10.10.54.64;};
};
[root@gyf ~]# vim /var/named/named.ssr.com
$TTL 86400
@ IN SOA ssr.com. root (
2014010802
1H
2M
1W
1D
);
@ IN NS ssr.com.
ssr.com. IN A 10.10.54.61
@ IN MX 8 mail.ssr.com. 邮件服务器
mail.ssr.com. IN A 10.10.54.69 地址
slaver IN A 10.10.54.64
svn IN A 10.10.54.64
ftp IN CNAME master.ssr.com.
;hr IN A 10.10.54.50
www.ssr.com. IN CNAME ssr.com.
hr IN CNAME ssr.com.
bbs IN CNAME ssr.com.
意思当有邮件发给ssr.com.这个区域时,先发给 mail.ssr.com.邮件服务器
一个域中只能有一个邮件服务器
[root@gyf ~]# vim /var/named/named.10.10.54
$TTL 86400
@ IN SOA ssr.com. root (
2014010802
1H
2M
1W
1D
);
@ IN NS ssr.com.
61 IN PTR ssr.com.
61 IN PTR ftp.ssr.com.
;50 IN PTR hr.ssr.com.
64 IN PTR slaver.ssr.com.
64 IN PTR svn.ssr.com.
61 IN PTR www.ssr.com.
61 IN PTR hr.ssr.com.
61 IN PTR bbs.ssr.com.
69 IN PTR mail.ssr.com.
3.设置邮件服务器10.10.54.69
修改dns
[root@mail ~]# cat /etc/resolv.conf
nameserver 10.10.54.61
[root@gyf ~]# /etc/init.d/named restart
4.安装:
1)关闭selinux: zimbra要求的
vim /etc/sysconfig/selinux
SELINUX=disabled
2)停止系统默认邮件服务,如果未停止则MTA服务启动时会冲突导致启动失败
chkconfig postfix off
/etc/init.d/postfix stop
3)安装依赖
yum install nc.x86_64 sysstat.x86_64
tar xvf /soft/zcs-8.0.6_GA_5922.RHEL6_64.20131203103705.tgz
cd /zcs-8.0.6_GA_5922.RHEL6_64.20131203103705
[root@gyf zcs-8.0.6_GA_5922.RHEL6_64.20131203103705]# ./install.sh
hostname: Unknown host
hostname: Unknown host
5.修改主机名
[root@centos69 ~]# vim /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=mail.ssr.com
[root@centos69 ~]# cat /etc/hosts
127.0.0.1 localhost.localdomain localhost
10.10.54.69 mail.ssr.com mail(mail是别名)
[root@centos69 ~]# hostname mail.ssr.com
[root@centos69 ~]# hostname
mail.ssr.com
[root@centos69 ~]# logout
退出重新登录
4.安装zimbra
[root@mail zcs-8.0.6_GA_5922.RHEL6_64.20131203103705]# ./install.sh
Checking for existing installation...
zimbra-ldap...NOT FOUND
zimbra-logger...NOT FOUND
zimbra-mta...NOT FOUND
zimbra-snmp...NOT FOUND
zimbra-store...NOT FOUND
zimbra-apache...NOT FOUND
zimbra-spell...NOT FOUND
zimbra-convertd...NOT FOUND
zimbra-memcached...NOT FOUND
zimbra-proxy...NOT FOUND
zimbra-archiving...NOT FOUND
zimbra-cluster...NOT FOUND
zimbra-core...NOT FOUND
Do you agree with the terms of the software license agreement? [N]
Select the packages to install
Install zimbra-ldap [Y] y
Install zimbra-logger [Y] y
Install zimbra-mta [Y] y
Install zimbra-snmp [Y] y
Install zimbra-store [Y] y
Install zimbra-apache [Y] y
Install zimbra-spell [Y] y
Install zimbra-memcached [N] y
Install zimbra-proxy [N] y
Installing:
zimbra-core
zimbra-ldap
zimbra-logger
zimbra-mta
zimbra-snmp
zimbra-store
zimbra-apache
zimbra-spell
zimbra-memcached
zimbra-proxy
The system will be modified. Continue? [N] y
######
Do you want to verify message store database integrity? [Y] y
Verifying integrity of message store databases. This may take a while.
Error: assertion '-r /opt/zimbra/conf/my.cnf' failed
解决办法:
1、卸载#./install.sh -u
2、删除所有的相关东西,包括/etc/passwd中的zimbra和mysql用户
userdel zimbra
userdel mysql
3、重新安装#./install.sh
配置DNS
删除mysql用户后mysql启动不了
在/etc/password增加
mysql:x:27:27:MySQL Server:/var/lib/mysql:/bin/bash
vim /etc/shadow
mysql:x:27:
组号不要和以前的组冲突
###############
询问是否更改主机名:
Setting defaults...
DNS ERROR resolving MX for mail.domain.com
It is suggested that the domain name have an MX record configured in DNS
Change domain name? [Yes] NO
##################
在Main menu的配置导向里设置:
Common Configuration:
? Hostname改为本机的机器名;
? TimeZone设置为67,即UTC+8北京时间;
zimbra-ldap:
? Domain to create设置:domain.com(注意是否使用子域名,具体根据系统管理表设定)
zimbra-store:
? Admin Password密码设置:(根据系统管理表设定)
? SMTP host设置为:stmp.domain.com(根据系统管理表设定)
? Web server HTTP port设置为80
? Web server HTTPS port设置为443
? Web server mode设置为https
? POP server port设置为110
? POP server SSL port设置为995
? Use spell check server设置为no
Main menu
1) Common Configuration:
2) zimbra-ldap: Enabled
3) zimbra-store: Enabled
+Create Admin User: yes
+Admin user to create: [email protected]
******* +Admin Password UNSET 未设置
+Anti-virus quarantine user: [email protected]
+Enable automated spam training: yes
+Spam training user: [email protected]
+Non-spam(Ham) training user: [email protected]
+SMTP host: mail.nclub.com
+Web server HTTP port: 80
+Web server HTTPS port: 443
+Web server mode: https
+IMAP server port: 143
+IMAP server SSL port: 993
+POP server port: 110
+POP server SSL port: 995
+Use spell check server: yes
+Spell server URL: http://mail.nclub.com:7780/aspell.php
+Configure for use with mail proxy: FALSE
+Configure for use with web proxy: FALSE
+Enable version update checks: TRUE
+Enable version update notifications: TRUE
+Version update notification email: [email protected]
+Version update source email: [email protected]
4) zimbra-mta: Enabled
5) zimbra-snmp: Enabled
6) zimbra-logger: Enabled
7) zimbra-spell: Enabled
8) Default Class of Service Configuration:
r) Start servers after configuration yes
s) Save config to file
x) Expand menu
q) Quit
Address unconfigured (**) items (? - help) 3 来设置上面的3)里的东西
Store configuration
1) Status: Enabled
2) Create Admin User: yes
3) Admin user to create: [email protected]
** 4) Admin Password UNSET
5) Anti-virus quarantine user: [email protected]
6) Enable automated spam training: yes
7) Spam training user: [email protected]
8) Non-spam(Ham) training user: [email protected]
9) SMTP host: mail.nclub.com
10) Web server HTTP port: 80
11) Web server HTTPS port: 443
12) Web server mode: https
13) IMAP server port: 143
14) IMAP server SSL port: 993
15) POP server port: 110
16) POP server SSL port: 995
17) Use spell check server: yes
18) Spell server URL: http://mail.nclub.com:7780/aspell.php
19) Configure for use with mail proxy: FALSE
20) Configure for use with web proxy: FALSE
21) Enable version update checks: TRUE
22) Enable version update notifications: TRUE
23) Version update notification email: [email protected]
24) Version update source email: [email protected]
Select, or 'r' for previous menu [r] 4 来设置上面的4)里的东西
Password for [email protected] (min 6 characters): [6E99rd4R] zimbra ---change
Store configuration
1) Status: Enabled
2) Create Admin User: yes
3) Admin user to create: [email protected]
4) Admin Password set 改变
5) Anti-virus quarantine user: [email protected]
6) Enable automated spam training: yes
7) Spam training user: [email protected]
8) Non-spam(Ham) training user: [email protected]
9) SMTP host: mail.nclub.com
10) Web server HTTP port: 80
11) Web server HTTPS port: 443
12) Web server mode: https
13) IMAP server port: 143
14) IMAP server SSL port: 993
15) POP server port: 110
16) POP server SSL port: 995
17) Use spell check server: yes
18) Spell server URL: http://mail.nclub.com:7780/aspell.php
19) Configure for use with mail proxy: FALSE
20) Configure for use with web proxy: FALSE
21) Enable version update checks: TRUE
22) Enable version update notifications: TRUE
23) Version update notification email: [email protected]
24) Version update source email: [email protected]
Select, or 'r' for previous menu [r] 12 来设置上面的12)里的东西
Please enter the web server mode (http,https,both,mixed,redirect) [https] mixed
Store configuration
1) Status: Enabled
2) Create Admin User: yes
3) Admin user to create: [email protected]
4) Admin Password set
5) Anti-virus quarantine user: [email protected]
6) Enable automated spam training: yes
7) Spam training user: [email protected]
8) Non-spam(Ham) training user: [email protected]
9) SMTP host: mail.nclub.com
10) Web server HTTP port: 80
11) Web server HTTPS port: 443
12) Web server mode: mixed 改变
13) IMAP server port: 143
14) IMAP server SSL port: 993
15) POP server port: 110
16) POP server SSL port: 995
17) Use spell check server: yes
18) Spell server URL: http://mail.nclub.com:7780/aspell.php
19) Configure for use with mail proxy: FALSE
20) Configure for use with web proxy: FALSE
21) Enable version update checks: TRUE
22) Enable version update notifications: TRUE
23) Version update notification email: [email protected]
24) Version update source email: [email protected]
Select, or 'r' for previous menu [r] r
Main menu
1) Common Configuration:
2) zimbra-ldap: Enabled
3) zimbra-store: Enabled
4) zimbra-mta: Enabled
5) zimbra-snmp: Enabled
6) zimbra-logger: Enabled
7) zimbra-spell: Enabled
8) Default Class of Service Configuration:
r) Start servers after configuration yes
s) Save config to file
x) Expand menu
q) Quit
*** CONFIGURATION COMPLETE - press 'a' to apply
Select from menu, or press 'a' to apply config (? - help) a
Save configuration data to a file? [Yes] y
Save config in file: [/opt/zimbra/config.19920]
Saving config in /opt/zimbra/config.19920...done.
The system will be modified - continue? [No] yes ---change
Operations logged to /tmp/zmsetup.03202014-141143.log
##########
等待后
Notify Zimbra of your installation? [Yes] y
[root@mail zcs-8.0.6_GA_5922.RHEL6_64.20131203103705]# /etc/init.d/zimbra start
5.邮件管理
//管理后台进行更详细配置
https://mail.ssr.com:7071
admin进入后台管理
创建用户
查看数据库:
[root@mail zcs-8.0.6_GA_5922.RHEL6_64.20131203103705]# ps -ef |grep mysql
zimbra 15770 15282 0 20:14 ? 00:00:01 /opt/zimbra/mysql/bin/mysqld --defaults-file=/opt/zimbra/conf/my.cnf --basedir=/opt/zimbra/mysql --datadir=/opt/zimbra/db/data --plugin-dir=/opt/zimbra/mysql/lib/plugin --external-locking --log-error=/opt/zimbra/log/mysql_error.log --pid-file=/opt/zimbra/db/mysql.pid --socket=/opt/zimbra/db/mysql.sock --port=7306
/opt/zimbra/bin/zmlocalconfig -s |grep zimbra_mysql
zimbra_mysql_connector_maxActive = 100
zimbra_mysql_password = QrPecLPFs5dDG4Xc_HcnXqcoyEELIZ2 密码
zimbra_mysql_user = zimbra 用户
/opt/zimbra/mysql/bin/mysql -uzimbra -pQrPecLPFs5dDG4Xc_HcnXqcoyEELIZ2 -P7306 --socket=/opt/zimbra/db/mysql.sock