Commit Graph

446 Commits (815ff98acc73201bfbd079414104169162a0fa0d)

Author SHA1 Message Date
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 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
Manos Pitsidianakis e9a935dbf7
melib: add search method in mail backends 2020-04-05 15:57:05 +03:00
Manos Pitsidianakis 3d7b9ff7cb
Move Query to melib 2020-04-05 15:57:05 +03:00
Manos Pitsidianakis c37d8bd331
imap: add mutex timeout lock and remove unwraps 2020-04-05 15:56:59 +03:00
Manos Pitsidianakis 5842a63e37
melib: ignore Draft body if empty for multipart mail 2020-04-04 19:17:16 +03:00
Manos Pitsidianakis ad2a51891b
melib: print attachment name in Display for text/* 2020-04-04 19:16:35 +03:00
Manos Pitsidianakis 6ccb9d3d75
melib/src/email/address.rs: Fix invalid UTF8 panic
In StrBuilder::display there's an assumption that the string is valid utf-8 but if an email contains an invalid string inside the MIME encoded word part the conversion panics. Change it to a lossy UTF-8 conversion instead. Fixes #19

Reported-By: cycomanic
2020-04-02 08:22:12 +03:00
Manos Pitsidianakis 9afb636894
melib/email: fix whitespace duplication in mime encoding 2020-03-28 11:44:30 +02:00
Manos Pitsidianakis 8eca8b34ed
jmap: fix two error messages 2020-03-28 11:43:32 +02:00
Manos Pitsidianakis c77af98b26
imap: prevent deadlock in operations.rs
imap/operations.rs could deadlock with imap/watch.rs when both lock the
main IMAP connection but both also need to lock UIDStore
2020-03-25 13:12:18 +02:00
Manos Pitsidianakis 5c2b93ee18
jmap: add parser for rfc3339 dates
Reported-by:cycomanic
Concerns #18 https://git.meli.delivery/meli/meli/issues/18
2020-03-24 00:09:40 +02:00
Manos Pitsidianakis 61be6e4c96
notmuch: fix wrong mailbox path in save()
mailbox path was passed to save_to_mailbox() with a cur/ tail and
save_to_mailbox() added an extra cur/ tail
2020-03-18 19:22:17 +02:00
Manos Pitsidianakis 7a770c7f7b
imap: fetch RFC822 instead of RFC822.HEADER
RFC822.HEADER is not parsed in imap/protocol_parser.rs
2020-03-18 19:19:39 +02:00
Manos Pitsidianakis a8c1016f37
Add various logic checks 2020-03-12 09:47:39 +02:00
Manos Pitsidianakis 6ca8c3b964
imap: add server_password_command 2020-03-12 09:45:18 +02:00
Manos Pitsidianakis 1811fb51cb
Fix unused imports/code compiler warnings 2020-03-04 22:11:37 +02:00
Manos Pitsidianakis 651dda67cf
Respect autoload mailbox setting 2020-03-02 12:06:19 +02:00
Manos Pitsidianakis a3600c0cd2
Add `filter` option in mail list
Filter mail in mail list.

Example:
[listing]
filter = "not flags:seen" # show only unseen messages
2020-03-01 20:24:00 +02:00
Manos Pitsidianakis 6c76db2063
Add delete, copy actions for envelopes 2020-03-01 17:48:10 +02:00
Manos Pitsidianakis 6079909f9c
imap: add managesieve connection
So far only the connection is implemented, and using the
testing/manage_sieve binary you can get a shell to a managesieve server.

The managesieve interface will be used in the UI from a plugin, but the
plugin's interface isn't implemented yet.
2020-02-28 15:47:07 +02:00
Manos Pitsidianakis 6b2a1f7757
imap: Don't fail on WouldBlock on ImapBlockingConnection 2020-02-28 09:11:41 +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 33c1bf6558
Add consume newlines flag to phrase() 2020-02-26 15:53:46 +02:00