In unmigrated members view, list balances and count number that are negative
[hcoop/zz_old/portal.git] / vmailpasswd / pass.sml
1 structure Pass :> PASS =
2 struct
3
4 fun validEmail email =
5 case String.fields (fn ch => ch = #"@") email of
6 [_, dom] => dom <> "localhost"
7 | _ => false
8
9 val vmp = "/usr/local/bin/vmailpasswd"
10
11 fun change (email, old, new) =
12 let
13 val cmd = String.concat ["/usr/local/bin/vmailpasswd \"",
14 String.toString email,
15 "\" \"",
16 String.toString old,
17 "\" \"",
18 String.toString new,
19 "\" >/dev/null 2>/dev/null"]
20 in
21 OS.Process.isSuccess (OS.Process.system cmd)
22 end
23
24 end