I have a setup of multiple mail servers on my LAN. For example i have two machines where
- machine A handles mails for domainA.com and username first letter a-l***@domainA.com on IP 192.168.1.100 ,
- machine B handles mails for m-z****@domainA.com on IP 192.168.1.101
- machine C handles domainC.com on IP 192.168.1.110.
I have configured MX enteries for both domains as mail.myMailHandlerDomain.Com mapped on my public ip.
So now i have limitation of portforwarding to one machine. I can only port forward 25,465, 587, 993, 995 to either machine A or machine B or machine C.
I am running Ubuntu server with postfix/dovecot setup. Due to my limited expertise in the field i am looking for solutions, but unable to grasp different concepts of mail relay and Nginx reverse proxy. I am seeking solution fits to my problem. Thanks !!
Machine C in this scenario is actually backup mail server for a remote mail server.
- Which kicks in whenever main mail server goes down.
- I have domain name update script to modify MX enteries whenever my observer machine detects a node failure, so my current ip will start reciving mails for domainC.com.
- But the limitation for my current network is i dont want waste money on extra IP addresses, so i have single IP address.
And i am splitting mails for domainA.com for load balancing.