Zimbraインストール手順

1.Zimbra Collaboration – Open Source Edition から最新版をダウンロード&解凍する。

# wget https://files.zimbra.com/downloads/8.6.0_GA/zcs-8.6.0_GA**.tgz
# tar zxvf zcs-8.6.0_GA**.tgz
# mv zcs-8.6.0_GA**.tgz zcs

2./etc/hosts を編集する。

127.0.0.1 localhost.localdomain localhost
192.168.24.8 zcs.example.com zcs

3.足りないライブラリなどをあらかじめ追加しておく。

# apt-get update
# apt-get install libaio1 pax sysstat sqlite3 libgmp10 libperl5.18 unzip

4.dnsmasq を設定する。(https://wiki.zimbra.com/wiki/Split_DNS を参照)

# apt-get install dnsmasq
# vi /etc/dnsmasq.conf

server=8.8.8.8 ← google DNS Server
server=208.67.222.222 ← OpenDNS
domain=example.com
mx-host=example.com,zcs.example.com,5
listen-address=127.0.0.1

# /etc/init.d/dnsmasq restart

# dig example.com mx ← DNSの動作を確認
# dig example.com any ← DNSの動作を確認
# host zcs.example.com ← ホストアドレスを確認

5.解凍したフォルダの中にある install.sh を実行する。

# cd zcs
# ./install.sh

6.インストール時の注意点

1.パッケージの中で、zimbra-dnscache はエラーになるのでインストールしない

2.途中、以下のようなエラーが出るので、yes を選択し、ドメイン名を入力する。

DNS ERROR resolving MX for zcs.example.com
It is suggested that the domain name have an MX record configured in DNS

Change domain name? [Yes] y
Create domain: [zcs.example.com] example.com
MX: zcs.example.com (192.168.24.8)

Interface: 127.0.0.1
Interface: ::1
Interface: 192.168.24.8

3.Main menu が表示されたら、

a) zimbra-store の番号を選択する。
b) Admin Password の番号を選択する。
c) パスワードを入力する。

 4.インストールの最後の方は、以下のように入力する。

*** CONFIGURATION COMPLETE – press ‘a’ to apply
Select from menu, or press ‘a’ to apply config (? – help) a # 変更を反映
Save configuration data to a file? [Yes]          # デフォルトでEnter
Save config in file: [/opt/zimbra/config.10869]      # デフォルトでEnter
Saving config in /opt/zimbra/config.10869…done.
The system will be modified – continue? [No] y# Yes
Operations logged to /tmp/zmsetup04032015-141009.log
Setting local config values…done.
Initializing core config…Setting up CA…done.

7.SMTPAuth認証(外部メールリレー)の設定を追加する。

1.https://(server_ip):7071/zimbraAdmin/ にアクセスし、admin でログインする。

2.[設定] – [グローバル設定] – [MTA] へ移動する。

3.外部配信用のリレーMTA に ISPのメールサーバーアドレスとポート番号を入力し、保存する。

4.postfix に追加設定する。

# echo mailrelay.example.com username:password > /opt/zimbra/conf/relay_password

# postmap /opt/zimbra/conf/relay_password
# postmap -q mailrelay.example.com /opt/zimbra/conf/relay_password ← 動作確認用

# zmprov ms <server> zimbraMtaSmtpSaslPasswordMaps lmdb:/opt/zimbra/conf/relay_password
# zmprov ms <server> zimbraMtaSmtpSaslAuthEnable yes
# zmprov ms <server> zimbraMtaSmtpCnameOverridesServername no

※postmap はpathが通っていないので、/opt/zimbra/postfix/sbin に移動してから ./postmap ~
※zmprov はpathが通っていないので、/opt/zimbra/bin に移動してから ./zmprov ~
※<server> は、zimbraサーバーのアドレス zcs.example.com

詳細は https://wiki.zimbra.com/wiki/Outgoing_SMTP_Authentication を参照。