Help setting up email relay
Hi all,
I'm not super with email administration so I kind of need some help with the following situation:
Our cpanel/whm servers are within domainabc.com. So we have server1.domainabc.com, server2.domainabc.com etc.
The account domainabc.com is not hosted on any cpanel server, nor the DNS or email server.
We need that emails sent by these servers (from cpanel@serverX.domainabc.com) get relayed through our mail server. This is only for the messages from cpanel itself, not the messages from user accounts.
We found this article
-
Hey there! If you setup a Smarthost, all the traffic would use that. Server notifications do use the Exim mailer, just like regular emails. Here's an example of a root login notification from CSF and the log it leaves in /var/log/exim_mainlog: 2021-06-21 08:54:56 1lvJS4-0007vu-LE <= root@host.domain.com U=root P=local S=598 T="lfd on host.domain.com: WHM/cPanel root access alert from 1.2.3.4 (US/United States/hou-2.n" for root 2021-06-21 08:54:56 cwd=/var/spool/exim 3 args: /usr/sbin/exim -Mc 1lvJS4-0007vu-LE 2021-06-21 08:54:56 1lvJS4-0007vu-LE Sender identification U=root D=-system- S=root
0 -
I'm not looking to send all emails through the relay host, only emails generated by the cpanel host itself. User accounts and their domains should use the localhost. From what I've read it seems perfectly possible to achieve this, I'm only unsure about the proper configuration. 0 -
Thanks for the additional details. In the blog you linked, there is an example configuration section which contains this: send_via_mySmartHost: driver = manualroute domains = !+local_domains transport = remote_smtp route_list = * smtp.example.com::25
the local_domains section will ensure that local domains do not route through the smarthost. For example, if domain1.com sends a message to domain2.com, that will stay local to the system. If domain1.com sends a message to Gmail, that would go through the smarthost. For more advanced configurations, you may need to dig in to the Exim documentation or work with an admin, as cPanel doesn't provide support for the actual smarthost configuration.0 -
thank you for your reply, I saw that example config but that is not what I am looking for. Picking on the example you provided, if domain1.com sends an email to gmail, I don't want the message to be sent through the smarthost. Only messages generated by the cpanel software, that are sent usually from cpanel@localhost are to be sent via smarthost. The cpanel fqdn belongs to a domain which is not hosted on any cpanel server. We have our own DNS system, email servers, web servers. etc. Emails sent from the cPanel server will use our domain on from, but we don't want system emails to be sent directly from the cpanel server, but relayed through our email server, authenticated. The authentication part is covered in this part of the blog post: mySmartHost_login: driver = plaintext public_name = LOGIN client_send = : Username : Password
But only emails from cpanel system are to be sent via smarthost. Customer account emails, whatever the domain, are to be handled by the cpanel server directly.0 -
Thanks for that - the best thing to do would be to contact our support team through a ticket to see if that is something we can do some additional research on. 0 -
Thank you for your feedback and patience! I have opened a ticket id #94338527, I think my question wasn't clearly understood at first, but looking forward for the reply. From what I was able to search around on the web I think it is doable, but email administration is not my thing and I'm worried that I may disrupt our customer's emails, that's why I'm looking for a clear understanding of the issue and a configuration that matches our desired behaviour before making any changes. 0 -
Thanks for that - I'm following the ticket on my end now so I'll make sure this post stays updated. 0
Please sign in to leave a comment.
Comments
7 comments