cPanel/WHM Smarthost Configuration
Authenticated smarthost setup with Exim Configuration Manager
Back to DocumentationWhat does this guide do?
Ensures all emails sent from your cPanel/WHM server are delivered through the MXGate smarthost (with authentication). This puts your outbound emails under MXGate protection.
Prerequisites
- WHM root access
- SMTP username and password created from MXGate panel
- cPanel version 92+ (Exim 4.94+ recommended)
1 Access Exim Configuration Manager in WHM
Log in to WHM panel as root user and search for "Exim" to find Exim Configuration Manager.
2 Switch to Advanced Editor Tab
On the opened page, click Advanced Editor tab from the top menu. You can directly edit the Exim configuration file in this section.
Important: Use the "Backup" button to backup current settings before starting configuration.
3 Section: ROUTERCONFIG - Smarthost Router
Add the following configuration in the ROUTERCONFIG section. This ensures all outgoing mail goes through MXGate:
4 Section: TRANSPORTCONFIG - Transport Configuration
Add the transport definition containing SMTP authentication settings in the TRANSPORTCONFIG section:
Port 587 is used with TLS encryption. All credentials are transmitted encrypted.
5 Section: AUTH - SMTP Authentication
Add MXGate SMTP authentication settings in the AUTH section. Use the username and password obtained from the MXGate panel:
Security: Replace MXGATE_USERNAME and MXGATE_PASSWORD with actual credentials from MXGate panel.
Format: client_send = : username : password - Note it must start with a colon (:).
6 Save Configuration and Restart Exim
After making all changes, click the Save button at the bottom of the page. WHM will automatically validate and restart the Exim configuration.
7 Testing and Verification
Test if the configuration is working. Send an email and check the Exim logs:
Success! All your outgoing emails are now delivered encrypted and authenticated through MXGate.
Troubleshooting
Check your authentication credentials. Make sure the username and password are correct in the MXGate panel. Ensure colons (:) are correctly placed in AUTH section.
Check firewall settings. Ensure outbound access to port 587 is allowed.
Ensure hosts_require_tls is in the transport section, or remove the TLS requirement.
Ensure smarthost_router definition is added to ROUTERCONFIG section. Check for indentation errors.