Configuring MX and A Records at DreamHost?


#1

I have a domain that will be hosted at DreamHost, but which I’d like to have the email handled by a non DH mail server.

DreamHost allows you to set your own MX server, but requires a Domain and not an IP address. Further, it doesn’t seem to indicate where/how to designate an “A” record for the new mail server.

Say my domain is : www.mynewdomain.com

and the mail server I would like to use is at: 123.123.123.123 (not DH)

and the mail server name would be: mail.mynewdomain.com

Further, I’d like to indicate a preference of “10” for this record.

Do I…

  1. Enter a domain of “mail.mynewdomain.com” for the MX server on DreamHost’s MX record change page?

  2. And then… add an “A” record over at the DNS tab for “mynewdomain.com”?

and if so, what is the preferred way to do so given the fields available to me on that page (Name, Type, Value, Comments).

Do I need to create MORE than one record on the DNS page, and if so, how many.

Finally, how do you delete, remove or modify specific records on the DNS record for a domain at DH?

Thanks for any and all help. It would be great if there were some details on this in the knowledgebase, but what I’ve seen has been pretty vague.

Thanks!

Jem


#2

We don’t allow MX records pointing to IP addresses because it is not allowed by the applicable RFCs. It does still functionally work, but you’re technically not supposed to do it.

In this case you would want to add an A record for mymail.mynewdomain.com pointing to the IP address then add the MX setting pointing to mymail.mynewdomain.com from the Mail->MX Record part of the web panel.

You probably won’t be able to modify the ‘mail.mynewdomain.com’ A record unless you also edit the Domain and disable the ‘Mail’ service for the domain completely as those DNS records are automatically maintained by our system. If you do delete the mail service you also won’t be able to use the Mail->MX Record part of the panel. You would have to add the MX record by hand in the DNS panel. The MX record would be something like ‘0 mymail.mynewdomain.com.’ . The . at the end of the record is important.

  • Dallas
  • DreamHost Head Honcho/Founder

#3

First, thank you for replying.

I think I understand what you’ve said, but to be clear, is this the process I would follow:

  1. Disable “mail” services for “mynewdomain.com” entirely.
  2. Once that is done, then ADD an “A” record at the DNS panel with fields filled out as follows:

name: mail.mynewdomain.com. (note the trailing “period”)
type: A
Value: 123.123.123.123 (the IP of the non-DH mail server)
Comment: whatever (this field not important?)

  1. THEN… add an “MX” record at the DNS panel with fields filled out as follows:

name: (leave this field blank?)
type: MX
Value: 10 mail.mynewdomain.com. (note the trailing “period”)
Comment: whatever (this field not important?)

  1. Wait for changes to take affect.

Did I get that right? If not, could you please point out which step I got wrong and where I’d need to enter something differently? Thanks!

Cheers,

Jem


#4

In the step 2, the ‘name’ field would just be ‘mail’.

Also note that there may be a delay between step 1 and when the rest of the steps are possible. This sort of change is not that common and has not been optimized to happen quickly.

  • Dallas
  • DreamHost Head Honcho/Founder

#5

Thank you Dallas!

I have initiated “Step 1” and am waiting for it to take effect before proceeding to step 2.

Sincerely,

Jem


#6

JEM - have you figured it out?


#7

Please let me know if you figured out the Mx stuff. I’ve been trying to do this for 6 weeks, but am terrified that I will lose my email.

Thanks.
-J


#8

wxoco,

I think so, but I probably won’t know for sure until Monday, as I need to confirm that the mail is getting where it needs to, and I won’t be speaking with the users until then :}

I will post back when I’m certain this is all set.

Cheers,

Jem


#9

I am also trying to figure out the best way to do this. Here are my current thoughts.

To change MX record of a domain that is currently receiving email:

1] Set the TTL (Time To Live) to a low number, for example 300 (5 minutes), at least 24 hours before you do the switch.

2] After the TTL has propagated, set the MX record to something like this

mx.NEWmxer.net. [Preference = 10]
mx1.OLDmxer.mail.dreamhost.net. [Preference = 20]

Replace these domain names with your new and old MX domains. Make sure you give the new MXer a lower preference.

3] After this has propagated, remove the DH server so that you have something like this:

mx.NEWmxer.net. [Preference = 10]

When there is only one MX domain, the preference number doesn’t matter (but you need to have it!).

4] Change the TTL back to a normal number.

I think that if you do it this way, you will not have any bounced mail. Feedback is welcome – and then we can put it in the wiki.

Thanks,
Nancy

Infinite Ink ~ http://www.ii.com
Deflexion & Reflexion ~ http://deflexion.com


#10

