Commit Graph

444 Commits (master)

Author SHA1 Message Date
Manos Pitsidianakis 1e084c1d85
melib: move backends out of the backends module
No reason to have such a deep module tree.
11 months ago
Manos Pitsidianakis 9216e7bc65
melib/connections: add opt id string for tracing 11 months ago
Manos Pitsidianakis 8ecdb6df31
melib/imap: add imap-trace feature 11 months ago
Manos Pitsidianakis b65934facc
melib/nntp: add nntp-trace feature 11 months ago
Manos Pitsidianakis 89c90f224a
melib: add `nntp` feature 11 months ago
Manos Pitsidianakis 4874e30f3c
melib: add smtp-trace feature
If it's enabled, every read/write in an SMTP transaction will be logged
on TRACE level.
11 months ago
Manos Pitsidianakis 8e698cabcf
Fix unreachable-pub and disjoint-capture lint errors 11 months ago
Manos Pitsidianakis bb7e119ade
Add gitea CI workflows 11 months ago
Manos Pitsidianakis 29b43e2c88
melib/datetime: replace mktime with timegm 11 months ago
Manos Pitsidianakis 6280bc75e5
melib/jmap: fix blob download URL formatting 11 months ago
Manos Pitsidianakis 48a10f7241
melib: remove unused BackendOp::fetch_flags() method 11 months ago
Manos Pitsidianakis 0219dc8707
melib/jmap: respect max_objects_in_get when fetching email
Fixes #144
11 months ago
Manos Pitsidianakis c4c245ee19
melib/jmap: respect danger_accept_invalid_certs setting 11 months ago
Manos Pitsidianakis e9cd800f49
melib/nntp: add support for storing read status locally 11 months ago
Manos Pitsidianakis 4e55fbc90d
nntp: add SEEN flag to all envs, since NNTP has no flags 11 months ago
Manos Pitsidianakis d4e605c098
Add tagref source code annotations
Source Code Annotation Tags:

Global tags (in tagref format <https://github.com/stepchowfun/tagref>)
for source code annotation:

- [tag:hardcoded_color_value] Replace hardcoded color values with user
   configurable ones.
- [tag:needs_unit_test]
- [tag:needs_user_doc]
- [tag:needs_dev_doc]
- [tag:FIXME]
- [tag:TODO]
- [tag:VERIFY] Verify whether this is the correct way to do something
- [tag:DEBT] Technical debt
11 months ago
Manos Pitsidianakis d93ee413a7
melib/datetime: add timestamp_to_string_utc
Tests were using `timestamp_to_string` which in turn uses `localtime_r`
which assumes the local machine's time zone. Use gmtime_r instead.

Fixes #252
11 months ago
Manos Pitsidianakis b5657201db
melib: fix doctest compilation errors 11 months ago
rek2 3803d788ab
if auth is false checks if config has password entry 11 months ago
rek2 b5f205b77b add availability to use server_password_command in the nntp backend like in the IMAP backend 11 months ago
Damian Poddebniak 34a54d3c05 docs: Add some `TODO(#222)`s. 11 months ago
Damian Poddebniak 9d51b6bd52 chore: Update `imap-codec`. 11 months ago
Manos Pitsidianakis e8e49e741b
melib/mbox: fix wrong per message offset 11 months ago
Manos Pitsidianakis 5f29faa640
melib: clippy lint fixes 11 months ago
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.
12 months ago
Manos Pitsidianakis 5699baecfb
melib: add utils::{futures, random} 12 months ago
Manos Pitsidianakis 4da5366959
Remove bincode dep, use serde_json for sqlite3 values 12 months ago
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.
12 months ago
Manos Pitsidianakis 8f14a2373e
melib/imap: put imap-codec logic under the imap_backend feature 12 months ago
Damian Poddebniak 330887c4f5
refactor: Introduce imap-codec. 12 months ago
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
1 year ago
Manos Pitsidianakis f8623d4b2c
melib/imap: implement more ResponseCode cases 1 year ago
Manos Pitsidianakis c5ecaceae1
melib/search: fix some search criteria in Query type 1 year ago
Manos Pitsidianakis 6bf1756de8 melib/search: implement more search criteria in Query type 1 year ago
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).
1 year ago
Damian Poddebniak 1eea8bab77 tests: Fix `test_imap_fetch_response`. 1 year ago
Manos Pitsidianakis 428f752b20
Remove obsolete crate::components::mail::get_display_name() 1 year ago
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.
1 year ago
Manos Pitsidianakis 85d4316a6a
Replace old logging module with the `log` create 1 year ago
Manos Pitsidianakis b1a7188771
Clippy fixes 1 year ago
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.
1 year ago
Manos Pitsidianakis 939dc15e28
Fix melib tests 1 year ago
Manos Pitsidianakis 3adf72aed0
Add support for utf-7 encoding
Closes #175
1 year ago
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.
1 year ago
Manos Pitsidianakis d7ec97f03b Small rustfmt change 1 year ago
Johannes Schilling fbc1007ff4 jmap: deserialize `null` to empty vec for messageId
The spec says MessageId can be `null`, handle that case and deserialize
it to an empty Vec.
1 year ago
Johannes Schilling 12cb717bda melib: add server_password_command to jmap
Move the handling of either `server_password` or
`server_password_command` from the imap backend to the common
`AccountSettings` struct and add it for jmap as well.
1 year ago
Manos Pitsidianakis de2f46fe61 rustfmt changes 1 year ago
Manos Pitsidianakis 7606317f24 melib/notmuch: add support for virtual mailbox hierarchy
Add optional "parent" property to notmuch mailbox configuration.

Closes #167

https://git.meli.delivery/meli/meli/issues/167
2 years ago
Manos Pitsidianakis 5634f95553 Rename MeliError struct to Error 2 years ago