I have at least two web servers which utilise Postfix to send mail from web applications. One is what I call the 'master' which will remain static and the other is what I call the 'slave', which is cloned often for load distribution. Each clone is given a random external IP. All of the servers are on a private IP range of 192.168.x.x to talk to each other.

I have a requirement to send mail via a particular SMTP relay from a client but an IP is needed for firewall rules. The issue is that I can't guarantee the IP of the servers except for the 'master'.

Is there a way I can direct mail from the 'slave' servers to the 'master'? Ideally, the master will then route mail to the SMTP relays that are set up for each domain.


1 Answer 1


Yes, that's what the transport table is for, depending on what you use (SQL, dbm, flat text files, etc) the setup is fairly simple.

On the slave you'd create an entry like this client.domain smtp:[ip.of.the.master]

That will mean that when the slave server receives mail for that domain, it will use smtp to relay it to your master server, who will then send it on to its final destination.

  • Thanks! Looks simple enough. What sort of setup is required on the master for this?
    – MrNorm
    Commented Apr 3, 2014 at 10:43
  • Nothing special ( I assume the slave will be in mynetworks), unless the client requires you to send through a destination MX server which isn't listed in their domain MX records..
    – NickW
    Commented Apr 3, 2014 at 10:54

You must log in to answer this question.

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