Nancy,

In theory, what you are suggesting sounds like it would work, but I think the challenge is in explaining clearly WRT how it is accomplished through the DH control panel. For instance, where do you set the TTL on DreamHost? That seems like a whole 'nother can of worms (though maybe a smaller one…) It also matters A LOT whether your domain is ALREADY hosted at DH, or if you will be transfering it AFTER your set things up on DH (as is my case).

It sounds to me like wroxo DOES already have a domain and email setup on DH, and NOW wants to split the email off to a non-DH server.

The trick, as I discovered, is that if you want to use “mail” as your subdomain (as in “mail.mynewdomain.com”) that conflicts with the default mail configuration on DreamHost, which is why you need to ENTIRELY deactivate DreamHost mail services for that domain BEFORE adding new mail A and MX records.

The further challenge, is that you CAN’T change the existing A and MX records set up by DreamHost by default… you can only add NEW ones. So I’m not sure if that throws a spanner in your suggestions above, since you’d only be able to change the zone records you’d created and not the existing ones from the DH default mail setup. Maybe this can be addressed through the “preference” value. I don’t know.

Apparently, if you choose to go with a different sub-domain, something like “pop.mynewdomain.com”, you can set that up WITHOUT turning off DreamHost mail services. Likewise you can also just change the MX record if the mail server is to have an entirely different domain such as “mail.differentdomain.com”.

None of this is clearly explained in the existing tech documents, and a DH-Wiki would be fantastic to help others out in similar situations.

I’m a relative “mail server neophyte” so I hope I’m making sense.

Thanks!

Jem


#11

I agree that it’s a challenge to write clearly about this and that’s why I posted here before editing this wiki page:

wiki.dreamhost.com/index.php/MX_record

I don’t know what the best way to do this at DreamHost is, but I’m pretty sure that the best way is not to simply set the MX record on the Control Panel > Mail > MX record screen. I tried this and had a lot of mail bouncing for over a half an hour and then gave up and switched back to the DreamHost radio button (and yes, I did have my external MX server all set up and ready to accept this mail). I contacted DH support and asked about TTL and first got a reply that said “There will be downtime, however, as you are changing your DNS records. There is no way around it.” Since I have not had bouncing like this with other domains of mine, which have their name servers elsewhere, I continued asking about this and finally got someone at DH Support who knew about TTL and DNS in general. AFAICT, you need to contact DH Support to lower the TTL, but I would really like to hear from someone at DH about the best way to switch the MX record for a domain that is actively receiving mail.

I’m happy to update the DH wiki once I know the story.

Thanks,
Nancy

Infinite Ink ~ http://www.ii.com
Deflexion & Reflexion ~ http://deflexion.com


#12

If you set the MX record through the MX -> MX record area, our system will update your DNS and configure itself to NOT accept email for your domain (I’ll explain why later). You will get bounced mail if the mail server configuration takes hold before the DNS change does, unfortunately. There are ways around that but it requires contacting us to handle it at the moment.

We have to configure our mail server to NOT accept mail for a domain with a custom MX record so any domain sent out using our server as the outbound mail server will be properly handed off to the custom MX mail server. Otherwise, the mail will just be accepted by that machine and delivered locally and you would never see it.

The MX Record part of the panel does do the job correctly, but the timing of the necessary is not ideal and mail can bounce during that interim period. We can do the changes manually for you to greatly reduce the likelihood of mail bouncing, however. You have to contact our support team about that.

  • Dallas
  • DreamHost Head Honcho/Founder

#13

Do you know how to get old emails and old contacts from squirrelmail? I switched my email server to the microsoft exchange server, so I can’t access my squirrelmail acct.

Thanks for your help.

-J


#14

OK, so I’m personally still confused. We’re switching our hosting from rackspace to dreamhost for the website, but we’re keeping our webmail host where it is. According to their instructions:

MX record that points your domain name to mx1.emailsrvr.com (pref 10). Example: YOURDOMAIN.COM. IN MX 10 mx1.emailsrvr.com.

Backup MX record that points your domain name to mx2.emailsrvr.com (pref 20).

Example: YOURDOMAIN.COM. IN MX 20 mx2.emailsrvr.com.

But I have absolutely no idea how to do this in the control panel at DH. Any help?

Thanks!


#15

To add more than one MX record you have to have access to the DNS editing section of our panel. I don’t think we enable it by default. We used to but people kept breaking their DNS. If you can access it, you would do so here:

https://panel.dreamhost.com/index.cgi?tree=domain.dns&

  • Dallas
  • DreamHost Head Honcho/Founder

#16

Thanks, fellas, for the info. I set up an external mail server without a hitch.