mirror of
https://github.com/mjl-/mox.git
synced 2025-07-19 03:26:37 +03:00
imapserver: implement NOTIFY extension from RFC 5465
NOTIFY is like IDLE, but where IDLE watches just the selected mailbox, NOTIFY can watch all mailboxes. With NOTIFY, a client can also ask a server to immediately return configurable fetch attributes for new messages, e.g. a message preview, certain header fields, or simply the entire message. Mild testing with evolution and fairemail.
This commit is contained in:
@ -118,7 +118,7 @@ func (t readerSizeSyncliteral) xwriteTo(c *conn, xw io.Writer) {
|
||||
lit = "~"
|
||||
}
|
||||
fmt.Fprintf(xw, "%s{%d}\r\n", lit, t.size)
|
||||
defer c.xtrace(mlog.LevelTracedata)()
|
||||
defer c.xtracewrite(mlog.LevelTracedata)()
|
||||
if _, err := io.Copy(xw, io.LimitReader(t.r, t.size)); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
@ -143,7 +143,7 @@ func (t readerSyncliteral) xwriteTo(c *conn, xw io.Writer) {
|
||||
panic(err)
|
||||
}
|
||||
fmt.Fprintf(xw, "{%d}\r\n", len(buf))
|
||||
defer c.xtrace(mlog.LevelTracedata)()
|
||||
defer c.xtracewrite(mlog.LevelTracedata)()
|
||||
xw.Write(buf)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user