(* HCoop Domtool (http://hcoop.sourceforge.net/)
* Copyright (c) 2006, Adam Chlipala
+ * Copyright (c) 2014 Clinton Ebadi <clinton@unknownlamer.org>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
structure SetSA :> SET_SA = struct
+open MsgTypes
+
datatype address =
User of string
| Email of string
fun address (User s) = s ^ "@localhost"
| address (Email s) = s
-fun file addr = OS.Path.joinDirFile {dir = Config.SpamAssassin.addrsDir,
+fun file addr = OS.Path.joinDirFile {dir = Config.SpamAssassin.addrsDb,
file = address addr}
fun query addr = Posix.FileSys.access (file addr, [])
else
OS.FileSys.remove (file addr)
+fun rebuild () =
+ let
+ fun doNode (site, ok) =
+ (print ("New spamassassin data for node " ^ site ^ "\n");
+ Connect.commandWorker (Domain.get_context (), site, MsgSaChanged))
+ in
+ foldl doNode true Config.mailNodes_all
+ end
+
end