Discussion:
Changing a transport after the transport map lookup, based on eventual destination?
(too old to reply)
t***@gmail.com
2014-04-15 23:37:56 UTC
Permalink
We handle mail relay for a large number of different domains. A number of them are Rackspace customers.

Rackspace won't allow more than 5 connections at a time from one IP address to it's servers, so we need to limit deliveries to their servers, perhaps using the destination_concurrency_limit feature of postfix.

The difficulty we have is that our transport map looks up the recipients domain, and gets back a result in the form of "relay:domain.com.internal.dns.zone". The smtp process then does an MX lookup of "domain.com.internal.dns.zone" to see where to relay the message (allowing us to support the fallback and round-robin features of having multiple mx records for a destination.

Is there a way to change the relay transport AFTER the transport map lookup is done, based on the destination of the message?. Is there a way to specify a per-destination fallback transport perhaps?

Or are we going to have to add something to our database, and return something other than "relay" when the customer is using Rackspace? I'd hate to do it that way - it seems like it's rife for mixups, and incorrect settings - I'd prefer some way to rewrite things programmatically.

Thanks-

Tom
t***@gmail.com
2014-04-16 00:39:14 UTC
Permalink
Post by t***@gmail.com
We handle mail relay for a large number of different domains. A number of them are Rackspace customers.
Rackspace won't allow more than 5 connections at a time from one IP address to it's servers, so we need to limit deliveries to their servers, perhaps using the destination_concurrency_limit feature of postfix.
The difficulty we have is that our transport map looks up the recipients domain, and gets back a result in the form of "relay:domain.com.internal.dns.zone". The smtp process then does an MX lookup of "domain.com.internal.dns.zone" to see where to relay the message (allowing us to support the fallback and round-robin features of having multiple mx records for a destination.
Is there a way to change the relay transport AFTER the transport map lookup is done, based on the destination of the message?. Is there a way to specify a per-destination fallback transport perhaps?
Or are we going to have to add something to our database, and return something other than "relay" when the customer is using Rackspace? I'd hate to do it that way - it seems like it's rife for mixups, and incorrect settings - I'd prefer some way to rewrite things programmatically.
Sorry to follow up on my own post, but I realized that storing something other than "relay" in our database won't cut it - because we could have 50 customers receiving mail that we have to relay to their accounts at Rackspace, and that'd mean potentially 250 open connections - well over their limit!

So I need a way to throttle down the connections to their servers - mx1.emailsrvr.com and mx2.emailsrvr.com.

Any ideas?

Continue reading on narkive:
Loading...