Commit Graph

119 Commits (36e29cb6fd00c798ad83e3064e0ff78c8153dced)

Author SHA1 Message Date
Manos Pitsidianakis 36e29cb6fd
Add configurable mailbox sort order
Closes #25

```
     sort_order unsigned integer           (optional) Override sort order on the sidebar for this mailbox.  Example:

                                           [accounts."imap.example.com".mailboxes]
                                             "INBOX" = { index_style = "plain" }
                                             "INBOX/Sent" = { sort_order = 0 }
                                             "INBOX/Drafts" = { sort_order = 1 }
                                             "INBOX/Lists" = { sort_order = 2 }
```
2021-10-31 18:15:39 +02:00
Manos Pitsidianakis 07e166e1fb
melib/error: Add kinds: NotImplemented, NotSupported, OSError 2021-09-05 12:39:15 +03:00
Manos Pitsidianakis 72a2ba20dc
conf/accounts.rs: print info when displaying watch error 2021-09-05 12:38:40 +03:00
Manos Pitsidianakis b49d965695
Fix unused var etc warnings 2021-09-04 16:52:17 +03:00
Manos Pitsidianakis 521f634e7b
melib/nntp: implement NNTP posting 2021-09-04 00:42:19 +03:00
Manos Pitsidianakis 22a64e2d76
melib: Remove unnecessary "pub use" std exports 2021-01-10 01:40:27 +02:00
Manos Pitsidianakis 781a1d0e1b
melib/backends: add collection() method to MailBackend
Keep track of the Collection state in the backend side
2021-01-10 01:31:27 +02:00
Manos Pitsidianakis eca10a5660
melib/backends: add mailbox management events to RefreshEventKind
Add mailbox management events from RFC 5423 Internet Message Store
Events

https://tools.ietf.org/html/rfc5423#page-8
2021-01-08 15:01:38 +02:00
Manos Pitsidianakis 9124ad0ae7
conf/accounts: remove some unnecessary unwraps 2020-12-25 06:10:28 +02:00
Manos Pitsidianakis ed826357a3
Don't unwrap try_recv() on async jobs channels
Job might have been canceled.
2020-12-25 06:10:28 +02:00
Manos Pitsidianakis aa73bd71c3
listing: fix mailbox tree rendering
Indentation value was being interpreted mirrored (raw binary value in
parenthesis):

   0  testing_account (0)
   1   ┣━Archives     (0)
   2   ┃ ┣━2014       (1)
   3   ┃ ┃ ┗━10       (11)
   4   ┃ ┗━2015       (1)
   5     ┃ ┗━05       (10) <- invalid/mirrored
   6   ┣━Drafts       (0)

Should be:

   0  testing_account (0)
   1   ┣━Archives     (0)
   2   ┃ ┣━2014       (1)
   3   ┃ ┃ ┗━10       (11)
   4   ┃ ┗━2015       (1)
   5   ┃   ┗━05       (10)
   6   ┣━Drafts       (0)
2020-11-11 17:14:34 +02:00
Manos Pitsidianakis a34f0aac5b
melib: fix bincode serialization
Previous commit changed bincode deserializes in maildir and sqlite3.rs
from bincode::deserialize_from to using bincode::config::DefaultOptions
and bincode::Options trait's method deserialize_from.

However, these two different deserializes use a different default
settings: https://github.com/servo/bincode/issues/348

