Mutt is a very popular and powerful command line client for Email handling and is the tool of choice for many Linux power users.
It is fairly straightforward to configure Mutt Email client for Gmail IMAP on Centos 6/RHEL with a few simple commands.
This is a quick guide to getting it up and running on Centos 6/RHEL in basic IMAP mode for Gmail. If you want more then you could do much worse than checking out the guide at the Arch Linux wiki.
However, if you just want to get your Mutt working with Gmail Centos 6/RHEL then do the following.
First install it.
$sudo yum -y install mutt
Make a directory for the files.
$mkdir .mutt (or /home/<user_name>/.mutt
Now create and edit a muttrc file
vi ~/.mutt/muttrc ('i' to insert the following)
set imap_user = ‘firstname.lastname@example.org’
set imap_pass = ‘your password’
set spoolfile = imaps://imap.gmail.com:993/INBOX
set folder = imaps://imap.gmail.com:993
set record=”imaps://imap.gmail.com/[Gmail]/Sent Mail”
Save the file (Esc ZZ)
Should open up a mutt window accessing your Emails.