iT邦幫忙

第 12 屆 iThome 鐵人賽

DAY 26
0
自我挑戰組

開源軟體介簡及架設系列 第 26

[開源] Zimbra 開源企業級郵件伺服器

  • 分享至 

  • xImage
  •  

因之前都是使用 mailcow 服務架設,看到社群有在推這一套 Zimbra 開源版服務,基本的功能都足夠可以使用,在加上前端的 Proxmox Mail Gateway 防護使用。

運行環境


CentOS 7、Zimbra 8.8.15

  • 安裝之前先把 CentOS 7  內預設已安裝好了 Postfix 先停用並且移除以防萬一不小心啟用到 Postfix 服務
systemctl stop postfix ; systemctl disable postfix
yum remove postfix -y
  • 主機名稱不一定要修改,但是 hosts 這個要做修改「 vim /etc/hosts
127.0.0.1 mail.XXX.com mail
  • 安裝 Zimbra 必要的套件
yum install -y perl perl-core ntpl nmap-ncat nmap sudo libidn gmp libaio libstdc++ unzip sysstat sqlite openssh-clients net-tools bind-utils nc wget libstdc++.so.6
cd /opt

wget https://files.zimbra.com/downloads/8.8.15_GA/zcs-8.8.15_GA_3869.RHEL7_64.20190918004220.tgz

tar -zxvf zcs-8.8.15_GA_3869.RHEL7_64.20190918004220.tgz

cd zcs-8.8.15_GA_3869.RHEL7_64.20190918004220
  • 開始安裝 Zimbra 服務
./install.sh
  • 安裝流程內容
    這是檢查系統是否曾有安裝過,如果沒有的話直接按下同意 Y即可
Operations logged to /tmp/install.log.piHDHKej
Checking for existing installation...
    zimbra-drive...NOT FOUND
    zimbra-imapd...NOT FOUND
    zimbra-patch...NOT FOUND
    zimbra-mta-patch...NOT FOUND
    zimbra-proxy-patch...NOT FOUND
    zimbra-license-tools...NOT FOUND
    zimbra-license-extension...NOT FOUND
    zimbra-network-store...NOT FOUND
    zimbra-network-modules-ng...NOT FOUND
    zimbra-chat...NOT FOUND
    zimbra-talk...NOT FOUND
    zimbra-ldap...NOT FOUND
    zimbra-logger...NOT FOUND
    zimbra-mta...NOT FOUND
    zimbra-dnscache...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-core...NOT FOUND


----------------------------------------------------------------------
PLEASE READ THIS AGREEMENT CAREFULLY BEFORE USING THE SOFTWARE.
SYNACOR, INC. ("SYNACOR") WILL ONLY LICENSE THIS SOFTWARE TO YOU IF YOU
FIRST ACCEPT THE TERMS OF THIS AGREEMENT. BY DOWNLOADING OR INSTALLING
THE SOFTWARE, OR USING THE PRODUCT, YOU ARE CONSENTING TO BE BOUND BY
THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL OF THE TERMS OF THIS
AGREEMENT, THEN DO NOT DOWNLOAD, INSTALL OR USE THE PRODUCT.

License Terms for this Zimbra Collaboration Suite Software:
https://www.zimbra.com/license/zimbra-public-eula-2-6.html
----------------------------------------------------------------------


# 這是詢問是否同意安裝,輸入 y 即可

Do you agree with the terms of the software license agreement? [N] y
  • 這直接按下 Enter 鍵即可
Use Zimbra's package repository [Y]

Importing Zimbra GPG key

Configuring package repository

Checking for installable packages

Found zimbra-core (local)
Found zimbra-ldap (local)
Found zimbra-logger (local)
Found zimbra-mta (local)
Found zimbra-dnscache (local)
Found zimbra-snmp (local)
Found zimbra-store (local)
Found zimbra-apache (local)
Found zimbra-spell (local)
Found zimbra-memcached (repo)
Found zimbra-proxy (local)
Found zimbra-drive (repo)
Found zimbra-imapd (local)
Found zimbra-patch (repo)
Found zimbra-mta-patch (repo)
Found zimbra-proxy-patch (repo)


