centos7 postfix+dovecot+α移行の要点
SMTP-Authでsaslauthdは使わずdovecotに任せる
main.cfで
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/dovecot-auth
と指定した事で、saslauthdを停止しないと認証エラーが出る。このあたりを理解せず、約5時間浪費。
ただし、メールアカウントのパスワードはシステムアカウントと切り離したのでメールアカウント用のパスワードをsasl2passwdで生成する。
/etc/sasl2/smtp.conf
pwcheck_method: auxprop
mech_list: cram-md5 plain login
sasl2passwd -u メールドメイン -c アカウント
dovecot側の設定 for SMTP-Auth
/etc/dovecot/conf.d/10-auth.conf
!include auth-system.conf.ext
!include auth-passwdfile.conf.ext
この2つをイキにする。
/etc/dovecot/conf.d/auth-passwdfile.conf.ext
passdb {
driver = passwd-file
args = /etc/dovecot/dovecot-passwd
}
userdb {
driver = passwd-file
args = /etc/dovecot/dovecot-passwd
}
として、/etc/dovecot/dovecot-passwdに、view /etc/passwdを見てアカウント情報をコピーし、(mech_listで利用可能にしたcram-md5を使った)dovecotpwで生成したコードを埋め込む
$ dovecotpw
Enter new password:
Retype new password:
{HMAC-MD5}dcbe8064d829ee98ad16817611150a6c7ee5fe1c9dfd79f5395be892f162bfd3
CentOS7のepel-releaseなamavisd-newの起動方法
systemctl start amavisdすると、エラーで起動できずpostfixとの連携からメールの受信ができなくなり、約5時間悩む。おそらく、amavisd.serviceな起動スクリプトに問題がある模様。で。素直に、
/usr/sbin/amavisd -c /etc/amavisd/amavisd.conf
としたら、あっけなく起動。OK。