Use mx option.

ozgurerdogan

Renowned Member
May 2, 2010
613
5
83
Bursa, Turkey, Turkey
Ok when adding transport, there is a "Use Mx" option.
Lets say domain.com has two mx records (second is for fallback):
1- pmg.domain.com Priority 0
2. mail.domain.com Priority 10

Then I add transport hostname as domain.com (not sure if I must enter mail.domain.com ? ) and check Use Mx option.

So here I am confusing:
Will pmg lookup mx record for domain.com and delivery mail to there ? If so, it will get pmg.domain.com as answer because of Priority 0. ? So how can it delivery mail to itself? Should not I also add priority option in transport box?
 
When I use mail.domain.com and check "Use mx", it delivers fine. But how can pmg knows to use mail.domain.com even with higher priority?
Also I can also uncheck "Use mx" when using mail.domain.com and it still delivers fine.
 
Last edited:
When I use mail.domain.com and check "Use mx", it delivers fine. But how can pmg knows to use mail.domain.com even with higher priority?
Also I can also uncheck "Use mx" when using mail.domain.com and it still delivers fine.
As far as I understand if you use MX then PMG will use MX records priority for delivery. If the record with lower priority is offline PMG will try to deliver email to the second record with higher priority. This is how it usually works.

https://en.wikipedia.org/wiki/MX_record#Load_distribution

Here is an example how I configured a domain for our customer that has two internet lines (two public IP addresses) so in case the primary line is offline PMG will try to deliver to secondary line.

For the root domain we still use the same records that point to our PMG server.

For DNS records I configured this:
Code:
maildelivery.example.com.    IN    MX    10 mail.example.com.
maildelivery.example.com.    IN    MX    100 mailsecondary.example.com.

mail.example.com = A record to primary public IP address of internet line
mailsecondary.example.com = A record to secondary public IP address of internet line

On proxmox I configured it like this:
1668957252695.png
 
Last edited:
  • Like
Reactions: kransom

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!