mirror of
https://github.com/mjl-/mox.git
synced 2025-07-12 13:04:38 +03:00
add funtionality to import zip/tgz with maildirs/mboxes to account page
so users can easily take their email out of somewhere else, and import it into mox. this goes a little way to give feedback as the import progresses: upload progress is shown (surprisingly, browsers aren't doing this...), imported mailboxes/messages are counted (batched) and import issues/warnings are displayed, all sent over an SSE connection. an import token is stored in sessionstorage. if you reload the page (e.g. after a connection error), the browser will reconnect to the running import and show its progress again. and you can just abort the import before it is finished and committed, and nothing will have changed. this also imports flags/keywords from mbox files.
This commit is contained in:
@ -647,7 +647,7 @@ func serve(listenerName string, cid int64, tlsConfig *tls.Config, nc net.Conn, x
|
||||
}()
|
||||
|
||||
select {
|
||||
case <-mox.Shutdown:
|
||||
case <-mox.Shutdown.Done():
|
||||
// ../rfc/9051:5381
|
||||
c.writelinef("* BYE mox shutting down")
|
||||
panic(errIO)
|
||||
@ -777,7 +777,7 @@ func (c *conn) command() {
|
||||
c.cmdMetric = "(unrecognized)"
|
||||
|
||||
select {
|
||||
case <-mox.Shutdown:
|
||||
case <-mox.Shutdown.Done():
|
||||
// ../rfc/9051:5375
|
||||
c.writelinef("* BYE shutting down")
|
||||
panic(errIO)
|
||||
@ -2522,7 +2522,7 @@ func (c *conn) cmdAppend(tag, cmd string, p *parser) {
|
||||
MsgPrefix: msgPrefix,
|
||||
}
|
||||
isSent := name == "Sent"
|
||||
c.account.DeliverX(c.log, tx, &msg, msgFile, true, isSent, true)
|
||||
c.account.DeliverX(c.log, tx, &msg, msgFile, true, isSent, true, false)
|
||||
})
|
||||
|
||||
// Fetch pending changes, possibly with new UIDs, so we can apply them before adding our own new UID.
|
||||
@ -2572,7 +2572,7 @@ wait:
|
||||
case changes := <-c.comm.Changes:
|
||||
c.applyChanges(changes, false)
|
||||
c.xflush()
|
||||
case <-mox.Shutdown:
|
||||
case <-mox.Shutdown.Done():
|
||||
// ../rfc/9051:5375
|
||||
c.writelinef("* BYE shutting down")
|
||||
panic(errIO)
|
||||
|
Reference in New Issue
Block a user