In DNS parlance, an MX record (Mail eXchanger) is used to tell the world which machines accept incoming mail for your domain. This feature is most frequently used to completely reroute control of your email system from Dreamhost to another hosting company.
A BIND format MX record looks like this:
example.net IN MX 10 mail.example.net.
Note: the final dot in the example is important. Without a final dot, the system thinks the server name is only a part of the address and your domain name will be appended to the record.
Changing the MX record for your Dreamhost-hosted domain
It should be noted that making a mistake on your MX records can prevent anyone from sending you mail. You should not change this unless you know exactly what you are doing.
- Find the domain you want to edit and click the edit link next to it.
- The host you are switching to should provide a list of servers that you will reroute your mail to. Use this for reference.
- Regular Dreamhost Email: This box will be selected in green by default. Leaving this selection as-is will keep Dreamhost's mail servers active (A and MX records found on the Domains-->Manage Domains-->DNS page). All address settings via the Mail-->Manage Addresses page will work in compliance with the instructions outlined in our Client Specific Wiki articles.
- "Mail Mirror" Another Domain's Email Addresses: This box is to be used for having one domain's mail service exactly mirror another's. Any email addresses you have @mirroreddomain.com will also work @domaintomirror.com. Change the "Mail Mirror" this domain: selection from the drop-down menu and click "Mirror this domain's email addresses now!" to save your set up.
Important Note: Domains with custom mx records, junk mail filters or that mail mirror another domain cannot be mirrored. (See also Email Aliases: Mail Mirror.)
- Custom MX Records: This box is for adding your own MX Records according to the above mentioned list from your email provider. Please remember to enter your priority preference before the hostname and to end your entry with a dot. Eg. 10 mx1.hosting.com. (priority-number space hostname dot). Your mail will be delivered to these mail servers rather than DreamHost.
Optional: I still want DreamHost to accept email for this domain. (Check this only if you're using an outside spam filtering service like Postini.)
Click Change this domain to use custom MX records now!
*The panel will add a priority (defaults to 0) and a period at the end if one doesn't exist.
Dreamhost's supplied MX record for Gmail is not ideal - it looks like
myhost.com IN MX 0 ASPMX.L.GOOGLE.COM.
It's not good practice to have an MX record with a priority of 0, and also they do not list all the other backup MX servers. Advanced users might consider switching from 'Gmail' to handling your MX records yourself, then supplying the correct gmail records as in this example:
MX Record: 10 ASPMX.L.GOOGLE.COM. MX Record: 30 ASPMX2.GOOGLEMAIL.COM. (optional) MX Record: 30 ASPMX3.GOOGLEMAIL.COM. (optional) MX Record: 30 ASPMX4.GOOGLEMAIL.COM. (optional) MX Record: 30 ASPMX5.GOOGLEMAIL.COM. (optional) MX Record: 20 ALT1.ASPMX.L.GOOGLE.COM. (optional) MX Record: 20 ALT2.ASPMX.L.GOOGLE.COM. (optional)
As explained above, you should explicitly set the priority on each MX value by typing "10 ASPMX2.GOOGLEMAIL.COM." in the value box rather than just "ASPMX2.GOOGLEMAIL.COM." otherwise your records too will default to "0".
Important Note: if you delete your last email box for a domain, it will also delete custom MX records for that domain. This is not necessarily desirable as if you have a custom MX to send your email to another mail server, then it is logical that you don't need any mail boxes.
This is an apparent anomaly that has been brought to Dreamhost's attention and they are investigating it.
Important Note 2: If you are using something like Postini where you want email delivered back to Dreamhost, make sure you get the host email account correct in your external service settings (for Postini these are found at Inbound Servers / Delivery Mgr / Edit). It is not "mail.yourserver.com". It should be something like "mx1.balanced.homie.mail.dreamhost.com". This can be found at the bottom of your custom MX page after you've added your own MX records. Email will be immediately rejected back to the sender until you get this correct.
Checking your Dreamhost email after creating a custom MX record
Webmail: If you need to check your Dreamhost email account after creating a custom MX record, you cannot check it with the default webmail installed on your domain or with any webmail client you have installed yourself because your mail.yourdomain.com subdomain doesn't exist any longer. To check your Dreamhost email account in this situation, use the following URL: http://webmail.dreamhost.com/src/redirect.php?login_username=XXXXXXX!@!MAILIPADDRESS&secretkey=PASSWORD
You must replace "XXXXXXX" with your e-mail address and you must also replace "PASSWORD" with your account password. You also must replace the MAILIPADDRESS with the IP address for your mail server. You can get the mail server's IP address by either clicking the DNS link next to the domain name in question under Domains -> Manage domains and and look for the value for the MAIL A-record. You can also run the following command from the command prompt (for Windows users) or from the terminal (For Mac users) which should give you the IP address:
nslookup mail.domainname.com ns1.dreamhost.com (of course replacing domainname with whatever your domain is).
POP Access: You can access your Dreamhost email using POP by changing your mail settings:
- Username = [email address] (e.g. "email@example.com")
- Password = [DH email password]
- POP server = [DH mail server].mail.dreamhost.com
This works in both email clients (like Outlook) and web clients (like Google mail).
You can also check your Dreamhost email account from a desktop client by using the mail server's IP address as the server, your mXXXXXXX as your username, and your standard password.