~kmaasrud/nvlp

opinionated mail client
chore(deps): bump dependencies
feat: adjust wrapping to make mail fit in terminal
refactor: restructure src dir

refs

main
browse  log 

clone

read-only
https://git.sr.ht/~kmaasrud/nvlp
read/write
git@git.sr.ht:~kmaasrud/nvlp

You can also use your local clone with git send-email.

#nvlp

pronounced: envelope

nvlp is a command line mail handler inspired by the likes of MH, mblaze, neatmail and himalaya. It was born — like most projects — out of a desire for something simpler and more modern. There exists a plethora of mail clients for a reason; email is hard, and everyone has their own workflow and preferences. For me, many of the other email clients suffer from being archaic, overly complex, or not very user-friendly. They often aim to cater to a wide range of uses, which make them versatile but not always convenient for everyday use.

My main criteria are to have a mail handler that seamlessly works with command line piping, adheres to email standards and conventions, and is simple to use. I also want to offload the decision-making burden associated with email formats, workflows, and standards, by making sensible choices the default.

With nvlp, my goal is to address these concerns for myself first and foremost. Hopefully, I can offer a more user-friendly email management solution for others too.

#Installation and setup

Install nvlp by cloning this repo and running:

$ cargo install --path .

Ensure that the Cargo binary directory is in your $PATH or move the built binary to a directory that is.

Next you need your mail stored locally on disk. This is done via a Maildir++-formatted directory. If you're like most people and you host your mail on an IMAP or JMAP server, you'll need an external program to sync it to your computer before using nvlp. For this, I recommend mbsync (if you choose this option, remember to set the SubFolders option to "Maildir++".) Additionally, if you want to sign your email, you will need to have gpg installed.

After this, create the config file by running the following command and edit according to your setup:

$ cat > "${XDG_CONFIG_HOME:-$HOME/.config}/nvlp/default.toml" << EOF
email = "my@email.tld"
maildir = "/absolute/path/to/maildir++"
smtp-password-cmd = "pass get email"
smtp-host = "smtp.email.tld"
EOF

More options in the configuration are described in the manpage, which is readable by running man nvlp-config (WIP).

#Usage

For usage instructions, run nvlp [subcommand] --help or read through the manpages (WIP) with man nvlp.

#Opinions

  • Emails should be plain text (except when they shouldn't.)

    This is already well explained on https://useplaintext.email/. What that page does not cover, however, is the fact that we live in the real world, where people use Gmail and the likes. Our carefully thought-out email, wrapped at 72 columns and displayed in our terminal through solarized and a paid monospace font might look nice; not so much in the Gmail app on a phone. It might feel yucky, but clients should send multipart/alternative with a generated HTML part. Its the only way we can all get along.

  • Use Maildir++.

    Maildir got it right: Each email should be its own individual file and the delivery of said file should be guaranteed complete (cough mbox.) However, people use folders, and the only specification of folders in the maildir context is Maildir++ — we should not make a new one.

  • CLI, not TUI.

    This might alienate some people, but hear me out. Emails are very nice to work with on the command line. Git and it's patches are probably the best example here, but consider also the fact that MIME headers are (at their core) pretty simple to parse and use in scripts and similar. It also is much easier to combine email into your existing workflow if you are not stuck inside a TUI, and the UX is familiar. I use nvlp list like I use ls, nvlp read like cat and nvlp send like the > operator, and everything composes well together. However, if you absolutely want an interactive client, have a look at the very well designed aerc.

--
Happy mailing,
kmaasrud