CentOS7に最新のdovecot2.3.7.2をインストール
CentOS7にGhettoForgeリポジトリを使って最新のdovecotをインストールした時のメモ
PostfixがDovecot-SASLライブラリに対応しているか確認
# postconf -a cyrus dovecot (Dovecot と返ってくればOK)
saslauthd はCyrus-SASLのデーモンなので、Dovecot SASLを使用する場合には停止しておきます。
Cyrus-SASL(saslauthd)インストール確認
# yum list installed | grep cyrus-sasl
Cyrus-SASL(saslauthd)の自動起動解除
# systemctl disable saslauthd.service
Cyrus-SASL(saslauthd)の停止
# systemctl stop saslauthd.service
CentOS7の公式yumリポジトリで提供されているバージョン
# yum info dovecot 利用可能なパッケージ 名前 : dovecot アーキテクチャー : i686 エポック : 1 バージョン : 2.2.36 リリース : 3.el7 容量 : 4.4 M リポジトリー : base/7/x86_64 要約 : Secure imap and pop3 server URL : http://www.dovecot.org/ ライセンス : MIT and LGPLv2 説明 : Dovecot is an IMAP server for Linux/UNIX-like systems, written with security : primarily in mind. It also contains a small POP3 server. It supports mail : in either of maildir or mbox formats. : : The SQL drivers and authentication plug-ins are in their subpackages. 名前 : dovecot アーキテクチャー : x86_64 エポック : 1 バージョン : 2.2.36 リリース : 3.el7 容量 : 4.4 M リポジトリー : base/7/x86_64 要約 : Secure imap and pop3 server URL : http://www.dovecot.org/ ライセンス : MIT and LGPLv2 説明 : Dovecot is an IMAP server for Linux/UNIX-like systems, written with security : primarily in mind. It also contains a small POP3 server. It supports mail : in either of maildir or mbox formats. : : The SQL drivers and authentication plug-ins are in their subpackages.
GhettoForgeリポジトリの追加
最新のdovecotをインストールするのにGhettoForgeリポジトリを使います。
GhettoForge(http://ghettoforge.org/index.php/Usage)
# yum install http://mirror.ghettoforge.org/distributions/gf/gf-release-latest.gf.el7.noarch.rpm
GhettoForgeリポジトリの無効化
GhettoForgeリポジトリは、インストールすると有効化の状態になっています。必要な時だけGhettoForgeリポジトリを使いたいので無効化にします。
/etc/yum.repos.d/gf.repo
enabled=1 ↓ enabled=0
GhettoForgeリポジトリを無効化にしたので、使用する時は「--enablerepo=gf-plus」といったように明示的に実行します。
最新のdovecotインストール
# yum --enablerepo=gf-plus install dovecot23
インストールが完了したらバージョンを確認
# dovecot --version 2.3.7.2 (3c910f64b)
dovecotを起動
# systemctl start dovecot.service
dovecotの自動起動の設定
# systemctl enable dovecot.service
dovecotの主なコマンド
状態確認 # systemctl status dovecot.service 起動 # systemctl start dovecot.service 停止 # systemctl stop dovecot.service 再起動 # systemctl restart dovecot.service 自動起動設定状態の確認 # systemctl is-enabled dovecot.service 自動起動設定 # systemctl enable dovecot.service 自動起動解除 # systemctl disable dovecot.service 設定ファイルチェック(デフォルトのパラメータとは異なる設定のみを明示的に表示) # dovecot -n