Mutt is “a small but very powerful text-based mail client for Unix operating systems”.

The problem I find with many clever computer programs, is that they are written by people who are exceptionally intelligent and demand a large amount of specific knowledge to install and use. Considering myself competent in using computers, but not knowing much about the command-line, nor *nix of any kind, exploring the possibilities can be a devilish but rewarding challenge.

For free software to be truly free (as in both beer and speech), it should be easily installable and configurable by any literate adult. By that, I mean my mum should be able to follow the documentation to install and use the software. Any prerequisite knowledge not in the documentation should be referenced right at the start. There should be no or as low as possible a barrier to entry for everyone.

Why should we care about free and open source software? That’s a discussion for another day. But I will say this. People are working together to develop software that is useful to us, and sharing their working so anyone can contribute and make the software better.

I propose all software should have a mum’s guide. Especially free software:

  1. As a way to attract newcomers who feel generally that free (as in speech) software is unfamiliar and hard to learn, and;
  2. To lead with a good example for others to follow.

If the software cannot be installed and configured successfully, is that a fault of the user or the developer(s)?

So here is mutt for mums (on Mac OS X). Basic muttrc supplied by Koralatov.

Note: Although this is written up to be informative (and a little tongue-in cheek), I will be user-testing this with my mum. Don’t slam me for errors in this case, as I am proving a concept. And yes, I am also aware that my mum would not use Mutt over a GUI mail client.

Prerequisites

Installing Mutt

  1. Open Terminal by pressing the cmd key and space bar together, begin typing terminal, and hit enter when terminal is highlighted. Or, you can go to your Applications folder, open the Utlities folder, then double-click on Terminal.
  2. (You will have installed Homebrew per the prerequisites section above.) type the following command: brew install mutt
  3. Next install msmtp. (a smtp mail client for sending email). Type the following command: brew install msmtp

Setting up Mutt

This should be enough to get your started, but you’ll need to fill in your password in the appropriate places, and create the following folders by typing the command mkdir, leave a space, then type the folder name, and finally hit enter):

mkdir ~/mutt
mkdir ~/mutt/cache
mkdir ~/mutt/cache/bodies

You also need to create the following files (create files by typing the command touch, leave a space, then type the file name):

touch ~/mutt/sig
touch ~/mutt/aliases

To edit text files, we will be using a program called Nano. To use nano we type the command into our terminal.

nano ~/mutt/sig

Type in your signature, e.g., mine below. Use ctrl key and oh key together to save, hit enter, then use ctrl key and ex key together to exit. Signature editing with Nano

Your aliases file is populated in the following fashion, one entry per line (spacing is optional, but there must be at least one space between each part of the entry):

   alias son Iain Simpson <iain@m.com>
   alias bob1 Bob Robertson <bob.robertson29145@uk.magicalunicornmail.com>

Setting aliases is handy for later. When you are sending mail to someone, you can write bob1 in the To: field, rather than bob.robertson29145@uk.magicalunicornmail.com

Setting muttrc

This step involves editing two files (muttrc and msmtprc) using Nano, e.g., nano ~/muttrc

Firstly copy the text below (highlight with your mouse then press cmd key and c key together to copy). (We will paste this into Nano later.)

COPY FROM NEXT LINE, starting # muttrc

# muttrc
# ----------------------------------------------------------------------
# BASIC SETTINGS
# ----------------------------------------------------------------------
## IDENTITY
set        realname            =   "Your Name"
set        from                =   "your@email.com"
set        use_from            =    yes
set        hidden_host
set        envelope_from       =    yes

## ALIASES SETTINGS
source   ~/mutt/aliases
set        alias_file          =   ~/mutt/aliases
set        sort_alias          =     alias
set        reverse_alias       =     yes

## CACHE SETTINGS
set        certificate_file    =   ~/mutt/certificates
set        header_cache        =   ~/mutt/cache/headers
set        message_cachedir    =   ~/mutt/cache/bodies


# LAYOUT
# ----------------------------------------------------------------------
## INBOX SETTINGS
set    sort           =  "reverse-date-received"
set    index_format   =  "%4C  %Z   %-18.18L   %-30.30s   %{%b %d %H:%M}"
set    markers        =   no

## CLEAN HEADERS
ignore      *
unignore    From Date Subject To CC
hdr_order   From To CC Date Subject

# FORMATTING
# ----------------------------------------------------------------------
## COMPOSITION
set     autoedit        =    yes
set     recall          =    no
set     include         =    yes
set     tilde
set     editor          =    nano
set     signature        =   ~/mutt/sig
set     delete          =    yes
set     fast_reply      =    yes
set     fcc_clear
set     include         =    ask-yes
set     move            =    no
unset   reply_self

## FORMAT SETTINGS
set    allow_8bit       =    yes
set    charset          =   "utf-8"
set    send_charset     =   "utf-8"
set    locale           =    en_GB
set    use_8bitmime     =    yes
set    indent_string    =   "> "
set    wrap             =    78
set    smart_wrap
set    attribution      =   "On %D, %n wrote:\n"
set    date_format      =   "!%a, %b %d, %Y at %H:%M"
set    forward_format   =   "Fwd: %s"


# SERVER SETTINGS
# ----------------------------------------------------------------------
## IMAP SETTINGS
set    imap_user        =   "your@email.com"
set    imap_pass        =   "your password"
set    mail_check       =    60
set    check_new        =    yes
set    imap_keepalive   =    900

## SMTP SETTINGS
set sendmail = "/usr/bin/msmtp"
set sendmail_wait = -1

## FOLDERS
set    spoolfile       =   "imaps://imap.1and1.co.uk:993"
set    folder          =   "imaps://imap.1and1.co.uk:993"
set    record          =   "imaps://imap.1and1.co.uk/Sent"
set    postponed       =   "imaps://imap.1and1.co.uk/Drafts"
set    mbox            =   "imaps://imap.1and1.co.uk/Archives/2012"
set    pager_stop

STOP COPYING after set pager stop

  1. Type the following command nano ~/muttrc
  2. To paste into Nano, click within Nano, then press the cmd key and vee key together, or secondary click (right-click). That’s it. Secondary click
  3. You will need to look through the file using the arrow keys and change the IDENTITY, IMAP and FOLDERS settings. (You may need to google your IMAP settings, e.g., google search for AOL IMAP settings)
  4. As before, when finished editing, press ctrl key and oh key to save, hit enter, then ctrl key and ex key to exit.

Setting msmtprc

Lastly we will edit msmtprc. Following the same steps as above, copy the below and edit. Edit your host (per your googled IMAP settings), user and password.

nano ~/msmtprc

COPY FROM NEXT LINE, starting # msmtprc

# msmtprc:
# ----------------------------------------------------------------------

account default
host auth.smtp.1and1.co.uk
port 587
auth on
user your@email.com
password xxxxx
auto_from off
from your@email.com
tls on
tls_starttls on
tls_certcheck off

STOP COPYING after tls_certcheck off

Edit your host (per your googled IMAP settings), user and password.

RUNNING MUTT

To run Mutt, open a Terminal window (by pressing the cmd key and space bar together, begin typing terminal, and hit enter when terminal is highlighted), type mutt and hit enter. Mutt will open and provided you entered your settings correctly in muttrc and msmtprc, you will be receive and send mail. Now you just have to learn the keyboard shortcuts, and you’ll be navigating and managing your mail very speedily indeed. To exit mutt, just hit the ex key.

Posted
AuthorI.B. Simpson
CategoriesTech