Compare commits


1517 Commits

Author SHA1 Message Date
Manos Pitsidianakis d3cbf184e6
compose: add extra_submission_headers fields in composer form and autocomplete for Newsgroups
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 10m32s Details
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 10m14s Details
Submitting to NNTP/Usenet servers requires you to specify which news
groups the post/article is going to. This commit places all
extra_submission_headers from a backend (in this case only NNTP
implements this) in the composing form fields.

Fixes #267

nntp should add Newsgroups header if missing

Signed-off-by: Manos Pitsidianakis <>
2023-09-23 18:51:02 +03:00
Manos Pitsidianakis e88957ae6e
melib/backends: add extra_submission_headers field in MailBackendCapabilities struct
Signed-off-by: Manos Pitsidianakis <>
2023-09-23 17:44:42 +03:00
Manos Pitsidianakis 3d85ca2edf
Bump version to 0.8.2
Build release binary / Build on ${{ }} (meli-linux-amd64, linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 9m44s Details
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 13m6s Details
Signed-off-by: Manos Pitsidianakis <>
2023-09-22 12:30:54 +02:00
Manos Pitsidianakis 7888d8b2a5
melib/utils/xdg: fix doc test compilation
Signed-off-by: Manos Pitsidianakis <>
2023-09-22 12:26:42 +02:00
Manos Pitsidianakis eb5d49c41a
meli/terminal/cells: use Self in self methods
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 11m25s Details
Signed-off-by: Manos Pitsidianakis <>
2023-09-20 19:30:50 +02:00
Manos Pitsidianakis 714744366f
mail/listing: revert 22525d40 behavior when sidebar not focused
Signed-off-by: Manos Pitsidianakis <>
2023-09-20 19:25:44 +02:00
Manos Pitsidianakis 73b3ed559d
mail/view: fix forward dialog not workng
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 10m55s Details
Signed-off-by: Manos Pitsidianakis <>
2023-09-16 20:28:33 +03:00
Manos Pitsidianakis 22525d40fb
mail/listing: go to end when pressing next/page down for the second time
When navigating the sidebar menu, if you reach the last account entry
and hit next account, nothing happens. This commit makes it so that
you're pointed to the last mailbox instead.

Signed-off-by: Manos Pitsidianakis <>
2023-09-14 15:08:44 +03:00
Manos Pitsidianakis 7eed82783a
Bump version to 0.8.1
Build release binary / Build on ${{ }} (meli-linux-amd64, linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 10m17s Details
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 11m23s Details
Signed-off-by: Manos Pitsidianakis <>
2023-09-13 19:08:21 +03:00
Manos Pitsidianakis 3944e4e60e
meli: update to 2021 edition
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 13m57s Details
Signed-off-by: Manos Pitsidianakis <>
2023-09-13 18:51:30 +03:00
Manos Pitsidianakis fe0a96f085
melib: update to 2021 edition
Signed-off-by: Manos Pitsidianakis <>
2023-09-13 18:47:00 +03:00
Manos Pitsidianakis 81974311c2
mail/view: show current number command buffer
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 10m44s Details
The command buffer in the envelope view records numbers the user presses
and then combines them with an action (e.g. type n in decimal; press
open_url action to open nth link, analogously with attachments).

Since a few commits ago, the command buffer number stopped being printed
on the envelope view.

Signed-off-by: Manos Pitsidianakis <>
2023-09-13 15:29:06 +03:00
Manos Pitsidianakis 64ba0459ee
mail/compose: init cursor at To: header field
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 21m4s Details
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 10m26s Details
Signed-off-by: Manos Pitsidianakis <>
2023-09-11 08:52:18 +03:00
Manos Pitsidianakis 39e99770da
Use Context::current_dir() when saving files to relative paths
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 19m13s Details
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 19m19s Details
Signed-off-by: Manos Pitsidianakis <>
2023-09-09 19:05:46 +03:00
Manos Pitsidianakis a4f0dbac26
Add current working directory tracking to Context
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 17m13s Details
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 17m1s Details
Signed-off-by: Manos Pitsidianakis <>
2023-09-09 17:15:15 +03:00
Manos Pitsidianakis 7e4ed2fa10
view/envelope: fix some out of bounds drawing.
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 9m31s Details
Signed-off-by: Manos Pitsidianakis <>
2023-09-09 12:54:59 +03:00
Manos Pitsidianakis 45d4f611b1
Add install-man cli subcommand to install manpages on your system
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 9m28s Details
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 10m46s Details
If meli is installed via cargo or a package without manpages, this
command can be used to install them to the user's system.

Signed-off-by: Manos Pitsidianakis <>
2023-09-09 12:31:34 +03:00
Manos Pitsidianakis 747e39bf55
meli: add print-used-paths subcommand
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 21m42s Details
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 10m2s Details
Print all paths that meli creates/uses e.g. XDG data path and temp dir

Signed-off-by: Manos Pitsidianakis <>
2023-09-08 17:39:11 +03:00
Manos Pitsidianakis 9b9c38f769
mellib/imap: don't flood user with sqlite3 errors if db is corrupted
Signed-off-by: Manos Pitsidianakis <>
2023-09-08 17:10:07 +03:00
Manos Pitsidianakis bb4d200036
command/parser: unify toggle_* parsers
Signed-off-by: Manos Pitsidianakis <>
2023-09-07 15:47:54 +03:00
Manos Pitsidianakis 63abf1e890
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 15m9s Details
Signed-off-by: Manos Pitsidianakis <>
2023-09-07 12:56:45 +03:00
Manos Pitsidianakis 7e3e938631
mail/view: fix out-of-bounds draw when terminal is small
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 9m52s Details
Signed-off-by: Manos Pitsidianakis <>
2023-09-07 12:37:24 +03:00
Manos Pitsidianakis c43aeb0eb1
melib/email/parser: fix invalid address parse on folded values
Signed-off-by: Manos Pitsidianakis <>
2023-09-07 12:34:49 +03:00
Manos Pitsidianakis 54862f8651 add hide_sidebar_on_launch option
Signed-off-by: Manos Pitsidianakis <>
2023-09-07 12:33:51 +03:00
Manos Pitsidianakis b673af02ac move to crate root
Signed-off-by: Manos Pitsidianakis <>
2023-09-05 15:44:43 +03:00
Manos Pitsidianakis dd4d0b7972 fix typo
Signed-off-by: Manos Pitsidianakis <>
2023-09-05 15:34:12 +03:00
Manos Pitsidianakis 6476985ce6
Add Cross.toml for aarch64-unknown-linux-gnu builds
Signed-off-by: Manos Pitsidianakis <>
2023-09-05 15:33:28 +03:00
Manos Pitsidianakis 6d5ebb5b04
command: split code into submodules, add better error reporting
Signed-off-by: Manos Pitsidianakis <>
2023-09-05 15:06:09 +03:00
Manos Pitsidianakis f0075b86cf
ui: show descriptive tab names for composer and threads
Instead of showing the nondescript tab names in the tab area,
use Subject or To: data from the draft in the composer and a subject
from the thread entries.

Signed-off-by: Manos Pitsidianakis <>
2023-09-03 10:17:24 +03:00
Manos Pitsidianakis a615b4701b
dependencies: embed xdg-utils crate
No reason to have it out of the tree.

Signed-off-by: Manos Pitsidianakis <>
2023-09-03 10:13:25 +03:00
Manos Pitsidianakis 0a9c89b6b3
mail/view/thread: add toggle_layout shortcut
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 14m12s Details
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 7m52s Details
Toggles between horizontal and vertical layout. Previously it was
decided on the terminal width.

Signed-off-by: Manos Pitsidianakis <>
2023-09-02 21:47:14 +03:00
Manos Pitsidianakis 49c36009ce
mail/view: don't initialize entire thread at once
For large threads, this would result in a lot of futures being created.
The user just wants to read one entry, not all of them. So prioritize
the open entry and some of the latest ones as an optimistic

Signed-off-by: Manos Pitsidianakis <>
2023-09-02 21:29:35 +03:00
Manos Pitsidianakis c7825c76c3
mail/view: handle dialog Esc in the parent component
Dialogues handled Esc themselves, which meant the event didn't bubble up
to their parent to let them know they should remove the dialogue. This
commit fixes that.

Signed-off-by: Manos Pitsidianakis <>
2023-09-02 21:29:35 +03:00
Manos Pitsidianakis 3344a8dbf6
mail/view: remove unnecessary Clone derives
There's no need to clone MailViews when opening them in new tabs,
just initialize new ones with the same metadata. That saves us the
trouble of implementing Clone for all related types.

Signed-off-by: Manos Pitsidianakis <>
2023-09-02 19:36:12 +03:00
Manos Pitsidianakis 1b3bebe304
view/thread: open earliest unread email instead of first in thread
Signed-off-by: Manos Pitsidianakis <>
2023-09-02 19:04:35 +03:00
Manos Pitsidianakis 85af524458
email/ fix invalid mailto() results when body field exists
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 13m56s Details
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 7m38s Details
Signed-off-by: Manos Pitsidianakis <>
2023-09-01 15:57:46 +03:00
Manos Pitsidianakis 0132677ff5 Introduce CommandError with context
There was no way to provide context to the user why their
command failed to be parsed. This commit paves the way of returning for
invalid domain values, invalid types, etc.

Signed-off-by: Manos Pitsidianakis <>
2023-09-01 15:55:43 +03:00
Manos Pitsidianakis 2dc2940586
melib/ add feature to use cache instead of downloading unicode data
Signed-off-by: Manos Pitsidianakis <>
2023-09-01 15:55:43 +03:00
Manos Pitsidianakis 49a38a23bf
jmap: fix invalid Type link references
Signed-off-by: Manos Pitsidianakis <>
2023-09-01 15:55:42 +03:00
Manos Pitsidianakis b4f2f33576
remove deflate feature; make it a hard dependency
Signed-off-by: Manos Pitsidianakis <>
2023-09-01 15:55:42 +03:00
Manos Pitsidianakis a337e2269e
contacts: refactor module structure
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 8m14s Details
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 13m51s Details
To prepare for more functionality, refactor contacts module.

Signed-off-by: Manos Pitsidianakis <>
2023-08-30 01:12:45 +03:00
Manos Pitsidianakis 46636d8748
Bump version to 0.8.0
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 8m1s Details
Build release binary / Build on ${{ }} (meli-linux-amd64, linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 7m10s Details
Signed-off-by: Manos Pitsidianakis <>
2023-08-29 15:04:55 +03:00
Manos Pitsidianakis 65e82d8896
Add meli/ symbolic link
Signed-off-by: Manos Pitsidianakis <>
2023-08-29 15:01:42 +03:00
Manos Pitsidianakis 1c79786ea2
Add scripts/
Signed-off-by: Manos Pitsidianakis <>
2023-08-29 14:55:16 +03:00
Manos Pitsidianakis 290cfb86c0
themes: add a highlighted_selected theme key
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 12m29s Details
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 12m40s Details
So that if you select a mail/thread entry that is currently under the
cursor (making it `highlighted`) you can also see its `selected` status.

Signed-off-by: Manos Pitsidianakis <>
2023-08-28 23:50:17 +03:00
Damian Poddebniak 5459a84f3d chore: Update to imap-codec 1.0.0 (w/o `-beta`)
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 8m7s Details
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 12m2s Details
2023-08-28 18:16:48 +02:00
Manos Pitsidianakis 31aa9ad29e
listing: autogen mbox filename when exporting mail to directories
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 8m9s Details
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 8m7s Details
Signed-off-by: Manos Pitsidianakis <>
2023-08-28 18:20:38 +03:00
Manos Pitsidianakis 59513b2670
melib/jmap: implement Backend::submit(), server-side submission
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 14m12s Details
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 8m3s Details
Well this was more complex that it should have been. And not very
optimized because we're not using pipelining in the submit() path:

1. first upload email bytes as a Blob object. This requires a standalone
   API post call at a specific url so it cannot be changed with followup
   calls to reference the blob's id.
2. Create an EmailObject in the drafts folder.
3. Create an EmailSubmission object referencing the email id of prevous
   call. Unfortunately I cannot get the Result Reference to work in
   stalwart jmap, so for now this is too a separate transaction.

Caveat emptor: Errors might not be returned to the user.

Closes #277.



Signed-off-by: Manos Pitsidianakis <>
2023-08-28 17:16:38 +03:00
Manos Pitsidianakis 38bc1369cc
melib/jmap: add an Identity type.
Signed-off-by: Manos Pitsidianakis <>
2023-08-28 14:54:34 +03:00
Manos Pitsidianakis 5d8f07c805
melib/jmap: rename some objects better
Signed-off-by: Manos Pitsidianakis <>
2023-08-28 14:39:20 +03:00
Manos Pitsidianakis b95f778335
melib/jmap: move JmapSession to its own module
Signed-off-by: Manos Pitsidianakis <>
2023-08-28 14:39:17 +03:00
Manos Pitsidianakis 29fd8522e6
melib/jmap: implement Backend::create_mailbox()
Signed-off-by: Manos Pitsidianakis <>
2023-08-28 14:35:13 +03:00
Manos Pitsidianakis 31982931f5
melib/jmap: use Argument<OBJ> (value or resultreference) where appropriate
Signed-off-by: Manos Pitsidianakis <>
2023-08-28 14:31:05 +03:00
Manos Pitsidianakis d9467d5fcd
melib/jmap: save all core capabilities to session store
We will need this in the future when we're going to support extra
extensions like Blob and also now to support server submission.

Signed-off-by: Manos Pitsidianakis <>
2023-08-28 14:27:34 +03:00
Manos Pitsidianakis 11432ba2c3
melib/jmap: make `null` fields into Option<_>s
Signed-off-by: Manos Pitsidianakis <>
2023-08-28 14:21:47 +03:00
Manos Pitsidianakis 4f9b97736a
melib/jmap: Rename EmailImport to EmailImportObject
Signed-off-by: Manos Pitsidianakis <>
2023-08-28 14:19:18 +03:00
Manos Pitsidianakis 6ebdc7f9ae
melib/jmap: add Id<_>::empty() contructor
Signed-off-by: Manos Pitsidianakis <>
2023-08-28 14:16:11 +03:00
Manos Pitsidianakis 37a787e6bb
melib/jmap: use IndexMap instead of HashMap
Signed-off-by: Manos Pitsidianakis <>
2023-08-28 14:12:05 +03:00
Manos Pitsidianakis c875dda496
melib/jmap: add last_method_response field to Connection
For book keeping.

Signed-off-by: Manos Pitsidianakis <>
2023-08-28 13:58:20 +03:00
Manos Pitsidianakis f7a4741bf1
melib/jmap: add jmap-trace feature
Signed-off-by: Manos Pitsidianakis <>
2023-08-28 13:47:42 +03:00
Manos Pitsidianakis 3433f7c41e
.gitea: update
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 13m31s Details
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 13m49s Details
Signed-off-by: Manos Pitsidianakis <>
2023-08-26 11:31:30 +03:00
Manos Pitsidianakis 9037f08495
listing: replace hardcoded Key::{Home,End} values with shortcut values
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 9m23s Details
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 13m56s Details
Replace hardcoded Key::{Home,End} values with shortcut values
"home_page" and "end_page".

Signed-off-by: Manos Pitsidianakis <>
2023-08-26 11:25:20 +03:00
Manos Pitsidianakis ffba203a3b
sidebar: add support for Home and End key navigation
Signed-off-by: Manos Pitsidianakis <>
2023-08-26 11:17:21 +03:00
Manos Pitsidianakis 8551e1ba0b
clippy: fix new 1.72 default clippy lints
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 13m23s Details
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 9m16s Details
Signed-off-by: Manos Pitsidianakis <>
2023-08-25 19:49:26 +03:00
Manos Pitsidianakis 64982b4cab
mail/view/thread: fix page{up,down} event bubbling up
When pressing PageUp, PageDown, Home, End shortcuts in ThreadView
entries, the event is bubbled up to the mailbox listing because
ThreadView::process_event() didn't return `true`. This commit fixes
this bug.

Signed-off-by: Manos Pitsidianakis <>
2023-08-25 18:20:56 +03:00
Manos Pitsidianakis 4d22b669bf
Cargo.lock: update dependencies
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Failing after 14m14s Details
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 7m40s Details
Signed-off-by: Manos Pitsidianakis <>
2023-08-25 08:25:12 +03:00
Manos Pitsidianakis 974b3a5305
Update bitflags, rusqlite dependencies
Signed-off-by: Manos Pitsidianakis <>
2023-08-25 08:22:36 +03:00
Manos Pitsidianakis f162239fcc
.gitea/workflows: change `on:` conditions for test.yaml
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Successful in 7m58s Details
Signed-off-by: Manos Pitsidianakis <>
2023-08-24 11:37:35 +03:00
Manos Pitsidianakis 946309c6f3
melib: do some small parser refactoring
- Use HeaderName in parsers instead of raw byte strings.
- Use byte literal constants where appropriate instead of repeating

Signed-off-by: Manos Pitsidianakis <>
2023-08-24 11:32:21 +03:00
Manos Pitsidianakis 66c21ab173
melib/email: move StandardHeader to its own module
Extract StandardHeader code to its own module to reduce
line-count size.

Signed-off-by: Manos Pitsidianakis <>
2023-08-24 09:11:46 +03:00
Manos Pitsidianakis 3963103d55
contacts: prevent duplicate contact creation
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 8m9s Details
When adding contacts from an envelope view, its hash/id/key was a random
Uuidv4, so it was always possible to add a contact again and again with
no limits. Now, the id is calculated from the hash of the email address
and display name, preventing duplicate additions.

Note that the hash algorithm is not supposed to be stable across
versions, meaning that in the future the same contact might have a
different hash. This means a more sophisticated method for
detecting/disallowing dupes must eventually be introduced.

Signed-off-by: Manos Pitsidianakis <>
2023-08-23 17:29:21 +03:00
Manos Pitsidianakis ab57e9420d
contacts: add delete_contact shortcut
New exciting feature: contact deletion.

Default shortcut is `d`.

Signed-off-by: Manos Pitsidianakis <>
2023-08-23 17:27:48 +03:00
Manos Pitsidianakis 095d24f914
.gitea: add
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 13m50s Details
Signed-off-by: Manos Pitsidianakis <>
2023-08-21 16:07:41 +03:00
Manos Pitsidianakis 96f0b3e6b4
components: fix shortcut section order
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 8m2s Details
Shortcut sections are shown in order, sorted by focus--as if widgets are
stacked vertically by the order you've opened them. In some widgets that
order was wrong.

Also, when a parent widget retrieved its child shortcuts, sometimes it
overwrote children sections if they both have them. This commit adds a
sealed trait ExtendShortcutsMaps that instead of overriding them, it
merges them with the child map having the priority.

Signed-off-by: Manos Pitsidianakis <>
2023-08-21 14:53:29 +03:00
Manos Pitsidianakis f193bdf685
meli/jobs_view: add column headers and sorting
Sort with `sort <index> [asc/desc]` command or by pressing `1..5` keys.
Press them again to toggle between asc and desc.

Signed-off-by: Manos Pitsidianakis <>
2023-08-21 14:48:24 +03:00
Manos Pitsidianakis f93adb683a
meli/terminal: replace change_color uses with change_theme
change_color() predated addition of Cell Attributes (Bold, Underline,
etc) so it didn't accept an attribute argument.

This commit adds a change_theme() function that does the same thing as
change_color() but also sets the cell attributes. It also takes a
ThemeAttribute as an argument instead of {fg, bg, attrs} individually.

Signed-off-by: Manos Pitsidianakis <>
2023-08-21 12:45:15 +03:00
Manos Pitsidianakis a1e7006186
melib: move Sort{Order,Field} to utils mod
We want to use SortOrder enum for non-thread purposes in the next
commit, so move it out of the thread module.

Signed-off-by: Manos Pitsidianakis <>
2023-08-21 12:41:50 +03:00
Manos Pitsidianakis 52874f9a97
mail/view: cancel previous jobs on MailView drop/update
When MailView loads a new thread or gets dropped, cancel all pending

Signed-off-by: Manos Pitsidianakis <>
2023-08-21 10:19:14 +03:00
Manos Pitsidianakis b3858de2f4
melib/error: impl From<io::ErrorKind> for ErrorKind
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 7m43s Details
We inspect errors in the frontend to check for network errors. If the
network error comes from std::io, this would get converted to an Error
with description "timed out", kind OSError, and source the actual
networking error.

This commit converts network std::io::ErrorKinds into appropriate
native ErrorKinds.

Signed-off-by: Manos Pitsidianakis <>
2023-08-19 09:11:59 +03:00
Manos Pitsidianakis dc2b00442b
melib: run rustfmt and cargo-sort 2023-08-19 09:07:55 +03:00
Manos Pitsidianakis da8e810448
melib/connections: remove leftover debug prints 2023-08-19 09:06:31 +03:00
Damian Poddebniak 4f6081b663 chore: Update to `imap-codec 1.0.0-beta`.
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 8m0s Details
2023-08-17 17:36:13 +02:00
Manos Pitsidianakis 67d2da0f88
ci: disable smtp::test::test_smtp in test.yaml
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 7m47s Details
For some network-inside-docker reason this test fails, even thought it
works on my machines(TM).
2023-08-16 20:34:33 +03:00
Manos Pitsidianakis df638cceec
melib/connections: remove stale failing doc code example
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 7m50s Details
This leftover doc test/example was failing to compile, so remove it.
2023-08-16 19:50:48 +03:00
Manos Pitsidianakis 97d3686815
melib/connections: use Happy Eyeballs algorithm Ꙭ
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 12m17s Details
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/

Fixes #268
2023-08-15 09:55:46 +03:00
Kris Warner 6578a56668 Update cargo install directions
The release available on is 2 years old and would not compile ("enum `TokenTree` is private"), but installing from repo works.
2023-08-14 18:35:09 +00:00
Manos Pitsidianakis 0f60009ea9
Makefile: add RUSTFLAGS with -D warnings
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 8m21s Details
2023-08-11 19:15:14 +03:00
Manos Pitsidianakis 5c2b04719b
Normalize std::fmt::* imports
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 7m42s Details
2023-08-11 13:16:47 +03:00
Manos Pitsidianakis 7c9a4b4b7c
meli: Move components/mail -> mail 2023-08-11 13:01:32 +03:00
Manos Pitsidianakis 64ab65ddff
meli: Move components/contacts -> contacts 2023-08-11 12:49:06 +03:00
Manos Pitsidianakis 005bf3881e
meli: Move components/utilities -> utilities 2023-08-11 12:46:16 +03:00
Manos Pitsidianakis a5446975c2
terminal: move braille and screen to their own module files 2023-08-11 11:00:59 +03:00
Manos Pitsidianakis 7c7f6e1923
melib/thread: don't increase Thread length for duplicates
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 15m44s Details
If an envelope that was already in the Threads object was inserted,
the only modification would be to erroneously increase the Thread len by
2023-08-10 18:48:53 +03:00
Manos Pitsidianakis 84081f4ed7
melib/nntp: minor style fix 2023-08-10 18:48:36 +03:00
Manos Pitsidianakis bf543855dc
melib/email: add PartialEq<str> for MessageID 2023-08-10 18:45:44 +03:00
Manos Pitsidianakis 448e0635e0
melib/nntp: log error when command length exceeds 512 octets
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 8m59s Details
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.
2023-08-10 18:31:22 +03:00
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
2023-08-10 18:30:59 +03:00
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.
2023-08-10 18:29:58 +03:00
Manos Pitsidianakis 0ee1b6e018
account: start background watch job in init
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 10m20s Details
When IsOnline was introduced, the background watch job stopped being
created when the connection was initialized. Restore that behavior.
2023-07-28 19:34:56 +03:00
Manos Pitsidianakis 8cb2a515e1
melib/smtp: use localhost in lieu of for CI
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 9m49s Details
2023-07-26 12:40:32 +03:00
Manos Pitsidianakis 6e27edcb77
ci: use cargo-nextest
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 9m19s Details
2023-07-24 14:14:48 +03:00
Manos Pitsidianakis ae25ffba43
melib/smtp: don't do plain EHLO before starting Tls connection
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 6m7s Details
2023-07-24 10:57:35 +03:00
Manos Pitsidianakis 1e084c1d85
melib: move backends out of the backends module
No reason to have such a deep module tree.
2023-07-22 22:17:01 +03:00
Manos Pitsidianakis 9216e7bc65
melib/connections: add opt id string for tracing 2023-07-22 22:17:01 +03:00
Manos Pitsidianakis 8ecdb6df31
melib/imap: add imap-trace feature 2023-07-22 21:27:05 +03:00
Manos Pitsidianakis b65934facc
melib/nntp: add nntp-trace feature 2023-07-22 21:15:59 +03:00
Manos Pitsidianakis 89c90f224a
melib: add `nntp` feature 2023-07-22 21:01:42 +03:00
Manos Pitsidianakis 7db930cabd
melib: rename `jmap_backend` feature to `jmap` 2023-07-22 20:54:55 +03:00
Manos Pitsidianakis e9f09a153c
melib: rename `mbox_backend` feature to `mbox` 2023-07-22 20:52:37 +03:00
Manos Pitsidianakis fe7dcc508e
melib: rename `notmuch_backend` feature to `notmuch` 2023-07-22 20:51:12 +03:00
Manos Pitsidianakis fe027fa300
melib: rename `maildir_backend` feature to `maildir` 2023-07-22 20:48:09 +03:00
Manos Pitsidianakis 129f10911b
melib: rename `imap_backend` feature to `imap` 2023-07-22 20:46:23 +03:00
Manos Pitsidianakis 51e9fbe8f2
sqlite3: add account_name identifier to sqlite3 index database name 2023-07-22 20:43:08 +03:00
Manos Pitsidianakis 4874e30f3c
melib: add smtp-trace feature
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Successful in 5m52s Details
If it's enabled, every read/write in an SMTP transaction will be logged
on TRACE level.
2023-07-22 16:25:54 +03:00
Manos Pitsidianakis 073d43b9b8
melib/test: move data files to data subdir
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 6m22s Details
2023-07-21 18:12:39 +03:00
Manos Pitsidianakis 8e698cabcf
Fix unreachable-pub and disjoint-capture lint errors
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 6m8s Details
2023-07-20 00:19:42 +03:00
Manos Pitsidianakis 1d0405ed5b
ci: add env vars
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 3m48s Details
2023-07-19 23:23:05 +03:00
Manos Pitsidianakis bb7e119ade
Add gitea CI workflows
Tests / Test on ${{ }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (push) Failing after 29s Details
2023-07-19 17:12:15 +03:00
Manos Pitsidianakis 29b43e2c88
melib/datetime: replace mktime with timegm 2023-07-19 15:53:30 +03:00
Manos Pitsidianakis 2df7354751
mail/{listing,view}: fix overflow substracts 2023-07-19 10:19:11 +03:00
Manos Pitsidianakis 6280bc75e5
melib/jmap: fix blob download URL formatting 2023-07-18 16:13:58 +03:00
Manos Pitsidianakis 48a10f7241
melib: remove unused BackendOp::fetch_flags() method 2023-07-18 16:13:58 +03:00
Manos Pitsidianakis 0219dc8707
melib/jmap: respect max_objects_in_get when fetching email
Fixes #144
2023-07-18 16:13:44 +03:00
Manos Pitsidianakis c4c245ee19
melib/jmap: respect danger_accept_invalid_certs setting 2023-07-18 16:13:41 +03:00
Manos Pitsidianakis 53cba4beee
Update relative file paths 2023-07-16 20:06:44 +03:00
Manos Pitsidianakis 561ba9c87b
listing: add relative_list_indices setting for thread listing 2023-07-16 14:13:55 +03:00
Manos Pitsidianakis 8abc9358a7
mail/pgp: add newline after Version: 1 header 2023-07-16 11:46:45 +03:00
Manos Pitsidianakis e9cd800f49
melib/nntp: add support for storing read status locally 2023-07-16 11:46:33 +03:00
Manos Pitsidianakis 519257b08f
listing: add relative_menu_indices setting for menubar 2023-07-15 20:29:25 +03:00
Manos Pitsidianakis ab418c1d39
pgp: refresh documentation, fix encryption/signing
Closes #259
2023-07-15 19:33:20 +03:00
Manos Pitsidianakis cf9a04a591
Add metadata to Jobs, and add JobManager tab
Opened with command `manage-jobs`
2023-07-14 00:24:38 +03:00
Manos Pitsidianakis 369c1dbdac
view/html: show `open` command in status bar 2023-07-13 23:02:10 +03:00
Manos Pitsidianakis 4e55fbc90d
nntp: add SEEN flag to all envs, since NNTP has no flags 2023-07-13 21:03:55 +03:00
Manos Pitsidianakis 5ceddf412e
Update 2023-07-13 17:21:10 +03:00
Manos Pitsidianakis 13fe64a027
Cache pgp signature verification results 2023-07-13 17:18:13 +03:00
Manos Pitsidianakis 6086a3789d
Fix libgpgme segfault error and re-enable gpg
Closes #255
2023-07-13 16:51:37 +03:00
Manos Pitsidianakis 5b5869a2ec
logging: re-enable print to stderr ifdef MELI_DEBUG_STDERR 2023-07-13 16:49:50 +03:00
Manos Pitsidianakis 866166eb8e
attachments: don't print parsing error for empty bytes 2023-07-13 16:48:59 +03:00
Manos Pitsidianakis d4e605c098
Add tagref source code annotations
Source Code Annotation Tags:

Global tags (in tagref format <>)
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
2023-07-13 16:47:11 +03:00
Manos Pitsidianakis a5770c89f4
Add Woodpecker-CI check pipeline
ci/woodpecker/push/check Pipeline failed Details
2023-07-11 13:05:52 +03:00
Manos Pitsidianakis 74e15316db
view/envelope: open message/rfc822 attachments in subview instead of new tab 2023-07-10 08:34:35 +03:00
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
2023-07-09 18:50:35 +03:00
Manos Pitsidianakis c2ed3e283f
view/envelope: fix Source::* view showing only envelope body
Instead of the entire envelope source
2023-07-08 13:59:09 +03:00
Manos Pitsidianakis b0e867eb68
Move src to meli/src 2023-07-08 13:58:32 +03:00
Manos Pitsidianakis b5657201db
melib: fix doctest compilation errors 2023-07-08 13:58:15 +03:00
rek2 3803d788ab
if auth is false checks if config has password entry 2023-07-07 14:00:16 +03:00
rek2 b5f205b77b add availability to use server_password_command in the nntp backend like in the IMAP backend 2023-07-06 05:23:24 +02:00
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 957abf4e72
Update cargo dependencies
Concerns #242 - "Compilation failure on master on OpenBSD"
2023-07-04 00:21:16 +03:00
Manos Pitsidianakis e3dfeaad7e
Fix compilation error when building without `gpgme` feature 2023-07-03 14:59:37 +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 342df091a0
mail/view: don't set all thread to seen when opening a thread entry 2023-07-03 11:04:49 +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 0b258a1f05
meli: clippy lint fixes 2023-07-03 09:38:51 +03:00
Manos Pitsidianakis 5f29faa640
melib: clippy lint fixes 2023-07-03 09:38:47 +03:00
Manos Pitsidianakis 6858ee1fab
meli: move subcommand handling to its own module 2023-07-03 09:38:43 +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 65179d4816
composer: fix cursor/widget focus scrolling logic
Scrolling up/down with scroll_{up,down} shortcuts didn't work correctly,
because the form widget used its own shortcuts. This commit refactors
the cursor logic.
2023-06-22 13:23:27 +03:00
Manos Pitsidianakis 0c0a678cff fix overlay widgets not being reaped after Unrealize event 2023-06-21 12:11:01 +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 363f493099
listing: add {previous,next}_entry shortcuts to quickly open other mail entries
When reading a mail entry, with Ctrl+n you can switch to the next entry,
and with Ctrl+p to the previous one. They can be reconfigured by setting
the shortcuts.listing.next_entry and shortcuts.listing.previous_entry
2023-06-19 22:15:06 +03:00
Manos Pitsidianakis 8cab9d9da8
listing/thread: add option to hide consecutive identical From values inside a thread
The config setting is listing.threaded_repeat_identical_from_values and
the default value is false




2023-06-19 10:01:02 +03:00
Manos Pitsidianakis b05d929975
account: impl exponential backoff when retrying connection
When connection fails to be established because of network issues,
perform an exponential back-off reconnection.

This will limit maximum waiting time before next attempt and also
prevent reconnecting without wait when there's no reason to (network or
remote server is down).

The algorithm is really crude:

Instead of uniformly sampling 1..=1000 milliseconds, we sample (4 *
random::<u8>()) which is at most 4 * 255 = 1020 which is good enough.

1. Try to connect immediately
2. If it fails, set retries = 1.
3. Try to reconnect after retries * (4 * random::<u8>())
4. If it fails, set retries *= 2 = 2.
5. Try to reconnect after retries * (4 * random::<u8>())
6. If it fails, set retries *= 2 = 4.
7. Try to reconnect after retries * (4 * random::<u8>())
8. If it fails, set retries *= 2 = 8. Stop increasing retries from now
9. Try to reconnect in a loop after retries * (4 * random::<u8>())
2023-06-19 10:01:02 +03:00
Manos Pitsidianakis 5699baecfb
melib: add utils::{futures, random} 2023-06-19 10:01:02 +03:00
Manos Pitsidianakis 02e86d1fad
listing/conversations: check for subject overflow on draw 2023-06-18 13:13:08 +03:00
Manos Pitsidianakis fdc0861ac0
view/ fix expanded_hash argument off by one error
When calling ThreadView::new with an envelope hash, Some(expanded_hash),
in the arguments, when translating it to a cursor position (usize) it
was mistakenly subtracted with 1 resulting in the wrong thread entry
showing up as expanded.
2023-06-17 21:14:15 +03:00
Manos Pitsidianakis 45bac6eb16
meli: Tidy up use of debug!
melib::debug! macro was deprecated when we started using the `log` crate
in `melib`. This commit replaces it with log::{debug,trace}! macro uses.
2023-06-17 21:14:15 +03:00
Manos Pitsidianakis 575509f1ed
mail/ move mail view to listing parent component
Instead of having a different widget to view mail in for each Listing
(plain, threaded, compact, etc) use a single widget in the listing's
parent type.

This will help with making the listing logic more modular in future
refactors to allow all combinations of listing/mail view/ thread view
positions and layouts.
2023-06-17 21:14:15 +03:00
Manos Pitsidianakis 5c9b3fb044
component: impl Component for Box<dyn Component>
Useful to have.
2023-06-17 21:02:08 +03:00
Manos Pitsidianakis 155fb41b93 remove unused Component::set_id method 2023-06-17 21:02:07 +03:00
Manos Pitsidianakis 96537e48c5
Add {Timer,Component}Id wrapper types over Uuid 2023-06-17 21:02:07 +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 b6c93e49f2
docs/meli.conf.5: add use_tls option in IMAP connection settings 2023-06-14 12:44:04 +03:00
Manos Pitsidianakis d33f9d54c7
terminal/keys: remove unreachable!() in Key::serialize 2023-06-13 16:27:35 +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 d7e6b40b7e accounts: auto re-index sqlite3 database if it's missing
Instead of telling user to do it themselves
2023-06-05 20:05:43 +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

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 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 f537c24909 utilities/ move text field to its own module 2023-06-03 14:43:00 +03:00
Guillaume Ranquet daf42fd456 fix build error with quote 1.0.28
With quote 1.0.28 the TokenTree enum is declared as a private enum
thus causing this error at build time:

error[E0603]: enum `TokenTree` is private
114 | ...                   if let quote::__private::TokenTree::Group(g) =
    |                                                ^^^^^^^^^ private enum

Use enum definition from proc_macro2 instead.

Signed-off-by: Guillaume Ranquet <>
2023-06-01 12:15:27 +03:00
Manos Pitsidianakis 58889bcadd
pager: Add show_extra_headers option
Show custom set headers on pager, if existent.

Quoting meli.conf(5):

> show_extra_headers [String]           (optional) Extra headers to
>                                      display, if present, in the
>                                      default header preamble of
>                                      the pager.  This setting is
>                                      useful especially when used
>                                      per-folder or per-account.
>                                      For example, if you use
>                                      ‘rss2email’ (See r2e(1)) the
>                                      e-mail you will receive will
>                                      have the ‘X-RSS-Feed’ header
>                                      by default.  You can show
>                                      them only in the folder
>                                      where you keep your feed
>                                      items:
>                                      [accounts."personal".mailboxes]
>                                      INBOX = {}
>                                      "INBOX/Sent" = { sort_order=0 }
>                                      "INBOX/Feeds" = { pager.show_extra_headers = ["X-RSS-Feed"] }
>                                      (empty)
2023-05-31 19:13:44 +03:00
Manos Pitsidianakis d332e4578d
melib/headers: add proper Display impl for HeaderName 2023-05-31 18:22:17 +03:00
Manos Pitsidianakis 954329d848 Set file extensions to temp files, use `open` in macos
If html_filter fails, meli unwraps it. Also, if it can't find an xdg default app it also fails.

So use xdg-open and open as failsaifes.

But that requires `open` to know it's an html file, so implemented setting temp file extensions as well.
2023-05-30 21:36:24 +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 1f8ac2287b
docs/ fix ftplugin location and add example mail.vim file 2023-05-22 14:46:42 +03:00
Manos Pitsidianakis c9d26bb415
mail/compose: add configurable custom hooks with shell commands
Quoting the docs at meli.conf(5):

 custom_compose_hooks [{ name = String, command = String }]

 (optional) Custom compose-hooks that run shell scripts.
 compose-hooks run before submitting an e-mail.
 They perform draft validation and/or transformations.
 If a custom hook exits with an error status or prints output to
 stdout and stderr, it will show up in the UI as a notification.


 editor_cmd = '~/.local/bin/vim +/^$'
 embed = true
 custom_compose_hooks = [ { name ="spellcheck", command="aspell --mode email --dont-suggest --ignore-case list" }]
2023-05-19 10:34:32 +03: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
Damian Poddebniak f63f6445ad chore: Improve error message when `m4` executable is missing. 2023-05-17 09:22:12 +00:00
Damian Poddebniak 682ea5547e chore: Add `.idea` (CLion) to `.gitignore`. 2023-05-17 09:22:12 +00:00
Manos Pitsidianakis 24103f3310
docs: add document 2023-05-17 09:33:52 +03:00
Manos Pitsidianakis 91557c2c43
mail/ 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 77020e0c19
Update 2023-05-16 17:38:03 +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 1f1ea30769
components/mail/view: on draw() set dirty on return 2023-05-01 16:33:19 +03:00
Manos Pitsidianakis 85d4316a6a
Replace old logging module with the `log` create 2023-05-01 16:22:35 +03:00
Manos Pitsidianakis 30cc5d3d02
docs: add edit-config in manpages 2023-05-01 08:43:36 +03:00
Manos Pitsidianakis b1a7188771
Clippy fixes 2023-04-30 20:47:53 +03:00
Manos Pitsidianakis 3a02b6fb80 mention how to override w3m with html_filter 2023-04-30 19:14:47 +03:00
3nt3 34bb532e8d
Mention w3m dependency
Fixes #181

Signed-off-by: 3nt3 <>
2023-04-30 18:05:21 +02:00
Manos Pitsidianakis 47e6d5d935
meli: add edit-config CLI subcommand that opens config files on EDITOR 2023-04-26 13:36:57 +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
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.
2023-03-09 10:30:34 +02:00
cos 256a3e252e Update minimum supported rust version
Code requires label_break_value feature, which was [stabilized][0] in
release 1.65.0 of the toolchain.

2023-03-06 09:56:43 +02:00
Manos Pitsidianakis 3a10953f05 debian/: update fix-prefix-for-debian.patch 2023-03-06 09:52:51 +02:00
Manos Pitsidianakis 11140b4a76 Fix test output
test_compose_reply_subject_prefix requires access to / path, and fails
when building with deb-dist
2023-03-06 09:49:02 +02:00
cos 671ce9f694 debian/: add missing build dependencies
quilt has unconditionally been used in debian/rules since the initial
addition of debian packaging support in commit bb80de.

sqlite3 has been a default feature since at least commit 6ceed3,
possibly longer through rusqlite.
2023-03-06 09:20:03 +02:00
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.
2023-03-06 09:11:55 +02:00
Manos Pitsidianakis f9ac9b607a Temporarily disable libgpgme functions because of a bug
`Possible incorrect libgpgme API usage causes a SIGABRT when verifying
signatures #176`

2023-02-11 17:51:36 +02:00
Manos Pitsidianakis 660bacb926 Add `mailto` command to open composer with initial values from mailto template 2022-12-30 17:02:10 +02:00
Manos Pitsidianakis de2f46fe61 rustfmt changes 2022-12-27 18:40:26 +02:00
Manos Pitsidianakis 5443b7e8f3 melib/sieve: remove literal_map() parse combinator 2022-12-27 18:38:20 +02:00
Manos Pitsidianakis 3c847ad26a melib/ add beginning of sieve parser
Concerns #153

Support filtering rules to move mails to folders #153 <#153>
2022-12-27 18:29:27 +02:00
Manos Pitsidianakis 2878bbb8c8 melib/addressbook: add parser for mutt alias file 2022-12-23 02:32:22 +02:00
Manos Pitsidianakis 40c6647db8 Fix multipart/related with main text/html part not displayed correctly 2022-12-09 14:06:20 +02:00
Manos Pitsidianakis f63ce388f7 commands: move ManageMailboxes to Tab Actions 2022-12-09 12:58:56 +02:00
Manos Pitsidianakis c06c3f5893 mail/listing/conversations: draw gap between list and mail view 2022-12-09 12:50:17 +02:00
Manos Pitsidianakis abc56eae43 mail/listing: fix SEEN flag update hiding mail view momentarily 2022-12-09 12:49:46 +02:00
Manos Pitsidianakis 7606317f24 melib/notmuch: add support for virtual mailbox hierarchy
Add optional "parent" property to notmuch mailbox configuration.

Closes #167

2022-12-09 12:35:10 +02:00
Manos Pitsidianakis 4f45b10974 mail/listing: fix tag updates not showing up right away
Closes #132
Closes #133
2022-12-09 12:30:51 +02:00
Manos Pitsidianakis 5634f95553 Rename MeliError struct to Error 2022-12-08 22:20:05 +02:00
Manos Pitsidianakis 259aeb0087 Convert {Account,Mailbox}Hash from typedef to wrapper struct 2022-12-08 22:10:58 +02:00
Manos Pitsidianakis 7382e30160 Convert EnvelopeHash from typedef to wrapper struct 2022-12-08 20:43:52 +02:00
Manos Pitsidianakis 2427b097c5 themes: make tag_default background lighter on light theme
Closes #164
2022-12-04 16:31:49 +02:00
Manos Pitsidianakis 252d2bdf2f Replace hardcoded /bin/false with 'false'
Credits to
2022-12-04 15:53:57 +02:00
Manos Pitsidianakis eaecc5ea12 melib/notmuch: remove hardcoded major .so version for non linux/macos target_os
Credits to for discovering this.
2022-12-04 15:44:20 +02:00
Manos Pitsidianakis 4b96bd591f mail/listing: add ColorCache constructor to deduplicate code 2022-12-04 14:16:36 +02:00
Manos Pitsidianakis b9030a684c listings: fix selection not appearing immediately and invalid motions 2022-12-01 21:20:20 +02:00
Manos Pitsidianakis 2224a7100f melib/imap: reset imap cache on init error 2022-12-01 21:06:33 +02:00
Manos Pitsidianakis 7924aa8bfe melib/jmap: fix compilation 2022-11-28 16:56:37 +02:00
Manos Pitsidianakis 7af893597f conf/ replace use of Self::DESCRIPTION with Shortcuts struct consts 2022-11-28 16:18:49 +02:00
Manos Pitsidianakis 7d9cabb023 Add mailbox manager tab 2022-11-28 15:44:12 +02:00
Manos Pitsidianakis ee9d458b05 implement mailbox {un,}sub actions 2022-11-28 15:30:19 +02:00
Manos Pitsidianakis 5ba7b2cd7b meli: fix clippy lints for meli binary 2022-11-24 19:58:23 +02:00
Manos Pitsidianakis 104352e595 Add table UI widget 2022-11-24 19:58:06 +02:00
Manos Pitsidianakis bd22f986f0 melib: fix clippy lints 2022-11-14 19:14:19 +02:00
_ ded9adde61 More descriptive "Unimplemented" messages 2022-11-13 19:04:29 +02:00
Manos Pitsidianakis 6317984136 Makefile: add --bin flag to meli cargo build target 2022-11-13 18:59:12 +02:00
Manos Pitsidianakis db227dea34 add error messages if `mandoc`,`man` binaries are missing 2022-11-11 20:08:00 +02:00
Manos Pitsidianakis 282af86e83 docs: fix NAME sections manual pages for correct whatis(1) parsing
Reference used was WHATIS PARSING section in lexgrog(1).

This change enables the manual page to be returned with a whatis(1)

 $ whatis meli
 meli (1)             - terminal e-mail client
2022-11-11 16:53:41 +02:00
Manos Pitsidianakis cc439b239a mail/ add RowsState struct
Keep state of rows in lists in this struct to reduce code duplication in
list implementations
2022-11-07 20:36:59 +02:00
Manos Pitsidianakis b776409d6c melib/ add thread, env hash index fields 2022-11-07 16:26:47 +02:00
Manos Pitsidianakis 56fc43bcf8 melib: add As{Ref,Mut} impls for RwRef{,Mut} 2022-11-07 16:25:37 +02:00
spike 59b95f83d2 fix docs 2022-10-30 13:31:23 +01:00
Manos Pitsidianakis 88a1f0d4bc melib/imap/parser: fix FETCH response parsing bug
Closes #160
Closes #128
2022-10-23 21:05:06 +03:00
Manos Pitsidianakis 64346dd3fe melib/parsec: add map_res, quoted_slice, is_a, alt, take, take_literal 2022-10-22 22:47:14 +03:00
Manos Pitsidianakis 17b42b1a6c melib/parsec: add json deserialization tests 2022-10-22 22:47:10 +03:00
Manos Pitsidianakis 6d20abdde7 melib/gpgme: add #[allow(deref_nullptr)] in bindgen tests 2022-10-22 22:45:15 +03:00
Manos Pitsidianakis 803d3414fd melib/imap/managesieve: implement some rfc5804 commands
Try with managesieve REPL in src/

cargo run --bin managesieve-client ~/.config/meli/config.toml

rfc5804 <>
2022-10-22 21:14:53 +03:00
Manos Pitsidianakis 3697b7d960 melib/datetime: don't use LC_ category in place of LC_ masks in libc calls
LC_ masks are bit masks, whereas category values are not.

Concerns #159

[imap] all mail timestamps are zero/epoch #159
2022-10-17 18:06:58 +03:00
Manos Pitsidianakis dd0baa82e9 Spawn user-given command strings with sh -c ".."
If given string contains arguments, Command::new(string) will fail.

Reported in #159 #159
2022-10-17 17:40:25 +03:00
Manos Pitsidianakis 0ef4dde939 melib/jmap: wrap serde_json deserialize errors in human readable errors 2022-10-13 10:59:10 +03:00
Manos Pitsidianakis 55ed962425 melib/jmap: use server_url instead of server_hostname + server_port in config 2022-10-13 10:40:48 +03:00
Manos Pitsidianakis 46a038dc68 remove interactive messages when #[cfg(test)] 2022-10-09 20:08:36 +03:00
Manos Pitsidianakis 16646976d7 compose: fix reply subject prefixes stripping original prefix
Unintelligent heuristic but should cover most cases?

Configurable subject response prefix #142

Closes #142
2022-10-09 18:31:01 +03:00
Manos Pitsidianakis ffb12c6d1a make all public struct fields public 2022-10-09 18:30:22 +03:00
Manos Pitsidianakis 7e09b1807f melib/collection: replace _Ref deref unwraps with expect() 2022-10-09 18:28:41 +03:00
Manos Pitsidianakis 129573e0fd melib/maildir: rename root_path to root_mailbox 2022-10-09 18:28:07 +03:00
Manos Pitsidianakis 0c08cb737c melib/jmap: mark mailboxes as subscribed on personal accounts
The spec says a mailbox property `isSubscribed` should be considered true if the account is marked as `isPersonal`.

Closes #157

JMAP incompatible with Stalwart server #157 #157
2022-10-04 15:58:36 +03:00
Manos Pitsidianakis 117d7fbe04 melib/jmap/ make private fields public 2022-10-04 15:51:43 +03:00
Manos Pitsidianakis 347be54305 melib/error: add NetworkErrorKind enum 2022-10-04 15:49:34 +03:00
Manos Pitsidianakis 7935e49a00 conf/ check properly if mailbox request is an error 2022-10-04 15:42:24 +03:00
Manos Pitsidianakis c54a31f7cc listing/ break line for error messages 2022-10-04 15:41:40 +03:00
Manos Pitsidianakis c3fdafde3b Documentation touchups 2022-09-26 18:04:53 +03:00
Manos Pitsidianakis c6bdda03cf melib/ fix notmuch error shown on any missing backend 2022-09-24 22:23:43 +03:00
Manos Pitsidianakis e450ad0f9c remove unused struct 2022-09-19 22:04:10 +03:00
Manos Pitsidianakis 0ed10711ef notifications: add new_mail_script option
Preferred over `script` option for new email notifications
2022-09-19 21:58:59 +03:00
Manos Pitsidianakis d8d43a16fe HtmlView: add html_open config setting
Add config setting in case xdg query default app for text/html mime type
doesn't yield results.
2022-09-19 21:40:12 +03:00
Manos Pitsidianakis b87d54ea3f melib/ impl Into<BTreeSet<EnvelopeHash>> for EnvelopeHashBatch 2022-09-19 15:18:25 +03:00
Manos Pitsidianakis a7a50d3078 src/: Box<_> some large fields in biggest types
As reported by `cargo +nightly typesize`
2022-09-19 15:18:25 +03:00
Manos Pitsidianakis b138d9bc61 melib: fix some clippy lints 2022-09-19 15:18:25 +03:00
Manos Pitsidianakis 787c64c2da remove expect()s from create_config_file()
No reason to expect(), just return the error.
2022-09-13 19:30:20 +03:00
Manos Pitsidianakis 0df46a63ec Show error if sqlite3 search backend is set but doesn't exist
Closes #114
2022-09-11 17:42:22 +03:00
Manos Pitsidianakis 94bd84b45d Fix clippy lints for `meli` crate 2022-09-11 15:19:40 +03:00
Manos Pitsidianakis 388d4e35d6 listing/ add in-progress messages while connecting in IMAP 2022-09-11 15:00:30 +03:00
Manos Pitsidianakis 9cbbf71e0f melib/email/attachments: Add DecodeOptions struct for decoding 2022-09-11 01:22:06 +03:00
Manos Pitsidianakis 3688369278 melib/smtp: add smtp test 2022-09-10 21:39:56 +03:00
Manos Pitsidianakis 3c0f5d8274 melib/smtp: add BINARYMIME support to smtp client
Concerns #49

IMAP: Lemonade profile tracking issue
2022-09-10 19:02:17 +03:00
Manos Pitsidianakis a72c96a26a melib/smtp: add 8BITMIME support to smtp client
Concerns #49

IMAP: Lemonade profile tracking issue
2022-09-10 19:02:17 +03:00
Manos Pitsidianakis 8c7b001aa5 listing/ add `thread_subject_pack` command to pack different inner thread subjects in entry title 2022-09-09 02:03:13 +03:00
Manos Pitsidianakis 9dc4d4055c listing: add focus_{left,right} shortcuts to switch focus
This allows you to make the mail entry column occupy the whole screen if
you press focus_right (Right key) twice.
2022-09-07 16:39:15 +03:00
Manos Pitsidianakis 3d92b41075 Add cli-docs feature to the default set 2022-09-06 21:59:30 +03:00
Manos Pitsidianakis 7c7115427d docs/meli.7: complete guide document 2022-09-06 21:41:26 +03:00
Manos Pitsidianakis 5fa4b6260c docs/meli.7: add more screenshots 2022-09-05 19:40:53 +03:00
Manos Pitsidianakis 4a20fc42e1 Update 2022-09-05 17:05:39 +03:00
Manos Pitsidianakis f76f4ea3f7 docs: add meli.7, a general tutorial document
This commit also changes some shortcut names.
2022-09-05 16:25:59 +03:00
Manos Pitsidianakis 2de69d17f1 melib/compose: fix erroneous placement of newlnes for wrap_header_preamble suffix 2022-09-03 17:47:58 +03:00
Manos Pitsidianakis cbe593cf31 mail/compose: add configurable header preample suffix and prefix for editing
This commit adds a new configuration value for the composing section of
settings. Quoting the documentation:

 wrap_header_preamble: Option<(String, String)>

 Wrap header preample when editing a draft in an editor. This allows you
 to write non-plain text email without the preamble creating syntax
 errors. They are stripped when you return from the editor. The values
 should be a two element array of strings, a prefix and suffix. This can
 be useful when for example you're writing Markdown; you can set the
 value to ["<!--",\ "-->"] which wraps the headers in an HTML comment.
2022-09-02 16:09:45 +03:00
Manos Pitsidianakis a484b397c6 melib/notmuch: show informative error messages if libloading fails
Add instructions on how to solve this, and also a config setting
`library_file_path` to set the path manually if necessary.
2022-09-02 15:17:30 +03:00
Manos Pitsidianakis eb5949dc9b melib/ switch summary<->details identifiers
They are more intuitive like this.
2022-09-02 12:12:12 +03:00
Manos Pitsidianakis aa99b0d787 compose: implement configurable subject prefix stripping when replying
Introduce functionality to strip email subject from a set list of
prefixes or from a user set list.

Also, added a setting for the reply prefix (default is "Re:").

Closes #142
2022-09-01 22:32:33 +03:00
Manos Pitsidianakis da9c80ccfd melib: Enhance SubjectPrefix with strip_prefixes_from_list() method
And make it public.
2022-09-01 22:32:33 +03:00
Manos Pitsidianakis a73885acb1 Improve embed terminal
- Add character attribute support
- Add cursor key mode support
- Fix buggy set fg / bg sequences

And added a bin under tools to test arbitrary apps using the embedded

 cargo run -p tools --bin embed -- "htop" 2> .htop.debug.log
2022-09-01 22:24:01 +03:00
Manos Pitsidianakis 480000ebbb melib/notmuch: show error if account directory does not contain ".notmuch" subdirectory
Bug reported by user on mailing list.
2022-08-30 12:23:25 +03:00
Manos Pitsidianakis 29042aba59 melib/datetime: add mbox date format parse 2022-08-29 11:19:21 +03:00
Manos Pitsidianakis a42a6ca868 show notifications in terminal if no alternative
If no alternative (dbus or notification command) show notifications
inside the terminal.
2022-08-28 17:39:20 +03:00
Manos Pitsidianakis bde87af387 Refactor filter() method in Listing trait 2022-08-28 17:29:30 +03:00
Manos Pitsidianakis 10497952f7 Wrap stdout in BufWriter
Hopefully this makes redrawing the terminal faster
2022-08-28 17:28:37 +03:00
Manos Pitsidianakis 0c0bee4482 Makefile: add missing .PHONY targets, fix missing tab indentation 2022-08-27 17:41:07 +03:00
Manos Pitsidianakis ca48896865 Cargo.toml: add strip option to profile.release 2022-08-27 17:39:23 +03:00
Manos Pitsidianakis 7650805c60 Bring stripped binary size down to 7MiB 2022-08-27 16:18:56 +03:00
Manos Pitsidianakis e29041f733 Rename src/ to src/ 2022-08-27 15:02:48 +03:00
Manos Pitsidianakis f4e0970d46 mail/ add ability to kill embed process
If embed editor process is unresponsive, there was no way to kill it.
Add force kill option by pressing Ctrl+C.
2022-08-27 15:02:15 +03:00
Manos Pitsidianakis 9cb66ef818 Fix all clippy warnings in `meli` crate 2022-08-25 16:38:02 +03:00
Guillaume Ranquet d921b3c320 use mail sorting parameters from config
Signed-off-by: Guillaume Ranquet <>
2022-08-25 12:52:39 +03:00
Guillaume Ranquet 9205f3b8af handle a per account mail order parameter
The new order parameter adds the possibility to specify a
sort order on a per account basis.

Signed-off-by: Guillaume Ranquet <>
2022-08-25 12:52:39 +03:00
Guillaume Ranquet 97ff3e787f only add toml files to the themes
By default, all files under MELI_CONFIG/themes are added to the
configuration files.
If one of these files is a binary file, this will provoke an error.

Summary: InvalidData
stream did not contain valid UTF-8
Caused by: stream did not contain valid UTF-8
Kind: OS Errorthread 'main' panicked at 'failed', melib/src/

Fixes the potential issue by filtering by file extension.

Signed-off-by: Guillaume Ranquet <>
2022-08-25 12:52:39 +03:00
Manos Pitsidianakis 824f614a69 mail/view: Fix HtmlView not being redrawn when parent is dirty 2022-08-22 23:12:48 +03:00
Manos Pitsidianakis ed3dbc8586 listing/conversations: fix crashes when listing is empty 2022-08-22 23:11:43 +03:00
Manos Pitsidianakis 7fca5f01ef melib/jmap: fix jmap build with isahc 1.7.2 2022-08-18 18:12:44 +03:00
Manos Pitsidianakis b716e4383e Add collapse option for mailboxes in sidebar menu
Closes #130

Feature request: collapsible folders with total counter #130 #130
2022-08-18 18:05:48 +03:00
Manos Pitsidianakis 4a79b2021d Update dependency versions 2022-08-01 04:09:42 +03:00
Manos Pitsidianakis daa900ec9a Fix embed terminal in macos
Pseudoterminal wasn't created correctly on macos
2022-07-31 18:17:59 +03:00
Manos Pitsidianakis ca84906d7d notifications: escape all quotes in applescript on macos 2022-07-03 13:32:01 +03:00
Manos Pitsidianakis ce269c64e1 conf: don't fail on `server_password_command`
Don't fail when parsing an IMAP config when it has
`server_password_command` set.

Closes #139

Meli stopped recognizing server_password_command configuration #139
2022-06-04 17:57:41 +03:00
Manos Pitsidianakis 0f6f3e30c6 conf: add IMAP config in config parse test 2022-06-04 17:56:54 +03:00
Manos Pitsidianakis e6d6e1f588 compose: don't unwrap if pseudoterminal creation fails
Show error notification instead.
2022-06-04 17:46:22 +03:00
Manos Pitsidianakis dc5afa13db notifications: use osascript/applescript for notifications on macos 2022-06-04 17:46:22 +03:00
Manos Pitsidianakis d6355a3043 melib/email/parser: impl Debug for ParsingError 2022-06-04 17:46:22 +03:00
Manos Pitsidianakis 6a843d4983 melib/maildir: export list_mail_in_maildir_fs() function 2022-06-04 17:46:22 +03:00
Manos Pitsidianakis 9558b2ae92 melib/email: parse Cp1253 as windows1253 encoding 2022-06-04 17:19:06 +03:00
Manos Pitsidianakis 4fdc90b31e Use `open` instead of `xdg-open` in macos
TODO: make this configurable instead.
2022-06-04 17:19:06 +03:00
Manos Pitsidianakis 8563bccd1b listing/conversations: don't cache CellBuffer, only row info
Caching a CellBuffer (a terminal grid view) takes too much RAM on big
mailboxes. Store just the information needed to write each row entry
when needed to draw a page instead.
2022-06-04 17:17:42 +03:00
Manos Pitsidianakis 721891c295 Update nom dependency 2022-05-02 17:04:13 +03:00
Manos Pitsidianakis 2c23ca34cd Update most Cargo dependencies 2022-05-02 17:03:56 +03:00
Manos Pitsidianakis 2eb22a290a
Stop hardcoding certain component colors
`Color::Byte` references were before themes were introduced in the code
base. Their presence is a bug and they should all be replaced by theme

Closes #124

Stop hardcoding certain component colors #124
2022-03-22 21:00:21 +02:00
Manos Pitsidianakis 5823178cc2 add test that looks in source code for invalid theme key references 2022-03-22 20:26:06 +02:00
Manos Pitsidianakis 81184b182c
Add extra_identities configuration flag
Closes #119

Multi identies per account #119 #119
2022-03-21 20:53:37 +02:00
Manos Pitsidianakis aa3524dd30
melib/backends/notmuch: fix tag not being removed in set_flags()
May be related to #132

Cannot remove tags in the notmuch backend #132

> Running tag remove TAG on the notmuch backend does nothing. At a
> glance, this seems to be because NotmuchMailbox::set_flags never bothers
> to remove tags that are already present but not in the list of new tags.
> I could try fixing it, but I have no idea how the contribution process
> works here (my guess is the mailing list, but, well, #131).

2022-03-21 13:13:47 +02:00
Manos Pitsidianakis 23c2355662 fill and align shortcut table columns 2022-03-20 19:18:40 +02:00
Manos Pitsidianakis d3e62e3d74
utilities/ use conf shortcuts for scroll {up, down} 2022-03-20 17:15:10 +02:00
Manos Pitsidianakis a866b29499
docs/meli.conf.5: update valid shortcut entries from src/conf/
Closes #136

docs/meli.conf.5 does not contain all shortcuts #136 #136
2022-03-20 17:14:42 +02:00
Manos Pitsidianakis f5dc25ae0d check that all conf flags are recognized in validation
This commit adds logic in configuration file validation that checks that
each account "extra" field is empty after getting it back from the
backend validation. This is to ensure the user doesn't set options that
are invalidly stated in the documentation or by accident.

Closes #135

Configuration error (xxx): the following flags are set but are not recognized: ["index_style"] #135
2022-03-20 16:35:18 +02:00
Manos Pitsidianakis d0de04854e add {in,de}crease_sidebar shortcuts
`increase_sidebar`: Increase sidebar width.
Default value Ctrl-p

`decrease_sidebar`: Decrease sidebar width.
Default value Ctrl-o
2022-02-25 16:40:27 +02:00
Manos Pitsidianakis 340d6451a3 add config setting for sidebar ratio 2022-02-25 16:20:08 +02:00
Manos Pitsidianakis e9aaa7b067
melib/datetime: use *const c_char instead of *const i8 for portability