Select the packages to install

Install zimbra-ldap [Y]

Install zimbra-logger [Y]

Install zimbra-mta [Y]

Install zimbra-dnscache [Y]

Install zimbra-snmp [Y]

Install zimbra-store [Y]

Install zimbra-apache [Y]

Install zimbra-spell [Y]

Install zimbra-memcached [Y]

Install zimbra-proxy [Y]

Install zimbra-drive [Y]
# 這是新的服務目前還在 beta 版,可選擇性安裝
Install zimbra-imapd (BETA - for evaluation only) [N] y

Install zimbra-chat [Y]
Checking required space for zimbra-core
Checking space for zimbra-store
Checking required packages for zimbra-store
zimbra-store package check complete.

Installing:
    zimbra-core
    zimbra-ldap
    zimbra-logger
    zimbra-mta
    zimbra-dnscache
    zimbra-snmp
    zimbra-store
    zimbra-apache
    zimbra-spell
    zimbra-memcached
    zimbra-proxy
    zimbra-drive
    zimbra-imapd
    zimbra-patch
    zimbra-mta-patch
    zimbra-proxy-patch
    zimbra-chat
# 直接輸入 y 即可
The system will be modified.  Continue? [N] y
  • 安裝過程,顯示目前的進度
Beginning Installation - see /tmp/install.log.piHDHKej for details...

                          zimbra-core-components will be downloaded and installed.
                            zimbra-timezone-data will be installed.
                          zimbra-common-core-jar will be installed.
                         zimbra-common-mbox-conf will be installed.
                   zimbra-common-mbox-conf-attrs will be installed.
                    zimbra-common-mbox-conf-msgs will be installed.
                  zimbra-common-mbox-conf-rights will be installed.
                           zimbra-common-mbox-db will be installed.
                         zimbra-common-mbox-docs will be installed.
                   zimbra-common-mbox-native-lib will be installed.
                         zimbra-common-core-libs will be installed.
                                     zimbra-core will be installed.
                          zimbra-ldap-components will be downloaded and installed.
                                     zimbra-ldap will be installed.
                                   zimbra-logger will be installed.
                           zimbra-mta-components will be downloaded and installed.
                                      zimbra-mta will be installed.
                      zimbra-dnscache-components will be downloaded and installed.
                                 zimbra-dnscache will be installed.
                          zimbra-snmp-components will be downloaded and installed.
                                     zimbra-snmp will be installed.
                         zimbra-store-components will be downloaded and installed.
                       zimbra-jetty-distribution will be downloaded and installed.
                                zimbra-mbox-conf will be installed.
                                 zimbra-mbox-war will be installed.
                             zimbra-mbox-service will be installed.
                       zimbra-mbox-webclient-war will be installed.
                   zimbra-mbox-admin-console-war will be installed.
                          zimbra-mbox-store-libs will be installed.
                                    zimbra-store will be installed.
                        zimbra-apache-components will be downloaded and installed.
                                   zimbra-apache will be installed.
                         zimbra-spell-components will be downloaded and installed.
                                    zimbra-spell will be installed.
                                zimbra-memcached will be downloaded and installed.
                         zimbra-proxy-components will be downloaded and installed.
                                    zimbra-proxy will be installed.
                                    zimbra-drive will be downloaded and installed (later).
                                    zimbra-imapd will be installed.
                                    zimbra-patch will be downloaded and installed (later).
                                zimbra-mta-patch will be downloaded and installed (later).
                              zimbra-proxy-patch will be downloaded and installed (later).
                                     zimbra-chat will be downloaded and installed (later).

Downloading packages (11):
   zimbra-core-components
   zimbra-ldap-components
   zimbra-mta-components
   zimbra-dnscache-components
   zimbra-snmp-components
   zimbra-store-components
   zimbra-jetty-distribution
   zimbra-apache-components
   zimbra-spell-components
   zimbra-memcached
   zimbra-proxy-components
      ...done

Removing /opt/zimbra
Removing zimbra crontab entry...done.
Cleaning up zimbra init scripts...done.
Cleaning up /etc/security/limits.conf...done.

Finished removing Zimbra Collaboration Server.


