CLI to manage emails
Go to file
2024-08-27 08:13:39 +02:00
.github fix release gh action 2024-04-20 07:50:57 +02:00
.vscode add nix support (#76) 2021-04-18 00:06:11 +02:00
assets add himalaya-watch@.service 2024-03-09 13:49:44 +01:00
src make deps point to new pimalaya organization path 2024-08-27 07:21:01 +02:00
.gitignore update code for sendmail sender lib feature 2022-10-12 13:59:20 +02:00
Cargo.lock make deps point to new pimalaya organization path 2024-08-27 07:21:01 +02:00
Cargo.toml make deps point to new pimalaya organization path 2024-08-27 07:21:01 +02:00
CHANGELOG.md make tables more customizable 2024-08-20 10:53:21 +02:00
config.sample.toml fix cargo features issues 2024-02-24 14:27:05 +01:00
CONTRIBUTING.md fix(CONTRIBUTING): Patches are requested to the wrong email 2024-03-09 11:08:29 +01:00
default.nix refactor msg model (#173) 2021-09-11 00:35:22 +02:00
flake.lock release v1.0.0-beta.4 2024-04-16 22:26:10 +02:00
flake.nix clean remaining parts 2024-04-19 22:11:16 +02:00
install.sh fix install.sh aarch64 2024-04-20 09:07:45 +02:00
LICENSE update license year 2024-01-01 00:31:19 +01:00
logo-small.svg make deps point to new pimalaya organization path 2024-08-27 07:21:01 +02:00
logo.svg make deps point to new pimalaya organization path 2024-08-27 07:21:01 +02:00
README.md refactor readme 2024-08-27 08:13:39 +02:00
rust-toolchain.nix add nix test github workflow 2024-04-18 22:06:24 +02:00
rust-toolchain.toml release v1.0.0-beta.4 2024-04-16 22:26:10 +02:00
screenshot.jpeg make deps point to new pimalaya organization path 2024-08-27 07:21:01 +02:00
shell.nix refactor msg model (#173) 2021-09-11 00:35:22 +02:00

Logo

📫 Himalaya

CLI to manage emails, based on email-lib

Release Repology Matrix

$ himalaya envelope list --account posteo --folder Archives.FOSS --page 2

screenshot

Features

  • Interactive configuration via wizard (requires wizard feature)
  • Mailbox/folder management (create, list, expunge, purge, delete)
  • Envelope listing, filtering and sorting
  • Message composition based on $EDITOR
  • Message manipulation (copy, move, delete)
  • Multi-accounting
  • JSON output with --output json
  • Basic backends:
    • IMAP (requires imap feature)
    • Maildir (requires maildir feature)
    • Notmuch (requires notmuch feature)
  • Sending backends:
    • SMTP (requires smtp feature)
    • Sendmail (requires sendmail feature)
  • PGP encryption:
    • via shell commands (requires pgp-commands feature)
    • via GPG bindings (requires pgp-gpg feature)
    • via native implementation (requires pgp-native feature)
  • Global system keyring for managing secrets (requires keyring feature)
  • OAuth 2.0 authorization (requires oauth2 feature)

Himalaya CLI is written in Rust, and relies on cargo features to enable or disable functionalities.

Default features can be found in the features section of the Cargo.toml.

Installation Repology

Prebuilt binary

Himalaya CLI can be installed with a prebuilt binary:

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

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

These commands install the latest binary from the GitHub releases section.

Binaries are built with default cargo features. If you want to enable or disable a feature, please use another installation method.

Cargo

Himalaya CLI can be installed with cargo:

$ cargo install himalaya

# With only IMAP support:
$ cargo install himalaya --no-default-features --features imap

You can also use the git repository for a more up-to-date (but less stable) version:

$ cargo install --git https://github.com/pimalaya/himalaya.git himalaya
Arch Linux

Himalaya CLI can be installed on Arch Linux with either the community repository:

$ pacman -S himalaya

or the user repository:

$ git clone https://aur.archlinux.org/himalaya-git.git
$ cd himalaya-git
$ makepkg -isc

If you use yay, it is even simplier:

$ yay -S himalaya-git
Homebrew

Himalaya CLI can be installed with Homebrew:

$ brew install himalaya
Scoop

Himalaya CLI can be installed with Scoop:

$ scoop install himalaya
Fedora Linux/CentOS/RHEL

Himalaya CLI can be installed on Fedora Linux/CentOS/RHEL via COPR repo:

$ dnf copr enable atim/himalaya
$ dnf install himalaya
Nix

Himalaya CLI can be installed with Nix:

$ nix-env -i himalaya

You can also use the git repository for a more up-to-date (but less stable) version:

$ nix-env -if https://github.com/pimalaya/himalaya/archive/master.tar.gz

# or, from within the source tree checkout
$ nix-env -if .

If you have the Flakes feature enabled:

$ nix profile install himalaya

# or, from within the source tree checkout
$ nix profile install

# you can also run Himalaya directly without installing it:
$ nix run himalaya
Sources

Himalaya CLI can be installed from sources.

First you need to install the Rust development environment (see the rust installation documentation):

$ curl https://sh.rustup.rs -sSf | sh

Then, you need to clone the repository and install dependencies:

$ git clone https://github.com/pimalaya/himalaya.git
$ cd himalaya
$ cargo check

Now, you can build Himalaya:

$ cargo build --release

Binaries are available under the target/release folder.

Configuration

Just run himalaya, the wizard will help you to configure your default account.

You can also manually write your own configuration, from scratch:

  • Copy the content of the documented ./config.sample.toml
  • Paste it in a new file ~/.config/himalaya/config.toml
  • Edit, then comment or uncomment the options you want

FAQ

How to debug Himalaya CLI?

The simplest way is to use --debug and --trace arguments.

The advanced way is based on environment variables:

  • RUST_LOG=<level>: determines the log level filter, can be one of off, error, warn, info, debug and trace.
  • RUST_SPANTRACE=1: enables the spantrace (a span represent periods of time in which a program was executing in a particular context).
  • RUST_BACKTRACE=1: enables the error backtrace.
  • RUST_BACKTRACE=full: enables the full error backtrace, which include source lines where the error originated from.

Logs are written to the stderr, which means that you can redirect them easily to a file:

RUST_LOG=debug himalaya 2>/tmp/himalaya.log
How the wizard discovers IMAP configs?

All the lookup mechanisms use the email address domain as base for the lookup. It is heavily inspired from the Thunderbird Autoconfiguration protocol. For example, for the email address test@example.com, the lookup is performed as (in this order):

  1. check for autoconfig.example.com
  2. look up of example.com in the ISPDB (the Thunderbird central database)
  3. look up MX example.com in DNS, and for mx1.mail.hoster.com, look up hoster.com in the ISPDB
  4. look up SRV example.com in DNS
  5. try to guess (imap.example.com, smtp.example.com…)

Sponsoring

nlnet

Special thanks to the NLnet foundation and the European Commission that helped the project to receive financial support from:

If you appreciate the project, feel free to donate using one of the following providers:

GitHub PayPal Ko-fi Buy Me a Coffee Liberapay