Cloudron wrongly changing Mail DNS record used by my external mail server
-
I seem to be running into an issue where with my cloudron instance is changing the email DNS records I have setup every time I sync the DNS records, when I am using an external mail server and have the DNS records setup to point to that one.
Not sure if there is a setting that I am not seeing, but it seems that the Cloudron is assuming that my email server is Cloudron, when I have an external system that I've configured within Cloudron, and it overrides the DNS settings for that service to put its own.
Might be something that if Cloudron detects an external email service being used for a domain, then it doesn't change the DNS records for that. But if mail is going through Cloudron, then it does change the DNS records to ensure that it's setup correctly.
It seems that the "Mail Server Location" might be triggering that DNS change, but unsure if I set this to something else that it will try and change the DNS records to something else.
Have posted some screenshots of what my settings are set to (with the credential info obscured) and if anyone has any ideas, would love to hear what I can do to change this (for context, my DNS goes through Cloudflare for both my email server and Cloudron).
-
-
The MX records appear to be unchanged by Cloudron, but the A and AAAA records get changed from my email server to Cloudron, which causes emails to not route correctly as they are trying to be directed to my Cloudron Server, and it needs to go to the Email Server.
I have already made the necessary changes to the SPF and DKIM records to allow Cloudron to send emails out, and that works, but it's just the A and AAAA records that it keeps changing.
Not sure if that "Mail Server Location" option in the screenshot is causing anything of that.
Also for reference, my email server is hosted out of mail.blockbluemedia.com, while the Cloudron server is out of my.blockbluemedia.com (as seen in the screenshots).
It's not too big of an issue, but one that I have to deploy a workflow for monitoring those records and automatically changing them back, if Cloudron changes them.
-
@bbm_noahgilbert your guess is correct. Setting "Mail Server Location" updates the DNS A and AAAA records. This behavior is per the RFC 5321 . Mail Server Location sets the EHLO name of the server and it must translate to a RR record. See sections 2.3.5 and 4.1.1.1 .
Why not set the Mail Server Location to something that is not your mail server? you can set it to ,say, cloudronmail.blockblueedia.com for example so that it does not interfere with your incoming mail server (MX) name.
-
Ahh ok, that makes sense was just looking for clarification if that was the behaviour of that setting.
Will try setting to something arbitrary for the moment and hope that it doesn't change the A and AAAA records, but from your explanation, it shouldn't in theory.Thanks for the advice @girish
-
Looks like that was the fix, now it doesn't change the A and AAAA records of the email server, and Cloudron can still use my External SMTP connection while having the Mail Server Location set to "cloudron.blockbluemedia.com".
-