Specifically, varint encoding for integers is the default for
DefaultOptions but not when using bincode::{de,}serialize_* functions.
That means that serialized structs were not able to be deserialized.
This commit makes all {de,}serializations use the DefaultOptions
interface rather than the top level functions.
2020-11-09 00:40:32 +02:00
Manos Pitsidianakis eb36034740
accounts: autoload Sent folders automatically 2020-10-20 23:18:27 +03:00
Manos Pitsidianakis cd68008e67
melib: Implement delete_messages for IMAP, Maildir 2020-10-13 13:57:04 +03:00
Manos Pitsidianakis a4b78532b7
Refactor job structs into JoinHandle
Put oneshot::channel<R> into JoinHandle<R>
2020-10-11 16:53:04 +03:00
Manos Pitsidianakis a2f11c341d
compose: add async draft filter stack in sending mail
Add a stack of "filter" closures that edit a draft before sending it.
Add PGP signing filter. An encryption filter will be added in a future
commit.
2020-10-11 16:53:04 +03:00
Manos Pitsidianakis baa44109f2
melib/thread: "merge" duplicate messages in threads 2020-09-20 15:00:03 +03:00
Manos Pitsidianakis fba69d1e5d
SearchBackend: add Auto variant as default 2020-09-18 21:38:50 +03:00
Manos Pitsidianakis 82cd690005
sqlite3: only update when SearchBackend is sqlite3 2020-09-18 21:06:34 +03:00
Manos Pitsidianakis 8eb78ae01b
sidebar: compute mailbox tree only for subscribed mailboxes 2020-09-18 21:06:33 +03:00
Manos Pitsidianakis fbf2b7dc7b
sidebar: add customizable mailbox tree
Concerns #72
2020-09-17 16:49:19 +03:00
Manos Pitsidianakis 005c879a12
accounts: remove job timeout 2020-09-16 15:17:48 +03:00
Manos Pitsidianakis 8a8c790f8c
accounts: fix blocking jobs not spawning on blocking workers 2020-09-16 15:17:48 +03:00
Manos Pitsidianakis e60eb23f4d
statustab: show active jobs 2020-09-16 15:17:48 +03:00
Manos Pitsidianakis 17a4ccdcbc
melib/imap: perform reconnect on IDLE failure 2020-09-14 19:32:43 +03:00
Manos Pitsidianakis fadf20d7b1
NotificationType: add melib::ErrorKind 2020-09-13 15:23:14 +03:00
Manos Pitsidianakis 46e3bb8074
conf/accounts: call is_online if Refresh job fails 2020-09-13 00:03:12 +03:00
Manos Pitsidianakis 4829e13c47
melib/maildir: impl copy_messages for Maildir 2020-09-11 17:02:27 +03:00
Manos Pitsidianakis f05dd379ae
Send NewJob event on all job startups 2020-09-10 21:19:38 +03:00
Manos Pitsidianakis 1ac3a7a903
Make dbus dependency optional
Put dbus dependency behing `dbus-notifications` feature.
2020-09-10 21:19:38 +03:00
Manos Pitsidianakis 8f46c4ebe7
Small fixes 2020-08-27 17:29:27 +03:00
Manos Pitsidianakis f02dde46da
melib/error:Add ErrorKind::Timeout
Timeout errors lead to automatic restart of connections without
bothering the user about the details, compared to actual network errors.
2020-08-26 20:01:39 +03:00
Manos Pitsidianakis 25b325dbda
Keep bytes copy in SaveMessage job in case of failure 2020-08-26 20:00:25 +03:00
Manos Pitsidianakis ca0f37e1f3
Send AccountStatusChange event on receiving mailboxes 2020-08-26 19:59:27 +03:00
Manos Pitsidianakis 843616221e
Add logging level to Generic jobs
Not every job success should be shown to the user, for example updating
the sqlite3 database. So introduce a level to only show relevant
notifications.
2020-08-26 19:17:54 +03:00
Manos Pitsidianakis c6f11fb592
melib: update notify to 4.0.15 2020-08-26 19:17:54 +03:00
Manos Pitsidianakis 4217839155
melib/email: remove Envelope::from_token 2020-08-26 00:54:07 +03:00
Manos Pitsidianakis 9e9be0b5f3
Remove block_on from mailbox creation/deletion 2020-08-26 00:54:07 +03:00
Manos Pitsidianakis b545a0b905
Show error if watch job fails 2020-08-26 00:54:07 +03:00
Manos Pitsidianakis fc25c7b165
Fix compiler warnings 2020-08-26 00:54:07 +03:00
Manos Pitsidianakis 53e924eb33
Add edit envelope action back as async 2020-08-26 00:54:06 +03:00
Manos Pitsidianakis 3eadaba34e
Replace old pseudo-async code with blocking rust async 2020-08-26 00:54:06 +03:00
Manos Pitsidianakis a190805384
melib/backends: Add BackendEvent enum 2020-08-26 00:54:06 +03:00
Manos Pitsidianakis 8a6bf3b217
Preserve Account order from configuration file
Use IndexMap to preserve the order of accounts in the UI from the
account definitions.
2020-08-26 00:54:05 +03:00
Manos Pitsidianakis b9e53a7451
melib/smtp: add recipient argument in mail_transaction() 2020-08-16 15:16:27 +03:00
Manos Pitsidianakis fe4dae12df
listing/*: show MailboxEntry::status() when length is 0
Show the MailboxEntry::status() string when self.length == 0, instead of
"MAILBOX is empty".
2020-08-07 00:39:17 +03:00
Manos Pitsidianakis c88eac1cc5
melib/jmap: implement search
Closes #59
2020-08-06 19:46:46 +03:00
Manos Pitsidianakis c5d0a6c3b6
conf/accounts.rs: don't retry connect on auth error 2020-08-02 00:46:37 +03:00
Manos Pitsidianakis ec0153e7b2
melib: add protocol extension info in MailBackendCapabilities 2020-08-02 00:22:15 +03:00
Manos Pitsidianakis 44fdc0765e
conf/accounts.rs: add 30s job timeout 2020-07-29 14:27:43 +03:00