On Wed, Oct 23, 2024 at 06:53:32PM +0200, postfixmailing--- via Postfix-users 
wrote:

> I would like change Domain name of all outgoing Email:
> 
> user@domainA -> user@domainB

    main.cf:
        smtp_generic_maps = inline:{ {@domainA = @domainB} }

If you are relaying some SMTP email inbound as well as outbound,
and to exclude inbound traffic, then apply this setting in master.cf

    master.cf:
        smtp unix ... smtp
            -o { smtp_generic_maps = inline:{ {@domainA = @domainB} } }
            ...
        relay unix ... smtp
            ...

Use the "relay" transport for inbound SMTP deliveries, and "smtp" for
outbound deliveries.  This actually default behaviour if the inbound
destinations are listed in "relay_domains".  But if you explicit
transport table entries, you need to be diligent about using the
right transport:

    transport:
        inside.example      relay:inside-gw.example
        outside.example     smtp:outside-gw.example

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

Reply via email to