Final touches of go-imap v1 implementation

This commit is contained in:
Michal Horejsek 2020-04-24 10:06:24 +02:00
parent 1998d92432
commit e43bd231ed
4 changed files with 12 additions and 1 deletions

View File

@ -12,6 +12,9 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
### Changed
* GODT-162 User Agent does not contain bridge version, only client in format `client name/client version (os)`
* GODT-258 Update go-imap to v1
* Fix UNSEEN to return sequence number of first unseen message and not count of unseen messages
* INBOX name is never quoted
* GODT-225 Do not send an EXISTS reposnse after EXPUNGE or when nothing changed (fixes rebuild of mailboxes in Outlook for Mac)
* GODT-165 Optimization of RebuildMailboxes
* GODT-282 Completely delete old draft instead moving to trash when user updates draft

View File

@ -126,7 +126,12 @@ func (im *imapMailbox) Status(items []imap.StatusItem) (*imap.MailboxStatus, err
}
dbTotal, dbUnread, dbUnreadSeqNum, err := im.storeMailbox.GetCounts()
l.Debugln("DB: total", dbTotal, "unread", dbUnread, "unreadSeqNum", dbUnreadSeqNum, "err", err)
l.WithFields(logrus.Fields{
"total": dbTotal,
"unread": dbUnread,
"unreadSeqNum": dbUnreadSeqNum,
"err": err,
}).Debug("DB counts")
if err == nil {
status.Messages = uint32(dbTotal)
status.Unseen = uint32(dbUnread)

View File

@ -79,6 +79,7 @@ func (store *Store) imapDeleteMessage(address, mailboxName string, sequenceNumbe
func (store *Store) imapMailboxCreated(address, mailboxName string) {
store.log.WithFields(logrus.Fields{
"address": address,
"mailbox": mailboxName,
}).Trace("IDLE mailbox info")
update := new(imapBackend.MailboxInfoUpdate)
update.Update = imapBackend.NewUpdate(address, "")

View File

@ -1,6 +1,8 @@
Feature: IMAP search messages
Background:
Given there is connected user "user"
# Messages are inserted in opposite way to keep increasing UID.
# Sequence numbers are then opposite than listed above.
Given there are messages in mailbox "INBOX" for "user"
| from | to | cc | subject | read | starred | body |
| john.doe@email.com | user@pm.me | | foo | false | false | hello |