Xeams typically does an MX lookup for foreign domains when sending out emails. If the recipient is local, it skips the MX lookup and sends the message to the IP/host configured for the domain.
If you aim to send every outbound message through a single server, you could specify a Smart Host. Smart Host, however, has one limitation: you cannot specify exceptions. Consider the following scenario:
The scenario mentioned above cannot be implemented by Smart Host, since there is no way to force a handful of domains to perform an MX Lookup.
This page talks about an alternate method of specifying rules to route emails for certain sender/recipient through a specific server.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <CustomRouting> <Routes> <!-- Example 1. Send messages from email@example.com to any recipient as long as the recipient does not belong to example1.com, example2.com or is firstname.lastname@example.org to 22.214.171.124 --> <Route> <!-- The sender's email address or domain name. Domain names MUST start with an @ symbol. This parameter can only have ONE sender. This is a mandatory field. It cannot be left blank. --> <sender>email@example.com</sender> <!-- The recipient's email address or domain name. Domain names MUST start with an @ symbol. The word 'ANY' indicates any domain. This parameter can ONLY have one recipient. This is a mandatory field. It cannot be left blank. --> <recipient>ANY</recipient> <!-- Pipe separated domain names or email addresses to exclude from this route. These exceptions ONLY apply when 'ANY' is used for the 'recipient --> <recipientExceptions>@firstname.lastname@example.orgemail@example.com</recipientExceptions> <!-- IP Address or host name of the server. Multiple IP addresses can be separated by a PIPE. A random IP address is returned when multiple addresses are found. This is a mandatory field. It cannot be left blank. --> <ip>126.96.36.199</ip> </Route> <!-- Route 2 . Send emails from example4.com that are sent to any user in example3.com to 188.8.131.52 --> <Route> <sender>@example4.com</sender> <recipient>@example3.com</recipient> <recipientExceptions></recipientExceptions> <ip>184.108.40.206</ip> </Route> </Routes> </CustomRouting>