Configure a Smarthost Gateway in SmarterMail

A smarthost gateway is essentially an outgoing gateway that can be used on a per-domain basis and, usually, requires some sort of authentication when sending email through it. As such, there’s no particular setting in SmarterMail to set up a “smarthost” as it’s simply an outbound gateway with some added protections.
 
As an example, a hosting company may offer a third-party email security solution that requires routing email through that third-party’s gateway. This service is marketed as an add-on, so not all customers will use it, just those who subscribe to the service. Therefore, the system administrator will want to make sure just those customers utilize the “smarthost” gateway. 
 
In this scenario, a couple of things need to happen:
 
1. The third-party service needs to be set up as an Outbound Gateway, and
2. The domain(s) using the service need(s) to be set up to actually point to the outbound gateway so their outgoing mail is routed through the service.
 
Creating an Outbound Gateway
 
Adding an outbound gateway in SmarterMail is extremely easy. The only 2 pieces of information needed are the service address of the gateway (hostname or IP address) and the port used by the gateway. Other information, such as the encryption to use for traffic, whether you want (or need) to authenticate the connection to the gateway with a username and password, are optional. (Though, to be fair, using both SSL or TLS for connecting to the gateway is just a good practice.) 
 
To create the outbound gateway, do the following:
 
1. Log in as the system administrator.
2. Navigate to Settings -> Gateways / Failover.
3. On the Options card, select “Outbound (Specific Domains)” as your Gateway Mode.
4. Enter the Server Address (either an IP address or a hostname) and the Port used for connecting to the gateway. (These can be given to you by the service provider or by whoever set up the gateway.)
5. As mentioned, Encryption and authentication are optional. However, using an encrypted connection is strongly recommended. And, to be fair, authentication is a standard for what is referred to as a “smart host.”
6. As for Status, if the service (or server) is up and accepting traffic, you can select Enabled. Otherwise, you can enable the gateway later, once things are running.
7. Be sure to save your new gateway settings. 
 
Setting Up a Domain to Use the Gateway
 
Once the outgound gateway is set up and enabled, you can start assigning domains to use it. This is also very easy. 
 
To set a domain to use a specific gateway, do the following:
 
1. Log in as the system administrator.
2. Navigate to Manage -> Domains.
3. Select the domain you want to use the new gateway. 
4. On the domain’s Options tab, find the Options card. (It’s the first one.)
5. The second-to-last filed on that card is Outbound Gateway, with a drop-down menu.
6. Select the appropriate gateway server from the menu.
7. Be sure to save your change.
 
That’s it! You’ve now associated the domain to the smarthost gateway. You can then do that for any additional domains as needed.
 
Of course, this is how you’d do this manually. For larger hosting companies and ISPs who use automated methods for propagating settings, this process can be automated using SmarterMail’s extensive API. In addition, a default Outbound Gateway can be set as a Domain Default, if needed. That means that any new domain added to SmarterMail will use the selected gateway when it’s created.