Configure outbound emails from cPanel servers.


Active Member
May 8, 2018

What are the exim configuration to forward all outbound emails from cPanel servers to proxmox mail gateway.
Thanks in advance.

Did anyone using PMG for cPanel outbound mails here, need your support for configuration.
Please share how you configured in Exim to forward those emails to PMG.

Awaiting anyone of your response.
not directly - but setting up exim to use PMG as outbound host or smart-host should work.

The following thread could help:

or the exim documentation:

the only specific part for PMG is that you need to decide if you're using the intern or extern port (if you want to send e-mail out you need to send the mail to port 26 (in the standard config))

I hope this helps!

Below are the changes which I have made in advance Exim configuration.

driver = manualroute
domains = ! +local_domains
transport = remote_smtp
hosts_randomize = true
route_list = *
host_find_failed = defer

driver = smtp
tls_tempfail_tryclear = true
headers_add = X-AuthUser: $authenticated_id

But after this, if I test an outgoing mail from a domain inside Cpanel, it shows as connection refused in mail delivery report. Also in PMG, there are no emails getting hit for outbound.

Can you please support.
It's been quite a while since I have used exim .... so you might get answers faster in the cpanel community however:
route_list = *
looks wrong - I think you need to specify the port in the transport section not the route section

good luck!

Anyone successfully configured Proxmox with cPanel for outbound mails please share your settings.
We tried in all aspects no mails are working, but the configurations which we use like sendgrid and other SMTP providers work fine.

Thank you.
In cPanel WHM, you want to go to the Exim Configuration Manager & search for "Smarthost support", select the second bullet, in the box input:

That will send all outbound email to the PMG hosted on, by default it will use port 25. Based on, sending mail out on port 26 requires this syntax:

Make sure you add your cpanel host to PMG's trusted networks ( /#pmgMailProxyConfiguration:networks )
  • Like
Reactions: Stoiko Ivanov
Make sure you tell cPanel about PMG on /scripts6/editremoteipslist the issue is documented here:

I also whitelist PMG's address on /scripts2/displayeximconfforedit as documented here:
Can you please let me know where I should whitelist PMG's address? I couldn't understand the second phrase. Thank you!


The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!