forked from meli/meli
1
Fork 0
Commit Graph

919 Commits (master)

Author SHA1 Message Date
Damian Poddebniak 7c33f8999b chore: Use published imap-codec 0.10.0. 2023-07-05 14:46:39 +02:00
Damian Poddebniak 34a54d3c05 docs: Add some `TODO(#222)`s. 2023-07-04 21:32:07 +02:00
Damian Poddebniak 9d51b6bd52 chore: Update `imap-codec`. 2023-07-04 20:56:51 +02:00
Manos Pitsidianakis 7998e1e77e
melib/datetime: add missing LC libc constants for openbsd target_os
Fixes #242

"Compilation failure on master on OpenBSD" #242
2023-07-04 00:23:47 +03:00
Manos Pitsidianakis 619fbef129
melib/thread: recursively calculate update_show_subject()
Walk the entire thread tree and update show_subject collectively when a
new entry is added.
2023-07-03 11:05:16 +03:00
Manos Pitsidianakis 1bcc0bbece
melib/mbox: add mbox parsing test 2023-07-03 11:00:51 +03:00
Manos Pitsidianakis e8e49e741b
melib/mbox: fix wrong per message offset 2023-07-03 11:00:49 +03:00
Manos Pitsidianakis 1dc1d86848
melib/shellexpand: fix infinite loop bug
Introduced in recent "fixing clippy lints" commit
2023-07-03 09:52:03 +03:00
Manos Pitsidianakis ba7f5dce1c
listing/thread: fix display of threaded conversations tree structure
When missing intermediate and/or parent messages in a thread, the
printed thread tree branches were completely invalid. This commit makes
sure thread node entries that have no corresponding envelopes are
accounted for in the tree structure.
2023-07-03 09:46:28 +03:00
Manos Pitsidianakis 5f29faa640
melib: clippy lint fixes 2023-07-03 09:38:47 +03:00
Manos Pitsidianakis f98e36cee5
melib: Replace old-style /*! module doc comments with //! 2023-07-03 09:38:37 +03:00
Manos Pitsidianakis f0d88005fb
melib/email: change message/rfc822 Display repr
Put subject first.
2023-07-03 09:37:56 +03:00
Manos Pitsidianakis e64923eeaa
melib/email/headers/names: fix debug_assert condition
On invalid parsings, _cnt can be equal to probe and chunk len because
the value won't be a valid header
2023-06-22 14:06:39 +03:00
Manos Pitsidianakis f5cfbd32e6
melib/imap: on set_flags, update {un,}seen sets in all mailboxes
Some envelopes might be in several mailboxes, for example in Gmail's
implementation of IMAP.
2023-06-20 13:22:52 +03:00
Manos Pitsidianakis 5699baecfb
melib: add utils::{futures, random} 2023-06-19 10:01:02 +03:00
Manos Pitsidianakis 4da5366959
Remove bincode dep, use serde_json for sqlite3 values 2023-06-17 20:11:12 +03:00
Manos Pitsidianakis fd0faade06
melib/imap: add connection instance id string for debugging in logs
- Add an ID field in ImapConnection and ImapStream that records where
  each instance was created. This is useful for differentiating main
  backend connections from watching thread connections (the ones that
  listen to updates from the IMAP server with IDLE or polling).
- Add an imap_trace! macro that uses log::trace! internally but also
  prepends the connection's ID string to each log line.
2023-06-17 20:11:10 +03:00
Manos Pitsidianakis 8f14a2373e
melib/imap: put imap-codec logic under the imap_backend feature 2023-06-17 20:10:23 +03:00
Damian Poddebniak 330887c4f5
refactor: Introduce imap-codec. 2023-06-17 20:10:21 +03:00
Damian Poddebniak 6c6d9f4b4e
chore: Improve ordering of `flag_impl!`s. 2023-06-17 13:32:45 +03:00
Damian Poddebniak 579372b4a7
chore: Improve readability of `Envelope`.
* Sorted according to RFC.
* Separated IMAP4rev1 and other values.
2023-06-17 13:32:45 +03:00
Manos Pitsidianakis cd85d83324
melib/email: replace timestamp with Date value in message/rfc822 Display 2023-06-13 16:27:35 +03:00
Manos Pitsidianakis e0257c9d8d
Run cargo-sort 2023-06-04 21:13:55 +03:00
Manos Pitsidianakis 27a4dcb916
Fix some rustdoc lints 2023-06-04 21:13:55 +03:00
Manos Pitsidianakis bf615e7d93
melib/thread: check for case when envelope has its own message id in References and In-Reply-To
Emails sent from meli's gitea do this, and it makes them invisible in
thread listings.
2023-06-04 21:13:55 +03:00
Manos Pitsidianakis b92a80a23a
melib/imap: resync even if UIDVALIDITY is missing from cache
I think this is related to #98 meli gets stuck on `set seen' for mail (threads) at random

https://git.meli.delivery/meli/meli/issues/98
2023-06-04 21:13:55 +03:00
Manos Pitsidianakis f8623d4b2c
melib/imap: implement more ResponseCode cases 2023-06-04 21:13:55 +03:00
Manos Pitsidianakis 299c8e0f99
meli: restructure pub use melib::* imports 2023-06-04 21:13:54 +03:00
Manos Pitsidianakis c5ecaceae1
melib/search: fix some search criteria in Query type 2023-06-04 21:13:49 +03:00
Manos Pitsidianakis 6bf1756de8 melib/search: implement more search criteria in Query type 2023-06-04 17:07:06 +03:00
Manos Pitsidianakis 23d95973d4 melib/backends/imap: add search.rs module
Add trait to convert melib::search::Query type to an IMAP appropriate
query string (search criteria).
2023-06-03 22:33:41 +03:00
Manos Pitsidianakis 6388bea9a0 melib/email/headers: fix &[u8] index in HeaderMap 2023-06-03 19:31:09 +03:00
Manos Pitsidianakis d332e4578d
melib/headers: add proper Display impl for HeaderName 2023-05-31 18:22:17 +03:00
Manos Pitsidianakis aebff3d3d9 melib: implement mailto RFC properly
This allows mailto links with `In-Reply-To` parameters to work properly.

PS Mailto links can be used with the `mailto MAILTO_URI` command
2023-05-30 16:52:29 +00:00
Manos Pitsidianakis 235fceaf21 melib: Add standard heeder constants in email::headers
Like `http` crate does
2023-05-30 16:52:29 +00:00
Damian Poddebniak 1eea8bab77 tests: Fix `test_imap_fetch_response`. 2023-05-28 08:32:32 +00:00
Damian Poddebniak 30866f752b chore: Bypass rustfmt bug. 2023-05-25 15:48:19 +02:00
Manos Pitsidianakis cc27639fca
melib/email/compose: use Envelope attachments when editing and don't add already existing headers 2023-05-19 09:21:11 +03:00
Manos Pitsidianakis 91557c2c43
mail/listing.rs: prevent list blank when refreshing account
Mail list would go blank if the currently focused account received a
Status update event.
2023-05-16 19:48:48 +03:00
Manos Pitsidianakis 428f752b20
Remove obsolete crate::components::mail::get_display_name() 2023-05-16 19:22:13 +03:00
Manos Pitsidianakis 8c671935f9
Add compose (pre-submission) hooks for validation/linting
compose-hooks run before submitting an e-mail.
They perform draft validation and/or transformations.
If a hook encounters an error or warning, it will show up as a notification.
The currently available hooks are:
- past-date-warn
  Warn if Date header value is far in the past or future.
- important-header-warn
  Warn if important headers (From, Date, To, Cc, Bcc) are missing or invalid.
- missing-attachment-warn
  Warn if Subject, draft body mention attachments but they are missing.
- empty-draft-warn
  Warn if draft has no subject and no body.

They can be disabled with [composing.disabled_compose_hooks] setting.
2023-05-16 17:31:56 +03:00
Manos Pitsidianakis 85d4316a6a
Replace old logging module with the `log` create 2023-05-01 16:22:35 +03:00
Manos Pitsidianakis b1a7188771
Clippy fixes 2023-04-30 20:47:53 +03:00
Manos Pitsidianakis 39d9c2af3b
melib/smtp: fix test smtp server logic 2023-04-26 12:08:15 +03:00
Manos Pitsidianakis d679a74450
melib/jmap: Implement Bearer token authentication
Fastmail now uses an API token in a http header for authentication.

This can be used either as a server_password or provided by a
server_password_command like oauth2.
2023-04-10 20:58:49 +03:00
Manos Pitsidianakis d9c07def0f
Add command to select charset encoding for email
Open dialog to select charset with `d`.
2023-04-10 11:42:50 +03:00
Manos Pitsidianakis 939dc15e28
Fix melib tests 2023-04-10 11:19:14 +03:00
Manos Pitsidianakis 3adf72aed0
Add support for utf-7 encoding
Closes #175
2023-04-10 10:33:46 +03:00
Johannes Schilling 2447a2cbfe melib/jmap: avoid relying on hardcoded hash values
The hash values seem to have changed in the meantime, or aren't the same
on all environments.
2023-03-09 10:37:58 +02:00
Manos Pitsidianakis d7ec97f03b Small rustfmt change 2023-03-09 10:37:00 +02:00