How to set a backup relay

saphirblanc

Well-Known Member
Jul 4, 2017
49
0
46
Hi,

I do have 2 nodes (Cluster) of Proxmox Mail Gateway and also two relays after them (mx1 and mx2) where the mails get finally dispatched.

However, I see I can only set one relay for all mails (currently only mx1). I expected to have the ability to set another one as a backup ?

Is there a way to do so for all domains (not some) ?

By the way, thanks for your great software :)

Yann
 
You can only set one relay, but you can use a hostname instead of an IP address. If you set a hostname, this hostname can also have MX records and if it has MX records, all MX records will be taken. If you don't want the MX records been taken, you need to enable Disable MX lookup, the A record is taken, if you don't have MX records or you have an IP address, it's the same, the A record is taken or just the given IP address directly.
 
Thank you for your replies. At the end I just created two A records "mx.domain.tld" in the DNS zone with the two different MX IP addresses and therefore I guess it would help in case one of them is having issues.
 
You can also use smtp_fallback_relay postfix parameter.
For example, if 1 is down, it will send to 2; 2 down, send to 3.
Code:
relay_transport = smtp:[10.10.10.1]:25
smtp_fallback_relay = [10.10.10.2]:25, [10.10.10.3]:25
 
Thank you for your replies. At the end I just created two A records "mx.domain.tld" in the DNS zone with the two different MX IP addresses and therefore I guess it would help in case one of them is having issues.

Don't do that. This way you have two hosts sharing the same ip address. You will end up on block lists etc. since incoming connections don't connect via the correct hostname (DNS).
One ip per host with a correct assigned reverse DNS name.

Just use the relay backup setting from postfix. It works fine, running it like this on thousand off systems.
 
  • Like
Reactions: saphirblanc
@DerDanilo is right, having two IP addresses for mx.domain.tld could result in having different reverse DNS entries and FCrDNS check (which is somehow the future in pregreet checks, I also disabled in my config, as customers have misconfigured systems and my decision is getting spam over rejecting ham/customers, but it will come on more and more systems like DMARC (SPF+DKIM) as well) and getting blocked. If you want to adjust main.cf.in from pmg/templates it's best to use the fallback setup or use two different MX (MX 10 and MX20) with well configured A and PTR records.
 

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!