KVKK & GDPR Compliant Turkey Data Center 24/7 Support
+90 850 455 35 01 | destek@mxgate.com.tr
MXGate
Türkçe Contact
Integration Guide

cPanel/WHM Smarthost Configuration

Authenticated smarthost setup with Exim Configuration Manager. All emails sent from your cPanel/WHM server are relayed through MXGate, encrypted and authenticated.

≈10 min setup cPanel 92+ · Exim 4.94+ TLS · Port 587
What 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 the MXGate panel
  • cPanel version 92+ (Exim 4.94+ recommended)
Setup Steps

Setup in 7 Steps

1

Access Exim Configuration Manager in WHM

Log in to the WHM panel as the root user and search for "Exim" to find the Exim Configuration Manager.

WHM Path
Home > Service Configuration > Exim Configuration Manager
2

Switch to the Advanced Editor Tab

On the opened page, click the Advanced Editor tab from the top menu. You can directly edit the Exim configuration file in this section.

Important: Use the "Backup" button to back up your current settings before starting the configuration.
3

Section: ROUTERCONFIG - Smarthost Router

Add the following configuration in the ROUTERCONFIG section. This ensures all outgoing mail goes through MXGate:

ROUTERCONFIG
# MXGate Smarthost Router smarthost_router: driver = manualroute domains = ! +local_domains transport = mxgate_smtp route_list = * smtp.mxgate.com.tr::587 no_more
4

Section: TRANSPORTCONFIG - Transport Configuration

Add the transport definition containing the SMTP authentication settings in the TRANSPORTCONFIG section:

TRANSPORTCONFIG
# MXGate SMTP Transport with Authentication mxgate_smtp: driver = smtp hosts = smtp.mxgate.com.tr port = 587 hosts_require_auth = smtp.mxgate.com.tr hosts_require_tls = smtp.mxgate.com.tr
Port 587 is used with TLS encryption. All credentials are transmitted encrypted.
5

Section: AUTH - SMTP Authentication

Add the MXGate SMTP authentication settings in the AUTH section. Use the username and password obtained from the MXGate panel:

AUTH
# MXGate SMTP Authentication smarthost_login: driver = plaintext public_name = LOGIN client_send = : MXGATE_KULLANICI_ADI : MXGATE_SIFRE
Security: Replace MXGATE_KULLANICI_ADI and MXGATE_SIFRE with the actual credentials obtained from the MXGate panel.
Format: client_send = : username : password — Note that 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.

SSH Verification
# SSH üzerinden Exim yapılandırmasını test edin: exim -bV # Syntax hatası olup olmadığını kontrol edin: exim -C /etc/exim.conf -bV # Exim servisini yeniden başlatın (gerekirse): /scripts/restartsrv_exim
7

Testing and Verification

Test whether the configuration is working. Send an email and check the Exim logs:

Test Commands
# E-posta kuyruğunu kontrol edin: exim -bp # Exim loglarını izleyin: tail -f /var/log/exim_mainlog # Başarılı bağlantı görmelisiniz: "smtp.mxgate.com.tr [IP]:587 connected" "=> kullanici@domain.com R=smarthost_router" # SMTP kimlik doğrulama testi: exim -d -Mvl <message-id>
Success! All your outgoing emails are now delivered encrypted and authenticated through MXGate.
Troubleshooting

Common Errors

How do I fix the "535 Authentication failed" error in cPanel/WHM Exim?

Check your authentication credentials. Make sure the username and password are correct in the MXGate panel. Ensure the colons (:) are correctly placed in the AUTH section.

Why does the cPanel smarthost return a "Connection refused" error?

Check your firewall settings. Ensure outbound access to port 587 is allowed.

How do I resolve the "TLS required" error in Exim?

Ensure hosts_require_tls is present in the transport section, or remove the TLS requirement.

Why does cPanel Exim throw a "Router not found" error?

Ensure the smarthost_router definition is added to the ROUTERCONFIG section. Check for indentation errors.

1000+ enterprise customers
trust MXGate