Mutt for my Mum

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, however they 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.

But why is free software so poorly documented? #

For free software to be truly free (as in both beer and speech), it should be easily installable and configurable by any literate person. Not barricaded by prickly and/or incomplete instructions.

For example, my lovely but computer-phobic mum should be able to follow documentation to install and use the software. All 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 and usage.

Why should we care about free and open source software? That’s a discussion for another day. But I will say this. Generous people are working together in their own time to develop software that is useful to the public. They share their working so anyone can contribute and make the software better.

All software should have a plainly written and easy-to-follow user’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 my 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 Utilities 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 the "enter" key):

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, and hit the "enter" key):

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.

Aliases (email address shortcuts) #

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

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).

nano ~/mutt/aliases

EXAMPLE aliases

alias son rogerdodger@aol.com (Roger Dodger)
alias bob1 bob.robertson29145@uk.magicalunicornmail.com (Bob Robertson)

'alias' = tells mutt this is an alias 'son' = the alias you type in the To: field when creating a new email. 'roger…' = the email address '(Roger…)= how the real name is displayed

Setting .muttrc #

This step involves editing two files (.muttrc and .msmtprc) using a text editor called Nano.

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       =
## ALIASES SETTINGS
source   ~/mutt/aliases
set        alias_file          =   ~/mutt/aliases
set        sort_alias          =     alias
set        reverse_alias       =
## CACHE SETTINGS
set        certificate_file    =   ~/mutt/certificates
set        header_cache        =   ~/mutt/cache/headers
set        message_cachedir    =   ~/mutt/cache/bod
# LAYOUT
# --------------------------------------------------------------
## INBOX SETTINGS
set    sort           =  "reverse-date-received"
set    index_format   =  "%4C  %Z   %-18.18L   %-30.30s   %{ %b %d %H:%M }"
set    markers        =
## CLEAN HEADERS
ignore      *
unignore    From Date Subject To CC
hdr_order   From To CC Date Subj
# 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_s

## 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:

# 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   =

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

## FOLDERS
set    spoolfile       =   "imaps://imap.ionos.co.uk:993"
set    folder          =   "imaps://imap.ionos.co.uk:993"
set    record          =   "imaps://imap.ionos.co.uk/Sent"
set    postponed       =   "imaps://imap.ionos.co.uk/Drafts"
set    mbox            =   "imaps://imap.ionos.co.uk/Archives/2021"
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.
  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 and hold the ctrl key then the "O" key to save, hit enter, then press and hold ctrl key then "X" 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          smtp.ionos.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

  1. Edit your host (per your googled IMAP settings), user and password.
  2. As before, when finished editing, press and hold the ctrl key then the "O" key to save, hit enter, then press and hold ctrl key then "X" key to exit.

Just before we launch mutt, we need to change file permissions for privacy and safety. Type these lines, hitting the "enter" key at the end of each to execute.

chmod 600 ~/.msmtprc
chmod 600 ~/.muutrc

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 "Q" key to quit.