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