From: Adam C. <ad...@us...> - 2009-09-27 19:07:42
|
Update of /cvsroot/hcoop/domtool2/src/mail In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv6994/src/mail Modified Files: vmail.sig vmail.sml Log Message: Changes to support IMAP on hopper all compile but are not tested yet Index: vmail.sml =================================================================== RCS file: /cvsroot/hcoop/domtool2/src/mail/vmail.sml,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** vmail.sml 4 Nov 2007 21:21:15 -0000 1.6 --- vmail.sml 27 Sep 2009 19:07:34 -0000 1.7 *************** *** 1,4 **** (* HCoop Domtool (http://hcoop.sourceforge.net/) ! * Copyright (c) 2006, Adam Chlipala * * This program is free software; you can redistribute it and/or --- 1,4 ---- (* HCoop Domtool (http://hcoop.sourceforge.net/) ! * Copyright (c) 2006-2009, Adam Chlipala * * This program is free software; you can redistribute it and/or *************** *** 21,25 **** structure Vmail :> VMAIL = struct ! fun rebuild () = Slave.shell [Config.Courier.postReload] datatype listing = --- 21,63 ---- structure Vmail :> VMAIL = struct ! open MsgTypes ! ! fun rebuild () = ! let ! fun doNode (site, ok) = ! (print ("New vmail data for node " ^ site ^ "\n"); ! if site = Config.defaultNode then ! Slave.shell [Config.Courier.postReload] andalso ok ! else let ! val bio = OpenSSL.connect true (Domain.get_context (), ! Domain.nodeIp site ! ^ ":" ! ^ Int.toString Config.slavePort) ! in ! Msg.send (bio, MsgVmailChanged); ! (case Msg.recv bio of ! NONE => (print "Slave closed connection unexpectedly\n"; ! false) ! | SOME m => ! case m of ! MsgOk => (print ("Slave " ^ site ^ " finished\n"); ! ok) ! | MsgError s => (print ("Slave " ^ site ! ^ " returned error: " ^ ! s ^ "\n"); ! false) ! | _ => (print ("Slave " ^ site ! ^ " returned unexpected command\n"); ! false)) ! before OpenSSL.close bio ! end) ! in ! Slave.shell [Config.Courier.pushUserdb] ! andalso foldl doNode true Config.mailNodes_all ! end ! ! fun doChanged () = ! Slave.shell [Config.Courier.pullUserdb] ! andalso Slave.shell [Config.Courier.postReload] datatype listing = *************** *** 30,34 **** let val file = OS.Path.joinDirFile {dir = Config.Courier.userdbDir, ! file = domain} in if Posix.FileSys.access (file, []) then --- 68,72 ---- let val file = OS.Path.joinDirFile {dir = Config.Courier.userdbDir, ! file = domain} in if Posix.FileSys.access (file, []) then Index: vmail.sig =================================================================== RCS file: /cvsroot/hcoop/domtool2/src/mail/vmail.sig,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** vmail.sig 23 Dec 2006 21:50:40 -0000 1.4 --- vmail.sig 27 Sep 2009 19:07:34 -0000 1.5 *************** *** 39,43 **** val rm : {domain : string, user : string} -> string option ! end --- 39,43 ---- val rm : {domain : string, user : string} -> string option ! val doChanged : unit -> bool end |