I'd like to whitelist several domains in my Postfix configuration in such a way that all e-mails from those domains are accepted as long as they're properly authenticated using SPF and/or DKIM, should it be used by that domain. This means that e-mails coming from those domains should not be subjected to the usual DNSBL and Greylisting process, only to a SPF and DKIM verification.
Right now I have managed to save e-mails coming from those domains from the Greylisting milter by configuring a sender_access
file and using the postmap
utility to convert it to a suitable hash-database.
main.cf:
...
parent_domain_matches_subdomains = yes
smtpd_recipient_restrictions =
permit_mynetworks
permit_sasl_authenticated
reject_rbl_client zen.spamhaus.org
reject_unauth_destination
check_sender_access hash:/etc/postfix/sender_access
check_policy_service unix:private/tumgreyspf
...
sender_access:
domain1.com OK
domain2.net OK
I've found out about postscreen and also found a neat little example, but it appears like that is a DNSBL-only measure and is only slightly helpful in my case.