Change dispatcher principal name to be more consistent with other cases
[hcoop/domtool2.git] / lib / easy_domain.dtl
index 9a1ace5..925802d 100644 (file)
@@ -1,22 +1,43 @@
 {{The most common kinds of domain configuration}}
 
 {{The most common kinds of domain configuration}}
 
-val web_ip : (ip) = "1.2.3.4";
+val default_node : (node) = "mire";
+val web_node : (web_node) = "mire";
+
+val webAt =
+       \ n : (web_node) ->
+       \ host : (host) ->
+       \\ config : Vhost ->
+               (dns (dnsA host (ip_of_node (web_node_to_node n)));
+
+               vhost host where
+                       WebNodes = [n]
+               with
+                       config
+               end);
+
+val web = webAt web_node;
 
 val dom =
        \ d : (your_domain) ->
        \\ config : Domain ->
                domain d with
 
 val dom =
        \ d : (your_domain) ->
        \\ config : Domain ->
                domain d with
-                       dns (dnsNS "ns.hcoop.net");
-                       dns (dnsNS "ns2.hcoop.net");
+                       dns (dnsNS "ns1.hcoop.net");
+                       dns (dnsNS "ns3.hcoop.net");
 
 
-                       dns (dnsA "www" web_ip);
+                       dns (dnsDefaultA (ip_of_node default_node));
 
                        handleMail;
 
                        handleMail;
+                       dns (dnsMX 1 "deleuze.hcoop.net");
                        mailbox <- Mailbox;
                        catchAllAlias mailbox;
 
                        mailbox <- Mailbox;
                        catchAllAlias mailbox;
 
-                       vhost "www" with
+                       web "www" with
                        end;
 
                        config
                end;
                        end;
 
                        config
                end;
+
+val nameserver = \host -> dns (dnsNS host);
+val dnsIP = \from -> \to -> dns (dnsA from to);
+val dnsMail = \num -> \host -> dns (dnsMX num host);
+val dnsAlias = \from -> \to -> dns (dnsCNAME from to);