One final test added to the test suite.
[exim.git] / test / dnszones-src / db.test.ex
1 ; $Cambridge: exim/test/dnszones-src/db.test.ex,v 1.3 2006/02/20 16:25:00 ph10 Exp $
2
3 ; This is a testing zone file for use when testing DNS handling in Exim. This
4 ; is a fake zone of no real use - hence no SOA record. The zone name is
5 ; test.ex. This file is passed through the substitution mechanism before being
6 ; used by the fakens auxiliary program. This inserts the actual IP addresses
7 ; of the local host into the zone.
8
9 ; NOTE (1): apart from ::1, IPv6 addresses must always have 8 components. Do
10 ; not abbreviate them by using the :: feature. Leading zeros in components may,
11 ; however, be omitted.
12
13 ; NOTE (2): the fakens program is very simple and assumes that the buffer into
14 ; which is puts the response is always going to be big enough. In other words,
15 ; the expectation is for just a few RRs for each query.
16
17 ; NOTE (3): the top-level networks for testing addresses are parameterized by
18 ; the use of V4NET and V6NET. These networks should be such that no real
19 ; host ever uses them.
20
21 test.ex.     NS      exim.test.ex.
22
23 test.ex.     TXT     "A TXT record for test.ex."
24 s/lash       TXT     "A TXT record for s/lash.test.ex."
25
26 cname        CNAME   test.ex.
27
28 ptr          PTR     data.for.ptr.test.ex.
29
30 ; Standard localhost handling
31
32 localhost    A       127.0.0.1
33 localhost    AAAA    ::1
34
35 ; This name exists only if qualified; it is never automatically qualified
36
37 dontqualify  A       V4NET.255.255.254
38
39 ; A host with upper case letters in its canonical name
40
41 UpperCase    A       127.0.0.1
42
43 ; A host with UTF-8 characters in its name
44
45 mx.π        A       V4NET.255.255.255
46
47 ; A non-standard name for localhost
48
49 thishost     A       127.0.0.1
50
51 ; Another host with both A and AAAA records
52
53 46           A       V4NET.0.0.4
54              AAAA    V6NET:ffff:836f:0a00:000a:0800:200a:c031
55
56 ; And another
57
58 46b          A       V4NET.0.0.5
59              AAAA    V6NET:ffff:836f:0a00:000a:0800:200a:c033
60
61 ; A working IPv4 address and a non-working IPv6 address, with different
62 ; names so they can have different MX values
63
64 46c          AAAA    V6NET:ffff:836f:0a00:000a:0800:200a:c033
65 46d          A       HOSTIPV4
66
67 ; A host with just a non-local IPv6 address
68
69 v6           AAAA    V6NET:ffff:836f:0a00:000a:0800:200a:c032
70
71 ; Alias A and CNAME records for the local host, under the name "eximtesthost"
72
73 eximtesthost     A       HOSTIPV4
74 alias-eximtesthost CNAME eximtesthost.test.ex.
75
76 ; A bad CNAME
77
78 badcname     CNAME   rhubarb.test.ex.
79
80 ; Test a name containing an underscore
81
82 a_b          A       99.99.99.99
83
84 ; The reverse registration for this name is an empty string
85
86 empty        A       V4NET.255.255.255
87
88 ; Some IPv6 stuff
89
90 eximtesthost.ipv6 AAAA   HOSTIPV6
91 test2.ipv6   AAAA    V6NET:2101:12:1:a00:20ff:fe86:a062
92 test3.ipv6   AAAA    V6NET:1234:5:6:7:8:abc:0d
93
94 ; A case of forward and backward pointers disagreeing
95
96 badA         A       V4NET.99.99.99
97 badB         A       V4NET.99.99.98
98
99 ; A host with multiple names in different (sub) domains
100 ; These are intended to be within test.ex - absence of final dots is deliberate
101
102 x.gov.uk     A       V4NET.99.99.97
103 x.co.uk      A       V4NET.99.99.97
104
105 ; A host, the reverse lookup of whose IP address gives this name plus another
106 ; that does not forward resolve to the same address
107
108 oneback      A       V4NET.99.99.90
109 host1.masq   A       V4NET.90.90.90
110
111 ; Fake hosts are registered in the V4NET.0.0.0 subnet. In the past, the
112 ; 10.0.0.0/8 network was used; hence the names of the hosts.
113
114 ten-1        A       V4NET.0.0.1
115 ten-2        A       V4NET.0.0.2
116 ten-3        A       V4NET.0.0.3
117 ten-3-alias  A       V4NET.0.0.3
118 ten-3xtra    A       V4NET.0.0.3
119 ten-4        A       V4NET.0.0.4
120 ten-5        A       V4NET.0.0.5
121 ten-6        A       V4NET.0.0.6
122 ten-5-6      A       V4NET.0.0.5
123              A       V4NET.0.0.6
124
125 ten-99       A       V4NET.0.0.99
126
127 black-1      A       V4NET.11.12.13
128 black-2      A       V4NET.11.12.14
129
130 myhost       A       V4NET.10.10.10
131 myhost2      A       V4NET.10.10.10
132
133 other1       A       V4NET.12.4.5
134 other2       A       V4NET.12.3.1
135              A       V4NET.12.3.2
136
137 other99      A       V4NET.99.0.1
138
139 testsub.sub  A       V4NET.99.0.3
140
141 ; This one's real name really is recurse.test.ex.test.ex. It is done like
142 ; this for testing host widening, without getting tangled up in qualify issues.
143
144 recurse.test.ex   A  V4NET.99.0.2
145
146 ; -------- Testing RBL records -------
147
148 ; V4NET.11.12.13 is deliberately not reverse-registered
149
150 13.12.11.V4NET.rbl    A   127.0.0.2
151                       TXT "This is a test blacklisting message"
152 14.12.11.V4NET.rbl    A   127.0.0.2
153                       TXT "This is a test blacklisting message"
154 15.12.11.V4NET.rbl    A   127.0.0.2
155                       TXT "This is a very long blacklisting message, continuing for ages and ages and certainly being longer than 128 characters which was a previous limit on the length that Exim was prepared to handle."
156
157 14.12.11.V4NET.rbl2   A   127.0.0.2
158                       TXT "This is a test blacklisting2 message"
159 16.12.11.V4NET.rbl2   A   127.0.0.2
160                       TXT "This is a test blacklisting2 message"
161
162 14.12.11.V4NET.rbl3   A   127.0.0.2
163                       TXT "This is a test blacklisting3 message"
164 15.12.11.V4NET.rbl3   A   127.0.0.3
165                       TXT "This is a very long blacklisting message, continuing for ages and ages and certainly being longer than 128 characters which was a previous limit on the length that Exim was prepared to handle."
166
167 20.12.11.V4NET.rbl4   A   127.0.0.6
168 21.12.11.V4NET.rbl4   A   127.0.0.7
169
170 1.13.13.V4NET.rbl     CNAME non-exist.test.ex.
171 2.13.13.V4NET.rbl     A   127.0.0.1
172                       A   127.0.0.2
173
174 ; -------- Testing MX records --------
175
176 mxcased      MX  5  ten-99.TEST.EX.
177
178 ; Points to a host with both A and AAAA
179
180 mx46         MX  46 46.test.ex.
181
182 ; Points to two hosts with both kinds of address, equal precedence
183
184 mx4646       MX  46 46.test.ex.
185              MX  46 46b.test.ex.
186
187 ; Ditto, with a third IPv6 host
188
189 mx46466      MX  46 46.test.ex.
190              MX  46 46b.test.ex.
191              MX  46 v6.test.ex.
192
193 ; This time, change precedence
194
195 mx46466b     MX  46 46.test.ex.
196              MX  47 46b.test.ex.
197              MX  48 v6.test.ex.
198
199 ; Points to a host with a working IPv4 and a non-working IPv6 record
200
201 mx46cd       MX  10 46c.test.ex.
202              MX  11 46d.test.ex.
203
204 ; Two equal precedence pointing to a v4 and a v6 host
205
206 mx246        MX  10 v6.test.ex.
207              MX  10 ten-1.test.ex.
208
209 ; Lowest-numbered points to local host
210
211 mxt1         MX  5  eximtesthost.test.ex.
212
213 ; Points only to non-existent hosts
214
215 mxt2         MX  5  not-exist.test.ex.
216
217 ; Points to some non-existent hosts;
218 ; Lowest numbered existing points to local host
219
220 mxt3         MX  5  not-exist.test.ex.
221              MX  6  eximtesthost.test.ex.
222
223 ; Points to some non-existent hosts;
224 ; Lowest numbered existing points to non-local host
225
226 mxt3r        MX  5  not-exist.test.ex.
227              MX  6  exim.org.
228
229 ; Points to an alias
230
231 mxt4         MX  5  alias-eximtesthost.test.ex.
232
233 ; Various combinations of precedence and local host
234
235 mxt5         MX  5  eximtesthost.test.ex.
236              MX  5  ten-1.test.ex.
237
238 mxt6         MX  5  ten-1.test.ex.
239              MX  6  eximtesthost.test.ex.
240              MX  6  ten-2.test.ex.
241
242 mxt7         MX  5  ten-2.test.ex.
243              MX  6  ten-3.test.ex.
244              MX  7  eximtesthost.test.ex.
245              MX  8  ten-1.test.ex.
246
247 mxt8         MX  5  ten-2.test.ex.
248              MX  6  ten-3.test.ex.
249              MX  7  eximtesthost.test.ex.
250              MX  7  ten-4.test.ex.
251              MX  8  ten-1.test.ex.
252
253 ; Same host appearing twice; make some variants in different orders to
254 ; simulate a real nameserver and its round robinning
255
256 mxt9         MX  5  ten-1.test.ex.
257              MX  6  ten-2.test.ex.
258              MX  7  ten-3.test.ex.
259              MX  8  ten-1.test.ex.
260
261 mxt9a        MX  6  ten-2.test.ex.
262              MX  7  ten-3.test.ex.
263              MX  8  ten-1.test.ex.
264              MX  5  ten-1.test.ex.
265
266 mxt9b        MX  7  ten-3.test.ex.
267              MX  8  ten-1.test.ex.
268              MX  5  ten-1.test.ex.
269              MX  6  ten-2.test.ex.
270
271 ; MX pointing to IP address
272
273 mxt10        MX  5  V4NET.0.0.1.
274
275 ; Several MXs pointing to local host
276
277 mxt11        MX  5  localhost.test.ex.
278              MX  6  localhost.test.ex.
279
280 mxt11a       MX  5  localhost.test.ex.
281              MX  6  ten-1.test.ex.
282
283 mxt12        MX  5  local1.test.ex.
284              MX  6  local2.test.ex.
285
286 local1       A   127.0.0.2
287 local2       A   127.0.0.2
288
289 ; Some more
290
291 mxt13        MX  4  other1.test.ex.
292              MX  5  other2.test.ex.
293
294 ; Different hosts with same IP addresses in the list
295
296 mxt14        MX  4  ten-5-6.test.ex.
297              MX  5  ten-5.test.ex.
298              MX  6  ten-6.test.ex.
299
300 ; Large number of IP addresses at one MX value, and then some
301 ; at another, to check that hosts_max_try tries the MX different
302 ; values if it can.
303
304 mxt99        MX  1  ten-1.test.ex.
305              MX  1  ten-2.test.ex.
306              MX  1  ten-3.test.ex.
307              MX  1  ten-4.test.ex.
308              MX  1  ten-5.test.ex.
309              MX  1  ten-6.test.ex.
310              MX  3  black-1.test.ex.
311              MX  3  black-2.test.ex.
312
313 ; Special case test for @mx_any (to doublecheck a reported Exim 3 bug isn't
314 ; in Exim 4). The MX points to two names, each with multiple addresses. The
315 ; very last address is the local host. When Exim is testing, it will sort
316 ; these addresses into ascending order.
317
318 mxt98        MX  1  98-1.test.ex.
319              MX  2  98-2.test.ex.
320
321 98-1         A   V4NET.1.2.3
322              A   V4NET.4.5.6
323
324 98-2         A   V4NET.7.8.9
325              A   HOSTIPV4
326
327 ; IP addresses with the same MX value
328
329 mxt97        MX  1  ten-1.test.ex.
330              MX  1  ten-2.test.ex.
331              MX  1  ten-3.test.ex.
332              MX  1  ten-4.test.ex.
333
334 ; MX pointing to a single-component name that exists if qualified, but not
335 ; if not. We use the special name dontqualify to stop the fake resolver
336 ; qualifying it.
337
338 mxt1c        MX  1  dontqualify.
339
340 ; MX with UTF-8 characters in its name
341
342 π           MX  0  mx.π.test.ex.
343
344 ; -------- Testing SRV records --------
345
346 _smtp._tcp.srv01    SRV  0 0 25 ten-1.test.ex.
347
348 _smtp._tcp.srv02    SRV  1 3 99 ten-1.test.ex.
349                     SRV  1 1 99 ten-2.test.ex.
350                     SRV  3 0 66 ten-3.test.ex.
351
352 _smtp._tcp.nosmtp   SRV  0 0 0  .
353
354 _smtp2._tcp.srv03   SRV  0 0 88 ten-4.test.ex.
355
356 _smtp._tcp.srv27    SRV  0 0 PORT_S localhost
357
358
359 ; -------- With some for CSA testing plus their A records -------
360
361 _client._smtp.csa1  SRV  1 2 0  csa1.test.ex.
362 _client._smtp.csa2  SRV  1 1 0  csa2.test.ex.
363
364 csa1         A   V4NET.9.8.7
365 csa2         A   V4NET.9.8.8
366
367 ; End