CLI to manage emails
Go to file
2021-03-12 23:01:01 +01:00
.github add buymeacoffee funding provider 2021-03-11 22:54:10 +01:00
src improve errors management 2021-03-12 23:01:01 +01:00
.gitignore init project, init toml config parser 2020-12-24 00:55:57 +01:00
Cargo.lock improve errors management 2021-03-12 23:01:01 +01:00
Cargo.toml improve errors management 2021-03-12 23:01:01 +01:00
CHANGELOG.md add idle mode 2021-03-11 17:22:16 +01:00
install.sh improve readme 2021-01-17 17:07:23 +01:00
LICENSE improve readme 2021-01-17 17:07:23 +01:00
README.md rename idle notify cmd 2021-03-12 00:07:01 +01:00

📫 Himalaya gh-actions

Minimalist CLI email client, written in Rust.

image

Table of contents

Motivation

Bringing emails to the terminal is a pain. The mainstream TUI, (neo)mutt, takes time to configure. The default mapping is not intuitive when coming from the Vim environment. It is even scary to use at the beginning, since you are dealing with sensitive data!

The aim of Himalaya is to extract the email logic into a simple (yet solid) CLI API that can be used either directly from the terminal or UIs. It gives users more flexibility.

Installation

curl -sSL https://raw.githubusercontent.com/soywod/himalaya/master/install.sh | bash

See the wiki section for other installation methods.

Configuration

# ~/.config/himalaya/config.toml

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

[gmail]
default = true
email = "your.email@gmail.com"

imap-host = "imap.gmail.com"
imap-port = 993
imap-login = "your.email@gmail.com"
imap-passwd-cmd = "pass show gmail"

smtp-host = "smtp.gmail.com"
smtp-port = 487
smtp-login = "your.email@gmail.com"
smtp-passwd-cmd = "security find-internet-password -gs gmail -w"

See the wiki section for all the options.

Usage

Himalaya 0.2.0
soywod <clement.douin@posteo.net>
📫 Minimalist CLI email client

USAGE:
    himalaya [OPTIONS] [SUBCOMMAND]

FLAGS:
    -h, --help       Prints help information
    -V, --version    Prints version information

OPTIONS:
    -a, --account <STRING>    Name of the account to use
    -o, --output <STRING>     Format of the output to print [possible values: text, json]

SUBCOMMANDS:
    attachments    Downloads all attachments from an email
    forward        Forwards an email
    help           Prints this message or the help of the given subcommand(s)
    idle           Starts the idle mode
    list           Lists emails sorted by arrival date
    mailboxes      Lists all available mailboxes
    read           Reads text bodies of an email
    reply          Answers to an email
    save           Saves a raw message in the given mailbox
    search         Lists emails matching the given IMAP query
    send           Sends a raw message
    template       Generates a message template
    write          Writes a new email

See the wiki section for more information about commands.

List mailboxes

image

Shows mailboxes in a basic table.

List messages

image

Shows messages in a basic table.

Search messages

image

Shows filtered messages in a basic table. The query should follow the RFC-3501.

Download attachments

image

Downloads all attachments from a message directly to the downloads-dir.

Read a message

image

Shows the text content of a message (text/plain if exists, otherwise text/html).

Write a new message

himalaya write

Opens your default editor (from the $EDITOR environment variable) to compose a new message.

Reply to a message

himalaya reply --all 5123

Opens your default editor to reply to a message.

Forward a message

himalaya forward 5123

Opens your default editor to forward a message.

Listen to new messages

himalaya idle

Starts a session in idle mode (blocking). When a new message arrives, it runs the command notify-cmd defined in the config file.

Here a use case with systemd:

# ~/.config/systemd/user/himalaya.service

[Unit]
Description=Himalaya new messages notifier

[Service]
ExecStart=/usr/local/bin/himalaya idle
Restart=always
RestartSec=5

[Install]
WantedBy=multi-user.target
systemctl --user enable himalaya.service
systemctl --user start  himalaya.service

Credits