25

meli mail client - alpha release 0.4.1 - meli MUA

 4 years ago
source link: https://meli.delivery/posts/2019-12-09-alpha-release.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

update: 0.4.1 is supported for rust >= 1.39 Checkout current master or latest release tag for bug fixes since 0.4.1.

Summary

  • New mail stores available: IMAP, notmuch join Maildir and mbox. JMAP is partially supported but not shipped with the master branch release.
  • Tagging (on IMAP & notmuch) with
    • custom colours
    • hiding unwanted tags
    • use as search keyword
  • Embed your editor in the composing tab without ever leaving meli. The editor runs in an embedded terminal emulator.
  • vCard support, read-only from local storage.
  • Search
    • Full text search if sqlite3 cache selected
    • SEARCH in IMAP without a cache
    • notmuch queries in notmuch without a cache
  • GPG signatures, signing and verifying
  • mailcap support
  • format=flowed support

and other smaller additions. Consult the manpages for up-to-date information.

Download

tags.png

stability

I use meli as my main client and though at times buggy, it is mostly stable enough to be usable. Data is treated immutably everywhere except for when you explicitly ask for mutation, meaning I don’t think data corruption is generally possible. I’d appreciate bug reports at this stage in order to start polishing it for a proper release.

IMAP, notmuch and… JMAP?

See example configuration files in meli.conf.5

IMAP accounts are retrieved on startup without any local caching. It is easy to implement though and I expect to do it soonish.

notmuch accounts don’t support new mail notifications yet. I have to check if I should use inotify just like in Maildir or poll the database’s mtime. notmuch search queries are passed to libnotmuch unchanged, though the app’s search syntax is quite similar.

JMAP is at an early stage still and unless you are a dev in pertinent projects or just really want to try it you shouldn’t care about it yet. I’ve written code using jmap-proxy for IMAP written in Perl. Authentication is still an unclear subject in JMAP and I haven’t a way to implement how fastmail, the company behind JMAP, does it without an account.

JMAP translates really well to Rust thanks to serde_json. By modeling JMAP Objects and methods as traits we can have some type safety in our queries:

trait Object {
   const NAME: &'static str;
}

trait Response<OBJ: Object> {
   const NAME: &'static str;
}

trait Method<OBJ: Object>: Serialize {
   const NAME: &'static str;
}

struct Request {
   using: &'static [&'static str],
   /* Why is this Value instead of Box<dyn Method<_>>? The Method trait cannot
      be made into a Trait object because its serialize() will be generic.
      Bummer! */
   method_calls: Vec<serde_json::Value>,

   #[serde(skip)]
   request_no: Arc<Mutex<usize>>,
}

#[serde(rename_all = "camelCase")]
struct Get<OBJ: Object>
where
    OBJ: std::fmt::Debug + Serialize,
{
   account_id: String,
   #[serde(flatten)]
   ids: Option<JmapArgument<Vec<String>>>,
   properties: Option<Vec<String>>,
   #[serde(skip)]
   _ph: PhantomData<*const OBJ>,
}
#[serde(rename_all = "camelCase")]
struct EmailGet {
   #[serde(flatten)]
   get_call: Get<EmailObject>,
   body_properties: Vec<String>,
   fetch_text_body_values: bool,
   fetch_html_body_values: bool,
   fetch_all_body_values: bool,
   max_body_value_bytes: u64,
}

impl Method<EmailObject> for EmailGet {
   const NAME: &'static str = "Email/get";
}

One of JMAP’s features is the ability to reference the results of previous calls in the same request, thus preventing the need for round-trips:

vCard

vCard is haphazardly parsed and available along with meli contacts. They are read-only for now, until a more standard-compliant parser and serializer is written.

contacts.png

sqlite3

sqlite3 searching uses a simple query language based on the Gmail webclient one:

((from:unrealistic and (to:complex or not “query”)) or flags:seen,draft)

You can also explore your data with SQL by loading the database ($XDG_DATA_HOME/meli/) with the sqlite3 cli tool. IMAP searches are converted from this language to SEARCH queries. notmuch queries are not tampered with at all.

quick unsubscribe

list_actions.png

If a newsletter has a List-Unsubscribe header, meli can send an unsubscribe request with the command list-unsubscribe. Other _List-*_ headers are also usable.

mailcap

You can now open attachments using mailcap files. You can still open them with xdg-open as well.

account info

View supported mailstore features in the status tab:

imap_status.png

maildir_status.png

vim-like motions

Prepend any move motion with a number n to repeat it n times.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK