Very early NOTIFY support, hopefully fix -password on Windows

This commit is contained in:
Neil Alexander
2021-07-10 11:42:55 +01:00
parent 4c07013a13
commit 63de5e81e4
8 changed files with 141 additions and 31 deletions

View File

@@ -16,6 +16,7 @@ type Backend struct {
Config *config.Config
Log *log.Logger
Storage storage.Storage
Server *IMAPServer
}
func (b *Backend) Login(conn *imap.ConnInfo, username, password string) (backend.User, error) {
@@ -38,6 +39,26 @@ func (b *Backend) Login(conn *imap.ConnInfo, username, password string) (backend
user := &User{
backend: b,
username: username,
conn: conn,
}
return user, nil
}
/*
func (b *Backend) NotifyNew(id int) error {
b.Server.server.ForEachConn(func(conn server.Conn) {
notify := false
for _, cap := range conn.Capabilities() {
if cap == "NOTIFY" {
notify = true
}
}
if !notify {
return
}
conn.WaitReady()
conn.WriteResp()
})
return nil
}
*/