On Wed, Oct 28, 2020 at 11:34:35AM -0400, Joey J wrote:

> Since you are looking within the code, on a reject we used to put
> @abc.com   550 and custom reject message

There's no need to consult the code.  The lookup keys for access(5)
tables are documented.  They DO NOT include "@domain".  To reject
mail to/from all users at a domain the lookup key is just the
domain name.  See the documentation.

    http://www.postfix.org/access.5.html

    EMAIL ADDRESS PATTERNS
           With lookups from indexed files such as DB or DBM,  or  from  
networked
           tables  such  as  NIS,  LDAP or SQL, patterns are tried in the order 
as
           listed below:

           user@domain
                  Matches the specified mail address.

           domain.tld
                  Matches domain.tld as the domain part of an email address.

                  The pattern domain.tld also matches subdomains,  but  only  
when
                  the  string  smtpd_access_maps  is  listed  in  the Postfix 
par-
                  ent_domain_matches_subdomains configuration setting.

           .domain.tld
                  Matches subdomains of  domain.tld,  but  only  when  the  
string
                  smtpd_access_maps   is   not   listed   in   the   Postfix  
par-
                  ent_domain_matches_subdomains configuration setting.

           user@  Matches all mail addresses with the specified user part.

           Note: lookup of the null sender address is not possible with some 
types
           of lookup table. By default, Postfix uses <> as the lookup key for 
such
           addresses. The value is specified with the 
smtpd_null_access_lookup_key
           parameter in the Postfix main.cf file.

-- 
    Viktor.

Reply via email to