Manos Pitsidianakis
e9a935dbf7
melib: add search method in mail backends
2020-04-05 15:57:05 +03:00
Manos Pitsidianakis
1811fb51cb
Fix unused imports/code compiler warnings
2020-03-04 22:11:37 +02:00
Manos Pitsidianakis
6c76db2063
Add delete, copy actions for envelopes
2020-03-01 17:48:10 +02:00
Manos Pitsidianakis
ca51077f53
imap: Add support for untagged FETCH (FLAG.. messages
...
IDLE connection can get untagged "* FETCH (FLAGS ({flag_list))" messages
if any client has changed flags. Support this refresh event.
2020-02-28 09:09:43 +02:00
Manos Pitsidianakis
c1a64d6c33
Add imports in tag_hash macro
2020-02-28 09:04:01 +02:00
Manos Pitsidianakis
303c530488
Load libnotmuch dynamically
2020-02-26 14:18:00 +02:00
Manos Pitsidianakis
4ac52d9d5b
Replace every use of Folder with Mailbox
...
Use Mailbox for consistency.
2020-02-26 10:54:10 +02:00
Manos Pitsidianakis
499fd59c6e
melib/imap: implement refresh()
2020-02-25 22:15:13 +02:00
Manos Pitsidianakis
f38d03e43a
melib: {create,delete}_folder returns updated folders
...
Potential parent folders will have their children fields updated, so
just return all folders.
2020-02-25 22:15:13 +02:00
Manos Pitsidianakis
f208948651
melib: add mailbox delete/create to IMAP
2020-02-08 23:54:14 +02:00
Manos Pitsidianakis
5dc477bcd5
Fix some unused etc warnings
2020-01-27 17:32:12 +02:00
Manos Pitsidianakis
7f8c638361
melib/imap: add mailbox creation ability
2020-01-20 15:58:59 +02:00
Manos Pitsidianakis
7eceef93e9
melib/backends: remove folder_operation
...
folder_operation functionalities will go to BackendFolder trait
2019-12-18 15:43:30 +02:00
Manos Pitsidianakis
2b6f6ab42c
melib: Add BackendFolder methods, move special usage logic to backend
...
- add count() method to return (unseen, total) counts
- add is_subscribed()
- add set_special_usage() and set_is_subscribed()
concerns #8
2019-12-18 08:58:49 +02:00
Manos Pitsidianakis
8f63572584
Small refactors to avoid implicit unwrap() panics
2019-12-15 19:47:42 +02:00
Manos Pitsidianakis
0201241786
melib/backends: MailBackend::refresh() returns Result
...
Handle cases were refresh() would fail properly. Fixes a crash reported in #13
2019-12-15 08:55:08 +02:00
Manos Pitsidianakis
65efb23f14
melib/MailBackend: add refresh() method
...
Initiate refresh manually.
2019-12-14 18:58:59 +02:00
Manos Pitsidianakis
d2b4057b7b
melib/MailBackend: add connect() method
2019-12-14 18:58:55 +02:00
Manos Pitsidianakis
2e38ea11e2
melib: make MailBackend::is_online() return Result<()>
...
Return Result<()> instead of bool to indicate connection status in order
to be able to show errors to user.
2019-12-14 18:57:52 +02:00
Manos Pitsidianakis
aa9a6a3128
melib: add SpecialUseMailbox::detect_usage method
2019-12-13 00:04:59 +02:00
Manos Pitsidianakis
a43f6919cc
JMAP WIP
2019-12-13 00:04:58 +02:00
Manos Pitsidianakis
81c70b0136
melib: small test cosmetic fixes
2019-12-11 16:07:08 +02:00
Manos Pitsidianakis
6f76cd9acc
melib: add special_usage() method to BackendFolder
...
Eventually after loading potential usage values from configuration,
backends will be able to change the usage values themselves. IMAP and
JMAP have the ability to set Mailbox roles (IMAP needs LIST-SPECIAL
extension
2019-12-11 00:15:36 +02:00
Manos Pitsidianakis
bce97d71bb
testing/imap_conn: update imapconn shell use
2019-12-11 00:07:47 +02:00
Manos Pitsidianakis
0eaf17871a
melib: add set_tags command in BackendOp
2019-12-08 11:25:54 +02:00
Manos Pitsidianakis
9d8d3e09f4
melib: remove unused methods from BackendOp
2019-12-06 12:33:58 +02:00
Manos Pitsidianakis
258b6c8fe8
melib: add tags() method in MailBackend
...
Add tags() method that returns Option<Arc<RwLock<BTreeMap<u64, String>>>>.
The BTreeMap holds available tags in a mail backend and uses the tag's
hash as key.
The method returns an Option because not all backends may support
tagging.
2019-11-30 17:37:00 +02:00
Manos Pitsidianakis
ba52c59859
bin: add backend specific validation functions for --test-config flag
2019-11-27 17:42:11 +02:00
Manos Pitsidianakis
41a678c6ef
melib: make MailBackend::folders return Result
...
Change folders() signature:
- fn folders(&self) -> FnvHashMap<FolderHash, Folder>;
+ fn folders(&self) -> Result<FnvHashMap<FolderHash, Folder>>;
Imap may not be online, therefore we need the ability to return an
error.
2019-11-23 17:47:24 +02:00
Manos Pitsidianakis
321be8555f
Cleanup startup error exit paths
...
Make startup methods return Results so that the main binary can exit
cleanly instead of using std::process::exit from arbitrary positions,
which exits the process immediately and doesn't run destructors.
2019-11-16 00:33:22 +02:00
Manos Pitsidianakis
77936e0cd5
melib: add notmuch backend
...
Missing:
- Watching for updates functionality
- Using tags
- Search
2019-11-15 22:56:45 +02:00
Manos Pitsidianakis
7463248da8
melib: change BackendOp::set_flag() signature
2019-11-15 21:32:55 +02:00
Manos Pitsidianakis
8f36678abf
melib: make Backendfolder::children return slice
2019-11-14 17:55:24 +02:00
Manos Pitsidianakis
5761f854e2
melib: Add FolderPermissions
...
permissions() method on BackendFolder and SetPermissions in
FolderOperation enum.
2019-11-11 00:47:23 +02:00
Manos Pitsidianakis
f56b89dde3
melib: add as_any() method to MailBackend trait
...
Cast the trait object into an &Any object. Then we can downcast it to
its actual type with downcast_ref().
2019-11-08 15:13:42 +02:00
Manos Pitsidianakis
d926cadc4d
melib: remove argument from MailBackend operation()
...
The operation() method on the MailBackend trait returns a trait object
that can read or modify an Envelope directly from the backend. This is
used to get eg the envelope's text, or set flags. It has two arguments,
envelope hash and folder hash.
Only the Maildir backend needed the latter argument, and it can be replaced with a dictionary to match envelope hashes to folder hashes within the Maildir backend.
2019-11-08 15:13:41 +02:00
Manos Pitsidianakis
e5b6faf6bd
Add account online status
...
Add a boolean field to accounts that states if the account can be
accessed. Local backends (Maildir/mbox) return true every time, but
remote backends (IMAP) may not. Accounts start as offline and then get
initialised when their status goes to online. Right now if an IMAP
account startup but later get offline, there are crashes. With this
change the account can be switched back to offline when that happens.
2019-10-24 20:30:17 +03:00
Manos Pitsidianakis
6e75160b70
melib: turn unicode algos and backends into features
2019-09-21 21:29:33 +03:00
Manos Pitsidianakis
f394fde143
add priority and info to jobs and workers
...
jobs now have a priority given to them, in order to parse some mailboxes
(eg INBOX, Sent) first.
worker threads now can set their names and status
2019-09-15 13:21:14 +03:00
Manos Pitsidianakis
ecb3fd7f3d
Add dyn keyword to Trait objects
...
And fix some unused var warnings as well
2019-09-15 13:21:14 +03:00
Manos Pitsidianakis
c3e3c98fb0
melib: filter subscribed folders in MailBackend::new()
2019-09-15 13:21:14 +03:00
Manos Pitsidianakis
c2c5f2db69
melib: add Failure to RefreshEventKind
2019-09-15 13:21:13 +03:00
Manos Pitsidianakis
0812242f60
Add IMAP backend
...
TODOs: new message events (untagged responses)
2019-09-15 13:21:13 +03:00
Manos Pitsidianakis
dc2184a9de
melib: add Folder operations in mail backends
...
Add following operations in mail backend:
- Create,
- Delete,
- Subscribe,
- Unsubscribe,
- Rename
2019-09-08 11:15:57 +03:00
Manos Pitsidianakis
1328f994f3
Make config objects Serializable with serde
2019-08-25 21:44:19 +03:00
Manos Pitsidianakis
b474b44b10
Add special use semantics for mailboxes
2019-08-25 10:48:01 +03:00
Manos Pitsidianakis
76909a1959
add folder subscriptions
2019-08-25 10:48:01 +03:00
Manos Pitsidianakis
84a042411d
melib: remove unnecessary unsafe impls
2019-08-15 11:30:25 +03:00
Manos Pitsidianakis
38da6c83b9
melib: add read-only support for mbox
2019-07-28 20:20:14 +03:00
Manos Pitsidianakis
a62f1d6c01
add read-only option in accounts
2019-07-18 20:16:51 +03:00
Manos Pitsidianakis
14f1527e61
melib: remove BackendOpGenerator
2019-07-18 20:14:14 +03:00
Manos Pitsidianakis
c6674a294d
melib: unwrap mailbox module
2019-06-10 19:40:50 +03:00