ホーム » コンピュータ » Linux » SPF, DMARC の確認

SPF, DMARC の確認

SPF 確認の設定

$ sudo apt install postfix-policyd-spf-python

postfixの設定

((( /etc/postfix/main.cf )))
smtpd_recipient_restrictions =
    permit_mynetworks
    permit_sasl_authenticated
    reject_unauth_destination
    check_policy_service inet:127.0.0.1:10023    # postgrey
    check_policy_service unix:private/policy-spf # postfix-policyd-spf-python

最後に postfix の再起動

$ sudo systemctl postfix

postgreyの起動方法の変更

メール受信チェックの postgrey を使っているけど、inet 起動になっている。でも一般的には socket 起動が普通のようなので変更するか。

((( /etc/default/postgrey )))
#POSTGREY_OPTS="--inet=127.0.0.1:10023"
POSTGREY_OPTS="--unix=/var/lib/postgrey/postgrey.sock"

((( /etc/postfix/main.cf )))
smtpd_recipient_restrictions = permit_mynetworks,
                permit_sasl_authenticated,
                reject_unauth_destination,
                check_policy_service unix:/var/lib/postgrey/postgrey.sock
                check_policy_service unix:private/policy-spf
smtpd_relay_restrictions = permit_mynetworks,
                permit_sasl_authenticated,
                reject_unauth_destination,
                check_policy_service unix:/var/lib/postgrey/postgrey.sock

OpenDMARC確認の設定

apt install opendmarc
設定に失敗中