PMG with multiple relay hosts.


Aug 23, 2019
Hello proxmox community.
i have managed to install and configure my first pmg.
Also successfully managed to send my incoming/outgoing mail traffic from a webserver to pmg. All seems to run well and smooth.

Now, i need to add more servers to send their outgoing mail traffic to this pmg.
Is this possible? because pmg only supports one default relay.
I suppose it is possible, i just need to point me to the right direction.

Thank you.
My goal is to route outgoing/incoming mail traffic from 3 different webservers (with multiple domains hosted) into the pmg
I'm not sure I understand your question completely...
* But yes you can route outgoing mail-traffic from your webservers into PMG -you need to configure your webservers to use PMG as their smart_host (or default mailrelay)
* Yes you can also use PMG to scan incoming mails for certain domains: just let the MX-record of those domains point to PMG's IP-address and setup the transports for those domains in PMG to the respective server, which should receive mail for the domain

Please check out the reference documentation:

I hope this helps!
Thank you for your reply.
I understand that the default relay is the only server that can send traffic to pmg.
Outgoing email traffic will be scanned for spam and viruses i suppose.
I don't quite get your question:
* The default relay for PMG is the traffic PMG sends its traffic to!
* any server (inside the trusted networks) can send traffic to PMG
* if you want to scan outbound mails you should configure your servers to send to PMG's internal port

please read the documentation - it is quite well explained there.
Hi i too want to set up multiple relay host in proxmox mail gateway
Is that possible :
Default Relay is accepting only one IP entry.
I wish to send my domain mails to multiple hosts.
Solved It.
in default relay host made an entry with name instead of IP and added two MX records for the host name.
Is adding dns name as relay host actually working? I mean if one of it's IP addresses is offline, will PMG try to relay mail to another IP?
Is adding dns name as relay host actually working? I mean if one of it's IP addresses is offline, will PMG try to relay mail to another IP?
if you have one DNS name with 2 A records and one of them is not reachable postfix should try to directly connect to the other

However it's always best to actively try those things and watch the logs - that way you get a feeling how it's working in practice

I hope this helps!


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!