On Mon, May 22, 2023 at 08:26:19PM +0800, Tom Reed via Postfix-users wrote:

> 1. postfix is a backup MX for foo.com
> 2. this postfix uses other MTA as relay_host

This would be a misconfiguration.  A backup MX host MUST NOT be an
effective null client that relays *all* non-local mail to a "smarthost"
relay.  Rather, a backup MX host MUST be at least smart enough to
relay mail for the domain(s) in question to better (lower) preference
MX hosts.

The best way to do this, is to configure an explicit nexthop in 
default_transport, and be sure to leave relayhost empty. 

    main.cf:
        # MUST be empty, to avoid backup MX domain loops.
        relayhost =
        relay_domains = foo.com

        # Regularly updated list of valid foo.com (and any other relay
        # domain) recipients:
        relay_recipient_maps = ...

        # Replace "smarthost.example" with actual default relayhost.
        default_transport = smtp:smarthost.example

Relay domains will use "relay_transport" (default "relay", which is
a clone of "smtp"), so will not in error use the smarhost.

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

Reply via email to