Commit | Line | Data |
---|---|---|
393a4193 AC |
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 | ||
393a4193 AC |
9 | fun change (email, old, new) = |
10 | let | |
abcc3395 | 11 | val cmd = String.concat ["/usr/bin/sudo /usr/local/bin/vmailpasswd \"", |
393a4193 AC |
12 | String.toString email, |
13 | "\" \"", | |
14 | String.toString old, | |
15 | "\" \"", | |
16 | String.toString new, | |
9a4c122a | 17 | "\" >/dev/null 2>/dev/null"] |
393a4193 AC |
18 | in |
19 | OS.Process.isSuccess (OS.Process.system cmd) | |
20 | end | |
21 | ||
22 | end |