On Sun, Sep 10, 2023 at 09:47:44AM +0200, Zorg via Postfix-users wrote:

> let me explain, I m searching to relay mail according to the IP of
> origin of the mail.

Postfix does not have any support for this.  The closest similar feature is:

    sender_dependent_default_transport_maps

> But can't find a way to achieve this

The feature does not exist.  A crude approximation exists by using
"FILTER" actions in access(5) lookups by client IP, but this is liable
to misdeliver mail that should be delivered locally, rather than relayed
to the chosen IP address:

    relayhost = [192.168.0.1]
    smtpd_client_restrictions =
        check_client_access cidr:{
            { 10.1.1.1 FILTER smtp:[192.168.1.1] },
            { 10.2.2.2 FILTER smtp:[192.168.2.1] },
            }

You can use a file-based table (rather than inline) if you prefer, the
above inline cidr table syntax requires Postfix 3.7 or later.

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

Reply via email to