Discussion:
Transportmaps based on client ip adresse?
(too old to reply)
Boris Behrens
2016-08-02 11:00:16 UTC
Permalink
Hi,
maybe someone can help me with some architecture design.

I have some prerequisites given by our infrastructure:
* A LOT of virtual machines with installed and configured postfix relay, so our web applications can just use localhost to send emails.
* All those servers are managed by us. No root access for customers or developers.
* A relay access to a "giant company which is our main client" mailsystem. We use it to send mails based on sender or receiver through this network, but only the company related ones. Simplest way was to use transport maps.

Works awesome.

Now we got some new customers and we want to offer the same service, but we don't want them to use the "giant company mailsystem". Is it possible to define other transport maps based on the client IP address? I thought about something like:
* 10.234.0.0/16 uses transport maps through relay.behrens.io
* 10.212.5.0/24 uses transport maps through mybigmailcluster.example.org
* 172.19.66.4/32 does not use transport maps at all

If this is a crap setup in you opinion, enlighten me please.

please excuse my terrible english, it's the worst when *random excuse*.


Boris
Wietse Venema
2016-08-02 13:23:48 UTC
Permalink
Post by Boris Behrens
Now we got some new customers and we want to offer the same service,
but we don't want them to use the "giant company mailsystem". Is
it possible to define other transport maps based on the client IP
address?
Use check_client_access, and a table with:

10.1.2.3 FILTER transport-for-10.1.2.3:
10.2.3.4 FILTER transport-for-10.2.3.4:

These "filter" transports handle all email deliveries for the
matching client.

The FILTER action does not have to specify a content filter, and
using it as shown above is explicitly supported since Postfix 2.7.

Note that FILTER takes precedence over content_filter settings and
over transport_maps.

Wietse

Loading...