Nixsys Public Access UNIX System

Mutt:

Text-based MIME mail client with PGP support

Contents

Overview

The Mutt Mail User Agent is a very powerful yet small text based utility for accessing e-mail under UNIX and UNIX-like OSes. Mutt includes support for color terminals, MIME, a threaded sorting mode, PGP, and GPG. Users may find Mutt to be more stable than PINE and handle PGP / GPG functions superiorly.

Like nail and PINE, Mutt connects to the Secure IMAP server locally and then reads mail. This requires users to input their passwords in order to access the mail folders. On initially accessing the Mail System via Mutt, the SSL Certificate check screen will appear. Select "a" to always accept the SSL Certificate for the Mail System. This certificate is stored in the ~/.muttcerts file and can be edited manually.

On Nixsys PAUS, Mutt is globally configured to provide some advanced features. By customizing an individual ~/.muttrc file, users may define other features. The following sections describe advanced configuration of Mutt.

Customized Headers

Customizing the headers in Mutt allows users to send mail from Nixsys PAUS, but not allow people to discern the nixsyspaus.org e-mail address as easily. This is useful if users have other e-mail accounts they wish the outside world to send mail. Users may configure the "From: " header to be anything. However, some UCE (better known as "SPAM") restrictions on some mail servers prohibit the delivery of mail from invalid or non-existent domains. Keep this in mind when customizing the headers in Mutt.

  1. Use your favorite editor to edit your ~/.muttrc file.
  2. Add the line:
    set from="you@otherdomain.blah"
    to the file.
  3. The command
    echo 'set from="you@otherdomain.blah"' >> ~/.muttrc
    adds the line to the end of the ~/.muttrc file and creates the file if it doesn't exist. This method utilizes the functionality of the shell (command interpreter) to accomplish the same task without using an editor.

Now, when mail is sent, others will see "From: you@otherdomain.blah" in the From: header instead of you@nixsyspaus.org.

Delivery Status Notification

Delivery Status Notification allows users to be notified if the delivery of the message was successful, if it was delayed, and / or if it failed. Users can have the full message returned as a confirmation or just the headers. The mail server receiving the message also has to support DSN for this feature to work. The following steps are necessary to enable DSN support in Mutt:

  1. Use your favorite editor to edit your ~/.muttrc file.
  2. Add the line:
    set dsn_notify="success,failure,delay"
    to the file. You may use any combination of "success", "delay", and / or "failure" depending on what event(s) you wish to have notification(s). You may also set dsn_notify to "never" to not ever receive notifications of message status.
  3. If dsn_notify is not set to "never", add the line:
    set dsn_return=hdrs
    to the file if you'd like just the headers returned. You may set dsn_return to "full", if you'd like the whole message returned.

GPG functions in Mutt

Nixsys PAUS provides a global configuration for using GPG functions with Mutt. Users may override this configuration by editing the ~/.muttrc file. Below, instructions for performing various GPG related tasks with Mutt are described.

Signing and / or encrypting an e-mail message
  1. After transcribing the message and exiting the editor, the Compose screen will reappear.
  2. At the Compose screen, type "p". This is not to be confused with "P", which postpones a message.
  3. Choose:
    (e)ncrypt, (s)ign, sign (a)s, (b)oth, or (f)orget it?
    Keep in mind that people who have not received your public key and signed it with their private key will not be able to decrypt your messages. A signed message will be readable by anyone, but guaranteed to originate from you.
  4. After selecting which GPG function will be used, send the message.
  5. Enter the passphrase on your key. If the wrong passphrase is entered, enter "p" again, but this time choose "a" to sign as. Then, press Enter to select your key, send the message, re-enter the passphrase, and get it right this time!

Navigating the mail folders with Mutt

Since Nixsys PAUS does not use traditional UNIX-style mailboxes, some users may find difficulty in browsing the mail folders. Mutt has a built-in help system, which is accessible by pressing the "?" key. In the help system, notice the "c" command for "change-folder". After exiting the help system, pressing the "c" key will display a prompt similar to:
Open mailbox ('?' for list):
Entering a value of "?" will display the list of mailboxes. The mailbox name may also be entered. The name of the INBOX is "imaps://localhost/INBOX"; the Sent folder is "=Sent"; the Drafts folder is "=Drafts". Notice mail folder names beginning with an equals sign, then the name of the folder. This is the structure of the mail folders.

