SMTP認証

SMTP はメール送信時にパスワードを要求されない。その為、不正な中継が許されてしまう可能性がある。SMTPに認証機能を追加したSMTP認証 (SMTP Auth) を利用することでこの問題を回避できる。
SMTP認証を利用するには、cyrus-sasl パッケージが必要

main.cf の設定

smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_sasl_security_options = noanonymous noplaintext
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,check_relay_domains,reject

SASL の設定ファイル

pwcheck_method: saslauthd
mech_list: plain login cram-md5 digest-md5 # この行を追加