📫Himalaya: CLI email client written in Rust.

Overview

📫 Himalaya gh-actions gh-actions gh-actions

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

Credits

Comments
  • Mail/Msg refactoring

    Mail/Msg refactoring

    Hi! I did some changes to the Msg struct. You should be able now to use it for everything which is related to Msgs/Mails. This means:

    • You can build templates with it
    • You can reply with it
    • Edit the body
    • Add new attachments

    and so on.

    I'd really appreaciate it, if this could be merged, because the "new" Msg struct will be able to store all related information of a Msg which should make it easier for the TUI to display them.

    Hint

    It's not completely done yet. You can see below in the TODO section what is missing, but the rest should work.

    TODO

    • [X] Finish the Documentation
    • [X] Finish/Add Tests
    opened by TornaxO7 120
  • Experiments around TUI

    Experiments around TUI

    You can view in this pull request the "process" of the implementation of the TUI. Pls consider that I'm completely new in rust so I might be pretty slow, but I'll do my best.

    Status

    Created the src/tui directory with

    cargo new --lib tui
    

    Information for maintainer (@soywod )

    I'm creating the pull request now, so you can review any time the latest commits whenever you want, so you can give me immediately a feedback if something doesn't suit you. Is that fine for you?

    enhancement tui 
    opened by TornaxO7 82
  • Neovim plugin seems to be calling 'Himalaya --mailbox' which is causing an error when I try to start it

    Neovim plugin seems to be calling 'Himalaya --mailbox' which is causing an error when I try to start it

    Hello, Whenever I try to start Himalaya I get the following error:

    	error: Found argument '--mailbox' which wasn't expected, or isn't valid in this context^@^@USAGE:^@    himalaya list [OPTIONS]^@^@For more information try --help^
    

    Any help would be appreciated. Thanks in advance!

    duplicate 
    opened by devanlooches 44
  • Notmuch support?

    Notmuch support?

    Awesome project! Just tried it out :)

    I'm wondering if there is a plan to support notmuch labels? In my aerc setup I've written some scripts that translate protonmail labels to notmuch labels which I like to see in my email client. Alternatively to notmuch labels could there be an option to show next to the email subject the labels associated to the email given by which Labels.xxx folders it also belongs to?

    enhancement cli 
    opened by AckslD 32
  • Introduce backends

    Introduce backends

    For now, we can only connect himalaya to an IMAP server with this config:

    global-settings
    
    [account-name]
    account-settings
    

    We want to connect other backends:

    • [x] https://github.com/soywod/himalaya/pull/296

    • [x] #43

    • [x] #57

    • [x] #318

    I propose to change the config this way:

    global-settings
    
    [backend-name.account-name]
    account-settings
    

    The fact to prefix the account with a backend allow us to have different APIs of account settings (one per backend). Plus it will match well with the toml to rust deserialization.

    To avoid breaking changes, we can consider that the default backend (if no prefix given) is the IMAP one. But it could be nice to deprecate such implicit usage. To show a warning to those users, we will need https://github.com/soywod/himalaya/pull/293.

    enhancement cli 
    opened by soywod 29
  • No reaction to incoming email when running `himalaya notify`

    No reaction to incoming email when running `himalaya notify`

    It's entirely possible that I'm not doing this correctly, but I'm not seeing any notifications when running himalaya notify.

    notify-send works fine. himalaya list and other features work as expected, so I think my configuration is OK. I've tried setting notify-cmd to something sensible, and leaving it unset. I'm also not seeing any reactions to incoming email when running himalaya watch (after setting watch-cmd). Troubleshooting suggestions welcome.

    opened by gleachkr 27
  • [Question] setup with pass and sync

    [Question] setup with pass and sync

    Hello. I want to try Himalaya but I don't know how to setup it properly. I want to put passes with gnu pass. How can I fill gpg password in gpg-agent and run Himalaya to watch my accounts and send notifications?

    invalid 
    opened by timsofteng 25
  • Protonmail bridge SMTP timed out STARTTLS

    Protonmail bridge SMTP timed out STARTTLS

    I'm trying to send an email using himalaya through the protonmail bridge but I'm getting the error:

    internal client error: timed out waiting for connection: Connection error: Could not connect
    

    after some time. Any thoughts on what could be going wrong? imap does work fine.

    My config is:

    [proton]
    default = true
    email = "<MYEMAIL>"
    
    imap-host = "127.0.0.1"
    imap-port = 1143
    imap-login = "<MYEMAIL>"
    imap-passwd-cmd = "echo <IMAP_PWD>"
    imap-starttls = true
    
    smtp-host = "127.0.0.1"
    smtp-port = 1025
    smtp-login = "<MYEMAIL>"
    smtp-passwd-cmd = "echo <IMAP_PWD>"
    smtp-starttls = true
    

    where things inside <> are replaced by their actual values.

    bug cli 
    opened by AckslD 24
  • Cannot build sendable message: missing destination address, invalid envelope

    Cannot build sendable message: missing destination address, invalid envelope

    Email addresses are way too complex. :)

    In the To: field, the following causes an error even though it is/should be valid:

    To: \"Lastname, First\" <[email protected]>

    (This was in response to himalaya reply 3)

    bug cli 
    opened by sbromberger 23
  • Error: cannot parse envelope

    Error: cannot parse envelope

    I'm on void linux, terminal is st, using fish shell but error also occurs with bash

    Error: cannot parse envelope
    
    Caused by:
        0: cannot decode subject of message 1
        1: Invalid byte 61, offset 130.
    
    

    the subject line was:

    Your App‌l‌e I‌D‌ has been locke‌‌d‌‌ on Saturday, May, 14 2022 [ref:_043871]

    (copied from outlook.com)

    let me know if you need any other info

    bug 
    opened by fuzzysh 22
  • Customize table columns + adjust the JSON output

    Customize table columns + adjust the JSON output

    Wonderful project!

    I got it working pretty easily with my Fastmail account.

    I'd like to use this to run some analysis based on specific message headers. Is it possible to output (either in plain or JSON) specific headers?

    something like

    himalaya --output json --headers Subject,Message-ID,Date
    
    enhancement cli 
    opened by luckman212 21
  • Release v0.6.2

    Release v0.6.2

    Added

    • Added the email composer (from its own repository) [#341].
    • Added Musl builds to releases [#356].
    • Added himalaya man command to generate man page [#419].

    Changed

    • Made commands read, attachments, flags, copy, move, delete accept multiple ids.
    • Flipped arguments ids and folder for commands copy and move in order the folder not to be considered as an id.

    Fixed

    • Fixed missing folder aliases [#430].

    Removed

    • Removed the -a|--attachment argument from write, reply and forward commands. Instead you can attach documents directly from the template using the syntax <#part filename=/path/to/you/document.ext>.
    • Removed the -e|--encrypt flag from write, reply and forward commands. Instead you can encrypt and sign parts directly from the template using the syntax <#part type=text/plain encrypt=command sign=command>Hello!<#/part>.
    • Removed the -l|--log-level option, use instead the RUST_LOG environment variable (see the wiki)

    himalaya-lib

    Added

    • Made backend functions accept a vector of id instead of a single id [#20].
    • Added function Backend::purge_folder that removes all emails inside a folder.

    Fixed

    • Used native IMAP commands copy and mv.
    • Fixed maildir date envelope parsing.
    • Fixed inline attachments not collected.

    Changed

    • Improved Backend method names. Also replaced the self mut by a RefCell.
    • Simplified the Email struct: there is no custom implementation with custom fields. Now, the Email struct is just a wrapper around mailparse::ParsedMail.
    • Improved Flag structures.
    • Changed Backend trait functions due to [#20]:
      • list_envelope => list_envelopes
      • search_envelope => search_envelopes
      • get_email => get_emails, takes now ids: Vec<&str> and returns an Emails structure instead of an Email)
      • copy_email => copy_emails, takes now ids: Vec<&str>.
      • move_email => move_emails, takes now ids: Vec<&str>.
      • delete_email => delete_emails, takes now ids: Vec<&str>.
      • add_flags takes now ids: Vec<&str> and flags: &Flags.
      • set_flags takes now ids: Vec<&str> and flags: &Flags.
      • remove_flags takes now ids: Vec<&str> and flags: &Flags.

    Removed

    • The email::Tpl structure moved to its own repository.
    • Encryption and signed moved with the email::Tpl in its own repository.

    Pending issues

    • [x] Waiting for a new release from https://github.com/jonhoo/rust-imap/issues/220.
    • [ ] Waiting for a new release from https://github.com/zesterer/chumsky/discussions/224#discussioncomment-4373295
    • [ ] Waiting for this PR to be merged and for a new release https://github.com/lettre/lettre/pull/839
    • [x] Waiting for an answer on decrypting and verifying parts https://github.com/staktrace/mailparse/issues/112
    opened by soywod 0
  • Configuration wizard

    Configuration wizard

    Another try at #312 with the new API, namely greeting the user with a wizard when no configuration can be found.

    I'm aiming at making the wizard flexible wrt. the configuration values, but I hope this PR gives us a chance to properly evaluate the config structure. I feel that we should be able to streamline it a bit, but I'm not sure how (yet.)

    opened by kmaasrud 1
Releases(v0.6.1)
Owner
Clément DOUIN
TypeScript / Rust / Haskell / OCaml
Clément DOUIN
Pay a lightning email to send an email to the website owner

TODO USE human readable age in encryption (support "e" as backward compatible) go back to referrer or provided option save time taken to send email op

Riccardo Casatta 12 Aug 24, 2022
Rust implementation of catapulte email sender

Catapulte What is catapulte? Catapulte is an open source mailer you can host yourself. You can use it to quickly catapult your transactionnal emails t

Jérémie Drouet 108 Dec 14, 2022
This app reads a csv file and sends an email with a formatted Handlebars file.

Bulkmail This app reads a csv file and sends an email with a formatted Handlebars file. This can be run on Linux for AMD64 and ARMv7. Upstream Links D

Giovanni Bassi 17 Nov 3, 2022
Automatically check for SPF misconfigurations that could result in email spoofing

SPFJack Email spoofing is dead, but misconfiguration never dies. Purpose This project is designed to take in domain names and review their SPF records

Alex (LunarCA) 2 Mar 27, 2022
Mjml - the only framework that makes responsive-email easy

MJML 4 If you're looking for MJML 3.3.X check this branch | Translated documentation | Introduction | Installation | Usage | Translated documentation

MJML 14.8k Jan 6, 2023
新しい IMAP client in Rust

新しい IMAP client 新しい (atarashii/new) IMAP client in Rust. It supports plain and secure connections. In progress It's under development... Usage Put thi

Alex Maslakov 39 Sep 13, 2020
mail-builder is a flexible e-mail builder library written in Rust that generates RFC5322 compliant e-mail messages

mail-builder mail-builder is a flexible e-mail builder library written in Rust that generates RFC5322 compliant e-mail messages. The library has full

Stalwart Labs 37 Dec 19, 2022
A mail suite written in rust meant to be easy to use.

Erooster A mail suite written in rust meant to be easy to use. Getting started Currently the setup is quite rough. You need some certificates for your

Marcel 33 Dec 19, 2022
An ESMTP server library written in Rust.

rs-smtp An ESMTP server library written in Rust. Features ESMTP client & server implementing RFC 5321 Support for SMTP AUTH and PIPELINING UTF-8 suppo

DUNEF 3 Apr 15, 2023
Unofficial Rust library for the SendGrid API

sendgrid-rs Unofficial Rust library for the SendGrid API. This crate requires Rust 1.15 or higher as it uses a crate that has a custom derive implemen

Garrett Squire 88 Dec 27, 2022
a mailer library for Rust

lettre A mailer library for Rust NOTE: this readme refers to the 0.10 version of lettre, which is still being worked on. The master branch and the alp

lettre 1.3k Jan 4, 2023
Rust library to parse mail files

mailparse A simple parser for MIME email messages. API The primary entry point for this library is the following function: parse_mail(&[u8]) -> Re

Kartikaya Gupta (kats) 150 Dec 27, 2022
Implementation of mjml in rust

MRML Introduction This project is a reimplementation of the nice MJML markup language in Rust. How to use it use mrml; fn main() { match mrml::to

Jérémie Drouet 228 Dec 28, 2022
Fast and robust e-mail parsing library for Rust

mail-parser mail-parser is an e-mail parsing library written in Rust that fully conforms to the Internet Message Format standard (RFC 5322), the Multi

Stalwart Labs 158 Jan 1, 2023
A rewrite of the server side parts of emersion/go-smtp package into rust.

rust-smtp-server A rust smtp server library. It's mainly a rewrite of the server side parts of the emersion/go-smtp library. Features Usage Add this t

Nick Westendorf 3 Apr 26, 2023
E-mail delivery library for Rust with DKIM support

mail-send mail-send is a Rust library to build, sign and send e-mail messages via SMTP. It includes the following features: Generates e-mail messages

Stalwart Labs 165 Oct 23, 2023
Check if an email address exists without sending any email, written in Rust.

Check if an email address exists without sending any email, written in Rust.

Reacher 3.5k Dec 31, 2022
Pay a lightning email to send an email to the website owner

TODO USE human readable age in encryption (support "e" as backward compatible) go back to referrer or provided option save time taken to send email op

Riccardo Casatta 12 Aug 24, 2022
Open source email client written in Rust and Dioxus. Under 🏗️

Blazemail A full-featued, beautiful, mail client that doesn't suck. Works on mac, windows, linux, mobile, web, etc. Features, status Blazemail is curr

Jon Kelley 13 Dec 19, 2022
Command line tool for cheap and efficient email automation written in Rust

Pigeon Pigeon is a command line tool for automating your email workflow in a cheap and efficient way. Utilize your most efficient dev tools you are al

null 57 Nov 20, 2022