2

I have a site hosted on Openshift and it allows users to add domain name aliases using an external DNS provider. I'm using Cloudflare for my DNS. However, since Openshift's IP addresses are known to change, you have to use CNAME records instead of A records. (Bad, I know!)

However, this then breaks my MX records and I want to use my domain host's free email redirection service.

Is there any workaround for this problem?

4
  • 3
    Don't use their email service? Go third-party, Google Apps maybe? May 3, 2012 at 8:50
  • 1
    But I'd still have to use their MX records right? So same problem still?
    – EddyR
    May 3, 2012 at 8:54
  • No, you can just set them to Google's MXes then. May 3, 2012 at 9:08
  • 1
    I'm not sure I see the difference without an A record. If you can explain further how Google Apps works in an answer I'd be happy to vote for it.
    – EddyR
    May 3, 2012 at 9:32

4 Answers 4

4

From RFC 2181:

10.3. MX and NS records

The domain name used as the value of a NS resource record, or part of the value of a MX resource record must not be an alias. Not only is the specification clear on this point, but using an alias in either of these positions neither works as well as might be hoped, nor well fulfills the ambition that may have led to this approach. This domain name must have as its value one or more address records. Currently those will be A records, however in the future other record types giving addressing information may be acceptable. It can also have other RRs, but never a CNAME RR.

The reason for this is that you will need to do additional queries:

  • ask the IP for the MX record -> CNAME
  • ask the IP for this CNAME -> A record
  • ask the IP for that A record -> finally the IP

This causes a lot of overhead

2
  • I'm totally aware of this and so is Openshift I believe but it's just the way it's done for now.
    – EddyR
    May 3, 2012 at 9:16
  • btw I'd go with Bar de Vos his solution and use google apps May 3, 2012 at 10:20
0

I'd simply use a smarthost.

Besides, OpenShift is being developed very rapidly, if you have an issue, post it in the community, and it will be addressed

0

There is a workaround, like the guys in heroku state implicitly when talking about avoiding naked domains. I have tried in OpenShift and it works the same.

1) If you own the domain example.com, create a subdomain www.example.com

2) Use CNAME records to alias wwww.example.com to example-yournamespace-rhcloud.com

3) Redirect permanently (301) example.com to www.example.com. For example, with .htaccess:

redirect 301 / http://www.example.com

4) You haven't touch CNAME neither A records, so you can configure freely your MX records.

0

You can have an MX record without an A record, like below:

yourdomain. IN MX 50 mail.otherserver.com.

1
  • But not with a CNAME, which he needs in order to use OpenShift
    – Nathan Fig
    Oct 12, 2015 at 4:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .