extern type mail_node;
{{A node offering SMTP services}}
-extern val mail_node_to_node : mail_node -> node;
\ No newline at end of file
+extern val mail_node_to_node : mail_node -> node;
+
+extern val domainHost : host -> [Domain] {} => { Hostname : domain };
+{{Appends the current domain onto a host.}}
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
+ dnsIP host (ip_of_node (mailman_web_node_to_node mailman_web_node));
+ domainHost host;
+ mwh <- Hostname;
+ mailmanWebHost mwh;
+ mailmanVhost host where
+ MailmanWebNodes = [mailman_web_node];
+ SSL = no_ssl
+ 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.}}
heading = "DNS SOA",
showEmpty = false}])
+val () = Env.registerAction ("domainHost",
+ fn (env, [(EString host, _)]) =>
+ SM.insert (env, "Hostname",
+ (EString (host ^ "." ^ currentDomain ()), dl))
+ | (_, args) => Env.badArgs ("domainHost", args))
+
end
val registerPost : (unit -> unit) -> unit
(* Register a callback for the end of a vhost block. *)
+ val doPre : {user : string, nodes : string list, id : string, hostname : string} -> unit
+ val doPost : unit -> unit
+
val registerAliaser : (string -> unit) -> unit
(* Register a callback for an alternate hostname that is configured. *)
post := (fn () => (old (); f ()))
end
+fun doPre x = !pre x
+fun doPost () = !post ()
+
val aliaser = ref (fn _ : string => ())
fun registerAliaser f =
let
val dl = ErrorMsg.dummyLoc
+val () = Env.registerFunction ("mailman_web_node",
+ fn [] => SOME (EString Config.Mailman.node, dl)
+ | _ => NONE)
+
+val () = Env.registerFunction ("mailman_web_node_to_node",
+ fn [e] => SOME e
+ | _ => NONE)
+
val () = Defaults.registerDefault
("MailmanWebNodes",
(TList (TBase "mailman_web_node", dl), dl),
print " Order allow,deny\n";
print " Allow from all\n";
print " </Directory>\n";
+
+ Apache.doPre {user = user, nodes = nodes, id = vhostId, hostname = fullHost};
+
print "</VirtualHost>\n";
- TextIO.closeOut file
+ TextIO.closeOut file;
+
+ Apache.doPost ()
end) nodes
end)
end
| EVar x =>
(case lookupEquation G x of
- NONE => eAll
+ NONE =>
+ (case function x of
+ NONE => eAll
+ | SOME f => case f [] of
+ NONE => eAll
+ | SOME e' => reduceExp G e')
| SOME e => reduceExp G e)
| EApp (e1, e2) =>
let