mirror of
https://github.com/mjl-/mox.git
synced 2025-01-14 01:06:27 +03:00
imap continuations must have a space after the "+"
prevented at least the gmail/mail (?) android app from appending a sent message to the sent mailbox.
This commit is contained in:
parent
bc62aae0e6
commit
cc4ecf2927
4 changed files with 5 additions and 5 deletions
|
@ -54,7 +54,7 @@ func TestAuthenticatePlain(t *testing.T) {
|
||||||
tc.readstatus("bad")
|
tc.readstatus("bad")
|
||||||
|
|
||||||
tc.cmdf("", "authenticate plain")
|
tc.cmdf("", "authenticate plain")
|
||||||
tc.readprefixline("+")
|
tc.readprefixline("+ ")
|
||||||
tc.writelinef("%s", base64.StdEncoding.EncodeToString([]byte("\u0000mjl@mox.example\u0000testtest")))
|
tc.writelinef("%s", base64.StdEncoding.EncodeToString([]byte("\u0000mjl@mox.example\u0000testtest")))
|
||||||
tc.readstatus("ok")
|
tc.readstatus("ok")
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,7 +23,7 @@ func TestIdle(t *testing.T) {
|
||||||
// todo: test with delivery through smtp
|
// todo: test with delivery through smtp
|
||||||
|
|
||||||
tc2.cmdf("", "idle")
|
tc2.cmdf("", "idle")
|
||||||
tc2.readprefixline("+")
|
tc2.readprefixline("+ ")
|
||||||
done := make(chan error)
|
done := make(chan error)
|
||||||
go func() {
|
go func() {
|
||||||
defer func() {
|
defer func() {
|
||||||
|
|
|
@ -566,7 +566,7 @@ func (c *conn) readCommand(tag *string) (cmd string, p *parser) {
|
||||||
|
|
||||||
func (c *conn) xreadliteral(size int64, sync bool) string {
|
func (c *conn) xreadliteral(size int64, sync bool) string {
|
||||||
if sync {
|
if sync {
|
||||||
c.writelinef("+")
|
c.writelinef("+ ")
|
||||||
}
|
}
|
||||||
buf := make([]byte, size)
|
buf := make([]byte, size)
|
||||||
if size > 0 {
|
if size > 0 {
|
||||||
|
@ -2541,7 +2541,7 @@ func (c *conn) cmdAppend(tag, cmd string, p *parser) {
|
||||||
c.xmailbox(tx, name, "TRYCREATE")
|
c.xmailbox(tx, name, "TRYCREATE")
|
||||||
})
|
})
|
||||||
if sync {
|
if sync {
|
||||||
c.writelinef("+")
|
c.writelinef("+ ")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Read the message into a temporary file.
|
// Read the message into a temporary file.
|
||||||
|
|
|
@ -512,7 +512,7 @@ func TestScenario(t *testing.T) {
|
||||||
tc.transactf("ok", "append inbox (\\seen) {%d+}\r\n%s", len(exampleMsg), exampleMsg)
|
tc.transactf("ok", "append inbox (\\seen) {%d+}\r\n%s", len(exampleMsg), exampleMsg)
|
||||||
tc.transactf("no", "append bogus () {%d}", len(exampleMsg))
|
tc.transactf("no", "append bogus () {%d}", len(exampleMsg))
|
||||||
tc.cmdf("", "append inbox () {%d}", len(exampleMsg))
|
tc.cmdf("", "append inbox () {%d}", len(exampleMsg))
|
||||||
tc.readprefixline("+")
|
tc.readprefixline("+ ")
|
||||||
_, err := tc.conn.Write([]byte(exampleMsg + "\r\n"))
|
_, err := tc.conn.Write([]byte(exampleMsg + "\r\n"))
|
||||||
tc.check(err, "write message")
|
tc.check(err, "write message")
|
||||||
tc.response("ok")
|
tc.response("ok")
|
||||||
|
|
Loading…
Reference in a new issue