DOVECOT †
- Project URL
- http://www.dovecot.org/
Current Version †
Status | Version | Release Date |
Stable | 2.1.12 | Nov 29 2012 |
Old Stable | 2.0.21 | June 12 2012 |
Debian Package | 1.2.15-7 | - |
Debian Package(unstable) | 2.1.7-6 | - |
Dovecot + postfix + sieve †
Debian の Dovecot パッケージは、dovecot-common と dovecot-imapd dovecot-pop3dからなります。
いままで、fetchmail で他のサーバより取得したファイルを、imapにて提供するようにしてsquirrelmailを組み合わせてWebmailとしてきましたが、AJAXを用いたRoundcube が使いやすそうなの移行作業を行ってきました。roundcubeは、発展初期なソフトウェアなのでまだ機能が十分ではありません。機能拡充は、プラグイン方式なのですが、ビルトインでの振り分けプログラムがまだありません。振り分け機能は、MUAとして必須なので サーバー側振り分けプログラムであるSieveを用いることにしました。
Sieveは,単独でもパッケージ化されていますが,dovecot の場合、パッケージに含まれています。sieveサーバ(managesieve)および sieveによる振り分けサービスをローカル配送に追加する形で行うようになっています。
いつも使ってきたMTAがpostfixなので今回はpostfixにて設定。
Debian Package 1.2.15-4 のsieveが動かない。 †
dovecotはいままで使ってきたので、sieveの設定だけすれば使えると考えましたが、以下のように出て どうもうまく行きません。
dlopen(/usr/lib/dovecot/lda/lib90_sieve_plugin.so) failed:
/usr/lib/dovecot/lda/lib90_sieve_plugin.so: undefined symbol:
duplicate_check
Couldn't load required plugins
調べてみると sieveプラグインを使う用になっていないようです。cmusieveあたりに宣言がなっているのではないかと思ったりしますが、くわしくはまだ調べていません。
dovecot 2 をビルドして突っ込んでみた。 †
とりあえず 最新なのは 2.0.11なので、探してみましたが debパッケージがありません。とりあえず checkinstall でやってみようと思いましたがこれもうまくいきません。なので ./configure make install してしまいましたら、うまく動くようになりました。(^^;
やったのは
- dovecot-2.0.11 を cofigure make make install *1
- dovecot-2.0-pigeonhole-0.2.2 を cofigure make make install
- dovecot の設定*2
- /etc/ に dovecot の設定がないので /usr/share/doc/dovecot/example-configをコピーして名前を変えました。
- /etc/dovecot/dovecot.conf の以下を設定
# Protocols we want to be serving.
protocols = imap pop3 lmtp sieve
# A comma separated list of IPs or hosts where to listen in for connections.
# "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces.
# If you want to specify non-default ports or anything more complex,
# edit conf.d/master.conf.
listen = *, ::
# Base directory where to store runtime data.
base_dir = /var/run/dovecot/
- /etc/dovecot/conf.d/10-mail.conf
#mail_location =
mail_location = maildir:~/Maildir
- /etc/dovecot/conf.d/15-lda.conf
protocol lda {
# Space separated list of plugins to load (default is global mail_plugins).
mail_plugins = $mail_plugins sieve
}
- /etc/dovecot/conf.d/15-lmtp.conf
protocol lmtp {
# Space separated list of plugins to load (default is global mail_plugins).
mail_plugins = $mail_plugins sieve
}
- あと スタートアップスクリプトを作って /etc/init.d/ に入れて update-rc.d にて登録。
- sieveを動かすには、ローカル配送時にdovecotに渡してやらないとだめなので /etc/postfix/main.cf に以下を追加。
mailbox_command = /usr/libexec/dovecot/deliver -a "$RECIPIENT"
これで roundcube で振り分けが動くようになりました。manageseive plugin と合わせて設定も簡単です。
時間を見つけて2.0の野良パッケージつくろうっと。
と思っていたら sid と testing(wheezy)は 1:2.0.12-1 と 2.0になっていたので 入れ替え(2011-05-17 (火) 17:11:48 Merlin)
Dovecot2 導入 †
Debian Package
dovecot-antispam*3 | Dovecot plugins for training spam filters |
dovecot-common | secure mail server that supports mbox, maildir, dbox and mdbox mailboxes |
dovecot-dbg | debug symbols for Dovecot |
dovecot-dev | header files for the dovecot mail server |
dovecot-gssapi | GSSAPI authentication support for Dovecot |
dovecot-imapd | secure IMAP server that supports mbox, maildir, dbox and mdbox mailboxes |
dovecot-ldap | LDAP support for Dovecot |
dovecot-lmtpd | secure LMTP server for Dovecot |
dovecot-managesieved | secure ManageSieve? server for Dovecot |
dovecot-mysql | MySQL support for Dovecot |
dovecot-pgsql | PostgreSQL support for Dovecot |
dovecot-pop3d | secure POP3 server that supports mbox, maildir, dbox and mdbox mailboxes |
dovecot-sieve | sieve filters support for Dovecot |
dovecot-sqlite | SQLite support for Dovecot |
mysqmail-dovecot-logger | real-time logging system in MySQL - Dovecot traffic-logger |
- aptitude install dovecot-common dovecot-imapd dovecot-lmtpd dovecot-pop3d dovecot-sieve dovecot-managesieved
- dovecot の設定
- cp /etc/dovecot/dovecot.conf.ucf-dist /etc/dovecot/dovecot.conf
- /etc/dovecot/dovecot.conf の以下を設定
# A comma separated list of IPs or hosts where to listen in for connections.
# "*" listens in all IPv4 interfaces, "::" listens in all IPv6 interfaces.
# If you want to specify non-default ports or anything more complex,
# edit conf.d/master.conf.
listen = *, ::
# Base directory where to store runtime data.
base_dir = /var/run/dovecot/
- /etc/dovecot/conf.d/10-mail.conf
#mail_location =
mail_location = maildir:~/Maildir
- /etc/dovecot/conf.d/15-lda.conf
protocol lda {
# Space separated list of plugins to load (default is global mail_plugins).
mail_plugins = $mail_plugins sieve
}
- /etc/dovecot/conf.d/15-lmtp.conf
protocol lmtp {
# Space separated list of plugins to load (default is global mail_plugins).
mail_plugins = $mail_plugins sieve
}
- /usr/share/dovecot/protocols.d に以下の内容を持つファイルの作成
dovecot-sieve.protocols
protocols = $protocols sieve
- sieveを動かすには、ローカル配送時にdovecotに渡してやらないとだめなので /etc/postfix/main.cf に以下を追加。
mailbox_command = /usr/libexec/dovecot/deliver -a "$RECIPIENT"
dovecot-2.1 以降でエラーが出て動かなくなる。 †
Error: user *****: Initialization failed: namespace configuration error: inbox=yes namespace missing
なるエラーが出ていたら、/etc/dovecot/conf.d/10-mail.confのバージョンが合ってないので10-mail.conf.ucf-dist を元に再設定すること。