		    M4 macros for your MaraDNS zones
		    Neale Pickett <neale@woozle.org>

MaraDNS wants every record to have every field, presumably with the
assumption that some sort of preprocessor can make maintenance easier.
This is that preprocessor.  It makes sure entries are propely ordered,
automatically takes care of serial numbers for you, and makes virtual
hosting a lot of domians as easy as a microwave burrito.

common.inc contains the macros that you should not mess with.  They
assure that processed zone files are properly ordered, provide the base
macros, and make PTR records easier.  It also defines the TTL (defalt
time to live) and

If you want to add your own macros, put them in local.inc.  The default
local.inc has some stuff to make entering single domains a piece of
cake, especially for sites with a single IP that hosts many domains.
The local.inc you get with the distribution is very similar to the one I
use for my little site which hosts 33 domains.  local.inc is where you
would also redefine TTL, if you don't like the default of 21600.

Put all your zone files in the "zones" directory.  db.{zone} files will
be created automatically.

In addition, you should work on mararc.m4, instead of mararc.  mararc
will be generated automatically from mararc.m4 to include your generated
zone files.


There are five macros available for use in your zone files:

 SOA(domain)  -  SOA record
  -> S{domain}.|TTL|{domain}.|hostmaster@{domain}.|SERIAL|7200|3600|604800|1800

 example:
   SOA(example.org)


 HOST(hostname, ip)  -  Host record
  -> A{hostname}.|TTL|{ip}

 example:
   HOST(www.example.org, 10.2.3.4)


 PTR(hostname, ip)  -  PTR record (reverse DNS)
  -> P{reversed-ip}.in-addr.arpa.|TTL|{hostname}.

 example:
   PTR(www.example.org, 10.2.3.4)


 NS(domain, level, ip)  -  NS record + A record for name server
  -> N{domain}.|TTL|ns{level}.{domain}.
     Ans{level}.{domain}.|TTL|{ip}

 example:
   NS(example.org, 1, 10.2.3.2)

 note:
   This creates an A record for you.  You don't need a separate HOST
   line for your name server.
 
 
 MX(domain, level, ip)  -  MX record + A record for mail server
   -> @{domain}.|TTL|{level}|mx{level}.{domain}.
      Amx{level}.{domain}.|TTL|{ip}

 example:
   MX(example.org, 1, 10.2.3.10)

 note:
   This creates an A record for you.  You don't need a separate HOST
   line for your mail server.


Let me know if you have any problems or suggestions.  Patches would be
especially neato!
