Mail client Mutt configuration

Mutt is a powerful mail client on linux, especially when you work mostly with the terminal and want to use a terminal based mail client, mutt is a perfect match.
sudo apt install libncurses-dev libncursesw5 libncursesw5-dev libsasl2-dev w3m libssl-dev
ldd `which mutt` | grep curses
Install Mutt
Install mutt
./configure --enable-imap --with-ssl --enable-smtp --enable-flock --enable-hcache --with-sasl --with-regex --enable-nfs-fix --without-wc-funcs --enable-locales-fix
Intall neomutt
./prepare --enable-imap --with-ssl --enable-smtp --enable-flock --enable-hcache --with-sasl --with-regex --enable-nfs-fix --without-wc-funcs --enable-locales-fix --enable-sidebar --enable-compressed
Install dependencies
sudo apt-get install libiconv-hook1 libiconv-hook-dev
perl -MCPAN -e shell
sudo
install Mail::Box::Maildir
install String::ShellQuote
Can't locate object method "unbind_key" via package "Term::ReadLine::Stub"
sudo apt install libterm-readline-gnu-perl
Addressbook:
install abook:ftp://ftp.debian.org/debian/pool/main/a/abook/
Mutt and abook
A simple setup for using abook as an external addressbook program:
set query_command = "abook --mutt-query '%s'"
macro generic,index,pager \ca "<shell-escape>abook<return>" "launch abook"
macro index,pager A "<pipe-message>abook --add-email<return>" "add the sender address to abook"
You can also use the abook convert facility to import the content of a mutt aliases file into abook. This is the syntax:
abook --convert [ --informat <input format> ] [ --infile <input file> ] [ --outformat <output format> ] [ --outfile <output file> ]
It will convert <input file> in <input format> to <output file> in <output format>.
So for example:
abook --convert --informat mutt --infile ~/.mutt/aliases --outformat abook --outfile ~/.abook/addressbook
GPG config
http://www.calmar.ws/mutt/
http://wcm1.web.rice.edu/mutt-tips.html
https://pbrisbin.com/posts/mutt_gmail_offlineimap/
https://github.com/pbrisbin/dotfiles
Send mail via the msmtp
$ echo -e "Subject: Test\r\n\r\nThis is a test mail" | msmtp kelvin@example.com