On Sun, Oct 15, 2023 at 08:52:18AM -0500, B Williams via Postfix-users wrote:

> So what I’m trying to devise is a strategy that would allow me to
> reject email for some domains if it didn’t come through the spam
> filtering service, but allow messages for other domains to be
> delivered that I don’t have going through the spam service. 

This is rather straightforward with access(5) rules:

    smtpd_restriction_classes = reject_unfiltered

    # Allow the filtering service IPv4/IPv6 CIDR blocks and reject
    # everything else.
    reject_unfiltered =
        check_client_access cidr:{
            {192.0.2.0/24               permit_auth_destination},
            {2001:db8:feed:cafe::/64    permit_auth_destination},
            {0.0.0.0/0                  REJECT 5.7.1 MX bypass attempt},
            {::/0                       REJECT 5.7.1 MX bypass attempt}
        }

    # If large enough, or changes more than rarely, use an access(5)
    # table ("cdb", "hash", ...) instead.  Assumes smtpd_delay_reject
    # is not changed from "yes" default.
    #
    smtpd_client_restrictions =
        check_recipient_access inline:{
            {filtered1.example = reject_unfiltered},
            {filtered2.example = reject_unfiltered}
        }

-- 
    Viktor.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to