Wildcard MX Records


Hi All,

I am setting up MX records for a domain and subdomains, and I want to use an MX wildcard if possible to avoid having to repeat the entries again and again.

However, I cannot work out how to do it, given the restriction that each subdomain needs its own A record (and www A record).

Simplistically, this is what I have:

+-+-+-+-+-+-+-+-+-+-+

MX Records:

a.emails.co.test      10      mailserver10.example
a.emails.co.test      20      mailserver20.example
b.emails.co.test      10      mailserver10.example
b.emails.co.test      20      mailserver20.example
c.emails.co.test      10      mailserver10.example
c.emails.co.test      20      mailserver20.example


A Records:

a.emails.co.test            192.168.1.1
b.emails.co.test            192.168.1.2
c.emails.co.test            192.168.1.3

www.a.emails.co.test            192.168.1.1
www.b.emails.co.test            192.168.1.2
www.c.emails.co.test            192.168.1.3

+-+-+-+-+-+-+-+-+-+-+


In actuality, I have 25 country subdomains and more could come online.

All of the MX records need to point to the same mailserver(s).  Every email comes into a single central location.


However, each of the subdomains has its own webserver that is managed locally, so I cannot just use a wildcard to point all of them to the same place.

There are also various other records relating to some of the subdomains, but just one is enough to scupper my initial idea of setting up the MX records thus:


*.emails.co.test      10      mailserver10.example
*.emails.co.test      20      mailserver20.example


This doesn't work of course, since the existence of any subdomain record irrespective of record type (e.g. www.b.emails.co.test) neuters the wildcard entry.




We have four mailservers in the MX priority list, and (currently) 25 subdomains, meaning I have to put in 100 MX records.

If any of the mailservers change their canonical names (a reasonable probability if it moves to another provider) then I'll have to change 25 (at least) MX records each time.  Not often, but hey!




Finally, it just looks crap having all those MX records repeating - there must be a better way??


So, any suggestions on how to do it differently?


Thanks,

Alan.
LVL 23
AlanConsultantAsked:
Who is Participating?
 
Chris DentPowerShell DeveloperCommented:
> meaning I have to put in 100 MX records.

Script it? Or make them into separate (delegated) domains and use a template zone file? Obviously you can't use the same file if the A records differ.

Chris
0
 
AlanConsultantAuthor Commented:
Hi Chris,

I wouldn't know where to begin with scripting since the management console is on a remote (c-panel style) site.

I'll look into delegated domains - not something I have any experience with so far!

Thanks,

Alan.
0
 
Chris DentPowerShell DeveloperCommented:
Oh fun, I do love those kind of things. GUI's... far too limited.

There's no way to get underneath it to the real DNS service / zone files? Maybe not, but just in case :)

Chris
0
Protect Your Employees from Wi-Fi Threats

As Wi-Fi growth and popularity continues to climb, not everyone understands the risks that come with connecting to public Wi-Fi or even offering Wi-Fi to employees, visitors and guests. Download the resource kit to make sure your safe wherever business takes you!

 
AlanConsultantAuthor Commented:
Hi,

Yes - I agree, but unfortunately no way to do that.  I did ask them if I could email a formatted zone file to them (that would make it trivial to do in Excel or whatever), but no go - I have to do it 'manually' via the web interface.

:-(

Alan.
0
 
Chris DentPowerShell DeveloperCommented:
Yuck, that's rubbish. I wish I had a better suggestion :-\

Chris
0
 
AlanConsultantAuthor Commented:
I'd look at moving the name server function elsewhere, but it is 'included' in a bundle of other stuff, and we would still pay the same apparently, plus wherever I moved it to would (presumably) charge, so I'd have to explain why I want to spend money - chances of that are never good :-P

Alan.
0
 
AlanConsultantAuthor Commented:
Hi Chris,

Sorry for not closing this before.  I only just noticed it was still open, so allocated the points now, and tidied up.

Thanks for your help!

Alan.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.