On Wed, Sep 01, 2021 at 06:37:59AM -0400, Steve Dondley wrote:

> So I followed the instructions at 
> http://www.postfix.org/ADDRESS_REWRITING_README.html#generic for generic 
> mapping and set that up. I modified main.cf with:

Which leads you to http://www.postfix.org/generic.5.html

    TABLE SEARCH ORDER
       With  lookups  from  indexed files such as DB or DBM, or from networked
       tables such as NIS, LDAP or SQL,  each  user@domain  query  produces  a
       sequence of query patterns as described below.

       Each query pattern is sent to each specified lookup table before trying
       the next query pattern, until a match is found.

       user@domain address
              Replace user@domain by address. This form has the highest prece-
              dence.

       user address
              Replace  user@site  by  address when site is equal to $myorigin,
              when site is listed in $mydestination, or when it is  listed  in
              $inet_interfaces or $proxy_interfaces.

       @domain address
              Replace other addresses in domain by address.  This form has the
              lowest precedence.

> and have this in the smtp_generic_maps file:
> 
> *@amazonses.com somebody@HOST_A

This is not an "@domain" address.  No tables in Postfix support this
syntax.

> I also tried:
> 
> /*@amazonses.com/ somebody@HOST_A

This is not an "@domain" address.  Hash tables are not regexp tables.

> Anyway, I postmapped and reloaded postfix. However, emails are still 
> getting rejected and logs on HOST_B show emails are still coming from 
> amazonses.com.
> 
> Anything else I can try?

Yes, far better to disable SPF checks on hostB when receiving mail from
hostA.

-- 
    Viktor.

Reply via email to