Installing repo packages (11):
   zimbra-core-components
   zimbra-ldap-components
   zimbra-mta-components
   zimbra-dnscache-components
   zimbra-snmp-components
   zimbra-store-components
   zimbra-jetty-distribution
   zimbra-apache-components
   zimbra-spell-components
   zimbra-memcached
   zimbra-proxy-components
      ...done

Installing local packages (27):
   zimbra-timezone-data
   zimbra-common-core-jar
   zimbra-common-mbox-conf
   zimbra-common-mbox-conf-attrs
   zimbra-common-mbox-conf-msgs
   zimbra-common-mbox-conf-rights
   zimbra-common-mbox-db
   zimbra-common-mbox-docs
   zimbra-common-mbox-native-lib
   zimbra-common-core-libs
   zimbra-core
   zimbra-ldap
   zimbra-logger
   zimbra-mta
   zimbra-dnscache
   zimbra-snmp
   zimbra-mbox-conf
   zimbra-mbox-war
   zimbra-mbox-service
   zimbra-mbox-webclient-war
   zimbra-mbox-admin-console-war
   zimbra-mbox-store-libs
   zimbra-store
   zimbra-apache
   zimbra-spell
   zimbra-proxy
   zimbra-imapd
      ...done

Installing extra packages (5):
   zimbra-drive
   zimbra-patch
   zimbra-mta-patch
   zimbra-proxy-patch
   zimbra-chat
      ...done

Running Post Installation Configuration:
Operations logged to /tmp/zmsetup.20191230-135538.log
Installing LDAP configuration database...done.
Setting defaults...
  • 這是確認目前的網域的狀況,(建議要在內部加設 DNS 主機,如果用外部的 DNS 主機後面的設定會有問題會無法正常收到件)
DNS ERROR resolving MX for mail.freedom.local
It is suggested that the domain name have an MX record configured in DNS
Change domain name? [Yes]
Create domain: [mail.freedom.local] freedom.local
        MX: mail.freedom.local (192.168.10.XXX)

        Interface: 127.0.0.1
        Interface: ::1

done.
Checking for port conflicts
  • 上面如果確認沒有問題會直接顯示要設定的選單,要選擇 7 設定管理者的密碼
Main menu

   1) Common Configuration:
   2) zimbra-ldap:                             Enabled
   3) zimbra-logger:                           Enabled
   4) zimbra-mta:                              Enabled
   5) zimbra-dnscache:                         Enabled
   6) zimbra-snmp:                             Enabled
   7) zimbra-store:                            Enabled
        +Create Admin User:                    yes
        +Admin user to create:                 admin@freedom.local
******* +Admin Password                        UNSET
        +Anti-virus quarantine user:           virus-quarantine.rvwrscjel4@freedom.local
        +Enable automated spam training:       yes
        +Spam training user:                   spam.i6zgq_xfb@freedom.local
        +Non-spam(Ham) training user:          ham.kctdkkb_i@freedom.local
        +SMTP host:                            mail.freedom.local
        +Web server HTTP port:                 8080
        +Web server HTTPS port:                8443
        +Web server mode:                      https
        +IMAP server port:                     7143
        +IMAP server SSL port:                 7993
        +POP server port:                      7110
        +POP server SSL port:                  7995
        +Use spell check server:               yes
        +Spell server URL:                     http://mail.freedom.local:7780/aspell.php
        +Enable version update checks:         TRUE
        +Enable version update notifications:  TRUE
        +Version update notification email:    admin@freedom.local
        +Version update source email:          admin@freedom.local
        +Install mailstore (service webapp):   yes
        +Install UI (zimbra,zimbraAdmin webapps): yes

   8) zimbra-spell:                            Enabled
   9) zimbra-proxy:                            Enabled
  10) zimbra-imapd:                            Enabled
  11) Default Class of Service Configuration:
   s) Save config to file
   x) Expand menu
   q) Quit

Address unconfigured (**) items  (? - help) 7
  • 選擇 4 修改管理者密碼
Store configuration

   1) Status:                                  Enabled
   2) Create Admin User:                       yes
   3) Admin user to create:                    admin@freedom.local
