Commit Graph

483 Commits

Author SHA1 Message Date
Manos Pitsidianakis
34ed9e2014
conf: set mailbox autoload default to false 2020-06-22 11:31:43 +03:00
Manos Pitsidianakis
1db2c16f95
mbox: add support for multiple mbox mailboxes in config
Concerns #9
2020-06-20 14:49:02 +03:00
Manos Pitsidianakis
674073899d
mbox: Add different readers for mbox{o,rd,cl,cl2} 2020-06-20 13:14:40 +03:00
Manos Pitsidianakis
01d83d8088
email/parser: do not set has_colon newline
When parsing a field-name, and expecting a colon (:) if a newline is
first encountered do not set `has_colon` flag to true.
2020-06-20 13:14:40 +03:00
Manos Pitsidianakis
8bfdce6658
melib/error: do not discard old summary in set_summary 2020-06-20 13:14:40 +03:00
Manos Pitsidianakis
75f9256a50
email/parser: change Error type to include error location
Add ParsingError type that includes a string with the location and
possibly an explanation for the error.
2020-06-20 13:14:40 +03:00
Manos Pitsidianakis
40f66f3333
imap: modify connection timeouts 2020-06-11 12:00:07 +03:00
Manos Pitsidianakis
34d782f16f
imap: Remove panic from fetch_flags 2020-06-11 11:44:04 +03:00
Manos Pitsidianakis
c7fbc5cafb
imap: remove redundant passing of AccountHash 2020-06-11 11:43:18 +03:00
Manos Pitsidianakis
2d862e39f4
imap: off by one error in iteration 2020-06-11 11:42:02 +03:00
Manos Pitsidianakis
2d3f49d64d
imap: index by (MailboxHash, UID) instead of just UID
Mailboxes can share UIDs.
2020-06-11 11:41:08 +03:00
Manos Pitsidianakis
ca9d4fde58
Discard EnvelopeRename event if envelope is missing from Collection 2020-06-09 15:38:13 +03:00
Manos Pitsidianakis
f3d5edfe14
Add copy/move to other account operations 2020-06-08 22:11:43 +03:00
Manos Pitsidianakis
5435a4615e
imap: don't try to connect in is_online()
Attempting to connect to the server when calling imap's is_online()
blocks the UI process, so don't.
2020-06-07 14:35:41 +03:00
Manos Pitsidianakis
b4dfc1f89d
imap: add experimental header caching with sqlite3
Add support for header caching. It is currently unstable and should not
be used. It can be turned on by specifying "X_header_caching" to true in
the IMAP account's configuration.

The header cache is saved in a sqlite3 database in your XDG_DATA_DIR,
for example:

  /home/epilys/.local/share/meli/17328072387188469646_header_cache.db

Concerns #31 https://git.meli.delivery/meli/meli/issues/31
2020-06-07 14:35:20 +03:00
Manos Pitsidianakis
6ec249dd7f
melib: update nom dependency from 3.2.0 to 5.1.1
That was hecking exhausting
2020-06-06 23:19:07 +03:00
Manos Pitsidianakis
db4c401828
melib/error: add chain_err_summary() method 2020-06-06 12:27:02 +03:00
Manos Pitsidianakis
e4d4cd55d3
melib: skip mbox From header if present
mbox messages might end up in the parser by mistake, for example by
being present in a Maildir store.
2020-06-06 12:24:39 +03:00
Manos Pitsidianakis
8c1c628c2c
melib: fix non-unicode encode_header() char boundary issue 2020-06-05 10:56:35 +03:00
Manos Pitsidianakis
84976b1dc9
Update libloading dependency to 0.6.2 2020-06-05 10:56:35 +03:00
Manos Pitsidianakis
b3b9563db0
LineBreakCandidateIter: make iter non-recursive
A line with lots of graphemes without any breaks can overflow the stack,
so make the recursion into a loop.
2020-05-31 01:08:22 +03:00
Manos Pitsidianakis
6ceed3cae9
sqlite3: move module to melib 2020-05-30 15:37:12 +03:00
Manos Pitsidianakis
815ff98acc
imap: add smarter untagged reply detection 2020-05-30 14:43:44 +03:00
Manos Pitsidianakis
2c45c39048
ShellExpandTrait: fix for non-linux targets 2020-05-30 14:09:54 +03:00
Manos Pitsidianakis
e4a1ab8a09
Fix rustfmt suggestions 2020-05-29 20:43:39 +03:00
Manos Pitsidianakis
0a83b99e7c
Update nix, linkify, uuid dependencies 2020-05-29 15:59:47 +03:00
Manos Pitsidianakis
b8261ee36a
Overhaul input thread
Remove raw/non raw distinction.

