Postfix+Dovecot/cyrus-saslを使用した導入手順

提供:Software Development Memo
< Postfix+Dovecot
2009年3月1日 (日) 08:52時点におけるAdmin (トーク | 投稿記録)による版
ナビゲーションに移動 検索に移動

SMTP認証の際、Dovecotではなく「cyrus-sasl」を使用する場合の導入手順を以下に示します。

インストール

$ tar zxvf cyrus-sasl-2.1.22.tar.gz
$ cd cyrus-sasl-2.1.22
$ ./configure --with-plugindir=/usr/local/lib/sasl2
$ make
# make install

Postfixのmake時は下記とします。

$ make makefiles CCARGS="-DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I/usr/local/include/sasl" AUXLIBS="-L/usr/local/lib -lsasl2"

configureオプションの「--with-plugindir」を付与しない場合、「saslpasswd2」コマンドを実行しても「/etc/sasldb2」ファイルが生成されませんでした。

設定

「/usr/local/lib/sasl2/smtpd.conf」を新規作成し、下記を追加します。

pwcheck_method: auxprop
auxprop_plugin: sasldb
mech_list: PLAIN LOGIN CRAM-MD5 DIGEST-MD5

「/etc/postfix/main.cf」の「smtpd_sasl_path」は下記とします。

smtpd_sasl_path = smtpd

認証ファイル作成する

$ saslpasswd2 -c -u `postconf -h myhostname` <ユーザ名>

起動

# /usr/local/sbin/saslauthd -m /var/run/saslauthd -a pam

更新履歴

  • 2009/02/22
    • ページ作成