Configure outbound emails from cPanel servers.

AmithKumar

Active Member
May 8, 2018
16
0
41
39
Hi,

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

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:
https://forums.cpanel.net/threads/cpanel-smtp-relay-account-level.618635/

or the exim documentation:
https://www.exim.org/exim-html-current/doc/html/spec_html/ch-some_common_configuration_settings.html

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!
 
Hi,

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

ROUTERSTART:
send_via_remotesmtp:
driver = manualroute
domains = ! +local_domains
transport = remote_smtp
hosts_randomize = true
route_list = * hostname.domain.com::26
host_find_failed = defer
no_more


TRANSPORTSTART:
remote_smtp:
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 = * hostname.domain.com::26
looks wrong - I think you need to specify the port in the transport section not the route section
see:
https://exim-users.exim.narkive.com/9ZrPGVwL/smarthost-with-an-alternate-port
https://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_smtp_transport.html
https://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_manualroute_router.html


good luck!
 
Hi,

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:
* pmg.AmithKumar.com

That will send all outbound email to the PMG hosted on pmg.AmithKumar.com, by default it will use port 25. Based on http://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_manualroute_router.html, sending mail out on port 26 requires this syntax:
* pmg.AmithKumar.com::26

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: https://confluence2.cpanel.net/display/82Docs/Configure+Remote+Service+IPs

I also whitelist PMG's address on /scripts2/displayeximconfforedit as documented here:
https://confluence2.cpanel.net/disp...Basic+Editor#4864e2ab92c140858eb3f8cc64b37209
Can you please let me know where I should whitelist PMG's address? I couldn't understand the second phrase. Thank you!
 

About

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!