# Himalaya

> Command-line email client written in Rust that lists, reads, sends and moves mail through shell commands with JSON output.

Himalaya is a stateless command-line email client: each action, such as listing envelopes or sending a message, is a separate shell command, so it fits scripts, editor plugins and other tools. It talks to IMAP, SMTP, JMAP, the Gmail API and Microsoft Graph, and reads Maildir and m2dir folders. Version 2 moved composing, PGP and OAuth token handling into separate Pimalaya tools (mml and ortie); a full-screen interface, himalaya-tui, is developed separately and is still pre-release.

- Type: Email client
- Interface: Command-line tools and prompts
- Systems: Runs on Linux, macOS and Windows, builds from source on BSD. Not available for Android.
- Language: Rust
- License: MIT or Apache 2.0 (MIT OR Apache-2.0)
- Latest version: 2.1.0
- Maintained: yes
- Website: https://pimalaya.org/
- Source: https://github.com/pimalaya/himalaya
- Documentation: https://github.com/pimalaya/himalaya#readme

## Install

### Linux

Native.

- pacman: `sudo pacman -S himalaya`
- Nix: `nix profile install github:pimalaya/himalaya`
- cargo: `cargo install --locked --git https://github.com/pimalaya/himalaya.git`
- Install script: `curl -sSL https://raw.githubusercontent.com/pimalaya/himalaya/master/install.sh | PREFIX=~/.local sh`

### macOS

Native.

- Homebrew: `brew install himalaya`
- cargo: `cargo install --locked --git https://github.com/pimalaya/himalaya.git`

### Windows

Native. Prebuilt x86_64 Windows binary on GitHub releases.

- Scoop: `scoop install himalaya`

### BSD

Build from source. No BSD package or prebuilt binary.

- cargo: `cargo install --locked --git https://github.com/pimalaya/himalaya.git`

### Android

Not supported.

## Protocols

- IMAP: Yes
- POP3: No
- SMTP: Yes
- JMAP: Yes
- Maildir: Yes
- mbox: No
- notmuch: No

## Features

- OpenPGP: No
- S/MIME: No
- OAuth2 sign-in: via script
- Threads: through the IMAP, JMAP and Gmail subcommands
- Search: built-in query syntax across backends; server-side for IMAP and JMAP
- HTML mail: No
- Mouse: No
- Multiple accounts: Yes
- Offline use: with the Maildir backend and a sync tool such as mbsync
- Calendar: No
- Contacts: No
- Vim-style keys: No
- Configuration: TOML file; interactive setup wizard

## Pros

- Every action is a shell command with optional JSON output, suited to scripts
- Native Windows binary through Scoop and GitHub releases
- Also supports JMAP, the Gmail API and Microsoft Graph

## Cons

- No interactive interface; himalaya-tui is still pre-release
- Composing rich MIME or PGP messages needs the separate mml tool
- Version 2 dropped the notmuch and sendmail backends

## Use Himalaya with Forward Email

File: `~/.config/himalaya/config.toml`

```
# Forward Email: IMAP over SSL/TLS (993), SMTP over SSL/TLS (465)
[accounts.forwardemail]
default = true
email = "you@example.com"
display-name = "Your Name"

imap.server = "imaps://imap.forwardemail.net:993"
imap.sasl.plain.username = "you@example.com"
imap.sasl.plain.password.command = "pass show email/forwardemail"

smtp.server = "smtps://smtp.forwardemail.net:465"
smtp.sasl.plain.username = "you@example.com"
smtp.sasl.plain.password.command = "pass show email/forwardemail"

# IMAP reports only the inbox role, so map the other folders by name
mailbox.alias.sent = "Sent Mail"
mailbox.alias.drafts = "Drafts"
mailbox.alias.trash = "Trash"
```

| Protocol | Server | Port | Security |
| --- | --- | --- | --- |
| IMAP | imap.forwardemail.net | 993 | SSL/TLS |
| POP3 | pop3.forwardemail.net | 995 | SSL/TLS |
| SMTP | smtp.forwardemail.net | 465 | SSL/TLS |
| SMTP | smtp.forwardemail.net | 587 | STARTTLS |

Username: your full alias address. Password: the one from Generate Password next to the alias. Folders: INBOX, Drafts, Sent Mail, Trash, Spam and Archive.

## Questions

### Does Himalaya work on Windows?

Yes, it runs natively on Windows. Prebuilt x86_64 Windows binary on GitHub releases.

### Does Himalaya support IMAP?

Yes, Himalaya connects to IMAP servers directly.

### Is Himalaya open source?

Yes, under the MIT or Apache 2.0.

### How do I use Himalaya with Forward Email?

Use the config in the Forward Email section on this page, saved as ~/.config/himalaya/config.toml, and replace the address and password with your own.

## Sources

- https://pimalaya.org/
- https://github.com/pimalaya/himalaya
- https://github.com/pimalaya/himalaya/blob/master/README.md
- https://github.com/pimalaya/himalaya/blob/master/MIGRATION.md
- https://github.com/pimalaya/himalaya/blob/master/CHANGELOG.md
- https://github.com/pimalaya/himalaya/blob/v2.1.0/config.sample.toml
- https://github.com/pimalaya/himalaya/blob/v2.1.0/Cargo.toml
- https://github.com/pimalaya/himalaya/blob/master/install.sh
- https://github.com/pimalaya/himalaya-tui
- https://crates.io/crates/himalaya
- https://formulae.brew.sh/formula/himalaya
- https://archlinux.org/packages/extra/x86_64/himalaya/
- https://github.com/ScoopInstaller/Main/blob/master/bucket/himalaya.json
- https://github.com/forwardemail/forwardemail.net/blob/master/helpers/ensure-default-mailboxes.js
