Forum Moderators: buckworks & webwork

Message Too Old, No Replies

configuring MX records for a subdomain

to use gmail / google apps

         

tata668

9:34 pm on Aug 19, 2009 (gmt 0)

10+ Year Member



I manage my own Bind DNS server. Maybe this is a bad idea because I'm not 100% sure of what I'm doing! ;-)

I'm able to configure the MX records to use gmail (google apps) for the main domain "example.com". But when I try to add MX records for a subdomain "hello.example.com", something goes wrong and my website doesn't work anymore!

Here's my current hosts file, for the targetted domain:

==================================
$ttl 38400
example.com. IN SOA example.com. xyz.gmail.com. (
1191376906
10800
3600
604800
38400 )
example.com. IN NS ns1.example.com.
example.com. IN NS ns2.example.com.

ns1.example.com. IN A XX.XX.XX.XX
ns2.example.com. IN A XX.XX.XX.XX
*.example.com. IN A XX.XX.XX.XX

example.com. IN A XX.XX.XX.XX
XX.XX.XX.XX.example.com. IN PTR example.com

example.com. IN MX 10 ASPMX.L.GOOGLE.COM.
example.com. IN MX 20 ALT1.ASPMX.L.GOOGLE.COM.
example.com. IN MX 20 ALT2.ASPMX.L.GOOGLE.COM.
example.com. IN MX 30 ASPMX2.GOOGLEMAIL.COM.
example.com. IN MX 30 ASPMX3.GOOGLEMAIL.COM.
example.com. IN MX 30 ASPMX4.GOOGLEMAIL.COM.
example.com. IN MX 30 ASPMX5.GOOGLEMAIL.COM.
==================================

Here's what I try to add to this file, for the subdomain. I add those lines at the end of the previous lines, and everything stop working!

==================================
hello.example.com. IN MX 10 ASPMX.L.GOOGLE.COM.
hello.example.com. IN MX 20 ALT1.ASPMX.L.GOOGLE.COM.
hello.example.com. IN MX 20 ALT2.ASPMX.L.GOOGLE.COM.
hello.example.com. IN MX 30 ASPMX2.GOOGLEMAIL.COM.
hello.example.com. IN MX 30 ASPMX3.GOOGLEMAIL.COM.
hello.example.com. IN MX 30 ASPMX4.GOOGLEMAIL.COM.
hello.example.com. IN MX 30 ASPMX5.GOOGLEMAIL.COM.
==================================

Any idea?
Thanks a lot!

tata668

2:49 am on Aug 21, 2009 (gmt 0)

10+ Year Member



I think I found the solution (not 100% sure!), if it can help someone.


@ IN A XX.XX.XX.XX
* IN CNAME @

"* IN CNAME @" says that every domain or subdomain in that zone are alias to the main domain of the zone. Then all MX rules will be applied to every ones, no need to add new MX rules for the subdomains.