; This zone file assumes the zone name is 'dnstestzone5.com'

; Before setting $ORIGIN, create a couple of records to check the default
; $ORIGIN matches the zone name. Note, first record must be SOA.
@ IN SOA ns1.dnstestzone5.com. hostmaster (
			2003080800 ; se = serial number
			12h ; ref = refresh
			15m ; ret = update retry
			3w ; ex = expiry
			3h ; min = minimum
			) ; Should give email 'hostmaster.dnstestzone5.com.'

default IN A 0.1.2.3 ; Should give default.dnstestzone5.com. A 0.1.2.3
tc IN CNAME test ; Should give tc.dnstestzone5.com. CNAME test.dnstestzone5.com.

; Test that $ORIGIN is substituted into non-fully qualified names
$ORIGIN dnstestzone5.com.
@ IN A 1.2.3.4 ; fqdn = dnstestzone5.com.
www IN A 2.3.4.5 ; fqdn = www.dnstestzone5.com.

; Check both record names and RDATA (across record types as appropriate)
test-cname IN CNAME r1 ; Should give test-cname.dnstestzone5.com. CNAME r1.dnstestzone5.com.
test-mx IN MX 10 m1 ; Should give test-mx.dnstestzone5.com MX 10 m1.dnstestzone5.com.
test-ns IN NS ns1 ; Should give test-ns.dnstestzone5.com NS ns1.dnstestzone5.com.
test-srv IN SRV 1 2 3 srv1 ; Should give test-srv.dnstestzone5.com SRV 1 2 3 srv1.dnstestzone5.com.

; And repeat the above, this time with fully-qualified targets
test-cname2 IN CNAME r1. ; Should give test-cname2.dnstestzone5.com. CNAME r1.
test-mx2 IN MX 10 m1. ; Should give test-mx2.dnstestzone5.com MX 10 m1.
test-ns2 IN NS ns1. ; Should give test-ns2.dnstestzone5.com NS ns1.
test-srv2 IN SRV 1 2 3 srv1. ; Should give test-srv2.dnstestzone5.com SRV 1 2 3 srv1.

; Check that changes to $ORIGIN are picked up
$ORIGIN subzone.dnstestzone5.com.
@ IN A 3.4.5.6 ; fqdn = subzone.dnstestzone5.com.
www IN A 4.5.6.7 ; fqdn = www.subzone.dnstestzone5.com.
test-cname IN CNAME r1 ; Should give test-cname.subzone.dnstestzone5.com.

; CNAME r1.subzone.dnstestzone5.com.
; Check $ORIGIN from outside zone is permitted (but not for record names)
; Also check that $ORIGIN without '.' terminator has one added (and a warning)
$ORIGIN foo.com
record.dnstestzone5.com. IN CNAME bar ; Should give record.dnstestzone5.com. CNAME bar.foo.com.

; A fully-qualified name that is within the zone should work OK
test.dnstestzone5.com. IN A 7.8.9.0 ; Should work OK