Introduction

NeoMutt is a command line mail reader, a fork of Mutt. It' versatile and highly configurable.

That is what it says on NeoMutt website, and the reason I decide to give it a try.

Installation

Base on Download page on NeoMutt website, it should be available on most distro repos.

1
2
sudo apt install neomutt
sudo pacman -S neomutt

Configuration

NeoMutt will try to load configuration on multiple location. I’m going to use the user default configuration location ~/.config/mutt/muttrc which a legacy of Mutt.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
# setup imap and smtp server information
set folder      = "imaps://[email protected]:993"
set smtp_url    = "smtp://[email protected]:587"

# sending
set from        = "[email protected]"
set realname    = "John Doe"

# mailboxes
set spoolfile   = "+INBOX"
set record      = "+Sent"
set trash       = "+Trash"
set postponed   = "+Drafts"

mailboxes =INBOX =Sent =Trash =Drafts =Junk =Other

The spoolfile is the folder where your (unfiltered) e-mail arrives. Most e-mail services conventionally name it INBOX

URL format in folder adn smtp

$$ \underbrace{imaps}_{protocol}://\underbrace{account}_{login\ account}@\underbrace{mail.example.com}_{domain}:\underbrace{993}_{port} $$
  • protocol: Remove suffix s if mail server doesn’t support SSL.
  • account: Mail server may requires a full email address as an login account, if so, just replace account with it:
    1
    
    set folder      = "imaps://[email protected]@mail.example.com:993"
    
  • domain: Could be something like smtp.example.com imap.example.com which should be provided by the mail service provider.
  • port: Same as domain

First run

With previous simple configuration, we can now launch NeoMutt. We shall see a Password prompt during the process, otherwise, see if any error message and double check the configuration file.

Now we enter Index Screen:

Index Screen

id flag sent date sender size title
1 + Nov 16 Klesh ( 25) Re: hello world

Flags

* `N`: New email
* `!`: Important email (toggle by capital `F`)
* `r`: Email that has been forwarded or replied to
* `*`: Tagged email (toggle by `t`)

Theads ordering

Mail threads are ordered by date ascendingly, which is odd, at least to me… so I added following line to my configuration.

1
2
set sort = "threads"
set sort_aux = "reverse-last-date-received"

Note that NeoMutt need to be restarted for configuration to work.

IMAP user

Capital G is the default key to fetch POP mails, for IMAP users we could rebind this key by putting following line to the muttrc

1
bind index G imap-fetch-mail

Basic navigation

Press j move to next mail thread, k move to previous mail thread. Press Enter to read mail, pay attention to the top menu, uses Space and - keys to scroll up and down. q returns to Index view.

Cheatsheet

Mutt Cheat

http://sheet.shiar.nl/mutt

How to send mail:

  1. Press m on Index View
  2. A prompt show appear on the bottom left corner showing ‘To:’, enter receipient email address and hit Enter
  3. Enter mail title on ‘Subject:’ prompt.
  4. Now NeoMutt should invoke the EDITOR (which is the command set by Environment Variable EDITOR), key in the messages, save and quit
  5. We are now back to NeoMutt, as the top menu suggested, press y to send out immediately.
  6. Press q if your want to save draft, NeoMutt will ask if we want to recall the draft next time we press m

How to reply mail:

  1. Highlight the mail thread we want to reply on Index View by press j/k or other ways…
  2. Press r, the rest are same as sending mail