Drop Ed25519 SSHFP records
[exim-dns.git] / templates.lua
1 --     
2 -- File: templates.lua
3 --
4
5 function google_app(domain, ttl)
6   local ttl = ttl or 28800
7   
8   -- Configure mail exchangers
9   mx(domain, 'aspmx.l.google.com',      10, ttl)
10   mx(domain, 'alt1.aspmx.l.google.com', 20, ttl)
11   mx(domain, 'alt2.aspmx.l.google.com', 20, ttl)
12   mx(domain, 'aspmx2.googlemail.com',   30, ttl)
13   mx(domain, 'aspmx3.googlemail.com',   30, ttl)
14   mx(domain, 'aspmx4.googlemail.com',   30, ttl)
15   mx(domain, 'aspmx5.googlemail.com',   30, ttl)
16   
17   -- Additional Google Apps records
18   cname(concat('calendar', domain), 'ghs.google.com', ttl)
19   cname(concat('docs',     domain), 'ghs.google.com', ttl)
20   cname(concat('mail',     domain), 'ghs.google.com', ttl)
21   cname(concat('sites',    domain), 'ghs.google.com', ttl)
22   cname(concat('start',    domain), 'ghs.google.com', ttl)
23   
24   -- Configure SPF
25   -- txt(domain, 'v=spf1 a mx include:_spf.google.com ~all', ttl)
26 end
27
28
29
30 function a_and_aaaa(domain, ipv4, ipv6, ttl)
31   local ttl = ttl or 28800
32   
33   a(domain, ipv4, ttl)
34   aaaa(domain, ipv6, ttl)
35 end
36
37
38
39 function values (t)
40     local i = 0
41     return function () i = i + 1; return t[i]  end
42 end