** 4) Admin Password                           UNSET
   5) Anti-virus quarantine user:              virus-quarantine.rvwrscjel4@freedom.local
   6) Enable automated spam training:          yes
   7) Spam training user:                      spam.i6zgq_xfb@freedom.local
   8) Non-spam(Ham) training user:             ham.kctdkkb_i@freedom.local
   9) SMTP host:                               mail.freedom.local
  10) Web server HTTP port:                    8080
  11) Web server HTTPS port:                   8443
  12) Web server mode:                         https
  13) IMAP server port:                        7143
  14) IMAP server SSL port:                    7993
  15) POP server port:                         7110
  16) POP server SSL port:                     7995
  17) Use spell check server:                  yes
  18) Spell server URL:                        http://mail.freedom.local:7780/aspell.php
  19) Enable version update checks:            TRUE
  20) Enable version update notifications:     TRUE
  21) Version update notification email:       admin@freedom.local
  22) Version update source email:             admin@freedom.local
  23) Install mailstore (service webapp):      yes
  24) Install UI (zimbra,zimbraAdmin webapps): yes

Select, or 'r' for previous menu [r] 4

Password for admin@freedom.local (min 6 characters): [ZLPB6VZvsp]
  • 輸入完之後輸入 r 回上一頁
Store configuration

   1) Status:                                  Enabled
   2) Create Admin User:                       yes
   3) Admin user to create:                    admin@freedom.local
   4) Admin Password                           set
   5) Anti-virus quarantine user:              virus-quarantine.rvwrscjel4@freedom.local
   6) Enable automated spam training:          yes
   7) Spam training user:                      spam.i6zgq_xfb@freedom.local
   8) Non-spam(Ham) training user:             ham.kctdkkb_i@freedom.local
   9) SMTP host:                               mail.freedom.local
  10) Web server HTTP port:                    8080
  11) Web server HTTPS port:                   8443
  12) Web server mode:                         https
  13) IMAP server port:                        7143
  14) IMAP server SSL port:                    7993
  15) POP server port:                         7110
  16) POP server SSL port:                     7995
  17) Use spell check server:                  yes
  18) Spell server URL:                        http://mail.freedom.local:7780/aspell.php
  19) Enable version update checks:            TRUE
  20) Enable version update notifications:     TRUE
  21) Version update notification email:       admin@freedom.local
  22) Version update source email:             admin@freedom.local
  23) Install mailstore (service webapp):      yes
  24) Install UI (zimbra,zimbraAdmin webapps): yes

Select, or 'r' for previous menu [r] r
  • 輸入 a 開始設定
Main menu

   1) Common Configuration:
   2) zimbra-ldap:                             Enabled
   3) zimbra-logger:                           Enabled
   4) zimbra-mta:                              Enabled
   5) zimbra-dnscache:                         Enabled
   6) zimbra-snmp:                             Enabled
   7) zimbra-store:                            Enabled
   8) zimbra-spell:                            Enabled
   9) zimbra-proxy:                            Enabled
  10) zimbra-imapd:                            Enabled
  11) Default Class of Service Configuration:
   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
  • 直接預設按 enter 鍵即可
