1
Is it possible to bypass DNS lookups and send email for a specific domain to a specieifed IP?
Question asked by David Feuer - 9/4/2024 at 12:41 PM
Answered
Title kind of says it all, client wants all email for a certain domain to go to a specific server, NOT the one that you get when you actually do a DNS lookup. Wondering if there is a way to do it.

Thanks,
Dave

6 Replies

Reply to Thread
2
Jorel Haggard Replied
Employee Post
Hello David,

I believe that your hosts file at C:\Windows\System32\drivers\etc\hosts (or /etc/hosts on Linux) takes preference over DNS lookups. If you enter a hostname and corresponding IP address into this file for the desired domain, you can ensure it resolves to the correct IP. 

An alternative way to do this is to select the domain in the web interface, then scroll to the "Email" card. If you change "Inbound Message Delivery" to "External (Use Host Address), it will allow you to input an IP or domain name to direct incoming mail to. 

Best regards
Jorel Haggard System/Network Administrator SmarterTools Inc. www.smartertools.com
0
Kyle Kerst Replied
Employee Post
I believe you may also be able to accomplish this by adding a Domain Forward gateway entry to your server for that domain name, then specifying the hostname or IP you want those messages delivered to. You may need to add an IP Bypass for your SmarterMail server on the destination environment to ensure spam checks are run against an appropriate IP as well.
Kyle Kerst IT Coordinator SmarterTools Inc. www.smartertools.com
1
Roger Replied
Marked As Answer
If you have an internal Nameserver, just add the domain and define the destination ip for the mailserver (mail.domain.com) that references to the mx-record. otherwise create a host-record in the corresponding server or work with a dns nat-reflection on the firewall and translate it on the firewall itself to the desired destination-ip.
0
David Feuer Replied
Just went ahead and put a DNS record in for them the DNS servers that our mail servers use.

IMO there should be an easier way to do this in smartermail then what I did or the other possible methods. Send all email for X domain to this IP and skip all DNS / other lookups for it. Postfix (and many other servers) have been able to do this forever with a line of text in a configuration file or a single step in the GUI of others.
0
Jorel Haggard Replied
Employee Post
David,

In my opinion, the "Inbound Message Delivery" Setting is nearly as straightforward as it gets, but I'd be interested to hear how you think we could improve it. It's essentially just a dropdown selection and then inputting an IP/hostname. 

Best regards,
Jorel Haggard System/Network Administrator SmarterTools Inc. www.smartertools.com
0
David Feuer Replied
Jorel,
The postfix way although it's a more complex text file allows you to in very granular way pick and choose what email goes where. 

postfix.org/transport.5.html

Even to the extent of user@domain.com goes one place and anotheruser@domain.com goes someplace else. 
The inbound message delivery option really does not do as much. 
With some other GUI servers you have a bit more limited ability to pick and choose but you still can force mail both in and out to specific locations. 

Even now I have a postfix server for a customer that is sending MOST email to the proper MX record. BUT, anything going to the emergency email box of one of their partners bypasses everything and gets sent straight to where they told me to send it. 

Not mission critical, but still very handy to have.

Reply to Thread