The Mutt Next Generation E-Mail ClientAndreasKrennmairak@synflood.atMichaelElkinsme@cs.hmc.eduversion @VERSION@
Michael Elinks on mutt, circa 1995:
``All mail clients suck. This one just sucks less.''
Sven Guckes on mutt, ca. 2003: ``But it still sucks!''
IntroductionOverviewMadmutt is a small but very
powerful text-based MIME mail client. Madmutt is highly
configurable, and is well suited to the mail power user with
advanced features like key bindings, keyboard macros, mail
threading, regular expression searches and a powerful pattern
matching language for selecting groups of messages.
This documentation additionally contains documentation to
Madmutt ,a fork from Mutt
with the goal to fix all the little annoyances of Mutt, to
integrate all the Mutt patches that are floating around in the
web, and to add other new features. Features specific to Madmutt
will be discussed in an extra section. Don't be confused when
most of the documentation talk about Mutt and not Madmutt,
Madmutt contains all Mutt features, plus many more.
Madmutt Home PageMailing ListsMadmutt-users@lists.berlios.de: This is
where the Madmutt user support happens.
Madmutt-devel@lists.berlios.de: The
development mailing list for Madmutt
Software Distribution Sites
So far, there are no official releases of Madmutt, but you can
download daily snapshots from IRC
Visit channel #madmutt on irc.freenode.net
(www.freenode.net) to chat with other people
interested in Madmutt.
Weblog
If you want to read fresh news about the latest development in
Madmutt, and get informed about stuff like interesting,
Madmutt-related articles and packages for your favorite
distribution, you can read and/or subscribe to our Madmutt development
weblog.
Copyright
Mutt is Copyright (C) 1996-2000 Michael R. Elkins
<me@cs.hmc.edu> and others
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Manual Conventions
This manual contains several (hopefully consistent) conventions to
specially layout different items in different fashions.
Configuration and environment variables will be printed
in a typewriter font and both prefixed with a dollar sign as
it's common for UNIX-like environments. Configuration
variables are lower-case only while environment variables
are upper-case only. is a configuration variable while
is an environment
variable.madmutt-specific functions are enclosed in
<> and printed in a typewriter font,
too, as in .As common for UNIX-like environments, references to
manual pages are printed with the section enclosed in
braces, as in or . Execute man [section]
[name] to view the manual page.Keys are presented in the following way: ordinary keys
are just given as-is, e.g.
q. Control characters are
prefixed with C- (e.g. the screen can be
redraw by pressing L) and E- for
Escape, e.g. a folder can be opened read-only with
c.
If, while reading this fine manual, you find any inconsistencies
of whatever kind, please contact the developers via
Madmutt-devel@lists.berlios.de to report it.
Getting StartedBasic ConceptsScreens and Menus
Madmutt offers different screens of which every has its special
purpose:
The index displays the contents of the
currently opened
mailbox.
The pager is responsible for displaying
messages, that
is, the header, the body and all attached parts.
The file browser offers operations on and
displays
information of all folders Madmutt should watch for mail.
The sidebar offers a permanent view of
which mailboxes
contain how many total, new and/or flagged mails.
The help screen lists for all currently
available
commands how to invoke them as well as a short description.
The compose menu is a comfortable
interface take last
actions before sending mail: change subjects, attach files,
remove
attachements, etc.
The attachement menu gives a summary and
the tree
structure of the attachements of the current message.
The alias menu lists all or a fraction of
the aliases
a user has defined.
The key menu used in connection with
encryption lets
users choose the right key to encrypt with.
When Madmutt is started without any further options, it'll open
the users default mailbox and display the index.
Configuration
Madmutt does not feature an internal
configuration
interface or menu due to the simple fact that this would be too
complex to handle (currently there are several hundred
variables which fine-tune the behaviour.)
Madmutt is configured using configuration files which allow
users to add comments or manage them via version control systems
to ease maintenance.
Also, Madmutt comes with a shell script named grml-madmutt
kindly contributed by users which really helps and eases the
creation of a user's configuration file. When downloading the
source code via a snapshot or via subversion, it can be found in
the contrib directory.
Functions
Madmutt offers great flexibility due to the use of functions:
internally, every action a user can make Madmutt perform is named
``function.'' Those functions are assigned to keys (or even key
sequences) and may be completely adjusted to user's needs. The
basic idea is that the impatient users get a very intuitive
interface to start off with and advanced users virtually get no
limits to adjustments.
Interaction
Madmutt has two basic concepts of user interaction:
There is one dedicated line on the screen used to query
the user for input, issue any command, query variables and
display error and informational messages. As for every type of
user input, this requires manual action leading to the need of
input.
The automatized interface for interaction are the so
called hooks. Hooks specify actions the
user wants to be
performed at well-defined situations: what to do when entering
which folder, what to do when displaying or replying to what
kind of message, etc. These are optional, i.e. a user doesn't
need to specify them but can do so.
Modularization
Although Madmutt has many functionality built-in, many
features can be delegated to external tools to increase
flexibility: users can define programs to filter a message through
before displaying, users can use any program they want for
displaying a message, message types (such as PDF or PostScript)
for which Madmutt doesn't have a built-in filter can be rendered
by arbitrary tools and so forth. Although Madmutt has an alias
mechanism built-in, it features using external tools to query for
nearly every type of addresses from sources like LDAP, databases
or just the list of locally known users.
Patterns
Madmutt has a built-in pattern matching ``language'' which is
as widely used as possible to present a consistent interface to
users. The same ``pattern terms'' can be used for searching,
scoring, message selection and much more.
Screens and MenusIndex
The index is the screen that you usually see first when you
start Madmutt. It gives an overview over your emails in the
currently opened mailbox. By default, this is your system mailbox.
The information you see in the index is a list of emails, each with
its number on the left, its flags (new email, important email,
email that has been forwarded or replied to, tagged email, ...),
the date when email was sent, its sender, the email size, and the
subject. Additionally, the index also shows thread hierarchies:
when you reply to an email, and the other person replies back, you
can see the other's person email in a "sub-tree" below. This is
especially useful for personal email between a group of people or
when you've subscribed to mailing lists.
Pager
The pager is responsible for showing the email content. On the
top of the pager you have an overview over the most important email
headers like the sender, the recipient, the subject, and much more
information. How much information you actually see depends on your
configuration, which we'll describe below.
Below the headers, you see the email body which usually contains
the message. If the email contains any attachments, you will see
more information about them below the email body, or, if the
attachments are text files, you can view them directly in the
pager.
To give the user a good overview, it is possible to configure
Madmutt to show different things in the pager with different
colors. Virtually everything that can be described with a regular
expression can be colored, e.g. URLs, email addresses or smileys.
File Browser
The file browser is the interface to the local or remote
file system. When selecting a mailbox to open, the browser allows
custom sorting of items, limiting the items shown by a regular
expression and a freely adjustable format of what to display in
which way. It also allows for easy navigation through the
file system when selecting file(s) to attach to a message, select
multiple files to attach and many more.
Sidebar
The sidebar comes in handy to manage mails which are spread
over different folders. All folders users setup Madmutt to watch
for new mail will be listed. The listing includes not only the
name but also the number of total messages, the number of new and
flagged messages. Items with new mail may be colored different
from those with flagged mail, items may be shortened or compress
if they're they to long to be printed in full form so that by
abbreviated names, user still now what the name stands for.
Help
The help screen is meant to offer a quick help to the user. It
lists the current configuration of key bindings and their
associated commands including a short description, and currently
unbound functions that still need to be associated with a key
binding (or alternatively, they can be called via the Madmutt
command prompt).
Compose Menu
The compose menu features a split screen containing the
information which really matter before actually sending a
message by mail or posting an article to a newsgroup: who gets
the message as what (recipient, newsgroup, who gets what kind of
copy). Additionally, users may set security options like
deciding whether to sign, encrypt or sign and encrypt a message
with/for what keys.
Also, it's used to attach messages, news articles or files to
a message, to re-edit any attachment including the message
itself.
Alias Menu
The alias menu is used to help users finding the recipients
of messages. For users who need to contact many people, there's
no need to remember addresses or names completely because it
allows for searching, too. The alias mechanism and thus the
alias menu also features grouping several addresses by a shorter
nickname, the actual alias, so that users don't have to select
each single recipient manually.
Attachment Menu
As will be later discussed in detail, Madmutt features a good
and stable MIME implementation, that is, is greatly supports
sending and receiving messages of arbitrary type. The
attachment menu displays a message's structure in detail: what
content parts are attached to which parent part (which gives a
true tree structure), which type is of what type and what size.
Single parts may saved, deleted or modified to offer great and
easy access to message's internals.
Key MenuFIXMEMoving Around in Menus
Information is presented in menus, very similar to ELM. Here is a
tableshowing the common keys used to navigate menus in Madmutt.
Most commonly used movement bindingsKeyFunctionDescriptionj or Downmove to the next entryk or Upmove to the previous entryz or PageDngo to the next pageZ or PageUpgo to the previous page= or Homejump to the first entry* or Endjump to the last entryqexit the current menu?list all key bindings for the current menu
Editing Input Fields
Madmutt has a builtin line editor which is used as the primary way to
input
textual data such as email addresses or filenames. The keys used to
move
around while editing are very similar to those of Emacs.
Line Editor FunctionsKeyFunctionDescriptionA or Homemove to the start of the lineB or Leftmove back one charBmove back one wordD or Deletedelete the char under the cursorE or Endmove to the end of the lineF or Rightmove forward one charFmove forward one wordTabcomplete filename or aliasTcomplete address with queryKdelete to the end of the lineddelete to the end of the wordWkill the word in front of the cursorUdelete entire lineVquote the next typed keyUprecall previous string from historyDownrecall next string from historyBackSpacekill the char in front of the cursoruconvert word to upper caselconvert word to lower caseccapitalize the wordGabortReturnfinish editing
You can remap the editor functions using the
command. For example, to make
the Delete key delete the character in front
of the cursor rather than under, you could use
bind editor <delete> backspaceReading Mail - The Index and Pager
Similar to many other mail clients, there are two modes in which mail
isread in Madmutt. The first is the index of messages in the mailbox,
which is
called the ``index'' in Madmutt. The second mode is the display of the
message contents. This is called the ``pager.''
The next few sections describe the functions provided in each of these
modes.
The Message Index
Most commonly used Index BindingsKeyFunctionDescriptioncchange to a different mailboxcchange to a folder in read-only modeCcopy the current message to another mailboxCdecode a message and copy it to a foldersdecode a message and save it to a folderDdelete messages matching a patternddelete the current messageFmark as importantlshow messages matching a patternNmark message as newochange the current sort methodOreverse sort the mailboxqsave changes and exitssave-messageTtag messages matching a patternttoggle the tag on a messagettoggle tag on entire message threadUundelete messages matching a patternuundelete-messagevview-attachmentsxabort changes and exitReturndisplay-messageTabjump to the next new or unread message@show the author's full e-mail address$save changes to mailbox/search/search-reverseLclear and redraw the screenTuntag messages matching a pattern
Status Flags
In addition to who sent the message and the subject, a short
summary of
the disposition of each message is printed beside the message
number.
Zero or more of the following ``flags'' may appear, which mean:
D
message is deleted (is marked for deletion)
d
message have attachments marked for deletion
K
contains a PGP public key
N
message is new
O
message is old
P
message is PGP encrypted
r
message has been replied to
S
message is signed, and the signature is succesfully
verified
s
message is signed
!
message is flagged
*
message is tagged
Some of the status flags can be turned on or off using
set-flag (default: w)
clear-flag (default: W)
Furthermore, the following flags reflect who the message is
addressed
to. They can be customized with the
variable.
+
message is to you and you only
T
message is to you, but also to or cc'ed to others
C
message is cc'ed to you
F
message is from you
L
message is sent to a subscribed mailing list
The Pager
By default, Madmutt uses its builtin pager to display the body of
messages.
The pager is very similar to the Unix program less though not nearly as
featureful.
Most commonly used Pager BindingsKeyFunctionDescriptionReturngo down one lineSpacedisplay the next page (or next message if at the end of a message)-go back to the previous pagensearch for next matchSskip beyond quoted textTtoggle display of quoted text?show key bindings/search for a regular expression (pattern)/search backwards for a regular expression\toggle search pattern coloring^jump to the top of the message
In addition, many of the functions from the index are available in
the pager, such as delete-message or
copy-message
(this is one
advantage over using an external pager to view messages).
Also, the internal pager supports a couple other advanced
features. For one, it will accept and translate the
``standard'' nroff sequences forbold and underline. These
sequences are a series of either the letter, backspace
(H), the letter again for bold
or the letter, backspace, _ for denoting
underline. Madmutt will attempt to display these in bold and
underline respectively if your terminal supports them. If not,
you can use the bold and underline objects to specify a color or mono attribute
for them.
Additionally, the internal pager supports the ANSI escape
sequences for character attributes. Madmutt translates them
into the correct color and character settings. The sequences
Madmutt supports are: ESC [ Ps;Ps;Ps;...;Ps
m (see table below for possible values for
Ps).
ANSI Escape SequencesValueAttribute0All Attributes Off1Bold on4Underline on5Blink on7Reverse video on3xForeground color is x (see table below)4xBackground color is x (see table below)
Madmutt uses these attributes for handling text/enriched messages,
and they
can also be used by an external
script for highlighting purposes. Note: If you change the colors for your
display, for example by changing the color associated with color2 for
your xterm, then that color will be used instead of green.
Threaded Mode
When the mailbox is sorted by
threads
,there are
a few additional functions available in the index and
pager
modes.
Most commonly used thread-related bindingsKeyFunctionDescriptionDdelete all messages in the current threadUundelete all messages in the current threadNjump to the start of the next threadPjump to the start of the previous threadRmark the current thread as readddelete all messages in the current subthreaduundelete all messages in the current subthreadnjump to the start of the next subthreadpjump to the start of the previous subthreadrmark the current subthread as read ttoggle the tag on the current threadvtoggle collapse for the current threadVtoggle collapse for all threadsPjump to parent message in thread
Note: Collapsing a thread displays
only the first message
in the thread and hides the others. This is useful when threads
contain so many messages that you can only see a handful of threads
onthe screen. See %M in
.
For example, you could use
%?M?(#%03M)&(%4l)? in
to optionally
display the number of hidden messages if the thread is collapsed.
See also the variable.
Miscellaneous Functionsa
Creates a new alias based upon the current message (or prompts for a
new one). Once editing is complete, an
command is added to the file specified by the
variable for future use. Note:
Specifying an
does not add the aliases specified there-in, you must also
the file.
P
This function will search the current message for content signed or
encrypted with PGP the "traditional" way, that is, without proper
MIME tagging. Technically, this function will temporarily change
the MIME content types of the body parts containing PGP data; this
is similar to the
function's
effect.
h
Toggles the weeding of message header fields specified by
commands.
e
This command (available in the ``index'' and ``pager'') allows you to
edit the raw current message as it's present in the mail folder.
After you have finished editing, the changed message will be
appended to the current folder, and the original message will be
marked for deletion.
(default: E on the attachment menu, and in the pager and index
menus; T on the compose menu)
This command is used to temporarily edit an attachment's content
type to fix, for instance, bogus character set parameters. When
invoked from the index or from the pager, you'll have the
opportunity to edit the top-level attachment's content type. On the
attach-menu, you can change any
attachment's content type. These changes are not persistent, and get
lost upon changing folders.
Note that this command is also available on the compose-menu
.There, it's used to
fine-tune the properties of attachments you are going to send.
:
This command is used to execute any command you would normally put in
a
configuration file. A common use is to check the settings of
variables, or
in conjunction with to change
settings on the
fly.
K
This command extracts PGP public keys from the current or tagged
message(s) and adds them to your PGP public key ring.
F
This command wipes the passphrase(s) from memory. It is useful, if
you misspelled the passphrase.
L
Reply to the current or tagged message(s) by extracting any addresses
which
match the regular expressions given by the
commands, but also honor any Mail-Followup-To
header(s) if the
configuration variable is set. Using this when replying to messages
posted
to mailing lists helps avoid duplicate copies being sent to the
author of
the message you are replying to.
Asks for an external Unix command and pipes the current or
tagged message(s) to it. The variables
,
,
and
control the exact behavior of this function.
e
With resend-message, mutt takes the current message as a template for
a
new message. This function is best described as "recall from
arbitrary
folders". It can conveniently be used to forward MIME messages while
preserving the original mail structure. Note that the amount of
headers
included here depends on the value of the
variable.
This function is also available from the attachment menu. You can use
this
to easily resend a message which was included with a bounce message
as a message/rfc822 body part.
!
Asks for an external Unix command and executes it. The
can be used to control
whether Madmutt will wait for a key to be pressed when the command
returns
(presumably to let the user read the output of the command), based on
the return status of the named command.
T
The pager uses the
variable to detect quoted text when
displaying the body of the message. This function toggles the
displayof the quoted material in the message. It is particularly
useful when
are interested in just the response and there is a large amount of
quoted text in the way.
S
This function will go to the next line of non-quoted text which come
after a line of quoted text in the internal pager.
Sending Mail
The following bindings are available in the index
for sending
messages.
Most commonly used Mail Composition BindingsKeyFunctionDescriptionmcompose a new messagerreply to sendergreply to all recipientsLreply to mailing list addressfforward messagebbounce (remail) messagekmail a PGP public key to someone
Bouncing a message sends the message as is to the recipient you
specify. Forwarding a message allows you to add comments or
modify the message you are forwarding. These items are discussed
in greater detail in the next chapter forwarding-mail.
Composing new messages
When you want to send an email using Madmutt, simply press m on
your keyboard. Then, Madmutt asks for the recipient via a prompt in
the last line:
To:
After you've finished entering the recipient(s), press return. If you
want to send an email to more than one recipient, separate the email
addresses using the comma ",". Madmutt then asks
you for the email
subject. Again, press return after you've entered it. After that,
Madmutt
got the most important information from you, and starts up an editor
where you can then enter your email.
The editor that is called is selected in the following way: you
can e.g. set it in the Madmutt configuration:
set editor = "vim +/^$/ -c ':set tw=72'"
set editor = "nano"
set editor = "emacs"
If you don't set your preferred editor in your configuration, Madmutt
first looks whether the environment variable is set, and if
so, it takes its value as editor command. Otherwise, it has a look
at and takes its value if it is set. If no
editor command
can be found, Madmutt simply assumes to be the
default editor,
since it's the most widespread editor in the Unix world and it's
pretty
safe to assume that it is installed and available.
When you've finished entering your message, save it and quit your
editor. Madmutt will then present you with a summary screen, the
compose menu.
On the top, you see a summary of the most important available key
commands.
Below that, you see the sender, the recipient(s), Cc and/or Bcc
recipient(s), the subject, the reply-to address, and optionally
information where the sent email will be stored and whether it should
be digitally signed and/or encrypted.
Below that, you see a list of "attachments". The mail you've just
entered before is also an attachment, but due to its special type
(it's plain text), it will be displayed as the normal message on
the receiver's side.
At this point, you can add more attachments, pressing a, you
can edit the recipient addresses, pressing t for
the "To:" field,
c for the "Cc:" field, and b
for the "Bcc: field. You can
also edit the subject the subject by simply pressing s or the
email message that you've entered before by pressing e. You will
then again return to the editor. You can even edit the sender, by
pressing
<esc>f, but this shall only be used with
caution.
Alternatively, you can configure Madmutt in a way that most of the
above settings can be edited using the editor. Therefore, you only
need to add the following to your configuration:
set edit_headers
Once you have finished editing the body of your mail message, you are
returned to the compose menu. The following
options are available:
Most commonly used Compose Menu BindingsKeyFunctionDescriptionaattach a fileAattach message(s) to the messagekattach a PGP public keydedit description on attachmentDdetach a filetedit the To fieldfedit the From fieldredit the Reply-To fieldcedit the Cc fieldbedit the Bcc fieldysend the messagesedit the SubjectSselect S/MIME optionsfspecify an ``Fcc'' mailboxpselect PGP optionsPpostpone this message until laterqquit (abort) sending the messagewwrite the message to a foldericheck spelling (if available on your system)Fwipe passphrase(s) from memory
Note: The attach-message function
will prompt you for a folder to
attach messages from. You can now tag messages in that folder and
theywill be attached to the message you are sending. Note that
certainoperations like composing a new mail, replying, forwarding,
etc. are
not permitted when you are in that folder. The %r
in
will change to
a 'A' to indicate that you are in attach-message mode.
ReplyingSimple Replies
When you want to reply to an email message, select it in the index
menu and then press r. Madmutt's behaviour is
then similar to the
behaviour when you compose a message: first, you will be asked for
the recipient, then for the subject, and then, Madmutt will start
the editor with the quote attribution and the quoted message. This
can e.g. look like the example below.
On Mon, Mar 07, 2005 at 05:02:12PM +0100, Michael Svensson wrote:
> Bill, can you please send last month's progress report to Mr.
> Morgan? We also urgently need the cost estimation for the new
> production server that we want to set up before our customer's
> project will go live.
You can start editing the email message. It is strongly
recommended to put your answer below the
quoted text and to
only quote what is really necessary and that you refer to. Putting
your answer on top of the quoted message, is, although very
widespread, very often not considered to be a polite way to answer
emails.
The quote attribution is configurable, by default it is set to
set attribution = "On %d, %n wrote:"
It can also be set to something more compact, e.g.
set attribution = "attribution="* %n <%a> [%(%y-%m-%d %H:%M)]:"
The example above results in the following attribution:
* Michael Svensson <svensson@foobar.com> [05-03-06 17:02]:
> Bill, can you please send last month's progress report to Mr.
> Morgan? We also urgently need the cost estimation for the new
> production server that we want to set up before our customer's
> project will go live.
Generally, try to keep your attribution short yet
information-rich. It is not the right place
for witty quotes,
long "attribution" novels or anything like that: the right place
for such things is - if at all - the email signature at the very
bottom of the message.
When you're done with writing your message, save and quit the
editor. As before, you will return to the compose menu, which is
used in the same way as before.
Group Replies
In the situation where a group of people uses email as a
discussion, most of the emails will have one or more recipients,
and probably several "Cc:" recipients. The group reply
functionalityensures that when you press g
instead of r to do a reply,
each and every recipient that is contained in the original message
will receive a copy of the message, either as normal recipient or
as "Cc:" recipient.
List Replies
When you use mailing lists, it's generally better to send your
reply to a message only to the list instead of the list and the
original author. To make this easy to use, Madmutt features list
replies.
To do a list reply, simply press L. If the email
contains
a Mail-Followup-To: header, its value will be
used as reply
address. Otherwise, Madmutt searches through all mail addresses in
the original message and tries to match them a list of regular
expressions which can be specified using the lists command.
If any of the regular expression matches, a mailing
list address has been found, and it will be used as reply address.
lists linuxevent@luga\.at vuln-dev@ Madmutt-users@
Nowadays, most mailing list software like GNU Mailman adds a
Mail-Followup-To: header to their emails anyway,
so setting
lists is hardly ever necessary in practice.
Editing the message header
When editing the header of your outgoing message, there are a couple
of
special features available.
If you specify
Fcc:filename
Madmutt will pick up filename
just as if you had used the edit-fcc function in
the compose menu.
You can also attach files to your message by specifying
Attach: filename [description]
where filename is the file to attach and
description
is an
optional string to use as the description of the attached file.
When replying to messages, if you remove the In-Reply-To: field from
the header field, Madmutt will not generate a References: field, which
allows you to create a new message thread.
Also see the and
variables
Using Madmutt with PGP
If you want to use PGP, you can specify
Pgp: [E | S | S id]
``E'' encrypts, ``S'' signs and
``S<id>'' signs with the given key, setting
permanently.
If you have told mutt to PGP encrypt a message, it will guide you
through a key selection process when you try to send the message.
Madmutt will not ask you any questions about keys which have a
certified user ID matching one of the message recipients' mail
addresses. However, there may be situations in which there are
several keys, weakly certified user ID fields, or where no matching
keys can be found.
In these cases, you are dropped into a menu with a list of keys from
which you can select one. When you quit this menu, or mutt can't
find any matching keys, you are prompted for a user ID. You can, as
usually, abort this prompt using G. When
you do so, mutt will
return to the compose screen.
Once you have successfully finished the key selection, the message
will be encrypted using the selected public keys, and sent out.
Most fields of the entries in the key selection menu (see also
)
have obvious meanings. But some explanations on the capabilities,
flags,
and validity fields are in order.
The flags sequence (%f) will expand to one of the following
flags:
PGP Key Menu FlagsFlagDescriptionRThe key has been revoked and can't be used.XThe key is expired and can't be used.dYou have marked the key as disabled.cThere are unknown critical self-signature packets.
The capabilities field (%c) expands to a two-character
sequencerepresenting a key's capabilities. The first character gives
the key's encryption capabilities: A minus sign (
-
)means
that the key cannot be used for encryption. A dot (
.
)means that
it's marked as a signature key in one of the user IDs, but may
also be used for encryption. The letter e indicates that
this key can be used for encryption.
The second character indicates the key's signing capabilities. Once
again, a ``-'' implies ``not for
signing'', ``.'' implies
that the key is marked as an encryption key in one of the user-ids,
and
``s'' denotes a key which can be
used for signing.
Finally, the validity field (%t) indicates how well-certified
a user-id
is. A question mark (?) indicates
undefined validity, a minus
character (-) marks an untrusted
association, a space character
means a partially trusted association, and a plus character (
+
)
indicates complete validity.
Sending anonymous messages via mixmaster
You may also have configured mutt to co-operate with Mixmaster, an
anonymous remailer. Mixmaster permits you to send your messages
anonymously using a chain of remailers. Mixmaster support in mutt is
for
mixmaster version 2.04 (beta 45 appears to be the latest) and 2.03.
It does not support earlier versions or the later so-called version 3
betas,
of which the latest appears to be called 2.9b23.
To use it, you'll have to obey certain restrictions. Most
important, you cannot use the Cc and Bcc headers. To tell
Madmutt to use mixmaster, you have to select a remailer chain, using
the mix function on the compose menu.
The chain selection screen is divided into two parts. In the
(larger) upper part, you get a list of remailers you may use. In
the lower part, you see the currently selected chain of remailers.
You can navigate in the chain using the chain-prev
and
chain-next functions, which are by default bound
to the left
and right arrows and to the h and l keys (think vi
keyboard bindings). To insert a remailer at the current chain
position, use the insert function. To append a
remailer behind
the current chain position, use select-entry or
append
.
You can also delete entries from the chain, using the corresponding
function. Finally, to abandon your changes, leave the menu, or
accept them pressing (by default) the
Return
key.
Note that different remailers do have different capabilities,
indicated in the %c entry of the remailer menu lines (see
).
Most important is
the ``middleman'' capability, indicated by a capital ``M'': This
means that the remailer in question cannot be used as the final
element of a chain, but will only forward messages to other
mixmaster remailers. For details on the other capabilities, please
have a look at the mixmaster documentation.
Forwarding and Bouncing Mail
Often, it is necessary to forward mails to other people.
Therefore, Madmutt supports forwarding messages in two different
ways.
The first one is regular forwarding, as you probably know it from
other mail clients. You simply press f, enter the
recipient
email address, the subject of the forwarded email, and then you can
edit the message to be forwarded in the editor. The forwarded
message is separated from the rest of the message via the two
following markers:
----- Forwarded message from Lucas User <luser@example.com> -----
From: Lucas User <luser@example.com>
Date: Thu, 02 Dec 2004 03:08:34 +0100
To: Michael Random <mrandom@example.com>
Subject: Re: blackmail
Pay me EUR 50,000.- cash or your favorite stuffed animal will die
a horrible death.
----- End forwarded message -----
When you're done with editing the mail, save and quit the editor,
and you will return to the compose menu, the same menu you also
encounter when composing or replying to mails.
The second mode of forwarding emails with Madmutt is the
so-called bouncing: when you bounce an email to
another
address, it will be sent in practically the same format you send it
(except for headers that are created during transporting the
message). To bounce a message, press b and enter the
recipient
email address. By default, you are then asked whether you really
want to bounce the message to the specified recipient. If you answer
with yes, the message will then be bounced.
To the recipient, the bounced email will look as if he got it
like a regular email where he was Bcc: recipient.
The only
possibility to find out whether it was a bounced email is to
carefully study the email headers and to find out which host really
sent the email.
Postponing Mail
At times it is desirable to delay sending a message that you have
already begun to compose. When the postpone-message function is
used in the compose menu, the body of your message
and attachments
are stored in the mailbox specified by the
variable. This means that you can recall the
message even if you exit Madmutt and then restart it at a later time.
Once a message is postponed, there are several ways to resume it. From
the
command line you can use the ``-p'' option, or if you compose a new
message from the index or pager you will be prompted if postponed
messages exist. If multiple messages are currently postponed, the
postponed menu will pop up and you can select
which message you would
like to resume.
Note: If you postpone a reply to a
message, the reply setting of
the message is only updated when you actually finish the message and
send it. Also, you must be in the same folder with the message you
replied to for the status of the message to be updated.
See also the quad-option.
ConfigurationLocations of Configuration Files
While the default configuration (or ``preferences'') make Madmutt
usable right out
of the box, it is often desirable to tailor Madmutt to suit your own
tastes. When
Madmutt is first invoked, it will attempt to read the ``system''
configuration
file (defaults set by your local system administrator), unless the
``-n'' commandline option is
specified. This file is
typically /usr/local/share/madmutt/madmuttrc or
/etc/madmuttrc
,
Madmutt users will find this file in
/usr/local/share/madmutt/Muttrc
or
/etc/madmuttrc. Mutt will next look for a file named
.muttrc
in your home directory, Madmutt will look for .madmuttrc. If this file
does not exist and your home directory has a subdirectory named
.mutt
,
mutt try to load a file named .madmutt/madmuttrc.
.muttrc (or .madmuttrc for
Madmutt) is the file where you will
usually place your commands to
configure Madmutt.
Basic Syntax of Initialization Files
An initialization file consists of a series of commands. Each line of the file may contain one or more commands.
When multiple commands are used, they must be separated by a semicolon
(;).
set realname='Madmutt user' ; ignore x-
The hash mark, or pound sign
(``#''), is used as a ``comment'' character. You can use it to
annotate your initialization file. All text after the comment character
to the end of the line is ignored. For example,
my_hdr X-Disclaimer: Why are you listening to me? # This is a comment
Single quotes (') and double quotes (") can be used to quote
strings
which contain spaces or other special characters. The difference
between
the two types of quotes is similar to that of many popular shell
programs,
namely that a single quote is used to specify a literal string (one
that is
not interpreted for shell variables or quoting with a backslash
(see
next paragraph), while double quotes indicate a string for which
should be evaluated. For example, backtics are evaluated inside of
double
quotes, but not for single quotes.
\ quotes the next character, just as in shells such as bash and
zsh.
For example, if want to put quotes ``"'' inside of a string, you
can use
``\'' to force the next character to be a literal instead of
interpreted
character.
set realname="Michael \"MuttDude\" Elkins"
``\\'' means to insert a literal ``\'' into the line.
``\n'' and ``\r'' have their usual C meanings of linefeed and
carriage-return, respectively.
A \ at the end of a line can be used to split commands over
multiple lines, provided that the split points don't appear in the
middle of command names.
Please note that, unlike the various shells, Madmutt interprets a
``\''
at the end of a line also in comments. This allows you to disable a
command
split over multiple lines with only one ``#''.
# folder-hook . \
set realname="Michael \"MuttDude\" Elkins"
When testing your config files, beware the following caveat. The
backslash
at the end of the commented line extends the current line with the next
line
- then referred to as a ``continuation line''. As the first line is
commented with a hash (#) all following continuation lines are also
part of a comment and therefore are ignored, too. So take care of
comments
when continuation lines are involved within your setup files!
Abstract example:
line1\
line2a # line2b\
line3\
line4
line5
line1 ``continues'' until line4. however, the part after the # is a
comment which includes line3 and line4. line5 is a new line of its own
and
thus is interpreted again.
The commands understood by mutt are explained in the next paragraphs.
For a complete list, see the commands.
Expansion within variables
Besides just assign static content to variables, there's plenty of
ways of adding external and more or less dynamic content.
Commands' Output
It is possible to substitute the output of a Unix command in an
initialization file. This is accomplished by enclosing the command
in backquotes (``) as in, for example:
my_hdr X-Operating-System: `uname -a`
The output of the Unix command ``uname -a'' will be substituted
before the line is parsed. Note that since initialization files are
line oriented, only the first line of output from the Unix command
will be substituted.
Environment Variables
UNIX environments can be accessed like the way it is done in
shells like sh and bash: Prepend the name of the environment by a
``$'' sign. For example,
set record=+sent_on_$HOSTNAME
sets the variable to the
string +sent_on_ and appends the
value of the evironment
variable .
Note: There will be no warning if an
environment variable
is not defined. The result will of the expansion will then be empty.
Configuration Variables
As for environment variables, the values of all configuration
variables as string can be used in the same way, too. For example,
set imap_home_namespace = $folder
would set the value of
to the value to which
is currently set to.
Note: There're no logical links
established in such cases so
that the the value for
won't change even
if gets changed.
Note: There will be no warning if a
configuration variable
is not defined or is empty. The result will of the expansion will
then be empty.
Self-Defined Variables
Madmutt flexibly allows users to define their own variables. To
avoid conflicts with the standard set and to prevent misleading
error messages, there's a reserved namespace for them: all
user-defined variables must be prefixed with user_ and can be
used just like any ordinary configuration or environment
variable.
For example, to view the manual, users can either define two
macros like the following
macro generic <F1> "!less -r /path/to/manual" "Show manual"
macro pager <F1> "!less -r /path/to/manual" "Show manual"
for generic, pager and
index
.The alternative is to
define a custom variable like so:
set user_manualcmd = "!less -r /path/to_manual"
macro generic <F1> "$user_manualcmd<enter>" "Show manual"
macro pager <F1> "$user_manualcmd<enter>" "Show manual"
macro index <F1> "$user_manualcmd<enter>" "Show manual"
to re-use the command sequence as in:
macro index <F2> "$user_manualcmd | grep '\^[ ]\\+~. '" "Show Patterns"
Using this feature, arbitrary sequences can be defined once and
recalled and reused where necessary. More advanced scenarios could
include to save a variable's value at the beginning of macro
sequence and restore it at end.
When the variable is first defined, the first value it gets
assigned is also the initial value to which it can be reset using
the reset command.
The complete removal is done via the unset
keyword.
After the following sequence:
set user_foo = 42
set user_foo = 666
the variable $user_foo has a current value
of 666 and an
initial of 42. The query
set ?user_foo
will show 666. After doing the reset via
reset user_foo
a following query will give 42 as the result. After unsetting it
via
unset user_foo
any query or operation (except the noted expansion within other
statements) will lead to an error message.
Pre-Defined Variables
In order to allow users to share one setup over a number of
different machines without having to change its contents, there's a
number of pre-defined variables. These are prefixed with
madmutt_ and are read-only, i.e. they cannot
be set, unset or
reset. The reference chapter lists all available variables.
Please consult the local copy of your manual for their
values as they may differ from different manual sources.
Where
the manual is installed in can be queried (already using such a
variable) by running:
$ madmutt -Q madmutt_docdir
To extend the example for viewing the manual via self-defined
variables, it can be made more readable and more portable by
changing the real path in:
set user_manualcmd = '!less -r /path/to_manual'
to:
set user_manualcmd = "!less -r $madmutt_docdir/manual.txt"
which works everywhere if a manual is installed.
Please note that by the type of quoting, madmutt determines when
to expand these values: when it finds double quotes, the value will
be expanded during reading the setup files but when it finds single
quotes, it'll expand it at runtime as needed.
For example, the statement
folder-hook . "set user_current_folder = $madmutt_folder_name"
will be already be translated to the following when reading the
startup files:
folder-hook . "set user_current_folder = some_folder"
with some_folder being the name of the
first folder madmutt
opens. On the contrary,
folder-hook . 'set user_current_folder = $madmutt_folder_name'
will be executed at runtime because of the single quotes so that
user_current_folder will always have
the value of the currently
opened folder.
A more practical example is:
folder-hook . 'source ~/.mutt/score-$madmutt_folder_name'
which can be used to source files containing score commands
depending on the folder the user enters.
Type Conversions
A note about variable's types during conversion: internally
values are stored in internal types but for any dump/query or set
operation they're converted to and from string. That means that
there's no need to worry about types when referencing any variable.
As an example, the following can be used without harm (besides
makeing madmutt very likely behave strange):
set read_inc = 100
set folder = $read_inc
set read_inc = $folder
set user_magic_number = 42
set folder = $user_magic_numberDefining/Using aliases
key address [, address,...]
It's usually very cumbersome to remember or type out the address of
someone
you are communicating with. Madmutt allows you to create ``aliases''
which map
a short string to a full address.
Note: if you want to create an alias
for a group (by specifying more than
one address), you must separate the
addresses with a comma (``,'').
To remove an alias or aliases (``*'' means all aliases):
[* | key ... ]
alias muttdude me@cs.hmc.edu (Michael Elkins)
alias theguys manny, moe, jack
Unlike other mailers, Madmutt doesn't require aliases to be defined
in a special file. The alias command can appear
anywhere in
a configuration file, as long as this file is .
Consequently, you can have multiple alias files, or
you can have all aliases defined in your muttrc.
On the other hand, the
function can use only one file, the one pointed to by the
variable (which is
~/.muttrc by default). This file is not
special either,
in the sense that Madmutt will happily append aliases to any file, but
in
order for the new aliases to take effect you need to explicitly
this file too.
For example:
source /usr/local/share/Madmutt.aliases
source ~/.mail_aliases
set alias_file=~/.mail_aliases
To use aliases, you merely use the alias at any place in mutt where
muttprompts for addresses, such as the To: or
Cc:
prompt. You can
also enter aliases in your editor at the appropriate headers if you
have the
variable set.
In addition, at the various address prompts, you can use the tab
character
to expand a partial alias to the full alias. If there are multiple
matches,
mutt will bring up a menu with the matching aliases. In order to be
presented with the full list of aliases, you must hit tab with out a
partial
alias, such as at the beginning of the prompt or after a comma denoting
multiple addresses.
In the alias menu, you can select as many aliases as you want with the
select-entry key (default: RET), and use the
exit
key
(default: q) to return to the address prompt.
Changing the default key bindings
map key function
This command allows you to change the default key bindings (operation
invoked when pressing a key).
map specifies in which menu the binding belongs.
Multiple maps may
be specified by separating them with commas (no additional whitespace
isallowed). The currently defined maps are:
generic
This is not a real menu, but is used as a fallback for all of
the other
menus except for the pager and editor modes. If a key is not
defined in
another menu, Madmutt will look for a binding to use in this
menu. This allows
you to bind a key to a certain function in multiple menus
instead of having
multiple bind statements to accomplish the same task.
alias
The alias menu is the list of your personal aliases as defined
in your
muttrc. It is the mapping from a short alias name to the full
email
address(es) of the recipient(s).
attach
The attachment menu is used to access the attachments on
received messages.
browser
The browser is used for both browsing the local directory
structure, and for
listing all of your incoming mailboxes.
editor
The editor is the line-based editor the user enters text data.
index
The index is the list of messages contained in a mailbox.
compose
The compose menu is the screen used when sending a new message.
pager
The pager is the mode used to display message/attachment data,
and help
listings.
pgp
The pgp menu is used to select the OpenPGP keys used for
encrypting outgoing
messages.
postpone
The postpone menu is similar to the index menu, except is used
when
recalling a message the user was composing, but saved until
later.
key is the key (or key sequence) you wish to bind.
To specify a
control character, use the sequence \Cx,
where x is the
letter of the control character (for example, to specify control-A use
``\Ca''). Note that the case of x as well as
\C is
ignored, so that \CA, \Ca,
\cA
and \ca are all
equivalent. An alternative form is to specify the key as a three digit
octal number prefixed with a ``\'' (for example
\177
is
equivalent to \c?).
In addition, key may consist of:
Reference: Command Line OptionsOptionDescription-Aexpand an alias-aattach a file to a message-bspecify a blind carbon-copy (BCC) address-cspecify a carbon-copy (Cc) address-especify a config command to be run after initialization files are read-fspecify a mailbox to load-Fspecify an alternate file to read initialization commands-hprint help on command line options-Hspecify a draft file from which to read a header and body-ispecify a file to include in a message composition-mspecify a default mailbox type-ndo not read the system madmuttrc-precall a postponed message-Qquery a configuration variable-Ropen mailbox in read-only mode-sspecify a subject (enclose in quotes if it contains spaces)-tdump the value of all variables to stdout-Tdump the value of all changed variables to stdout-vshow version number and compile-time definitions-xsimulate the mailx(1) compose mode-yshow a menu containing the files specified by the mailboxes command-zexit immediately if there are no messages in the mailbox-Zopen the first folder with new message,exit immediately if none
To read messages in a mailbox
mutt ] -nz ] ] -F muttrc ] ] -m
type
] ] -f mailbox ]
To compose a new message
mutt ] -n ] ] -F muttrc ] ] -a
file
] ] -c address ] ] -i
filename
] ] -s subject ] address ]
address
... ]
Madmutt also supports a ``batch'' mode to send prepared messages.
Simply redirect
input from the file you wish to send. For example,
mutt -s "data set for run #2"
professor@bigschool.edu
< ~/run2.dat
This command will send a message to ``professor@bigschool.edu'' with a
subject
of ``data set for run #2''. In the body of the message will be the
contents
of the file ``~/run2.dat''.
Patterns
Reference: PatternsPattern ModifierArgumentDescriptionall messagesEXPRmessages which contain EXPR in the message bodyEXPRmessages which contain EXPR in the whole messageEXPRmessages carbon-copied to EXPREXPRmessage is either to: or cc: EXPRdeleted messages[MIN]-[MAX]messages with ``date-sent'' in a Date rangeexpired messagesEXPRmessage which contains EXPR in the ``Sender'' fieldflagged messagesEXPRmessages originating from EXPRcryptographically signed messagescryptographically encrypted messagesEXPRmessages with a spam attribute matching EXPREXPRmessages which contain EXPR in the message headermessage contains PGP key materialEXPRmessage which match ID in the ``Message-ID'' fieldEXPRmessage is either originated or received by EXPRmessage is addressed to a known mailing list[MIN]-[MAX]message in the range MIN to MAX *)multipart messages[MIN]-[MAX]messages with a score in the range MIN to MAX *)new messagesold messagesmessage is addressed to you (consults alternates)message is from you (consults alternates)messages which have been replied toread messages[MIN]-[MAX]messages with ``date-received'' in a Date rangesuperseded messagesEXPRmessages having EXPR in the ``Subject'' field.tagged messagesEXPRmessages addressed to EXPRunread messagesmessage is addressed to a subscribed mailing listmessage is part of a collapsed thread.cryptographically verified messagesEXPRmessages which contain EXPR in the `Newsgroups' field (if compiled with NNTP support)EXPRmessages which contain EXPR in the `References' field[MIN]-[MAX]messages with MIN to MAX attachments *)EXPRmessages which contain EXPR in the `X-Label' field[MIN]-[MAX]messages with a size in the range MIN to MAX *)duplicated messages (see $duplicate_threads)unreferenced messages (requires threaded view)``From'' contains realname and (syntactically) valid address
(excluded are addresses matching against alternates or any alias)
Where EXPR are
regexp. Special attention has to be
made when using regular expressions inside of patterns. Specifically,
Madmutt's parser for these patterns will strip one level of backslash
(\),
which is normally used for quoting. If it is your intention to use a
backslash in the regular expression, you will need to use two
backslashes
instead (\\).
*) The forms <[MAX], >[MIN],
[MIN]- and -[MAX]
are allowed, too.
Configuration Commands
The following are the commands understood by mutt.
patterncommandkeyaddress [, address, ... ]
[ * | key ... ]
regexp [ regexp ... ]
[ * | regexp ... ]
mimetype [ mimetype ... ]
mimetype [ mimetype ... ]
regexpcommandmimetype [ mimetype ... ]
mimetype [ mimetype ... ]
mapkeyfunctionaliascharsetregexpcommandobjectforegroundbackground [ regexp ]
indexpattern [ pattern ... ]
function [ function ... ]
patternmailboxpatternmailboxpatterncommandheader [ header ... ]
header [ header ... ]
charsetlocal-charsetpattern [ pattern ... ]
pattern [ pattern ... ]
regexp [ regexp ... ]
regexp [ regexp ... ]
menukeysequence [ description ]
filename [ filename ... ]
patternmailboxpatterncommandmimetype [ mimetype ... ]
mimetype [ mimetype ... ]
object attribute [ regexp ]
indexpattern [ pattern ... ]
stringfield [ field ... ]
regexpcommandpatternkey-idstringvariable [ variable ... ]
regexpfilenamepatternvaluepattern [ pattern ... ]
regexpcommandregexpcommand [no|inv]variable[ =value ] [ variable ... ]
variable [ variable ... ]
filenamepatternformatpatternregexp [ regexp ... ]
regexp [ regexp ... ]
variable [ variable ... ]
hook-typeConfiguration variables
The following list contains all variables which, in the process of
providing more consistency, have been renamed and are partially even
removed already. The left column contains the old synonym variables,
the right column the full/new name: