Can't configure two email servers. What's missing?
-
Hi all
After unsuccesfully searching for a solution in the web I want to ask my question here in the forum.
My goal is to have two mailservers behind the firewall up and running.
Situation:
I have a single WAN IP leading to my netgate/pfsense plus firewall.
Two LAN interfaces are configured with all the ports forwarded, NAT rules set and dns resolution configured.
LAN1 with domain1: 192.168.178.xx
LAN2 with domain2: 192.168.180.xxAll the configuration on the ISP’s interface is done and one mailserver is running without any problems since weeks.
Problem:
With all this config in place, I’ve connected the second mailserver and I can send mails from this server, but not receive. Incoming emails for domain1 get delivered to the server with domain2, which I’ve configured first on LAN2. And of course, there the mails don’t find a box to be delivered to.
The webmail interfaces are reachable correctly by domain.My question is: what is missing, what did I do wrong?
Thanks a lot for help!
David
-
@daro
You cannot forward a domain to a certain server, but just an IP. A single IP-port combination can only be forwarded to a single server.So if the connection to both domains bounce on your WAN IP port 25, they can only be forwarded to a single server.
-
As viragomann says. The simplest solution IMHO is to put the two mailservers behind a smart host that determines which server to send the mail to.
-
Thank you @viragomann and @Popolou for your help! I will do some more evaluation and consider a smart host.