NOTICE: There was a data loss of the last few months. Accounts and issues created in that timespan are now lost. I apologize for this blunder and sorry for any inconvenience. -- epilys
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
--> config_macros.rs:114:54
|
114 | ... if let quote::__private::TokenTree::Group(g) =
| ^^^^^^^^^ private enum
Use enum definition from proc_macro2 instead.
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
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)
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.
Quoting the docs at meli.conf(5):
```text
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.
Example:
[composing]
editor_cmd = '~/.local/bin/vim +/^$'
embed = true
custom_compose_hooks = [ { name ="spellcheck", command="aspell --mode email --dont-suggest --ignore-case list" }]
```
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.
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.
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.
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.
Reference used was WHATIS PARSING section in lexgrog(1).
This change enables the manual page to be returned with a whatis(1)
query:
$ whatis meli
meli (1) - terminal e-mail client
Try with managesieve REPL in src/managesieve.rs:
cargo run --bin managesieve-client ~/.config/meli/config.toml
"accountname"
rfc5804 <https://www.rfc-editor.org/rfc/rfc5804.html>
The spec https://jmap.io/spec-mail.html#mailboxes 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
This commit adds a new configuration value for the composing section of
settings. Quoting the documentation:
wrap_header_preamble: Option<(String, String)>
optional
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.
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
- 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
terminal:
cargo run -p tools --bin embed -- "htop" 2> .htop.debug.log
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/error.rs:201:9
Fixes the potential issue by filtering by file extension.
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
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
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.
`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
values.
Closes#124
Stop hardcoding certain component colors #124#124
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).
#132
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
According to the vcard RFC
https://datatracker.ietf.org/doc/html/rfc6350#section-3.2 all lines must
end with CRLF (\r\n or 0x0d 0x0a)
Some VCard sources use only newline, which, while spec violating is easy
to recover from. So parse them as if they are correct.
Closes#121
Forward email with shortcut 'forward' (default ctrl+f)
This opens a composing tab letting you to select receiver etc.
"composing" config setting "forward_as_attachment" selects the
forwarding behavior:
- "ask" asks you ever time
- true always forwards by attaching the entire email as a single
attachment
- false always forwards by inlining the email, like most email clients
do.
Closes#120
An embedded pseudoterminal was enclosed in the EmbedGrid struct. This
commit splits it into EmbedTerminal and EmbedGrid, with EmbedGrid
containing only the CellBuffer grid logic. With this change we can reuse
EmbedGrid to parse ANSI output from external programs into meli's
CellBuffer's.
*)echo"\n${RED}${BOLD}WARNING${ANSI_RESET}: ${UNDERLINE}Path ${DESTDIR}${MANDIR} is not contained in your MANPATH variable or the output of \`manpath\` command.${ANSI_RESET} \`man\` might fail finding the installed manpages. Consider adding it if necessary.\nMANPATH variable / output of \`manpath\`: ${MANPATHS}";;\
esac);\
elseecho"NO_MAN is defined, so no documentation is going to be installed.";fi)
@ -138,7 +144,7 @@ install-bin: meli
@mkdir -p $(DESTDIR)${BINDIR}
@echo " - ${BOLD}Installing binary to ${ANSI_RESET}${GREEN}${DESTDIR}${BINDIR}/meli${ANSI_RESET}"
@case ":${PATH}:" in \
*:${DESTDIR}${BINDIR}:*)echo -n "";;\
*:${DESTDIR}${BINDIR}:*)echo -n "";;\
*)echo"\n${RED}${BOLD}WARNING${ANSI_RESET}: ${UNDERLINE}Path ${DESTDIR}${BINDIR} is not contained in your PATH variable.${ANSI_RESET} Consider adding it if necessary.\nPATH variable: ${PATH}";;\
See also [Quickstart tutorial](https://meli.delivery/documentation.html#quick-start).
See a comprehensive tour of `meli` in the manual page [`meli(7)`](./docs/meli.7).
After installing meli, see `meli(1)`, `meli.conf(5)` and `meli-themes(5)` for documentation. Sample configuration and theme files can be found in the `docs/samples/` subdirectory. Manual pages are also [hosted online](https://meli.delivery/documentation.html "meli documentation").
See also the [Quickstart tutorial](https://meli.delivery/documentation.html#quick-start) online.
meli by default looks for a configuration file in this location: `$XDG_CONFIG_HOME/meli/config.toml`
After installing `meli`, see `meli(1)`, `meli.conf(5)`, `meli(7)` and `meli-themes(5)` for documentation. Sample configuration and theme files can be found in the `docs/samples/` subdirectory. Manual pages are also [hosted online](https://meli.delivery/documentation.html "meli documentation").
`meli` by default looks for a configuration file in this location: `$XDG_CONFIG_HOME/meli/config.toml`
You can run meli with arbitrary configuration files by setting the `$MELI_CONFIG`
environment variable to their locations, i.e.:
@ -46,12 +48,12 @@ For a quick start, build and install locally:
Available subcommands for `make` are listed with `make help`. The Makefile *should* be POSIX portable and not require a specific `make` version.
meli requires rust 1.39 and rust's package manager, Cargo. Information on how
`meli` requires rust 1.65 and rust's package manager, Cargo. Information on how
to get it on your system can be found here: <https://doc.rust-lang.org/cargo/getting-started/installation.html>
With Cargo available, the project can be built with `make` and the resulting binary will then be found under `target/release/meli`. Run `make install` to install the binary and man pages. This requires root, so I suggest you override the default paths and install it in your `$HOME`: `make PREFIX=$HOME/.local install`.
You can build and run meli with one command: `cargo run --release`.
You can build and run `meli` with one command: `cargo run --release`.
### Build features
@ -63,8 +65,8 @@ Some functionality is held behind "feature gates", or compile-time flags. The fo
- `jmap` provides support for connecting to a jmap server and use it as a mail backend (off by default)
- `sqlite3` provides support for builting fast search indexes in local sqlite3 databases (on by default)
- `cli-docs` includes the manpage documentation compiled by either `mandoc` or `man` binary to plain text in `meli`'s command line. Embedded documentation can be viewed with the subcommand `meli man [PAGE]`
- `svgscreenshot` provides support for taking screenshots of the current view of meli and saving it as SVG files. Its only purpose is taking screenshots for the official meli webpage. (off by default)
- `debug-tracing` enables various trace debug logs from various places around the meli code base. The trace log is printed in `stderr`. (off by default)
- `svgscreenshot` provides support for taking screenshots of the current view of `meli` and saving it as SVG files. Its only purpose is taking screenshots for the official `meli` webpage. (off by default)
- `debug-tracing` enables various trace debug logs from various places around the `meli` code base. The trace log is printed in `stderr`. (off by default)
### Build Debian package (*deb*)
@ -75,11 +77,11 @@ A `*.deb` package can be built with `make deb-dist`
### Using notmuch
To use the optional notmuch backend feature, you must have `libnotmuch5` installed in your system. In Debian-like systems, install the `libnotmuch5` packages. meli detects the library's presence on runtime.
To use the optional notmuch backend feature, you must have `libnotmuch5` installed in your system. In Debian-like systems, install the `libnotmuch5` packages. `meli` detects the library's presence on runtime.
### Using GPG
To use the optional gpg feature, you must have `libgpgme` installed in your system. In Debian-like systems, install the `libgpgme11` package. meli detects the library's presence on runtime.
To use the optional gpg feature, you must have `libgpgme` installed in your system. In Debian-like systems, install the `libgpgme11` package. `meli` detects the library's presence on runtime.
### Building with JMAP
@ -91,6 +93,11 @@ MELI_FEATURES="jmap" make
or if building directly with cargo, use the flag `--features="jmap"'.
### HTML Rendering
HTML rendering is achieved using [w3m](https://github.com/tats/w3m) by default.
You can use the `pager.html_filter` setting to override this (for more details you can consult [`meli.conf(5)`](./docs/meli.conf.5)).
# Development
Development builds can be built and/or run with
@ -102,7 +109,7 @@ cargo run
There is a debug/tracing log feature that can be enabled by using the flag
`--feature debug-tracing` after uncommenting the features in `Cargo.toml`. The logs
are printed in stderr, thus you can run meli with a redirection (i.e `2> log`)
are printed in stderr, thus you can run `meli` with a redirection (i.e `2> log`)