mirror of
https://github.com/neilalexander/yggmail.git
synced 2026-05-06 11:56:31 +03:00
Very early NOTIFY support, hopefully fix -password on Windows
This commit is contained in:
@@ -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
|
||||
}
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user