Adding MX record where the host is @

Wildfires

Verified User
Joined
Feb 21, 2013
Messages
5
Not sure if this is a bug or not, but found an interesting quirk when trying to add an MX record for office 365.

In the "DNS Management" section, if I try to enter an MX record where the host name is '@' as Office 365 requires, I get a message telling me the name is invalid.

However, if I then try to add it via the "MX Records" section, it works fine.

Also, when I delete an MX record via the "DNS Management" it does not seem to delete from the "MX Records" section and has to be deleted separately.

Can someone explain to me why this is so, and if it is supposed to be like this. Seems strange to me to have to control the records from two separate places when the records are visible in both places, yet seem to function separately.

Many thanks.
 
Hello,

In the "DNS Management" section, if I try to enter an MX record where the host name is '@' as Office 365 requires, I get a message telling me the name is invalid.

However, if I then try to add it via the "MX Records" section, it works fine.

Yes, I've been able to replicate this issue on my end as well. Never tried it ever before though.

Also, when I delete an MX record via the "DNS Management" it does not seem to delete from the "MX Records" section and has to be deleted separately.

In my case it does delete.

Can someone explain to me why this is so, and if it is supposed to be like this. Seems strange to me to have to control the records from two separate places when the records are visible in both places, yet seem to function separately.

Please note there is a feature which allows you to enable/disable "Local Mail Server" for your domain on the page "MX records". I guess if you need to modify MX records it would more strange to visit two different pages. On the "MX records" page you choose and enable "Local Mail Server", and on "DNS Management" page you modify DNS records. But probably that's a matter of a habit already.

Probably Directadmin Support should bring those pages to one and the same functionality if to speak about using special mark @.
 
I think the problem is a simple misunderstanding between how the DNS interface works and the meaning and use of the @ record.

@zEitEr:

I'm not sure where you tried the @ symbol, because there is no place in the DirectAdmin interface for the MX record to include the host name. It's always implied as the domain name you're hosting.

@Wildfires:

Office 365, just as any other external provider, requires that mail for example.com goes to a different mx location. (example.com is your domain name, and is often called the host name..)

In BIND DNS zone files, the @ symbol is used on the left side (the host side) of the record, to mean whatever the main domain name, as defined in the name of the zone file. The reason it's available as a short cut is because traditionally when creating zone files by hand we often lised all the A records first, and then later, below, the MX records.

For example, if you had an A record for ftp then ftp would be the left side host name and immediately below you'd have your MX record... you'd need to either enter example.com. (don't forget the .) as if you left it blank you'd e creating an MX record for ftp.example.com and not for example.com.

So to make it easier for people creating zone files by hand, the @ shortcut code was created.

Since DirectAdmin automatically knows to create an MX record for the main zone name, and automatically populates the left side (host name) for you, all you do to create the MX record is set the value/cost number and the target server name (again, don't forget the . at the end.

And finally, DirectAdmin requires you remove the X from the checkbox under the MX Records setting because exim doesn't even check MX records if the domai is hosted on the local server. So you need to tell exim the domain email isn't hosted on the local server wy unchecking that box and saving the setting.

Technical note:

The checkbox controls whether or not the domain name is listed in your /etc/virtual/domains file. Exim refers to that file to know if a domain's email is hosted locally or not.

Jeff
 
I'm not sure where you tried the @ symbol, because there is no place in the DirectAdmin interface for the MX record to include the host name. It's always implied as the domain name you're hosting.

Hey Jeff,

why don't you then just simply try it yourself by following the steps from the starting message?

According to my understanding the issue is that directadmin allows @ to be entered in the left side on "MX Records" page, but it's not allowed on "DNS Management". That's not a question on what and why @ is. Wikipedia can be used for it.
 
The BIND software can take the @ anywhere to indicate the same name as used in the zone file name, as I've already mentioned. I suppose then that it's reasonable to enter it into DirectAdmin, in which case you'd be creating a zone entry such as:
Code:
example.com.       14400     IN      MX      10 @
or
Code:
@       14400     IN      MX      10 mail
or even
Code:
@       14400     IN      MX      10 @
which in all such cases would be interpreted by BIND as example.com if the filename were example.com.db.

I've just noticed a somewhat recent change in how DirectAdmin handles MX recordes.

In older versions of DirectAdmin you can only enter the right side (object) of the MX record in DirectAdmin, and the left side is filled in for you (in this example, it would be as example.com.). And to make it even more confusing, though it's the object (right side) you actually enter it on the left side, where in all other record types the object would be.

But in latest versions of DirectAdmin you can fill in both sides. And the left side (subject) and right side (object) are where they should be.

I hadn't noticed this previously, and I didn't ealize you could enter the hostname (subject, left side) of an MX record using DirectAdmin.

So let's ask the question then: should @ be allowed? I'd suggest that it should be allowed at least on the left (host) side, to make DirectAdmin compatible with some samples found on the 'net (including the one for Office 365. And perhaps it should be allowed on both sides, to allow for all possible examples.

On both the MX Records and DNS Management pages of the control panel?

Good idea? Comments? Should this be a feature request?

Jeff
 
Back
Top