Add default DNS mappings
[hcoop/domtool2.git] / lib / easy_domain.dtl
1 {{The most common kinds of domain configuration}}
2
3 val default_node : (node) = "mire";
4 val web_node : (web_node) = "mire";
5
6 val webAt =
7 \ n : (web_node) ->
8 \ host : (host) ->
9 \\ config : Vhost ->
10 (dns (dnsA host (ip_of_node (web_node_to_node n)));
11
12 vhost host where
13 WebNodes = [n]
14 with
15 config
16 end);
17
18 val web = webAt web_node;
19
20 val dom =
21 \ d : (your_domain) ->
22 \\ config : Domain ->
23 domain d with
24 dns (dnsNS "deleuze.hcoop.net");
25 dns (dnsNS "mire.hcoop.net");
26
27 dns (dnsDefaultA (ip_of_node default_node));
28
29 handleMail;
30 mailbox <- Mailbox;
31 catchAllAlias mailbox;
32
33 web "www" with
34 end;
35
36 config
37 end;
38
39 val nameserver = \host -> dns (dnsNS host);
40 val dnsIP = \from -> \to -> dns (dnsA from to);
41 val dnsMail = \num -> \host -> dns (dnsMX num host);
42 val dnsAlias = \from -> \to -> dns (dnsCNAME from to);