Hi. I want Proxmox Mail Gateway to sit in front of the WHM/Cpanel and filter out all the spam for both incoming and outgoing email first. I can't find any good step by step tutorial on how to do it. So far, I have a bit and pieces together but not sure it will work. What I know I must do are as below. Please see if its correct or piece it up altogether.
1) To use Smarthost features. In WHM, I need to put in the hostname of my PMG as smarthost. This is under Exim Configuration Manager settings. I put in
* myproxmoxhostname.com
2) In Proxmox > Mail proxy > Relaying, I need to add smarthost hostname and port. I presume this would be WHM hostname and port? Or what would the actual data here would be?
3) In Proxmox > Mail proxy > Relay domains, I need to add all the domain from Cpanel. This needs a custom job as there is no way of automating this out of the box. I know that WHM have API and I can use API to either call something like this below:
Or, I can read the domain list using the command below.
I presume I need some cron setup for either solution above but I can't really get my head around it yet. Any advice?
4) In WHM, I believe I need to set Mail Routing Settings to Local exchanger in order for this to work? Am I right?
5) In WHM, I need to make the MX record (that are managed by WHM) to send the email to PMG instead. Not sure how to enable this globally for current and future clients.
I would really need some help in getting this to work. This is my first time getting PMG to work. I can't find any tutorial related to using it with WHM. Please help.
1) To use Smarthost features. In WHM, I need to put in the hostname of my PMG as smarthost. This is under Exim Configuration Manager settings. I put in
* myproxmoxhostname.com
2) In Proxmox > Mail proxy > Relaying, I need to add smarthost hostname and port. I presume this would be WHM hostname and port? Or what would the actual data here would be?
3) In Proxmox > Mail proxy > Relay domains, I need to add all the domain from Cpanel. This needs a custom job as there is no way of automating this out of the box. I know that WHM have API and I can use API to either call something like this below:
Code:
whmapi1 listaccts |grep domain
Or, I can read the domain list using the command below.
Code:
cat /etc/trueuserdomains
ls /etc/valiases/
I presume I need some cron setup for either solution above but I can't really get my head around it yet. Any advice?
4) In WHM, I believe I need to set Mail Routing Settings to Local exchanger in order for this to work? Am I right?
5) In WHM, I need to make the MX record (that are managed by WHM) to send the email to PMG instead. Not sure how to enable this globally for current and future clients.
I would really need some help in getting this to work. This is my first time getting PMG to work. I can't find any tutorial related to using it with WHM. Please help.