Public Folders

Due to the incredible navigation system in Mutt, Public Folders are super simple to use. Users need not subscribe to each subdirectory in the Public Folders, as is the case when initially accessing the Public Folders via the Secure WebMail interface. When Mutt connects to the local Secure IMAP server, it fetches the list automagically. If a user has already accessed subdirectories of the Public Folders using Mutt, that user will not need to subscribe to them when using the Secure WebMail interface.

With Mutt, users can not only view messages in Public Folders, but also edit the messages and, upon saving them, have the modified message uploaded instantly to the folder. Note, the original message is still in the folder and can only be deleted by its owner. The modified version of the original is uploaded to the folder, creating an almost mailing list-like feature of threading.

Accessing Public Folders

Starting from an opened INBOX, users will be shown a collection of their mail folders when pressing the "c" key followed by "?". Selecting the first entry "../" will display a collection of four items: "INBOX.", "shared.", "INBOX", and another "shared.". "INBOX." is the collection of users' mail folders (Drafts, Sent, etc). "INBOX" (without the trailing dot) is the actual INBOX containing received messages. Both "shared." collections are the same. For some reason, it's displayed twice. Selecting one of the "shared." collections displays both Public Folders, Drop_Box and Drop_Box2. Choosing Drop_Box, for example, displays its subdirectories, and selecting a subfolder presents a list of its messages.

Adding Messages to Public Folders

After becoming familiar with navigating the mail folders with Mutt, the Public Folders, and Accessing Public Folders, users may then decide to share some messages with other Nixsys PAUS users. To share a message, users may press the "C" (note: case sensitive) key to invoke the copy function, then choosing a Public Folder. Instead, users may wish to copy a message to a Public Folder and simultaneously mark that message for deletion in the current folder. This procedure is done by pressing the "s" key, invoking the "Save to mailbox" function, then selecting a Public Folder.

Spell Checking in Mutt

Nixsys PAUS supports twenty four (24) languages with two really great packages for multilingual spell checking, Aspell and Ispell. All supported languages are listed on the Spell Checkers page. The method for language selection differs between the two packages. Language selection is passed to Aspell as a language code. Ispell requires a language name. The following table shows the Aspell language code and the Ispell language name associated with each language, if supported.

Spell Checking Table
Language Aspell language code Ispell language name
Breton br Not supported.
British en britishxlg
british
Catalan ca catala
Czech cs Not supported.
Danish da Not supported.
Dutch nl Not supported.
English en Ispell default; different from British.
Esperanto eo Not supported.
Faroese fo Not supported.
French fr francais
German de deutsch
german
ngerman
Greek el Not supported.
Irish gaeilge gaeilge
Italian it Not supported.
Norwegian no Not supported.
Polish pl polish
Portuguese pt Not supported.
Romanian ro romanian
romanian-signs
Russian ru russian
russian-io
Slovak sk slovak
Spanish es castellano
Swedish sv svenska
Ukrainian uk Not supported.
Welsh cy Not supported.

Use your favorite editor to edit the ~/.muttrc file. This example shows how to edit the ~/.muttrc file with the pico editor. This procedure is the same using the nano editor. vi and vim are also good editors. Two interactive programs, available on Nixsys PAUS, called vilearn and vimtutor, which teach the functionality of the vi and vim editors respectively.

Begin by opening the file for editing:
you@nixsys% pico ~/.muttrc

To use Aspell:

On a new line, enter "/usr/pkg/bin/aspell --lang=$CODE --mode=email check", where $CODE is the desired Aspell language code.

To use Ispell:

On a new line, enter "/usr/pkg/bin/ispell -d $NAME", where $NAME is the Ispell language name.

Entering "^X" (the "control" key plus the "x" key) will exit the editor and confirming with a "Y" will save these changes. Now, after a message has been edited and before it's sent, pressing the "i" key at the Compose screen will invoke the spell checking package of choice.

Back to the top!