New database IMAP backend Dbus service without mbsync
A new DBus service will be written that natively supports IMAP and works on a database and exposes a DBus API. The goal is to replace the current mbsync and maildir-based approach and eventually to be more flexible and faster.
Blueprint information
- Status:
- Not started
- Approver:
- None
- Priority:
- Undefined
- Drafter:
- Cris Dywan
- Direction:
- Needs approval
- Assignee:
- Allen Lowe
- Definition:
- Discussion
- Series goal:
- None
- Implementation:
-
Unknown
- Milestone target:
- None
- Started by
- Completed by
Related branches
Related bugs
Sprints
Whiteboard
Features:
Hide Folders, so they're not fetched/ indexed but still listed as hidden folders
^^ Use LSUB and SUBSCRIBE to store this in IMAP so Postler on a second machine gets the same folders hidden
Yahoo!: send ID ("GUID" "1")
^^ 1 capability 2 id 3 login
Transparently handle prefix eg. "INBOX."
Handle folder separator, eg. "~" or "."
Treat identical messages in multiple folders as one
Fetch headers first, then all inbox messages, then remaining folders
One thread per folder
API to return special folder eg. Trash or Queue
XLIST command to automatically find special folders if server supports it
Fetch n messages per folder maximum by default
Fetch every 10 minutes or IDLE if supported
listen to net.connman.
decrypt pgp message body for excerpt? for fulltext search? but never attachments?
Indicator
DockManager
libnotify
DBus API:
AddAccount AccountName, ImapServer, User, Password, SmtpServer, SmtpPort
UpdateAccount AccountName, ImapServer, User, Password, SmtpServer, SmtpPort
^^ add or update gets all folders, Received()
Fetch AccountName
^^ the account name can be * to mean any
signal Received AccountName, Folder, NumberOfUnread, IDs[]
signal Deleted AccountName, Folder, ID
errors?
GetUnreadCount AccountName, Folder → NumberOfUnread
GetMessages AccountName, Folder → IDs
^^ the account name can be * to mean any, folder can be /specialfolder
GetHeaders ID → Headers[]
GetAllHeaders ID → RawHeaders[]
GetBody ID → PipeName
^^ use os.pipe() and return /proc/$
^^ alternative plan: always store raw body in ~/.cache (or ~/.local/share?)
AddMessage AccountName, Folder
MarkRead ID, Read?
MarkImportant ID, Important?
MoveTo ID, AccountName, Folder
GetFolders AccountName → FolderNames[
MapFolder AccountName, Folder, SpecialFolder
AddFolder AccountName, Folder
RenameFolder AccountName, Folder
DeleteFolder AccountName, Folder
sqlite Database:
Columns AccountName, FolderName, SpecialFolderName
Columns AccountName, UID, Subject, From, To, CC, ReplyTo, Flags"Read,
fts3 for fulltext search: http://