0

I don't know where or what I should be reading about when I want to send email between two different domains as follows and please give an example basic Postfix configuration. All conditions in the list below MUST apply:

  • Each domain is on a separate machine
  • Each has machine Postfix server
  • Both machines are in the very same room
  • I want Send emails between them without going to the internet using a crossover cable
  • I still want each domain to send internationally to the outside world as usual.

The whole problem is about saving bandwidth and making use of the full cable 1Gbps speed as long as I can do it. also the two domains are two friend neighboring companies like your neighbor next to your home.

Thanks for your help.

HBruijn
  • 72,524
  • 21
  • 127
  • 192
superlinux
  • 141
  • 5
  • 1
    If there is a bandwidth concern *between two mail severs* would that not automatically mean there is also an equally relevant bandwidth concern *between the mail servers and human users* eventually receiving/reading&answering those mails? What makes you think that you need anything that would not be setup that way anyway to speed up the connection between the machine, something wrong with your routers? Please clarify the network layout a bit more. – anx Aug 16 '22 at 11:11
  • Your mails eventually do go to the internet, because you are at least asynchronously updating an offsite backup anyway, right? – anx Aug 16 '22 at 11:15

1 Answers1

2
  1. Ensure proper connectivity between the NIC's where you've attached the cross cable so the two machines can reach each other. (ping, connecting to SMTP port 25 etc.) Assign suitable host names for those new IP-addresses (ideally in DNS, otherwise in the hosts file of both machines). Ensure that the smtp daemon will listen on the new interface/IP (typically the default), that kind of thing.

  2. Use the postfix transport map feature to set up a specific email route for a particular destination (ignoring the usual MX records):

    # /etc/postfix/main.cf
    ...
    transport_maps = hash:/etc/postfix/transport
    ...
    

Define the custom route:

   # /etc/postfix/transport

   example.com        smtp:[hostname.crossover-net.example.com]:25

Create the hashmap

   postmap /etc/postfix/transport

Restart postfix.

HBruijn
  • 72,524
  • 21
  • 127
  • 192