Git Product home page Git Product logo

himalaya's Introduction

πŸ“« Himalaya

gh-actions gh-actions gh-actions Homebrew

CLI email client written in Rust.

The project is under active development. Do not use in production before the v1.0.0 (see the roadmap).

image

Motivation

Bringing emails to the terminal is a pain. First, because they are sensitive data. Secondly, the existing TUIs (Mutt, NeoMutt, Alpine, aerc…) are really hard to configure. They require time and patience.

The aim of Himalaya is to extract the email logic into a simple (yet solid) CLI API that can be used directly from the terminal, from scripts, from UIs… Possibilities are endless!

Installation

# As root:
curl -sSL https://raw.githubusercontent.com/soywod/himalaya/master/install.sh | sudo sh

# As a regular user:
curl -sSL https://raw.githubusercontent.com/soywod/himalaya/master/install.sh | PREFIX=~/.local sh

See the wiki for other installation methods.

Configuration

# ~/.config/himalaya/config.toml

name = "Your full name"
downloads-dir = "/abs/path/to/downloads"
signature = """
--
Regards,
"""

[gmail]
default = true
email = "[email protected]"

imap-host = "imap.gmail.com"
imap-port = 993
imap-login = "[email protected]"
imap-passwd-cmd = "pass show gmail"

smtp-host = "smtp.gmail.com"
smtp-port = 465
smtp-login = "[email protected]"
smtp-passwd-cmd = "security find-internet-password -gs gmail -w"

See the wiki for all the options.

Features

  • Mailbox listing
  • Email listing and filtering
  • Email composition based on $EDITOR
  • Email manipulation (copy/move/delete)
  • Multi-accounting
  • IDLE mode for real-time notifications
  • Vim plugin
  • Completions for bash/zsh/fish
  • JSON output
  • …

See the wiki for all the features.

Sponsoring

github paypal ko-fi buy-me-a-coffee liberapay

Credits

himalaya's People

Contributors

acksld avatar alexwennerberg avatar chambln avatar chawyehsu avatar chenrui333 avatar fancycade avatar igbanam avatar matthiasbeyer avatar msfjarvis avatar mtoohey31 avatar paolobarbolini avatar remche avatar soywod avatar srid avatar toastal avatar tornaxo7 avatar vladimyr avatar yanganto avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

hmpthcs

himalaya's Issues

Forwarded message's signature misplaced

We already discussed this (#9), and I really think the signature should be below the forwarded message (not above). Later we could add an option for this, but for now I would prefer to stay "standard".

Improve tests

Trying to find a solution for this case for example. Also thinking about a test trait... or not...

Process

@soywod When I started to rewatch the code I found the following:

  • A robust type-safety change like here wouldn't be bad: Changing the parameter type of flags to our struct Flags
    Do you agree to this?

  • I also found an issue when I tried to add a flag. In general I'd like to write some tests for the subcommands and so on first.

I'll wait for your respond first before I keep implementing (I've already started to adjust the Flags struct).

Read

  • The JSON output does not have the same shape (it misses hasAttachment)
  • The JSOn output should show the text/html version of the mail if no text/plain is found.

Template shows raw data with JSON format

himalaya --output json template reply/forward shows the raw buffer data (it should be discarded).

[EDIT]: in fact it should not be discarded, but it should show the raw message as string (not buffer). This way we align with the existing behaviour (it is useful for UIs).

General

  • The From header contains only the email address (it should contains the name if available My Name <[email protected]>
  • The signature is missing
  • The Subject header is missing

Template

[] The raw should be excluded from the JSON export (#[serde(skip_serializing)])
[] The JSON export should be in camelCase, not in snake_case (#[serde(rename_all = "camelCase")])

Discussion about `mail_refactor`

Envelope

I'm a bit suspicious about the name "Envelope". Theoretically, the envelope is the container of the message. The struct looks more like headers for me. I checked what you put in the doc (about the Envelope of the crate imap_proto), and it matches well indeed. But imap_proto and himalaya are not on the same level: imap_proto is really low level, whereas himalaya is at the top level. The meaning of Envelope is not really the same. The 2 options I see so far is:

  • Rename Envelope (sth like Headers for example)
  • Use the imap_proto struct directly instead of creating our own one

Feel free to argue of course, maybe I miss some information.

Signature in envelope

I do not think the signature should be there. Also (it's not fully related to what you propose, it was already the case before), I'm half satisfied with how the signature is processed. It's a bit overwhelming. We never know when to append \n, how many of them etc. I thought about introducing a function like append_signature that takes in parameter a mutable body and appends the signature if exists. Feel free to propose btw.

Signature position in a forward message

I see that you put the signature before the quote in a forward message, what are your motivations? I think it should be after the quote instead. The default (and recommanded) option in Thunderbird is below the quote:

screenshot

I may add more points in the future.

PS: don't think I'm bashing your work, in fact you did quite well (like the tests based on RFC examples, the try_from etc). I just list here all points that I partially agree with πŸ˜‰

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.