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