BIND should be able to do this by 'fooling' it into thinking it is authoratative for a higher level zone, such as com, for example.

zone "com" { type master; file "/etc/bind/files/catch_all.db"; };


Then, in your catch_all.db file:

$TTL 300
@               IN SOA  ns1.domain.example. hostmaster.domain.example. (
                            2012020301 ; serial
                            6H ; refresh
                            1H ; retry
                            2W ; expire
                            6H ; minimum
                        )
                IN      NS      ns1.domain.example.
                IN      NS      ns2.domain.example.
*               IN      MX      10 mail.domain.example.
mail            IN      A       10.0.0.2 ; Your mail server's IP.
*                       A       10.0.0.1 ; The IP you want all domains to resolve to.


This will apply to any request for a domain in the com zone that hits your server.  You can do the same for other top-level zones as well:

zone "net" { type master; file "/etc/bind/files/catch_all.db"; };
zone "org" { type master; file "/etc/bind/files/catch_all.db"; };
zone "co.uk" { type master; file "/etc/bind/files/catch_all.db"; };


Setting up wildcard DNS for lots of domains
I have this:

from __future__ import print_function

def f_comma(p_string):
   v_string = p_string
   if (type(v_string) == type(int()) or type(v_string) == type(long()) or  
       type(v_string) == type(float())):
      v_string = str(v_string)
   else:   
      l_string = list(v_string)
      for v_index in range(3, len(l_string), 4):
         l_string.insert(v_index, ',')
      v_result = ''.join(l_string)
   return (v_result)

print (f_comma('qwertyuiopaq'))


It seems that i can't figure it out why if i use a string longer than 11 chars the period stops inserting, but with only 11 chars it works fine. What i'm doing wrong in this piece?
