Here are steps to configure your server for use with SoftLayer’s E-mail Delivery Service as a SmartHost. The example below was performed with a standard SoftLayer OS Reload of CentOS 6.7 with cPanel (WHM version 11.52) and Exim. Dovecot was originally used and then switched over to Courier without fail or needed changes to the settings as detailed below. The following settings should be configured using WHM.
- Confirm emails may be sent from the device before adding or updating SmartHost settings. Remedy any existing issues in the send/receive process prior to proceeding.
- Follow the next steps to access the Exim Configuration Editor:
- Access WHM using your unique credentials.
- Navigate to Service Configuration > Exim Configuration Editor.
- Click the Advanced Editor button at the bottom of the screen to open the editor.
- Specific instructions for using the Advanced Editor are located on the Exim Configuration Editor screen.
- The actions listed herein may caus Exim to fail.
- The Exim Configuration Editor screen displays the contents of the file “exim.conf” and allows for additions to the file via editable boxes similar to the one shown below:
Authenticate using SendGrid Credentials
Prior to configuration, authenticate to the system. Locate the Begin Authenticators section and enter the following commands in the corresponding text box labeled Section: AUTH
driver = plaintext
public_name = LOGIN
client_send = : firstname.lastname@example.org : YourSendgridPassword
Configure the Routers
Routers must be configured to work with SendGrid in the Routers Configuration. Locate this section, which is indicated with the text ROUTERS CONFIGURATION and enter the following commands in the corresponding text box labeled Section: PREROUTERS:
driver = manualroute
domains = ! +local_domains
transport = sendgrid_smtp
route_list = "* smtp.sendgrid.net::587 byname"
host_find_failed = defer
Configure the Transports
Configure the transports used by the service in the Transports Configuration section. Locate this section, which is indicated with the text TRANSPORTS CONFIGURATION and enter the following commands in the corresponding text bo labeled Section: TRANSPORTSTART
driver = smtp
hosts = smtp.sendgrid.net
hosts_require_auth = smtp.sendgrid.net
hosts_require_tls = smtp.sendgrid.net
Scroll to the bottom of the page and click the Save button to save all changes made to the file.
Note: In order to receive root/nobody/cpanel mail forwarded to external address the hostname of the cPanel servers needs to be in /etc/localdomains file.
What Happens Next
Upon completing this task, the system runs a series of checks against the updated configuration file and automatically restarts Exim. If logged into any WebMail pages, log out and back in after the restart is complete. Send a test email to ensure the proper credits are used from the E-mail Delivery Service screen in the Customer Portal.