In unmigrated members view, list balances and count number that are negative
[hcoop/zz_old/portal.git] / vmailpasswd / pass.sml
CommitLineData
893fd779 1structure Pass :> PASS =
2struct
3
4fun validEmail email =
5 case String.fields (fn ch => ch = #"@") email of
6 [_, dom] => dom <> "localhost"
7 | _ => false
8
9val vmp = "/usr/local/bin/vmailpasswd"
10
11fun 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
24end