mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 12:24:38 +03:00
make the setaccountpassword talk through ctl
otherwise, setting a password will block if something has the account open, e.g. any imap connection. so in practice it only worked when mox isn't running.
This commit is contained in:
12
main.go
12
main.go
@ -889,15 +889,13 @@ Any email address configured for the account can be used.
|
||||
}
|
||||
mustLoadConfig()
|
||||
|
||||
acc, _, err := store.OpenEmail(args[0])
|
||||
xcheckf(err, "open account")
|
||||
|
||||
pw := xreadpassword()
|
||||
|
||||
err = acc.SetPassword(pw)
|
||||
xcheckf(err, "setting password")
|
||||
err = acc.Close()
|
||||
xcheckf(err, "closing account")
|
||||
ctl := xctl()
|
||||
ctl.xwrite("setaccountpassword")
|
||||
ctl.xwrite(args[0])
|
||||
ctl.xwrite(pw)
|
||||
ctl.xreadok()
|
||||
}
|
||||
|
||||
func cmdDeliver(c *cmd) {
|
||||
|
Reference in New Issue
Block a user