Mutt
The below minimal is largely based on the Arch wiki entry on mutt. Note that for the sidebar to work on Debian you need to install mutt-patched, not mutt!!
Minimal setup
Here is a minimal config using built in SMTP and IMAP:
# ~/.mutt/muttrc
# User credentials
set my_email=mail@example.com
set my_password=<PASSWORD>
# IMAP
set imap_user=$my_email
set imap_pass=$my_password
set folder=imaps://imap.server.tld/
set spoolfile=+INBOX
mailboxes =INBOX
set imap_check_subscribed
set header_cache=~/.mutt/cache
set message_cachedir=~/.mutt/cache
set postponed=+Drafts
unset imap_passive
set imap_keepalive=300
set mail_check=60
# SMTP
set record=+Sent
# or, possibly:
#set record="+Sent Items"
set my_pass=$my_password
set my_user=$my_email
set realname="My Realname"
set from=$my_email
set use_from=yes
set smtp_url=smtps://$my_user:$my_pass@smtp.server.tld
set ssl_force_tls=yes
set ssl_starttls=yes
#Sidebar
source ~/.mutt/sidebar.muttrc
# Further (optional tweaking)
set edit_headers=yes
#set mark_old=no
set sort=reverse-date-received
set editor="vim +8"
set date_format="%d/%m/%Y, %H:%M"
unset allow_8bit # might improve encoding display
#alias file (for use with abook)
set alias_file=~/.mutt/aliases # aliases-file is there
#set sort_alias= address
#set sort_alias= alias
set sort_alias= unsorted
set reverse_alias=yes
source $alias_file
set query_command="abook --mutt-query '%s'" # address book
auto_view text/html
alternative_order text/plain text/html
set mailcap_path = ~/.mutt/mailcap
set smart_wrap = yes
set markers = yes
set pager_stop = yes
# keybinds
source ~/.mutt/keybinds.muttrc
Keybinds:
# ~/.mutt/keybinds.muttrc
bind pager <Up> "previous-line" # scroll up one line
bind pager <Down> "next-line" # scroll up one line
For the sidebar:
# ~/.mutt/sidebar.muttrc
# shamelessly copied from Debian 8 - /usr/share/doc/mutt/examples/sidebar.muttrc
# which in turn shamelessly copied from
# [http://www.lunar-linux.org/index.php?option=com_content&task=view&id=44](http://www.lunar-linux.org/index.php?option=com_content&task=view&id=44)
#
# set up the sidebar, default not visible
set sidebar_width=24
set sidebar_visible=yes
set sidebar_delim='|'
# which mailboxes to list in the sidebar
mailboxes =INBOX
# color of folders with new mail
color sidebar_new yellow default
# ctrl-n, ctrl-p to select next, prev folder
# ctrl-o to open selected folder
bind index \CP sidebar-prev
bind index \CN sidebar-next
bind index \CO sidebar-open
bind pager \CP sidebar-prev
bind pager \CN sidebar-next
bind pager \CO sidebar-open
# I don't need these. just for documentation purposes. See below.
# sidebar-scroll-up
# sidebar-scroll-down
# b toggles sidebar visibility
macro index b '<enter-command>toggle sidebar_visible<enter>'
macro pager b '<enter-command>toggle sidebar_visible<enter>'
# Remap bounce-message function to "B"
bind index B bounce-message