Use a pipe for input thread commands and poll stdin/pipe for events
2020-05-29 15:43:05 +03:00
Manos Pitsidianakis
bea0ca61f5
maildir: conditionally accept invalid subdirs
If directory is invalid (i.e. has no {cur,new,tmp} subfolders), accept
 it ONLY if it contains subdirs of any depth that are valid maildir
 paths.

For example, this change will accept the following directory tree:
```
  invalid_maildir
  └── valid_maildir
      ├── cur
      ├── new
      └── tmp
```
2020-05-28 21:02:49 +03:00
Manos Pitsidianakis
bd404e6937
Execute user shell commands with /bin/sh
Execute user provided command invocations $CMD such as `editor_cmd` with
`/bin/sh` as `/bin/sh -c "$CMD"

Previously, user commands were split by whitespace which must trigger
erroneous behavior if quotes are involved.
2020-05-28 21:02:49 +03:00
Manos Pitsidianakis
bfff0e4feb
conf: add options for logging
Add options for log file location and maximum log level. Also add
manpage entries for these options in `meli.conf.5`
2020-05-28 21:02:49 +03:00
Manos Pitsidianakis
671d473894
email/parser: avoid slice index panic if slice is empty 2020-05-19 13:01:09 +03:00
Manos Pitsidianakis
fb2bb74c5c
Remove std::dbg! use 2020-05-19 12:55:22 +03:00
Manos Pitsidianakis
3ce4772251
datetime: fix unupdated tests 2020-05-16 13:34:59 +03:00
Manos Pitsidianakis
38893a77bd
notmuch: fix invalid flag setting 2020-05-16 13:34:29 +03:00
Manos Pitsidianakis
595fa8ab95
notmuch: add total message count for mailboxes 2020-05-16 13:33:22 +03:00
Manos Pitsidianakis
68b1feb6c8
melib: add timestamp to debug trace logs 2020-05-16 12:46:01 +03:00
Manos Pitsidianakis
c5fe511d95
notmuch: don't remove tags from tag_index
When removing a tag, we shouldn't also remove it from the tag index.
2020-05-11 21:01:40 +03:00
Manos Pitsidianakis
b2857955e4
notmuch: add NewFlags, Remove and Create events 2020-05-11 21:01:40 +03:00
Manos Pitsidianakis
8648b229ad
Add AccountHash to RefreshEvent
Different accounts might have same inboxes with same MailboxHashes. Use
the hash of the account's name to differentiate.
2020-05-10 22:10:17 +03:00
Manos Pitsidianakis
eb701695f7
Remove fnv crate 2020-05-10 21:18:56 +03:00
Manos Pitsidianakis
b5b9982d9e
notmuch: cache messages by msg-id, not path 2020-05-09 14:32:30 +03:00
Manos Pitsidianakis
3ea1ce5454
errors: add source field to MeliError 2020-05-09 14:32:30 +03:00
Manos Pitsidianakis
d915c4a7c8
text_processing: remove invalid unreachable!() 2020-05-08 14:58:59 +03:00
Manos Pitsidianakis
2c549f5fcb
Refactor comments in notmuch/bindings.rs 2020-05-08 10:54:53 +03:00
Manos Pitsidianakis
2230e5705d
notmuch: LOCK database only when needed
Reported in https://git.meli.delivery/meli/meli/issues/24
2020-05-07 23:11:47 +03:00
Manos Pitsidianakis
b00d3c28c5
parser: fix panic on invalid encoded_word, display_addr
found by cargo-fuzz
2020-05-06 19:11:49 +03:00
Manos Pitsidianakis
5981f98f17
parser: fix panic on invalid message id 2020-05-06 18:58:00 +03:00
Manos Pitsidianakis
f2ecb81612
parser: fix panic on invalid input
Found with cargo-fuzz
2020-05-06 18:47:37 +03:00
Manos Pitsidianakis
5d07a5147b
datetime: fix panic on invalid cstr conversion 2020-05-06 18:46:38 +03:00
Manos Pitsidianakis
330134af5a
maildir: update mailbox unread count on file rename event 2020-05-06 17:38:29 +03:00