Save configuration data to a file? [Yes]
Save config in file: [/opt/zimbra/config.16286]
Saving config in /opt/zimbra/config.16286...done.
The system will be modified - continue? [No] yes  <<<# 詢問是否繼續,輸入 yes 即可
Operations logged to /tmp/zmsetup.20191230-135538.log
Setting local config values...done.
Initializing core config...Setting up CA...done.
Deploying CA to /opt/zimbra/conf/ca ...done.
Creating SSL zimbra-imapd certificate...done.
Creating new zimbra-store SSL certificate...done.
Creating new zimbra-ldap SSL certificate...done.
Creating new zimbra-mta SSL certificate...done.
Creating new zimbra-proxy SSL certificate...done.
Installing mailboxd SSL certificates...done.
Installing imapd SSL certificates...done.
Installing MTA SSL certificates...done.
Installing LDAP SSL certificate...done.
Installing Proxy SSL certificate...done.
Initializing ldap...done.
Setting replication password...done.
Setting Postfix password...done.
Setting amavis password...done.
Setting nginx password...done.
Setting BES searcher password...done.
Creating server entry for mail.freedom.local...done.
Setting Zimbra IP Mode...done.
Saving CA in ldap...done.
Saving SSL Certificate in ldap...done.
Setting spell check URL...done.
Setting service ports on mail.freedom.local...done.
Setting zimbraFeatureTasksEnabled=TRUE...done.
Setting zimbraFeatureBriefcasesEnabled=TRUE...done.
Checking current setting of zimbraReverseProxyAvailableLookupTargets
Querying LDAP for other mailstores
Searching LDAP for reverseProxyLookupTargets...done.
Adding mail.freedom.local to zimbraReverseProxyAvailableLookupTargets
Setting Master DNS IP address(es)...done.
Setting DNS cache tcp lookup preference...done.
Setting DNS cache udp lookup preference...done.
Setting DNS tcp upstream preference...done.
Updating zimbraLDAPSchemaVersion to version '1557224584'
Setting TimeZone Preference...done.
Disabling strict server name enforcement on mail.freedom.local...done.
Initializing mta config...done.
Setting services on mail.freedom.local...done.
Adding mail.freedom.local to zimbraMailHostPool in default COS...done.
Creating domain freedom.local...done.
Setting default domain name...done.
Creating domain freedom.local...already exists.
Creating admin account admin@freedom.local...done.
Creating root alias...done.
Creating postmaster alias...done.
Creating user spam.i6zgq_xfb@freedom.local...done.
Creating user ham.kctdkkb_i@freedom.local...done.
Creating user virus-quarantine.rvwrscjel4@freedom.local...done.
Setting spam training and Anti-virus quarantine accounts...done.
Initializing store sql database...done.
Setting zimbraSmtpHostname for mail.freedom.local...done.
Configuring SNMP...done.
Setting up syslog.conf...done.
Enabling IMAP protocol for zimbra-imapd service...done.
Enabling IMAPS protocol for zimbra-imapd service...done.
Starting servers...done.
Installing common zimlets...
        com_zimbra_attachmail...done.
        com_zimbra_tooltip...done.
        com_zimbra_webex...done.
        com_zimbra_email...done.
        com_zimbra_mailarchive...done.
        com_zimbra_url...done.
        com_zimbra_ymemoticons...done.
        com_zimbra_cert_manager...done.
        com_zimbra_date...done.
        com_zextras_chat_open...done.
        com_zimbra_attachcontacts...done.
        com_zimbra_adminversioncheck...done.
        com_zimbra_proxy_config...done.
        com_zimbra_phone...done.
        com_zimbra_viewmail...done.
        com_zimbra_clientuploader...done.
        com_zimbra_srchhighlighter...done.
        com_zextras_drive_open...done.
        com_zimbra_bulkprovision...done.
Finished installing common zimlets.
Restarting mailboxd...done.
Creating galsync account for default domain...done.

You have the option of notifying Zimbra of your installation.
This helps us to track the uptake of the Zimbra Collaboration Server.
The only information that will be transmitted is:
        The VERSION of zcs installed (8.8.15_GA_3869_RHEL7_64)
        The ADMIN EMAIL ADDRESS created (admin@freedom.local)
  • 直接按下 enter 鍵,最後按下任意鍵就可以了,這樣子就安裝完成了
Notify Zimbra of your installation? [Yes]
Notifying Zimbra of installation via http://www.zimbra.com/cgi-bin/notify.cgi?VER=8.8.15_GA_3869_RHEL7_64&MAIL=admin@freedom.local

Notification complete

Checking if the NG started running...done.
Setting up zimbra crontab...done.


Moving /tmp/zmsetup.20191230-135538.log to /opt/zimbra/log


Configuration complete - press return to exit
  • 安裝完成之後在瀏灠器上輸入 https://192.168.1.1:7071

zimbra-admin.png

  • 登入後的畫面

zimbra-admin-1.png

參考相關網頁



上一篇
[開源] PowerDNS 架設
下一篇
[開源] Zimbra acme.sh SSL 憑證
系列文
開源軟體介簡及架設30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言