When I installed Postfix I enabled the SPF option. Today I setup SPF in my main.cf file as follows:
When I receive an email from a domain that has an SPF record the header says:
But when I send a fake email to test that Postfix/SPF will reject the email I get:
So how do I tell Postfix/SPF to reject all email that fails an SPF check?
Code:
smtpd_sender_restrictions = reject_spf_invalid_sender
permit_spf_valid_sender
smtpd_recipient_restrictions = reject_spf_invalid_sender
permit_spf_valid_sender
spf_received_header = yes
spf_explanation = "%{h} [%{i}] is not allowed to send mail for %{s}"
spf_reject_code = 550
spf_mark_only = no
When I receive an email from a domain that has an SPF record the header says:
Code:
Received-SPF: pass
But when I send a fake email to test that Postfix/SPF will reject the email I get:
Received-SPF: softfail (mail.domain.com: transitioning domain of gmail.com does not designate xxx.xxx.xxx.xxx as permitted sender) client-ip=xxx.xxx.xxx.xx; envelope-from=bob@gmail.com; helo=mail05.domain.org
So how do I tell Postfix/SPF to reject all email that fails an SPF check?