Going back to terminal based apps:
I’ve just recently gone back to the old-school ways of using the terminal instead of gui apps, as at work we administer a lot of Debian based servers remotely via ssh. My desktop now has one terminal open, with around 5-6 “Screens” with Mutt(email), Irssi(IRC), TwitVim(Identica), Elinks(Web) and a couple of spares for terminal/ssh work and editing with Vim.
Mutt is easier than you think:
To install mutt on Crunchbang/Squeeze:
sudo apt-get install mutt
Next, in the terminal, create these directories that mutt needs to cache message headers and bodies, and store certificates:
mkdir -p ~/.mutt/cache/headers
Now, create a basic Gmail-ready .muttrc
Choose your own text editor, I use Vim
And paste this basic gmail-ready config:
Once you have it pasted, edit the Gmail account details (everything you’ll need to alter is IN CAPITALS.) and save the file.
**Note** If you are in the UK you will need to use a slightly different config:HERE
**Edit** Darrin suggested that as your password is in plaintext, it may also be a good idea to encrypt your home directory as well for added security. (I’ll try to post a guide on single file encryption, directory encryption and entire drive/partition encryption at a later date) Thanks for the suggestion Derrin.
# Change the following six lines to match your Gmail account details
set imap_user = "YOUR.EMAIL@gmail.com"
set imap_pass = "PASSWORD"
set smtp_url = "smtp://YOUR.EMAIL@smtp.gmail.com:587/"
set smtp_pass = "PASSWORD"
set from = "YOUR.EMAIL@gmail.com"
set realname = "YOUR NAME"
# Change the following line to a different editor you prefer.
set editor = "vim"
# Basic config, you can leave this as is
set folder = "imaps://imap.gmail.com:993"
set spoolfile = "+INBOX"
set hostname = gmail.com
set mail_check = 120
set timeout = 300
set imap_keepalive = 300
set postponed = "+[GMail]/Drafts"
set record = "+[GMail]/Sent Mail"
set move = no
set sort = 'threads'
set sort_aux = 'reverse-last-date-received'
set auto_tag = yes
hdr_order Date From To Cc
alternative_order text/plain text/html *
bind editor complete-query
bind editor ^T complete
bind editor noop
# Gmail-style keyboard shortcuts
macro index,pager y "unset trash\n " "Gmail archive message"
macro index,pager d "set trash=\"imaps://imap.googlemail.com/[GMail]/Bin\"\n " "Gmail delete message"
macro index,pager gi "=INBOX" "Go to inbox"
macro index,pager ga "=[Gmail]/All Mail" "Go to all mail"
macro index,pager gs "=[Gmail]/Starred" "Go to starred messages"
macro index,pager gd "=[Gmail]/Drafts" "Go to drafts"
Start Using Mutt:
Run it from the terminal by simply typing mutt and hit “enter”. The first time you do this, you’ll be prompted to accept two SSL certificates from Google; press ‘a’ to always accept these certificates. You should now be greeted by your Gmail inbox.
Navigating, Reading and Sending Emails
Mutt is controlled from the keyboard and the following shortcuts will get you up and running:
For a more in depth list of commands and config features, either hit the “?” key in an open Mutt session or type “man mutt” in the terminal.
j to move down.
k to move up.
d to delete a message
y to archive one
gi to view your Inbox
ga to view All Mail
gd to view Drafts
gs to view Starred messages
And here are a few more that are particular to mutt:
t will mark a message
s will save one, or more
c lets you change to a different folder
/ lets you search the current folder
Sending Email with mutt
The basics look like this:
1. Type m (or r if you’re replying to a mail)
2. Enter the recipients email address; hit Return
3. Enter a subject; hit Return
4. Write your message.
5. Save it.
6. Type y, and your message will be sent.
Type q to quit mutt.