Manos Pitsidianakis
df638cceec
melib/connections: remove stale failing doc code example
...
This leftover doc test/example was failing to compile, so remove it.
1 year ago
Manos Pitsidianakis
97d3686815
melib/connections: use Happy Eyeballs algorithm Ꙭ
...
This commit adds a Happy Eyeballs [1] implementation taken from the
happy-eyeballs crate, which is in public domain.
While the function lookup_ip[0] iterates through the addresses returned by
A and AAAA records from a DNS lookup, it returns the first one which
always is an IPv4 address, unless there only is an AAAA record.
RFC6555 [1] recommends an algorithm for choosing the fastest address to
connect to, called "Happy Eyeballs". Ꙭ
[0]: melib/src/utils/connections.rs:497
[1]: https://www.rfc-editor.org/rfc/rfc6555
Fixes #268
1 year ago
Manos Pitsidianakis
5c2b04719b
Normalize std::fmt::* imports
1 year ago
Manos Pitsidianakis
7c7f6e1923
melib/thread: don't increase Thread length for duplicates
...
If an envelope that was already in the Threads object was inserted,
the only modification would be to erroneously increase the Thread len by
one.
1 year ago
Manos Pitsidianakis
84081f4ed7
melib/nntp: minor style fix
1 year ago
Manos Pitsidianakis
bf543855dc
melib/email: add PartialEq<str> for MessageID
1 year ago
Manos Pitsidianakis
448e0635e0
melib/nntp: log error when command length exceeds 512 octets
...
According to RFC 3977:
> Command lines MUST NOT exceed 512 octets, which includes the
> terminating CRLF pair
This commit adds a log::error entry when any sent command exceeds that
limit and recommends the user to report this as a bug.
1 year ago
Manos Pitsidianakis
4e654d2d02
melib/nntp: limit LIST ACTIVE command length to 512 octets
...
According to RFC 3977:
> Command lines MUST NOT exceed 512 octets, which includes the
> terminating CRLF pair
Sending a `LIST ACTIVE` command with lots of newgroups and passing the
512 byte limit is therefore invalid. This commit splits the mailboxes in
chunks and sends a separate command for each maximal chunk that has
a valid length.
Fixes #269 .
Reported-by: r3k2
1 year ago
Manos Pitsidianakis
40d4ecefa0
melib/nntp: accept invalid (non-ascii) address comment text
...
NNTP servers may return addresses that are not RFC 5322 compliant. An
address with a comment with non-ascii characters will make the parser loop indefinitely.
Fixes #269 .
1 year ago
Manos Pitsidianakis
8cb2a515e1
melib/smtp: use localhost in lieu of 127.0.0.1 for CI
1 year ago
Manos Pitsidianakis
ae25ffba43
melib/smtp: don't do plain EHLO before starting Tls connection
1 year ago
Manos Pitsidianakis
1e084c1d85
melib: move backends out of the backends module
...
No reason to have such a deep module tree.
1 year ago
Manos Pitsidianakis
9216e7bc65
melib/connections: add opt id string for tracing
1 year ago
Manos Pitsidianakis
8ecdb6df31
melib/imap: add imap-trace feature
1 year ago
Manos Pitsidianakis
b65934facc
melib/nntp: add nntp-trace feature
1 year ago
Manos Pitsidianakis
89c90f224a
melib: add `nntp` feature
1 year ago
Manos Pitsidianakis
7db930cabd
melib: rename `jmap_backend` feature to `jmap`
1 year ago
Manos Pitsidianakis
e9f09a153c
melib: rename `mbox_backend` feature to `mbox`
1 year ago
Manos Pitsidianakis
fe7dcc508e
melib: rename `notmuch_backend` feature to `notmuch`
1 year ago
Manos Pitsidianakis
fe027fa300
melib: rename `maildir_backend` feature to `maildir`
1 year ago
Manos Pitsidianakis
129f10911b
melib: rename `imap_backend` feature to `imap`
1 year 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.
1 year ago
Manos Pitsidianakis
073d43b9b8
melib/test: move data files to data subdir
1 year ago
Manos Pitsidianakis
8e698cabcf
Fix unreachable-pub and disjoint-capture lint errors
1 year ago
Manos Pitsidianakis
bb7e119ade
Add gitea CI workflows
1 year ago
Manos Pitsidianakis
29b43e2c88
melib/datetime: replace mktime with timegm
1 year ago
Manos Pitsidianakis
6280bc75e5
melib/jmap: fix blob download URL formatting
1 year ago
Manos Pitsidianakis
48a10f7241
melib: remove unused BackendOp::fetch_flags() method
1 year ago
Manos Pitsidianakis
0219dc8707
melib/jmap: respect max_objects_in_get when fetching email
...
Fixes #144
1 year ago
Manos Pitsidianakis
c4c245ee19
melib/jmap: respect danger_accept_invalid_certs setting
1 year ago
Manos Pitsidianakis
e9cd800f49
melib/nntp: add support for storing read status locally
1 year ago
Manos Pitsidianakis
ab418c1d39
pgp: refresh documentation, fix encryption/signing
...
Closes #259
1 year ago
Manos Pitsidianakis
4e55fbc90d
nntp: add SEEN flag to all envs, since NNTP has no flags
1 year ago
Manos Pitsidianakis
13fe64a027
Cache pgp signature verification results
1 year ago
Manos Pitsidianakis
6086a3789d
Fix libgpgme segfault error and re-enable gpg
...
Closes #255
1 year ago
Manos Pitsidianakis
5b5869a2ec
logging: re-enable print to stderr ifdef MELI_DEBUG_STDERR
1 year ago
Manos Pitsidianakis
866166eb8e
attachments: don't print parsing error for empty bytes
1 year 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
1 year 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
1 year ago
Manos Pitsidianakis
b0e867eb68
Move src to meli/src
1 year ago
Manos Pitsidianakis
b5657201db
melib: fix doctest compilation errors
1 year ago
rek2
3803d788ab
if auth is false checks if config has password entry
1 year ago
rek2
b5f205b77b
add availability to use server_password_command in the nntp backend like in the IMAP backend
1 year ago
Damian Poddebniak
7c33f8999b
chore: Use published imap-codec 0.10.0.
1 year ago
Damian Poddebniak
34a54d3c05
docs: Add some `TODO( #222 )`s.
1 year ago
Damian Poddebniak
9d51b6bd52
chore: Update `imap-codec`.
1 year ago
Manos Pitsidianakis
7998e1e77e
melib/datetime: add missing LC libc constants for openbsd target_os
...
Fixes #242
"Compilation failure on master on OpenBSD" #242
1 year ago
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.
1 year ago
Manos Pitsidianakis
1bcc0bbece
melib/mbox: add mbox parsing test
1 year ago
Manos Pitsidianakis
e8e49e741b
melib/mbox: fix wrong per message offset
1 year ago