I speak here {^_^}

A very quick guide for mutt installation!

July 30, 2019

From past several days, I am constantly hearing folks from #dgplug, talking about their email management tactics, using several different email clients/tools. And Kushal's idea of keeping his inbox in a zero state, pulled my maximum attention.

So, now, here I am taking my very first step towards the same. :D

I am starting by changing my usual web-based email client to a command line, text-based email client, Mutt.

And with the aim of keeping this post a little sweet one, let me quickly walk you through the installation steps.

[Note:- These steps are in correspondance to a Ubuntu 18.04.1 LTS machine.

  • Install mutt with the following command.

$ sudo apt-get install mutt

  • Create a .muttrc file in your home directory and put the following content (with appropriate alterations as per your gmail account).

$ vim ~/.muttrc

//Paste the following content inside your file and make changes in the angular brackets.

set realname = "<first and last name>"
set from = "<gmail username>@gmail.com"
set use_from = yes
set envelope_from = yes

set smtp_url = "smtps://<gmail username>@gmail.com@smtp.gmail.com:465/"
set smtp_pass = "<app password>"
set imap_user = "<gmail username>@gmail.com"
set imap_pass = "<app password>"
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set ssl_force_tls = yes

# G to get mail
bind index G imap-fetch-mail
set editor = "vim"
set charset = "utf-8"
set record = ''


You might be worried about putting your gmail account password in a text-file (and obviously you should be). So, the alternative solution is to generate a new App Specific Password and put that in place of your actual gmail password in <app password>. It solves the issue of getting "Login Failed" errors as well, while connecting to the email IMAP server.

You may want to check this post here, to better understand how to generate an app specific password in gmail.

  • And now the final step is to run mutt. You will see it downloading all your emails from the inbox in terminal.

$ mutt

I have already purged some 11,000 emails right after installing it and there is lots more still left to filter.

And yes, I am yet to learn how to properly use mutt as well.

That's all for this short post. o/