"Use MX" checkbox in "Transports"

masterx

Member
Jun 6, 2020
21
4
8
24
Hi,

i have a bunch of Domains configured in Proxmox Mail Gateway and I have three internal mail servers which are in a cluster.
Also, i checked the "Use MX" checkbox for all the domains, and entered mxin.mydomain.local.
In my local DNS Server, I have three MX records like this

mxin.mydomain.local. IN MX 10 mailserver1.mydomain.local. mxin.mydomain.local. IN MX 10 mailserver2.mydomain.local. mxin.mydomain.local. IN MX 10 mailserver3.mydomain.local.

Priority is the same, as I don't really care, this is just for round robin and availability.
Now I had a situation, where only one of the mail servers was reachable for the Proxmox Mail Gateway, because of a firewall misconfiguration. Unfortunately, Proxmox decided to pick one of the unreachable Servers and queued up all the mails, not delivering a single one, instead of trying the next MX record, until a mail server would have responded.

The error message in the logs was:
Feb 20 00:06:46 pmg01 postfix/error[103886]: 94EA92C0AFE: to=<address@mydomain.com>, relay=none, delay=52574, delays=52574/0.01/0/0.01, dsn=4.4.1, status=deferred (deliver
y temporarily suspended: connect to mailserver1.mydomain.local[192.168.0.6]:25: Connection timed out)

Is my assumption of expected behavior wrong or did I discover a bug? Should I use different MX priorities? Please don't tell me, I have to put a load balancer in front of my mail servers. I beg you.

Thanks!
 
* Usually this works quite fine - could you please share more of the logs around the time when this happened?
* One thing that is odd with postfix-log is that it sometimes only logs the last message - despite trying other things as well (especially when resolving ipv6 first and v4 afterwards it will only log one of the resolution failures)

if this does not help - consider enabling verbose logging of the smtp service to see what it tries to do:
http://www.postfix.org/DEBUG_README.html#verbose

I hope this helps!
 
which logs would you need? in syslog I can only see (after enabling verbosity for postfix), that postfix is trying to connect to only two of the three mail servers but not the third one (which is the only one reachable, lol).
I saw pmg is even replying with 450 4.7.1 <myemail@mydomain.com>: Recipient address rejected: Service is unavailable (try later);
IPv6 is not being used at all...

in a network capture I saw that the pmg VM is actually requesting all the MX records and that it is getting all three MX records in the response so DNS and DNS querying/replying is not the issue.
 
Thanks for coming back and reporting what the solution was - this will help others who also run into this issue!

Please mark the thread as 'SOLVED' to make this more visible to others
 

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!