3

Using Postfix, I want to setup the transport according to the sender IP.

There is sender_dependent_default_transport_maps, which does it according to the sender email address (envelope MAIL FROM).

Is there similar configuration which does the same but according to the client IP? Or can I specify client IPs instead of email addresses in this configuration?

Note 1: instead of default_transport and sender_dependent_default_transport_maps I can use relayhost and sender_dependent_relayhost_maps too. But I need to lookup by client IP, not email address.

Note 2: In fact, these IPs will match $mynetworks. So, what I really need is something like a mynetworks_transport or client_ip_dependent_default_transport_maps configuration.

1 Answer 1

1

Postfix will not be able to do this, as the process responsible for sending the mail is not the process that received the mail, and does not have access to the client IP information. YOur best should would be trying to find something that can use the Received: headers from the mail to determine mail routing, as the receiving process will have added a header containing the client IP to the mail. I'm not at all certain such a thing even exists though.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .