zimbra郵件系統


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

解決辦法:

一、卸載#./install.sh -u
二、刪除全部的相關東西,包括/etc/passwd中的zimbra和mysql用戶
userdel zimbra
userdel mysql
三、從新安裝#./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:                 admin@mail.nclub.com          
******* +Admin Password                        UNSET        未設置                 
        +Anti-virus quarantine user:           virus-quarantine.zu0av89xo_@mail.nclub.com
        +Enable automated spam training:       yes                           
        +Spam training user:                   spam.riysgrxjzf@mail.nclub.com
        +Non-spam(Ham) training user:          ham.4drsliwim@mail.nclub.com  
        +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:    admin@mail.nclub.com          
        +Version update source email:          admin@mail.nclub.com          

   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:                    admin@mail.nclub.com          
** 4) Admin Password                           UNSET                         
   5) Anti-virus quarantine user:              virus-quarantine.zu0av89xo_@mail.nclub.com
   6) Enable automated spam training:          yes                           
   7) Spam training user:                      spam.riysgrxjzf@mail.nclub.com
   8) Non-spam(Ham) training user:             ham.4drsliwim@mail.nclub.com  
   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:       admin@mail.nclub.com          
  24) Version update source email:             admin@mail.nclub.com          

Select, or 'r' for previous menu [r] 4      來設置上面的4)裏的東西

Password for admin@mail.nclub.com (min 6 characters): [6E99rd4R] zimbra    ---change

Store configuration

   1) Status:                                  Enabled                       
   2) Create Admin User:                       yes                           
   3) Admin user to create:                    admin@mail.nclub.com          
   4) Admin Password                           set      改變                     
   5) Anti-virus quarantine user:              virus-quarantine.zu0av89xo_@mail.nclub.com
   6) Enable automated spam training:          yes                           
   7) Spam training user:                      spam.riysgrxjzf@mail.nclub.com
   8) Non-spam(Ham) training user:             ham.4drsliwim@mail.nclub.com  
   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:       admin@mail.nclub.com          
  24) Version update source email:             admin@mail.nclub.com          

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:                    admin@mail.nclub.com          
   4) Admin Password                           set                           
   5) Anti-virus quarantine user:              virus-quarantine.zu0av89xo_@mail.nclub.com
   6) Enable automated spam training:          yes                           
   7) Spam training user:                      spam.riysgrxjzf@mail.nclub.com
   8) Non-spam(Ham) training user:             ham.4drsliwim@mail.nclub.com  
   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:       admin@mail.nclub.com          
  24) Version update source email:             admin@mail.nclub.com          

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



php

相關文章
相關標籤/搜索