Web app shortcuts
[hcoop/domtool2.git] / lib / mailman.dtl
index 2cf0445..df935be 100644 (file)
@@ -3,3 +3,36 @@
 extern val mailmanWebHost : domain -> [Domain];
 {{Set the hostname of the web site for administration of mailing lists for this
   domain.}}
+
+extern type mailman_web_node;
+{{Like <tt>web_node</tt>, but with the possibility of using some additional
+  nodes set by the admins.}}
+
+extern val mailman_web_node : mailman_web_node;
+{{The default location for Mailman web interfaces}}
+
+extern val mailman_web_node_to_node : mailman_web_node -> node;
+
+extern val mailmanVhost : host -> [Domain]
+       {MailmanWebNodes : [mailman_web_node],
+        SSL : ssl,
+        User : your_user};
+{{Create an Apache virtual host to serve as the web interface for some Mailman
+  lists.}}
+
+val mailman = \ host : (host) -> begin
+  let
+    domainHost host;
+  in
+    dnsIP host (ip_of_node (mailman_web_node_to_node mailman_web_node));
+    mwh <- Hostname;
+    mailmanWebHost mwh;
+    mailmanVhost host where
+      MailmanWebNodes = [mailman_web_node];
+      SSL = no_ssl
+    end
+  end
+end;
+{{The most common Mailman config, for when you want to have a virtual host of your
+  domain dedicated to a Mailman interface.  Provide the name of that host (e.g.,
+  "lists") to this directive, and it will take care of the rest.}}