315
328
per-folder basis and much more.
332
Besides an interactive mode, Mutt can also be used as a command-line
333
tool only send messages. It also supports a
334
<literal>mailx(1)</literal>-compatible interface, see <xref
335
linkend="tab-commandline-options"/> for a complete list of command-line
341
<sect1 id="concept-screens-and-menus">
342
<title>Screens and Menus</title>
344
<sect2 id="intro-index">
348
The index is the screen that you usually see first when you start
349
Mutt. It gives an overview over your emails in the currently opened
350
mailbox. By default, this is your system mailbox. The information you
351
see in the index is a list of emails, each with its number on the left,
352
its flags (new email, important email, email that has been forwarded or
353
replied to, tagged email, ...), the date when email was sent, its
354
sender, the email size, and the subject. Additionally, the index also
355
shows thread hierarchies: when you reply to an email, and the other
356
person replies back, you can see the other's person email in a
357
"sub-tree" below. This is especially useful for personal email between
358
a group of people or when you've subscribed to mailing lists.
363
<sect2 id="intro-pager">
367
The pager is responsible for showing the email content. On the top of
368
the pager you have an overview over the most important email headers
369
like the sender, the recipient, the subject, and much more
370
information. How much information you actually see depends on your
371
configuration, which we'll describe below.
375
Below the headers, you see the email body which usually contains the
376
message. If the email contains any attachments, you will see more
377
information about them below the email body, or, if the attachments are
378
text files, you can view them directly in the pager.
382
To give the user a good overview, it is possible to configure Mutt to
383
show different things in the pager with different colors. Virtually
384
everything that can be described with a regular expression can be
385
colored, e.g. URLs, email addresses or smileys.
390
<sect2 id="intro-browser">
391
<title>File Browser</title>
394
The file browser is the interface to the local or remote file
395
system. When selecting a mailbox to open, the browser allows custom
396
sorting of items, limiting the items shown by a regular expression and a
397
freely adjustable format of what to display in which way. It also allows
398
for easy navigation through the file system when selecting file(s) to
399
attach to a message, select multiple files to attach and many more.
404
<sect2 id="intro-help">
408
The help screen is meant to offer a quick help to the user. It lists the
409
current configuration of key bindings and their associated commands
410
including a short description, and currently unbound functions that
411
still need to be associated with a key binding (or alternatively, they
412
can be called via the Mutt command prompt).
417
<sect2 id="intro-compose">
418
<title>Compose Menu</title>
421
The compose menu features a split screen containing the information
422
which really matter before actually sending a message by mail: who gets
423
the message as what (recipients and who gets what kind of
424
copy). Additionally, users may set security options like deciding
425
whether to sign, encrypt or sign and encrypt a message with/for what
426
keys. Also, it's used to attach messages, to re-edit any attachment
427
including the message itself.
432
<sect2 id="intro-alias">
433
<title>Alias Menu</title>
436
The alias menu is used to help users finding the recipients of
437
messages. For users who need to contact many people, there's no need to
438
remember addresses or names completely because it allows for searching,
439
too. The alias mechanism and thus the alias menu also features grouping
440
several addresses by a shorter nickname, the actual alias, so that users
441
don't have to select each single recipient manually.
446
<sect2 id="intro-attach">
447
<title>Attachment Menu</title>
450
As will be later discussed in detail, Mutt features a good and stable
451
MIME implementation, that is, it supports sending and receiving messages
452
of arbitrary MIME types. The attachment menu displays a message's
453
structure in detail: what content parts are attached to which parent
454
part (which gives a true tree structure), which type is of what type and
455
what size. Single parts may saved, deleted or modified to offer great
456
and easy access to message's internals.
320
463
<sect1 id="menus">
321
464
<title>Moving Around in Menus</title>
324
The most important navigation keys common to all menus are shown in
325
<xref linkend="tab-keys-nav"/>.
467
The most important navigation keys common to line- or entry-based menus
468
are shown in <xref linkend="tab-keys-nav-line"/> and in
469
<xref linkend="tab-keys-nav-page"/> for page-based menus.
328
<table id="tab-keys-nav">
329
<title>Most common navigation keys</title>
472
<table id="tab-keys-nav-line">
473
<title>Most common navigation keys in entry-based menus</title>
330
474
<tgroup cols="3">
332
476
<row><entry>Key</entry><entry>Function</entry><entry>Description</entry></row>
1005
1182
<emphasis>Bouncing</emphasis> a message sends the message as-is to the recipient you
1006
1183
specify. <emphasis>Forwarding</emphasis> a message allows you to add comments or
1007
1184
modify the message you are forwarding. These items are discussed
1008
in greater detail in the next chapter <quote><link linkend="forwarding-mail">Forwarding
1185
in greater detail in the next section <quote><link linkend="forwarding-mail">Forwarding
1009
1186
and Bouncing Mail</link>.</quote>
1013
1190
Mutt will then enter the <emphasis>compose</emphasis> menu and prompt you for the
1014
recipients to place on the <quote>To:</quote> header field. Next, it will ask
1191
recipients to place on the <quote>To:</quote> header field when you hit <literal>m</literal> to start a new message. Next, it will ask
1015
1192
you for the <quote>Subject:</quote> field for the message, providing a default if
1016
you are replying to or forwarding a message. See also
1193
you are replying to or forwarding a message. You again
1194
have the chance to adjust recipients, subject, and security settings
1195
right before actually sending the message. See also
1017
1196
<link linkend="askcc">$askcc</link>,
1018
1197
<link linkend="askbcc">$askbcc</link>,
1019
1198
<link linkend="autoedit">$autoedit</link>,
1020
1199
<link linkend="bounce">$bounce</link>,
1021
1200
<link linkend="fast-reply">$fast_reply</link>,
1022
1201
and <link linkend="include">$include</link>
1023
for changing how Mutt asks these questions.
1027
Mutt will then automatically start your <link linkend="editor">$editor</link>
1028
on the message body. If the <link linkend="edit-headers">$edit_headers</link>
1029
variable is set, the headers will be at the top of the message in your editor.
1030
Any messages you are replying to will be added in sort order to the message,
1202
for changing how and if Mutt asks these questions.
1206
When replying, Mutt fills these fields with proper values depending on
1207
the reply type. The types of replying supported are:
1212
<term>Simple reply</term>
1215
Reply to the author directly.
1220
<term>Group reply</term>
1223
Reply to the author as well to all recipients except you; this consults
1224
<link linkend="alternates"><command>alternates</command></link>.
1229
<term>List reply</term>
1232
Reply to all mailing list addresses found, either specified via
1233
configuration or auto-detected. See <xref linkend="lists"/> for
1241
After getting recipients for new messages, forwards or replies, Mutt
1242
will then automatically start your <link
1243
linkend="editor">$editor</link> on the message body. If the <link
1244
linkend="edit-headers">$edit_headers</link> variable is
1245
set, the headers will be at the top of the message in your editor. Any
1246
messages you are replying to will be added in sort order to the message,
1031
1247
with appropriate <link linkend="attribution">$attribution</link>,
1032
1248
<link linkend="indent-string">$indent_string</link> and
1033
<link linkend="post-indent-string">$post_indent_string</link>.
1034
When forwarding a message, if the <link linkend="mime-forward">$mime_forward</link>
1035
variable is unset, a copy of the forwarded message will be included. If
1036
you have specified a <link linkend="signature">$signature</link>, it
1037
will be appended to the message.
1250
linkend="post-indent-string">$post_indent_string</link>.
1251
When forwarding a message, if the <link
1252
linkend="mime-forward">$mime_forward</link> variable is
1253
unset, a copy of the forwarded message will be included. If you have
1254
specified a <link linkend="signature">$signature</link>, it will
1255
be appended to the message.
1097
1315
<sect2 id="edit-header">
1098
<title>Editing the message header</title>
1316
<title>Editing the Message Header</title>
1101
1319
When editing the header because of <link linkend="edit-headers">$edit_headers</link>
1102
1320
being set, there are a several pseudo headers available which
1103
will not be included in sent messages.
1321
will not be included in sent messages but trigger special Mutt behavior.
1106
1324
<sect3 id="fcc-header">
1107
<title>Fcc: pseudo header</title>
1325
<title>Fcc: Pseudo Header</title>
1112
1332
<literal>Fcc:</literal> <emphasis>filename</emphasis>
1114
1336
as a header, Mutt will pick up <emphasis>filename</emphasis>
1115
1337
just as if you had used the <literal><edit-fcc></literal> function in the <emphasis>compose</emphasis> menu.
1338
It can later be changed from the compose menu.
1120
1343
<sect3 id="attach-header">
1121
<title>Attach: pseudo header</title>
1344
<title>Attach: Pseudo Header</title>
1124
1347
You can also attach files to your message by specifying
1126
<literal>Attach:</literal> <emphasis>filename</emphasis> [ <emphasis>description</emphasis> ]
1351
<literal>Attach:</literal> <emphasis>filename</emphasis>
1352
[ <emphasis>description</emphasis> ]
1128
1356
where <emphasis>filename</emphasis> is the file to attach and <emphasis>description</emphasis> is an
1129
optional string to use as the description of the attached file.
1357
optional string to use as the description of the attached file. Spaces
1358
in filenames have to be escaped using backslash (<quote>\</quote>).
1359
The file can be removed as well as more added from the compose menu.
1134
1364
<sect3 id="pgp-header">
1135
<title>Pgp: pseudo header</title>
1365
<title>Pgp: Pseudo Header</title>
1138
1368
If you want to use PGP, you can specify
1248
<sect2 id="sending-mixmaster">
1249
<title>Sending anonymous messages via mixmaster</title>
1252
You may also have compiled mutt to co-operate with Mixmaster, an
1253
anonymous remailer. Mixmaster permits you to send your messages
1254
anonymously using a chain of remailers. Mixmaster support in mutt is for
1255
mixmaster version 2.04 (beta 45 appears to be the latest) and 2.03.
1256
It does not support earlier versions or the later so-called version 3 betas,
1257
of which the latest appears to be called 2.9b23.
1261
To use it, you'll have to obey certain restrictions. Most
1262
important, you cannot use the <literal>Cc</literal> and <literal>Bcc</literal> headers. To tell
1263
Mutt to use mixmaster, you have to select a remailer chain, using
1264
the mix function on the compose menu.
1268
The chain selection screen is divided into two parts. In the
1269
(larger) upper part, you get a list of remailers you may use. In
1270
the lower part, you see the currently selected chain of remailers.
1274
You can navigate in the chain using the <literal><chain-prev></literal> and
1275
<literal><chain-next></literal> functions, which are by default bound to the left
1276
and right arrows and to the <literal>h</literal> and <literal>l</literal> keys (think vi
1277
keyboard bindings). To insert a remailer at the current chain
1278
position, use the <literal><insert></literal> function. To append a remailer behind
1279
the current chain position, use <literal><select-entry></literal> or <literal><append></literal>.
1280
You can also delete entries from the chain, using the corresponding
1281
function. Finally, to abandon your changes, leave the menu, or
1282
<literal><accept></literal> them pressing (by default) the <literal>Return</literal> key.
1286
Note that different remailers do have different capabilities,
1287
indicated in the %c entry of the remailer menu lines (see
1288
<link linkend="mix-entry-format">$mix_entry_format</link>). Most important is
1289
the <quote>middleman</quote> capability, indicated by a capital <quote>M</quote>: This
1290
means that the remailer in question cannot be used as the final
1291
element of a chain, but will only forward messages to other
1292
mixmaster remailers. For details on the other capabilities, please
1293
have a look at the mixmaster documentation.
1298
1478
<sect2 id="ff">
1299
<title>Sending format=flowed messages</title>
1479
<title>Sending Format=Flowed Messages</title>
1301
1481
<sect3 id="ff-concept">
1302
1482
<title>Concept</title>
2394
The uncolor command can be applied to the index object only. It
2395
removes entries from the list. You <emphasis role="bold">must</emphasis> specify the same pattern
2396
specified in the color command for it to be removed. The pattern <quote>*</quote> is
2397
a special token which means to clear the color index list of all entries.
2572
The <command>uncolor</command> command can be applied to the index, header and body objects only. It
2573
removes entries from the list. You <emphasis>must</emphasis> specify the same pattern
2574
specified in the <command>color</command> command for it to be removed. The pattern <quote>*</quote> is
2575
a special token which means to clear the color list of all entries.
2402
2580
Mutt also recognizes the keywords <emphasis>color0</emphasis>, <emphasis>color1</emphasis>, …,
2403
<emphasis>color</emphasis><emphasis role="bold">N-1</emphasis> (<emphasis role="bold">N</emphasis> being the number of colors supported
2581
<emphasis>color</emphasis><emphasis>N-1</emphasis> (<emphasis>N</emphasis> being the number of colors supported
2404
2582
by your terminal). This is useful when you remap the colors for your
2405
2583
display (for example by changing the color associated with <emphasis>color2</emphasis>
2406
2584
for your xterm), since color names may then lose their normal meaning.
2410
2589
If your terminal does not support color, it is still possible change the video
2411
attributes through the use of the <quote>mono</quote> command:
2590
attributes through the use of the <quote>mono</quote> command. Usage:
2418
2594
<command>mono</command>
2419
2595
<arg choice="plain">
2632
With various functions, mutt will treat messages differently,
2808
With various functions, Mutt will treat messages differently,
2633
2809
depending on whether you sent them or whether you received them from
2634
2810
someone else. For instance, when replying to a message that you
2635
sent to a different party, mutt will automatically suggest to send
2636
the response to the original message's recipients -- responding to
2811
sent to a different party, Mutt will automatically suggest to send
2812
the response to the original message's recipients — responding to
2637
2813
yourself won't make much sense in many cases. (See <link linkend="reply-to">$reply_to</link>.)
2641
2817
Many users receive e-mail under a number of different addresses. To
2642
fully use mutt's features here, the program must be able to
2818
fully use Mutt's features here, the program must be able to
2643
2819
recognize what e-mail addresses you receive mail under. That's the
2644
purpose of the <literal>alternates</literal> command: It takes a list of regular
2820
purpose of the <command>alternates</command> command: It takes a list of regular
2645
2821
expressions, each of which can identify an address under which you
2646
2822
receive e-mail.
2675
The <literal>unalternates</literal> command can be used to write exceptions to
2676
<literal>alternates</literal> patterns. If an address matches something in an
2677
<literal>alternates</literal> command, but you nonetheless do not think it is
2678
from you, you can list a more precise pattern under an <literal>unalternates</literal>
2851
The <command>unalternates</command> command can be used to write exceptions to
2852
<command>alternates</command> patterns. If an address matches something in an
2853
<command>alternates</command> command, but you nonetheless do not think it is
2854
from you, you can list a more precise pattern under an <command>unalternates</command>
2683
To remove a regular expression from the <literal>alternates</literal> list, use the
2684
<literal>unalternates</literal> command with exactly the same <emphasis>regexp</emphasis>.
2685
Likewise, if the <emphasis>regexp</emphasis> for an <literal>alternates</literal> command matches
2686
an entry on the <literal>unalternates</literal> list, that <literal>unalternates</literal>
2687
entry will be removed. If the <emphasis>regexp</emphasis> for <literal>unalternates</literal>
2688
is <quote>*</quote>, <emphasis>all entries</emphasis> on <literal>alternates</literal> will be removed.
2859
To remove a regular expression from the <command>alternates</command> list, use the
2860
<command>unalternates</command> command with exactly the same <emphasis>regexp</emphasis>.
2861
Likewise, if the <emphasis>regexp</emphasis> for an <command>alternates</command> command matches
2862
an entry on the <command>unalternates</command> list, that <command>unalternates</command>
2863
entry will be removed. If the <emphasis>regexp</emphasis> for <command>unalternates</command>
2864
is <quote>*</quote>, <emphasis>all entries</emphasis> on <command>alternates</command> will be removed.
2693
2869
<sect1 id="lists">
2694
<title>Mailing lists</title>
2870
<title>Mailing Lists</title>
2696
2872
<anchor id="subscribe"/>
2697
2873
<para>Usage:</para>
2772
2949
receiving personal CCs of list messages. Also note that the generation
2773
2950
of the Mail-Followup-To header is controlled by the
2774
2951
<link linkend="followup-to">$followup_to</link>
2775
configuration variable.
2952
configuration variable since it's common practice on some mailing lists
2953
to send Cc upons replies (which is more a group- than a list-reply).
2780
2958
More precisely, Mutt maintains lists of patterns for the addresses
2781
2959
of known and subscribed mailing lists. Every subscribed mailing
2782
list is known. To mark a mailing list as known, use the <quote>lists</quote>
2783
command. To mark it as subscribed, use <quote>subscribe</quote>.
2960
list is known. To mark a mailing list as known, use the <command>list</command>
2961
command. To mark it as subscribed, use <command>subscribe</command>.
2787
You can use regular expressions with both commands. To mark all
2788
messages sent to a specific bug report's address on mutt's bug
2965
You can use regular expressions with both commands. To mark all
2966
messages sent to a specific bug report's address on Debian's bug
2789
2967
tracking system as list mail, for instance, you could say
2790
<quote>subscribe [0-9]*@bugs.guug.de</quote>. Often, it's sufficient to just
2791
give a portion of the list's e-mail address.
2971
subscribe [0-9]*.*@bugs.debian.org</screen>
2974
as it's often, it's sufficient to just give a portion of the list's e-mail address.
2795
2978
Specify as much of the address as you need to to remove ambiguity. For
2796
2979
example, if you've subscribed to the Mutt mailing list, you will receive mail
2797
addressed to <emphasis>mutt-users@mutt.org</emphasis>. So, to tell Mutt
2798
that this is a mailing list, you could add <quote>lists mutt-users@</quote> to your
2799
initialization file. To tell mutt that you are subscribed to it,
2800
add <quote>subscribe mutt-users</quote> to your initialization file instead.
2980
addressed to <literal>mutt-users@mutt.org</literal>. So, to tell Mutt
2981
that this is a mailing list, you could add <literal>lists mutt-users@</literal> to your
2982
initialization file. To tell Mutt that you are subscribed to it,
2983
add <literal><command>subscribe</command> mutt-users</literal> to your initialization file instead.
2801
2984
If you also happen to get mail from someone whose address is
2802
<emphasis>mutt-users@example.com</emphasis>, you could use
2803
<quote>lists ^mutt-users@mutt\\.org$</quote>
2804
or <quote>subscribe ^mutt-users@mutt\\.org$</quote> to
2985
<literal>mutt-users@example.com</literal>, you could use
2986
<literal><command>lists</command> ^mutt-users@mutt\\.org$</literal>
2987
or <literal><command>subscribe</command> ^mutt-users@mutt\\.org$</literal> to
2805
2988
match only mail from the actual list.
3183
<literal>reply-hook</literal> is matched against the message you are <emphasis>replying to</emphasis>,
3184
instead of the message you are <emphasis>sending</emphasis>. <literal>send-hook</literal> is
3350
<command>reply-hook</command> is matched against the message you are <emphasis>replying to</emphasis>,
3351
instead of the message you are <emphasis>sending</emphasis>. <command>send-hook</command> is
3185
3352
matched against all messages, both <emphasis>new</emphasis>
3186
3353
and <emphasis>replies</emphasis>.
3191
<literal>reply-hook</literal>s are matched <emphasis role="bold">before</emphasis> the <literal>send-hook</literal>, <emphasis role="bold">regardless</emphasis>
3358
<command>reply-hook</command>s are matched <emphasis>before</emphasis> the <command>send-hook</command>, <emphasis>regardless</emphasis>
3192
3359
of the order specified in the user's configuration file.
3197
<literal>send2-hook</literal> is matched every time a message is changed, either
3364
<command>send2-hook</command> is matched every time a message is changed, either
3198
3365
by editing it, or by using the compose menu to change its recipients
3199
or subject. <literal>send2-hook</literal> is executed after <literal>send-hook</literal>, and
3366
or subject. <command>send2-hook</command> is executed after <command>send-hook</command>, and
3200
3367
can, e.g., be used to set parameters such as the <link linkend="sendmail">$sendmail</link> variable depending on the message's sender
3205
For each type of <literal>send-hook</literal> or <literal>reply-hook</literal>, when multiple matches
3206
occur, commands are executed in the order they are specified in the muttrc
3372
For each type of <command>send-hook</command> or <command>reply-hook</command>, when multiple matches
3373
occur, commands are executed in the order they are specified in the <literal>.muttrc</literal>
3207
3374
(for that type of hook).
3211
Example: <literal>send-hook mutt "set mime_forward signature=''"</literal>
3378
Example: <literal><command>send-hook</command> mutt "<command>set</command> mime_forward signature=''"</literal>
3387
The <literal>score</literal> commands adds <emphasis>value</emphasis> to a message's score if <emphasis>pattern</emphasis>
3556
The <command>score</command> commands adds <emphasis>value</emphasis> to a message's score if <emphasis>pattern</emphasis>
3388
3557
matches it. <emphasis>pattern</emphasis> is a string in the format described in the <link linkend="patterns">patterns</link> section (note: For efficiency reasons, patterns
3389
3558
which scan information not available in the index, such as <literal>˜b</literal>,
3390
3559
<literal>˜B</literal> or <literal>˜h</literal>, may not be used). <emphasis>value</emphasis> is a
3391
3560
positive or negative integer. A message's final score is the sum total of all
3392
matching <literal>score</literal> entries. However, you may optionally prefix <emphasis>value</emphasis> with
3393
an equal sign (=) to cause evaluation to stop at a particular entry if there is
3561
matching <command>score</command> entries. However, you may optionally prefix <emphasis>value</emphasis> with
3562
an equal sign (<quote>=</quote>) to cause evaluation to stop at a particular entry if there is
3394
3563
a match. Negative final scores are rounded up to 0.
3398
The <literal>unscore</literal> command removes score entries from the list. You <emphasis role="bold">must</emphasis>
3399
specify the same pattern specified in the <literal>score</literal> command for it to be
3567
The <command>unscore</command> command removes score entries from the list. You <emphasis>must</emphasis>
3568
specify the same pattern specified in the <command>score</command> command for it to be
3400
3569
removed. The pattern <quote>*</quote> is a special token which means to clear the list
3401
3570
of all score entries.
3625
To match spam tags, mutt needs the corresponding header information
3626
which is always the case for local and POP folders but not for IMAP in
3627
the default configuration. Depending on the spam header to be analyzed,
3628
<link linkend="imap-headers">$imap_headers</link> may need
3458
3633
If you're using multiple spam filters, a message can have more than
3459
one spam-related header. You can define <literal>spam</literal> patterns for each
3634
one spam-related header. You can define <command>spam</command> patterns for each
3460
3635
filter you use. If a message matches two or more of these patterns, and
3461
the $spam_separator variable is set to a string, then the
3636
the <link linkend="spam-separator">$spam_separator</link> variable is set to a string, then the
3462
3637
message's spam tag will consist of all the <emphasis>format</emphasis> strings joined
3463
together, with the value of $spam_separator separating
3638
together, with the value of <link linkend="spam-separator">$spam_separator</link> separating
3468
For example, suppose I use DCC, SpamAssassin, and PureMessage. I might
3469
define these spam settings:
3643
For example, suppose one uses DCC, SpamAssassin, and PureMessage, then
3644
the configuration might look like in <xref linkend="ex-spam"/>.
3472
3647
<example id="ex-spam">
3483
If I then received a message that DCC registered with <quote>many</quote> hits
3658
If then a message is received that DCC registered with <quote>many</quote> hits
3484
3659
under the <quote>Fuz2</quote> checksum, and that PureMessage registered with a
3485
3660
97% probability of being spam, that message's spam tag would read
3486
3661
<literal>90+/DCC-Fuz2, 97/PM</literal>. (The four characters before <quote>=many</quote> in a
3487
DCC report indicate the checksum used -- in this case, <quote>Fuz2</quote>.)
3662
DCC report indicate the checksum used — in this case, <quote>Fuz2</quote>.)
3491
If the $spam_separator variable is unset, then each
3666
If the <link linkend="spam-separator">$spam_separator</link> variable is unset, then each
3492
3667
spam pattern match supersedes the previous one. Instead of getting
3493
3668
joined <emphasis>format</emphasis> strings, you'll get only the last one to match.
3497
3672
The spam tag is what will be displayed in the index when you use
3498
<literal>%H</literal> in the <literal>$index_format</literal> variable. It's also the
3673
<literal>%H</literal> in the <link linkend="index-format">$index_format</link> variable. It's also the
3499
3674
string that the <literal>˜H</literal> pattern-matching expression matches against for
3500
3675
<literal><search></literal> and <literal><limit></literal> functions. And it's what sorting by spam
3501
3676
attribute will use as a sort key.
3505
3680
That's a pretty complicated example, and most people's actual
3506
3681
environments will have only one spam filter. The simpler your
3507
configuration, the more effective mutt can be, especially when it comes
3682
configuration, the more effective Mutt can be, especially when it comes
3512
Generally, when you sort by spam tag, mutt will sort <emphasis>lexically</emphasis> --
3687
Generally, when you sort by spam tag, Mutt will sort <emphasis>lexically</emphasis> —
3513
3688
that is, by ordering strings alphanumerically. However, if a spam tag
3514
begins with a number, mutt will sort numerically first, and lexically
3689
begins with a number, Mutt will sort numerically first, and lexically
3515
3690
only when two numbers are equal in value. (This is like UNIX's
3516
<literal>sort -n</literal>.) A message with no spam attributes at all -- that is, one
3517
that didn't match <emphasis>any</emphasis> of your <literal>spam</literal> patterns -- is sorted at
3691
<literal>sort -n</literal>.) A message with no spam attributes at all — that is, one
3692
that didn't match <emphasis>any</emphasis> of your <command>spam</command> patterns — is sorted at
3518
3693
lowest priority. Numbers are sorted next, beginning with 0 and ranging
3519
3694
upward. Finally, non-numeric strings are sorted, with <quote>a</quote> taking lower
3520
3695
priority than <quote>z</quote>. Clearly, in general, sorting by spam tags is most
3521
3696
effective when you can coerce your filter to give you a raw number. But
3522
in case you can't, mutt can still do something useful.
3697
in case you can't, Mutt can still do something useful.
3526
The <literal>nospam</literal> command can be used to write exceptions to <literal>spam</literal>
3527
patterns. If a header pattern matches something in a <literal>spam</literal> command,
3701
The <command>nospam</command> command can be used to write exceptions to <command>spam</command>
3702
patterns. If a header pattern matches something in a <command>spam</command> command,
3528
3703
but you nonetheless do not want it to receive a spam tag, you can list a
3529
more precise pattern under a <literal>nospam</literal> command.
3704
more precise pattern under a <command>nospam</command> command.
3533
If the <emphasis>pattern</emphasis> given to <literal>nospam</literal> is exactly the same as the
3534
<emphasis>pattern</emphasis> on an existing <literal>spam</literal> list entry, the effect will be to
3708
If the <emphasis>pattern</emphasis> given to <command>nospam</command> is exactly the same as the
3709
<emphasis>pattern</emphasis> on an existing <command>spam</command> list entry, the effect will be to
3535
3710
remove the entry from the spam list, instead of adding an exception.
3536
Likewise, if the <emphasis>pattern</emphasis> for a <literal>spam</literal> command matches an entry
3537
on the <literal>nospam</literal> list, that <literal>nospam</literal> entry will be removed. If the
3538
<emphasis>pattern</emphasis> for <literal>nospam</literal> is <quote>*</quote>, <emphasis>all entries on both lists</emphasis>
3539
will be removed. This might be the default action if you use <literal>spam</literal>
3540
and <literal>nospam</literal> in conjunction with a <literal>folder-hook</literal>.
3711
Likewise, if the <emphasis>pattern</emphasis> for a <command>spam</command> command matches an entry
3712
on the <command>nospam</command> list, that nospam entry will be removed. If the
3713
<emphasis>pattern</emphasis> for <command>nospam</command> is <quote>*</quote>, <emphasis>all entries on both lists</emphasis>
3714
will be removed. This might be the default action if you use <command>spam</command>
3715
and <command>nospam</command> in conjunction with a <command>folder-hook</command>.
3544
You can have as many <literal>spam</literal> or <literal>nospam</literal> commands as you like.
3545
You can even do your own primitive spam detection within mutt -- for
3719
You can have as many <command>spam</command> or <command>nospam</command> commands as you like.
3720
You can even do your own primitive <command>spam</command> detection within Mutt — for
3546
3721
example, if you consider all mail from <literal>MAILER-DAEMON</literal> to be spam,
3547
you can use a <literal>spam</literal> command like this:
3722
you can use a <command>spam</command> command like this:
3556
3731
<sect1 id="set">
3557
3732
<title>Setting and Querying Variables</title>
3734
<sect2 id="var-types">
3735
<title>Variable Types</title>
3738
Mutt supports these types of configuration variables:
3743
<term>boolean</term>
3746
A boolean expression, either <quote>yes</quote> or <quote>no</quote>.
3754
A signed integer number in the range -32768 to 32767.
3770
A specialized string for representing paths including support for
3771
mailbox shortcuts (see <xref linkend="shortcuts"/>) as well as tilde
3772
(<quote>˜</quote>) for a user's home directory and more.
3777
<term>quadoption</term>
3780
Like a boolean but triggers a prompt when set to <quote>ask-yes</quote>
3781
or <quote>ask-no</quote> with <quote>yes</quote> and <quote>no</quote>
3782
preselected respectively.
3787
<term>sort order</term>
3790
A specialized string allowing only particular words as values depending
3796
<term>regular expression</term>
3799
A regular expression, see <xref linkend="regexp"/> for an introduction.
3804
<term>folder magic</term>
3807
Specifies the type of folder to use: <emphasis>mbox</emphasis>,
3808
<emphasis>mmdf</emphasis>, <emphasis>mh</emphasis>
3809
or <emphasis>maildir</emphasis>.
3810
Currently only used to determine the type for newly created folders.
3815
<term>e-mail address</term>
3818
An e-mail address either with or without
3819
realname. The older <quote><literal>user@example.org (Joe User)</literal></quote>
3820
form is supported but strongly deprecated.
3825
<term>user-defined</term>
3828
Arbitrary text, see <xref linkend="set-myvar"/> for details.
3559
3836
<sect2 id="set-commands">
3560
3837
<title>Commands</title>
3668
The <literal>reset</literal> command resets all given variables to the compile time
3939
The <command>reset</command> command resets all given variables to the compile time
3669
3940
defaults (hopefully mentioned in this manual). If you use the command
3670
<literal>set</literal> and prefix the variable with <quote>&</quote> this has the same
3671
behavior as the reset command.
3941
<command>set</command> and prefix the variable with <quote>&</quote> this has the same
3942
behavior as the <command>reset</command> command.
3675
With the <literal>reset</literal> command there exists the special variable <quote>all</quote>,
3946
With the <command>reset</command> command there exists the special variable <quote>all</quote>,
3676
3947
which allows you to reset all variables to their system defaults.
3681
3952
<sect2 id="set-myvar">
3682
<title>User-defined variables</title>
3953
<title>User-Defined Variables</title>
3684
3955
<sect3 id="set-myvar-intro">
3685
3956
<title>Introduction</title>
3688
3959
Along with the variables listed in the
3689
<link linkend="variables">Configuration variables</link> section, mutt
3960
<link linkend="variables">Configuration variables</link> section, Mutt
3690
3961
supports user-defined variables with names starting
3691
3962
with <literal>my_</literal> as in, for
3692
3963
example, <literal>my_cfgdir</literal>.
3696
The <literal>set</literal> command either creates a
3967
The <command>set</command> command either creates a
3697
3968
custom <literal>my_</literal> variable or changes its
3698
value if it does exist already. The <literal>unset</literal> and <literal>reset</literal>
3969
value if it does exist already. The <command>unset</command> and <command>reset</command>
3699
3970
commands remove the variable entirely.
3872
4143
Some of the modifiers are borrowed right out of C (though you might
3873
4144
know them from Perl, Python, shell, or another language). These are
3874
the [-]m.n modifiers, as in <literal>%-12.12s</literal>. As with
4145
the <literal>[-]m.n</literal> modifiers, as in <literal>%-12.12s</literal>. As with
3875
4146
such programming languages, these modifiers allow you to specify the
3876
4147
minimum and maximum size of the resulting string, as well as its
3877
4148
justification. If the <quote>-</quote> sign follows the percent, the string will
3878
4149
be left-justified instead of right-justified. If there's a number
3879
4150
immediately following that, it's the minimum amount of space the
3880
formatted string will occupy -- if it's naturally smaller than that, it
4151
formatted string will occupy — if it's naturally smaller than that, it
3881
4152
will be padded out with spaces. If a decimal point and another number
3882
follow, that's the maximum space allowable -- the string will not be
4153
follow, that's the maximum space allowable — the string will not be
3883
4154
permitted to exceed that width, no matter its natural size. Each of
3884
4155
these three elements is optional, so that all these are legal format
3886
<literal>%-12s</literal>
3887
<literal>%4c</literal>
3888
<literal>%.15F</literal>
3889
<literal>%-12.15L</literal>
4156
strings: <literal>%-12s</literal>, <literal>%4c</literal>,
4157
<literal>%.15F</literal> and <literal>%-12.15L</literal>.
4182
<sect2 id="formatstrings-conditionals">
4183
<title>Conditionals</title>
4186
Depending on the format string variable, some of its sequences can be
4187
used to optionally print a string if their value is nonzero. For
4188
example, you may only want to see the number of flagged messages if such
4189
messages exist, since zero is not particularly meaningful. To optionally
4190
print a string based upon one of the above sequences, the following
4195
%?<sequence_char>?<optional_string>?</screen>
4198
where <emphasis>sequence_char</emphasis> is an expando, and
4199
<emphasis>optional_string</emphasis> is the string you would like printed if
4200
<emphasis>sequence_char</emphasis> is nonzero.
4201
<emphasis>optional_string</emphasis> may contain other
4202
sequences as well as normal text, but you may not nest optional
4207
Here is an example illustrating how to optionally print the number of
4208
new messages in a mailbox in
4209
<link linkend="status-format">$status_format</link>:
4213
%?n?%n new messages.?</screen>
4216
You can also switch between two strings using the following construct:
4220
%?<sequence_char>?<if_string>&<else_string>?</screen>
4223
If the value of <emphasis>sequence_char</emphasis> is
4224
non-zero, <emphasis>if_string</emphasis> will be expanded,
4225
otherwise <emphasis>else_string</emphasis> will be expanded.
3914
4230
<sect2 id="formatstrings-filters">
3915
4231
<title>Filters</title>
3947
4263
A practical example is the <literal>mutt_xtitle</literal>
3948
4264
script installed in the <literal>samples</literal>
3949
subdirectory of the mutt documentation: it can be used as filter for
3950
<literal>$status_format</literal> to set the current
4265
subdirectory of the Mutt documentation: it can be used as filter for
4266
<link linkend="status-format">$status_format</link> to set the current
3951
4267
terminal's title, if supported.
4272
<sect2 id="formatstrings-padding">
4273
<title>Padding</title>
4276
In most format strings, Mutt supports different types of padding using
4277
special %-expandos:
4282
<term><literal>%|X</literal></term>
4285
When this occurs, Mutt will fill the rest of the
4286
line with the character <literal>X</literal>. For
4287
example, filling the rest of the line with dashes is
4291
set status_format = "%v on %h: %B: %?n?%n&no? new messages %|-"</screen>
4296
<literal>%>X</literal>
4300
Since the previous expando stops at the end of line, there must be a way
4301
to fill the gap between two items via the <literal>%>X</literal>
4302
expando: it puts as many characters <literal>X</literal> in between two
4303
items so that the rest of the line will be right-justified. For example,
4304
to not put the version string and hostname the above example on the left
4305
but on the right and fill the gap with spaces, one might use (note the
4306
space after <literal>%></literal>):
4309
set status_format = "%B: %?n?%n&no? new messages %> (%v on %h)"</screen>
4313
<term><literal>%*X</literal>
4317
Normal right-justification will print everything to the left of the
4318
<literal>%></literal>, displaying padding and whatever lies to the
4319
right only if there's room. By contrast, <quote>soft-fill</quote> gives
4320
priority to the right-hand side, guaranteeing space to display it and
4321
showing padding only if there's still room. If necessary, soft-fill will
4322
eat text leftwards to make room for rightward text. For example, to
4323
right-justify the subject making sure as much as possible of it fits on
4324
screen, one might use (note two spaces after <literal>%*
4325
</literal>: the second ensures there's a space between the truncated
4326
right-hand side and the subject):
4329
set index_format="%4C %Z %{%b %d} %-15.15L (%?l?%4l&%4c?)%* %s"</screen>
4258
4641
Where <emphasis>EXPR</emphasis> is a
4259
<link linkend="regexp">regular expression</link>. Special attention has to be
4260
made when using regular expressions inside of patterns. Specifically,
4642
<link linkend="regexp">regular expression</link>.
4646
*) The forms <quote><[<emphasis>MAX</emphasis>]</quote>, <quote>>[<emphasis>MIN</emphasis>]</quote>,
4647
<quote>[<emphasis>MIN</emphasis>]-</quote> and <quote>-[<emphasis>MAX</emphasis>]</quote>
4652
**) The suffixes <quote>K</quote> and <quote>M</quote> are allowed to specify kilobyte and megabyte respectively.
4656
Special attention has to be
4657
payed when using regular expressions inside of patterns. Specifically,
4261
4658
Mutt's parser for these patterns will strip one level of backslash (<quote>\</quote>),
4262
4659
which is normally used for quoting. If it is your intention to use a
4263
4660
backslash in the regular expression, you will need to use two backslashes
4264
instead (<quote>\\</quote>). You can force mutt to treat <emphasis>EXPR</emphasis> as a simple string
4661
instead (<quote>\\</quote>). You can force Mutt to treat <emphasis>EXPR</emphasis> as a simple string
4265
4662
instead of a regular expression by using = instead of ˜ in the
4266
4663
pattern name. For example, <literal>=b *.*</literal> will find all messages that contain
4267
4664
the literal string <quote>*.*</quote>. Simple string matches are less powerful than
4268
4665
regular expressions but can be considerably faster. This is especially
4269
4666
true for IMAP folders, because string matches can be performed on the
4270
4667
server instead of by fetching every message. IMAP treats <literal>=h</literal> specially:
4271
it must be of the form "header: substring" and will not partially
4668
it must be of the form <quote>header: substring</quote> and will not partially
4272
4669
match header names. The substring part may be omitted if you simply
4273
4670
wish to find messages containing a particular header without regard to
4278
*) The forms <quote><[<emphasis>MAX</emphasis>]</quote>, <quote>>[<emphasis>MIN</emphasis>]</quote>,
4279
<quote>[<emphasis>MIN</emphasis>]-</quote> and <quote>-[<emphasis>MAX</emphasis>]</quote>
4283
<sect2 id="patterns-modifier">
4284
<title>Pattern Modifier</title>
4288
Note that patterns matching 'lists' of addresses (notably c, C, p, P and t)
4675
Patterns matching lists of addresses (notably c, C, p, P and t)
4289
4676
match if there is at least one match in the whole list. If you want to
4290
4677
make sure that all elements of that list match, you need to prefix your
4291
4678
pattern with <quote>ˆ</quote>.
4292
4679
This example matches all mails which only has recipients from Germany.
4682
<example id="ex-recips">
4683
<title>Matching all addresses in address lists</title>
4302
<sect2 id="simple-patterns">
4303
<title>Simple Patterns</title>
4691
<sect2 id="simple-searches">
4692
<title>Simple Searches</title>
4306
Mutt supports two versions of so called <quote>simple searches</quote> which are
4695
Mutt supports two versions of so called <quote>simple searches</quote>. These are
4307
4696
issued if the query entered for searching, limiting and similar
4308
operations does not seem to be a valid pattern (i.e. it does not contain
4697
operations does not seem to contain a valid pattern modifier (i.e. it does not contain
4309
4698
one of these characters: <quote>˜</quote>, <quote>=</quote> or <quote>%</quote>). If the query is
4310
4699
supposed to contain one of these special characters, they must be escaped
4311
4700
by prepending a backslash (<quote>\</quote>).
4594
4990
reading, or to whom you are sending mail. In the Mutt world, a <emphasis>hook</emphasis>
4595
4991
consists of a <link linkend="regexp">regular expression</link> or
4596
4992
<link linkend="patterns">pattern</link> along with a
4597
configuration option/command. See
4993
configuration option/command. See:
4603
<link linkend="folder-hook">folder-hook</link>
4609
<link linkend="send-hook">send-hook</link>
4615
<link linkend="message-hook">message-hook</link>
4621
<link linkend="save-hook">save-hook</link>
4627
<link linkend="mbox-hook">mbox-hook</link>
4633
<link linkend="fcc-hook">fcc-hook</link>
4639
<link linkend="fcc-save-hook">fcc-save-hook</link>
4999
<link linkend="account-hook"><command>account-hook</command></link>
5005
<link linkend="charset-hook"><command>charset-hook</command></link>
5011
<link linkend="crypt-hook"><command>crypt-hook</command></link>
5017
<link linkend="fcc-hook"><command>fcc-hook</command></link>
5023
<link linkend="fcc-save-hook"><command>fcc-save-hook</command></link>
5029
<link linkend="folder-hook"><command>folder-hook</command></link>
5035
<link linkend="iconv-hook"><command>iconv-hook</command></link>
5041
<link linkend="mbox-hook"><command>mbox-hook</command></link>
5047
<link linkend="message-hook"><command>message-hook</command></link>
5053
<link linkend="reply-hook"><command>reply-hook</command></link>
5059
<link linkend="save-hook"><command>save-hook</command></link>
5065
<link linkend="send-hook"><command>send-hook</command></link>
5071
<link linkend="send2-hook"><command>send2-hook</command></link>
4650
5082
If a hook changes configuration settings, these changes remain
4651
effective until the end of the current mutt session. As this is generally
4652
not desired, a default hook needs to be added before all other hooks to
4653
restore configuration defaults. Here is an example with send-hook and the
4654
my_hdr directive:
5083
effective until the end of the current Mutt session. As this is generally
5084
not desired, a <quote>default</quote> hook needs to be added before all
5085
other hooks of that type to restore configuration defaults.
4658
<example id="ex-send-hook-my-hdr">
4659
<title>Combining <literal>send-hook</literal> and <literal>my_hdr</literal></title>
5089
<example id="ex-default-hook">
5090
<title>Specifying a <quote>default</quote> hook</title>
4661
5092
send-hook . 'unmy_hdr From:'
4662
5093
send-hook ~C'^b@b\.b$' my_hdr from: c@c.c
5098
In <xref linkend="ex-default-hook"/>, by default the value of
5099
<link linkend="from">$from</link>
5100
and <link linkend="realname">$realname</link>
5101
is not overridden. When sending messages either To: or Cc:
5102
to <literal><b@b.b></literal>, the From: header is changed to
5103
<literal><c@c.c></literal>.
4666
5106
<sect2 id="pattern-hook" xreflabel="Message Matching in Hooks">
4667
5107
<title>Message Matching in Hooks</title>
4670
Hooks that act upon messages (<literal>message-hook, reply-hook,
4671
send-hook, send2-hook, save-hook, fcc-hook</literal>) are evaluated in a
5110
Hooks that act upon messages (<command>message-hook</command>, <command>reply-hook</command>,
5111
<command>send-hook</command>, <command>send2-hook</command>, <command>save-hook</command>, <command>fcc-hook</command>) are evaluated in a
4672
5112
slightly different manner. For the other
4673
5113
types of hooks, a <link linkend="regexp">regular expression</link> is
4674
5114
sufficient. But in dealing with messages a finer grain of control is
4794
5236
to denote the start of a new message (this is often referred to as the
4795
<quote>From_</quote> line).
4799
<emphasis role="bold">MMDF</emphasis>. This is a variant of the <emphasis>mbox</emphasis> format. Each message is
4800
surrounded by lines containing <quote>ˆAˆAˆAˆA</quote> (four control-A's).
4804
<emphasis role="bold">MH</emphasis>. A radical departure from <emphasis>mbox</emphasis> and <emphasis>MMDF</emphasis>, a mailbox
5237
<quote>From_</quote> line). The mbox format requires mailbox
5238
locking, is prone to mailbox corruption with concurrently writing
5239
clients or misinterpreted From_ lines. Depending on the
5240
environment, new mail detection can be unreliable. Mbox folders are fast
5241
to open and easy to archive.
5245
<emphasis>MMDF</emphasis>. This is a variant of
5246
the <emphasis>mbox</emphasis> format. Each message is surrounded by
5247
lines containing <quote>ˆAˆAˆAˆA</quote> (four
5248
control-A's). The same problems as for mbox apply (also with finding the
5249
right message separator as four control-A's may appear in message
5254
<emphasis>MH</emphasis>. A radical departure from <emphasis>mbox</emphasis> and <emphasis>MMDF</emphasis>, a mailbox
4805
5255
consists of a directory and each message is stored in a separate file.
4806
5256
The filename indicates the message number (however, this is may not
4807
5257
correspond to the message number Mutt displays). Deleted messages are
4808
renamed with a comma (,) prepended to the filename. Mutt
5258
renamed with a comma (<quote>,</quote>) prepended to the filename. Mutt
4809
5259
detects this type of mailbox by looking for either <literal>.mh_sequences</literal>
4810
or <literal>.xmhcache</literal> (needed to distinguish normal directories from MH
5260
or <literal>.xmhcache</literal> files (needed to distinguish normal directories from MH
5261
mailboxes). MH is more robust with concurrent clients writing the mailbox,
5262
but still may suffer from lost flags; message corruption is less likely
5263
to occur than with mbox/mmdf. It's usually slower to open compared to
5264
mbox/mmdf since many small files have to be read (Mutt provides
5265
<xref linkend="header-caching"/> to greatly speed this process up).
5266
Depending on the environment, MH is not very disk-space efficient.
4815
<emphasis role="bold">Maildir</emphasis>. The newest of the mailbox formats, used by the Qmail MTA (a
5270
<emphasis>Maildir</emphasis>. The newest of the mailbox formats, used by the Qmail MTA (a
4816
5271
replacement for sendmail). Similar to <emphasis>MH</emphasis>, except that it adds three
4817
5272
subdirectories of the mailbox: <emphasis>tmp</emphasis>, <emphasis>new</emphasis> and <emphasis>cur</emphasis>. Filenames
4818
5273
for the messages are chosen in such a way they are unique, even when two
4819
5274
programs are writing the mailbox over NFS, which means that no file locking
5275
is needed and corruption is very unlikely. Maildir maybe
5276
slower to open without caching in Mutt, it too is not very
5277
disk-space efficient depending on the environment. Since no additional
5278
files are used for metadata (which is embedded in the message filenames)
5279
and Maildir is locking-free, it's easy to sync across different machines
5280
using file-level synchronization tools.
4829
5289
There are a number of built in shortcuts which refer to specific mailboxes.
4830
5290
These shortcuts can be used anywhere you are prompted for a file or mailbox
5291
path or in path-related configuration variables. Note that these only
5292
work at the beginning of a string.
4838
! -- refers to your <link linkend="spoolfile">$spoolfile</link> (incoming) mailbox
4844
> -- refers to your <link linkend="mbox">$mbox</link> file
4850
< -- refers to your <link linkend="record">$record</link> file
4856
ˆ -- refers to the current mailbox
4862
- or !! -- refers to the file you've last visited
4868
˜ -- refers to your home directory
4874
= or + -- refers to your <link linkend="folder">$folder</link> directory
4880
@<emphasis>alias</emphasis> -- refers to the <link linkend="save-hook">default save folder</link> as determined by the address of the alias
5299
! — refers to your <link linkend="spoolfile">$spoolfile</link> (incoming) mailbox
5305
> — refers to your <link linkend="mbox">$mbox</link> file
5311
< — refers to your <link linkend="record">$record</link> file
5317
ˆ — refers to the current mailbox
5323
- or !! — refers to the file you've last visited
5329
˜ — refers to your home directory
5335
= or + — refers to your <link linkend="folder">$folder</link> directory
5341
@<emphasis>alias</emphasis> — refers to the <link linkend="save-hook">default save folder</link> as determined by the address of the alias
4884
5345
</itemizedlist>
5348
For example, to store a copy of outgoing messages in the folder they
5350
a <link linkend="folder-hook"><command>folder-hook</command></link> can
5351
be used to set <link linkend="record">$record</link>:
5355
folder-hook . 'set record=ˆ'</screen>
4888
5359
<sect1 id="using-lists">
5039
5510
<sect1 id="editing-threads">
5040
<title>Editing threads</title>
5511
<title>Editing Threads</title>
5043
5514
Mutt has the ability to dynamically restructure threads that are broken
5044
5515
either by misconfigured software or bad behavior from some
5045
correspondents. This allows to clean your mailboxes formats) from these
5516
correspondents. This allows to clean your mailboxes from these
5046
5517
annoyances which make it hard to follow a discussion.
5049
5520
<sect2 id="link-threads">
5050
<title>Linking threads</title>
5521
<title>Linking Threads</title>
5053
Some mailers tend to "forget" to correctly set the "In-Reply-To:" and
5054
"References:" headers when replying to a message. This results in broken
5524
Some mailers tend to <quote>forget</quote> to correctly set the <quote>In-Reply-To:</quote> and
5525
<quote>References:</quote> headers when replying to a message. This results in broken
5055
5526
discussions because Mutt has not enough information to guess the correct
5057
5528
You can fix this by tagging the reply, then moving to the parent message
5058
5529
and using the <literal><link-threads></literal> function (bound to & by default). The
5059
reply will then be connected to this "parent" message.
5530
reply will then be connected to this parent message.
5063
5534
You can also connect multiple children at once, tagging them and using the
5064
tag-prefix command (';') or the auto_tag option.
5535
<literal><tag-prefix></literal> command (';') or the <link linkend="auto-tag">$auto_tag</link> option.
5069
5540
<sect2 id="break-threads">
5070
<title>Breaking threads</title>
5541
<title>Breaking Threads</title>
5073
5544
On mailing lists, some people are in the bad habit of starting a new
5074
discussion by hitting "reply" to any message from the list and changing
5545
discussion by hitting <quote>reply</quote> to any message from the list and changing
5075
5546
the subject to a totally unrelated one.
5076
5547
You can fix such threads by using the <literal><break-thread></literal> function (bound
5077
5548
by default to #), which will turn the subthread starting from the
5253
5771
The '-' denotes that Mutt will delete the file after sending (or
5254
5772
postponing, or canceling) the message. It can be toggled with the
5255
<literal>toggle-unlink</literal> command (default: u). The next field is the MIME
5256
content-type, and can be changed with the <literal>edit-type</literal> command
5773
<literal><toggle-unlink></literal> command (default: u). The next field is the MIME
5774
content-type, and can be changed with the <literal><edit-type></literal> command
5257
5775
(default: ˆT). The next field is the encoding for the attachment,
5258
5776
which allows a binary message to be encoded for transmission on 7bit
5259
links. It can be changed with the <literal>edit-encoding</literal> command
5777
links. It can be changed with the <literal><edit-encoding></literal> command
5260
5778
(default: ˆE). The next field is the size of the attachment,
5261
5779
rounded to kilobytes or megabytes. The next field is the filename,
5262
which can be changed with the <literal>rename-file</literal> command (default: R).
5780
which can be changed with the <literal><rename-file></literal> command (default: R).
5263
5781
The final field is the description of the attachment, and can be
5264
changed with the <literal>edit-description</literal> command (default: d).
5782
changed with the <literal><edit-description></literal> command (default: d).
6057
6613
<title>MIME Lookup</title>
6620
<command>mime-lookup</command>
6621
<arg choice="plain">
6622
<replaceable>mimetype</replaceable>
6624
<arg choice="opt" rep="repeat">
6625
<replaceable>mimetype</replaceable>
6628
<command>unmime-lookup</command>
6629
<group choice="req">
6630
<arg choice="plain">
6631
<replaceable>*</replaceable>
6633
<arg choice="plain" rep="repeat">
6634
<replaceable>mimetype</replaceable>
6060
6640
Mutt's mime_lookup list specifies a list of mime-types that should not
6061
6641
be treated according to their mailcap entry. This option is designed to
6062
deal with binary types such as application/octet-stream. When an attachment's
6642
deal with binary types such as <literal>application/octet-stream</literal>. When an attachment's
6063
6643
mime-type is listed in mime_lookup, then the extension of the filename will
6064
be compared to the list of extensions in the mime.types file. The mime-type
6644
be compared to the list of extensions in the <literal>mime.types</literal> file. The mime-type
6065
6645
associated with this extension will then be used to process the attachment
6066
6646
according to the rules in the mailcap file and according to any other configuration
6067
options (such as auto_view) specified. Common usage would be:
6647
options (such as <command>auto_view</command>) specified. Common usage would be:
6128
<literal>proto</literal> is the communication protocol:
6708
<emphasis>proto</emphasis> is the communication protocol:
6129
6709
<literal>imap</literal> for IMAP, <literal>pop</literal> for POP3 and
6130
<literal>smtp</literal> for SMTP. If <quote>s</quote> for <quote>secure communication</quote>
6131
is appended, mutt will attempt to establish an encrypted communication
6132
using SSL or TLS. If no explicit port is given, mutt will use the
6133
system's default for the given protocol.
6137
Since all protocols by mutt support authentication, the username may be
6138
given directly in the URL instead of using the <literal>pop_user</literal> or
6139
<literal>imap_user</literal> variables. It may contain the <quote>@</quote> symbol
6140
being used by many mail systems as part of the login name. A password can be
6141
given, too but is not recommended if the URL is specified in a configuration
6710
<literal>smtp</literal> for SMTP. If <quote>s</quote> for <quote>secure
6711
communication</quote> is appended, Mutt will attempt to establish an
6712
encrypted communication using SSL or TLS.
6716
Since all protocols supported by Mutt support/require authentication,
6717
login credentials may be specified in the URL. This has the advantage
6718
that multiple IMAP, POP3 or SMTP servers may be specified (which isn't
6719
possible using, for example,
6720
<link linkend="imap-user">$imap_user</link>). The username
6721
may contain the <quote>@</quote> symbol being used by many mail systems
6722
as part of the login name. A password can be given, too but is not
6723
recommended if the URL is specified in a configuration file on disk.
6727
If no port number is given, Mutt will use the system's default for the
6728
given protocol (usually consulting <literal>/etc/services</literal>).
6146
6732
The optional path is only relevant for IMAP.
6150
For IMAP for example, you can select an alternative port by specifying it with the
6151
server: <literal>imap://imapserver:port/INBOX</literal>. You can also specify different
6152
username for each folder: <literal>imap://username@imapserver[:port]/INBOX</literal>
6153
or <literal>imap://username2@imapserver[:port]/path/to/folder</literal>.
6154
Replacing <literal>imap://</literal> by <literal>imaps://</literal>
6155
would make mutt attempt to connect using SSL or TLS on a different port
6156
to encrypt the communication.
6735
<example id="ex-url">
6739
imaps://user@host/INBOX/Sent
6740
smtp://user@host:587/
6410
7006
The built-in SMTP support supports encryption (the <literal>smtps</literal> protocol
6411
7007
using SSL or TLS) as well as SMTP authentication using SASL. The authentication mechanisms
6412
7008
for SASL are specified in <link linkend="smtp-authenticators">$smtp_authenticators</link>
6413
defaulting to an empty list which makes mutt try all available methods
7009
defaulting to an empty list which makes Mutt try all available methods
6414
7010
from most-secure to least-secure.
6419
7015
<sect1 id="account-hook">
6420
<title>Managing multiple accounts</title>
7016
<title>Managing Multiple Accounts</title>
7023
<command>account-hook</command>
7024
<arg choice="plain">
7025
<replaceable class="parameter">pattern</replaceable>
7027
<arg choice="plain">
7028
<replaceable class="parameter">command</replaceable>
6423
7033
If you happen to have accounts on multiple IMAP, POP and/or SMTP servers,
6424
7034
you may find managing all the authentication settings inconvenient and
6425
error-prone. The account-hook command may help. This hook works like
6426
folder-hook but is invoked whenever you access a remote mailbox
7035
error-prone. The <link linkend="account-hook"><command>account-hook</command></link> command may help. This hook works like
7036
<link linkend="folder-hook"><command>folder-hook</command></link> but is invoked whenever Mutt needs to access a remote mailbox
6427
7037
(including inside the folder browser), not just when you open the
6428
mailbox which includes (for example) polling for new mail, storing Fcc
7038
mailbox. This includes (for example) polling for new mail, storing Fcc
6429
7039
messages and saving messages to a folder. As a consequence,
6430
account-hook should only be used to set connection-related settings such
7040
<link linkend="account-hook"><command>account-hook</command></link> should only be used to set connection-related settings such
6431
7041
as passwords or tunnel commands but not settings such as sender
6432
7042
address or name (because in general it should be considered unpredictable
6433
which account-hook was last used).
7043
which <link linkend="account-hook"><command>account-hook</command></link> was last used).
6444
7054
account-hook smtp://user@host3/ 'set tunnel="ssh host3 /usr/libexec/smtpd"'
7058
To manage multiple accounts with, for example, different values of
7059
<link linkend="record">$record</link> or sender addresses,
7060
<link linkend="folder-hook"><command>folder-hook</command></link>
7061
has to be be used together with
7062
the <link linkend="mailboxes"><command>mailboxes</command></link> command.
7065
<example id="ex-multiaccount">
7066
<title>Managing multiple accounts</title>
7068
mailboxes imap://user@host1/INBOX
7069
folder-hook imap://user@host1/ 'set folder=imap://host1/ ; set record=+INBOX/Sent'
7071
mailboxes imap://user@host2/INBOX
7072
folder-hook imap://user@host2/ 'set folder=imap://host2/ ; set record=+INBOX/Sent'
7078
<xref linkend="ex-multiaccount"/> the folders are defined using
7079
<link linkend="mailboxes"><command>mailboxes</command></link> so Mutt polls them for new
7080
mail. Each <link linkend="folder-hook"><command>folder-hook</command></link> triggers when
7081
one mailbox below each IMAP account is opened and sets
7082
<link linkend="folder">$folder</link> to the account's root
7083
folder. Next, it sets <link linkend="record">$record</link> to
7084
the <emphasis>INBOX/Sent</emphasis> folder below the newly
7085
set <link linkend="folder">$folder</link>. Please notice that the
7086
value the <quote>+</quote>
7087
<link linkend="shortcuts">mailbox shortcut</link> refers to depends on
7088
the <emphasis>current</emphasis> value
7089
of <link linkend="folder">$folder</link> and therefore has to be set
7090
separatedly per account. Setting other values
7091
like <link linkend="from">$from</link>
7092
or <link linkend="signature">$signature</link> is analogous to setting
7093
<link linkend="record">$record</link>.
6449
7098
<sect1 id="caching">
6450
<title>Local caching</title>
7099
<title>Local Caching</title>
6453
7102
Mutt contains two types of local caching: <emphasis>(1)</emphasis>
7213
<sect1 id="sending-mixmaster">
7214
<title>Sending Anonymous Messages via Mixmaster</title>
7217
You may also have compiled Mutt to co-operate with Mixmaster, an
7218
anonymous remailer. Mixmaster permits you to send your messages
7219
anonymously using a chain of remailers. Mixmaster support in Mutt is for
7220
mixmaster version 2.04 (beta 45 appears to be the latest) and 2.03.
7221
It does not support earlier versions or the later so-called version 3 betas,
7222
of which the latest appears to be called 2.9b23.
7226
To use it, you'll have to obey certain restrictions. Most
7227
important, you cannot use the <literal>Cc</literal> and <literal>Bcc</literal> headers. To tell
7228
Mutt to use mixmaster, you have to select a remailer chain, using
7229
the mix function on the compose menu.
7233
The chain selection screen is divided into two parts. In the
7234
(larger) upper part, you get a list of remailers you may use. In
7235
the lower part, you see the currently selected chain of remailers.
7239
You can navigate in the chain using the <literal><chain-prev></literal> and
7240
<literal><chain-next></literal> functions, which are by default bound to the left
7241
and right arrows and to the <literal>h</literal> and <literal>l</literal> keys (think vi
7242
keyboard bindings). To insert a remailer at the current chain
7243
position, use the <literal><insert></literal> function. To append a remailer behind
7244
the current chain position, use <literal><select-entry></literal> or <literal><append></literal>.
7245
You can also delete entries from the chain, using the corresponding
7246
function. Finally, to abandon your changes, leave the menu, or
7247
<literal><accept></literal> them pressing (by default) the <literal>Return</literal> key.
7251
Note that different remailers do have different capabilities,
7252
indicated in the %c entry of the remailer menu lines (see
7253
<link linkend="mix-entry-format">$mix_entry_format</link>). Most important is
7254
the <quote>middleman</quote> capability, indicated by a capital <quote>M</quote>: This
7255
means that the remailer in question cannot be used as the final
7256
element of a chain, but will only forward messages to other
7257
mixmaster remailers. For details on the other capabilities, please
7258
have a look at the mixmaster documentation.
7265
<chapter id="security">
7266
<title>Security Considerations</title>
7269
First of all, Mutt contains no security holes included by intention but
7270
may contain unknown security holes. As a consequence, please run Mutt
7271
only with as few permissions as possible. Especially, do not run Mutt as
7276
When configuring Mutt, there're some points to note about secure setups
7277
so please read this chapter carefully.
7280
<sect1 id="security-passwords">
7281
<title>Passwords</title>
7284
Although Mutt can be told the various passwords for accounts, please
7285
never store passwords in configuration files. Besides the fact that the
7286
system's operator can always read them, you could forget to mask it out
7287
when reporting a bug or asking for help via a mailing list. Even worse,
7288
your mail including your password could be archived by internet search
7289
engines, mail-to-news gateways etc. It may already be too late before
7290
you notice your mistake.
7295
<sect1 id="security-tempfiles">
7296
<title>Temporary Files</title>
7299
Mutt uses many temporary files for viewing messages, verifying digital
7300
signatures, etc. As long as being used, these files are visible by other
7301
users and maybe even readable in case of misconfiguration. Also, a
7302
different location for these files may be desired which can be changed
7303
via the <link linkend="tmpdir">$tmpdir</link> variable.
7308
<sect1 id="security-leaks">
7309
<title>Information Leaks</title>
7311
<sect2 id="security-leaks-mid">
7312
<title>Message-Id: headers</title>
7315
Message-Id: headers contain a local part that is to be created in a
7316
unique fashion. In order to do so, Mutt will <quote>leak</quote> some
7317
information to the outside world when sending messages: the generation
7318
of this header includes a step counter which is increased (and rotated)
7319
with every message sent. In a longer running mutt session, others can
7320
make assumptions about your mailing habbits depending on the number of
7321
messages sent. If this is not desired, the header can be manually
7322
provided using <link
7323
linkend="edit-headers">$edit_headers</link> (though not
7329
<sect2 id="security-leaks-mailto">
7330
<title><literal>mailto:</literal>-style Links</title>
7333
As Mutt be can be set up to be the mail client to handle
7334
<literal>mailto:</literal> style links in websites, there're security
7335
considerations, too. Arbitrary header fields can be embedded in these
7336
links which could override existing header fields or attach arbitrary
7337
files using <link linkend="attach-header">the Attach:
7338
psuedoheader</link>. This may be problematic if the <link
7339
linkend="edit-headers">$edit-headers</link> variable is
7340
<emphasis>unset</emphasis>, i.e. the user doesn't want to see header
7341
fields while editing the message and doesn't pay enough attention to the
7342
compose menu's listing of attachments.
7346
For example, following a link like
7350
mailto:joe@host?Attach=~/.gnupg/secring.gpg</screen>
7353
will send out the user's private gnupg keyring to
7354
<literal>joe@host</literal> if the user doesn't follow the information
7355
on screen carefully enough.
7362
<sect1 id="security-external">
7363
<title>External Applications</title>
7366
Mutt in many places has to rely on external applications or for
7367
convenience supports mechanisms involving external applications.
7371
One of these is the <literal>mailcap</literal> mechanism as defined by
7372
RfC1524. Details about a secure use of the mailcap mechanisms is given
7373
in <xref linkend="secure-mailcap"/>.
7377
Besides the mailcap mechanism, Mutt uses a number of other external
7378
utilities for operation, for example to provide crypto support, in
7379
backtick expansion in configuration files or format string filters. The
7380
same security considerations apply for these as for tools involved via
6589
7389
<chapter id="tuning">
6590
<title>Performance tuning</title>
7390
<title>Performance Tuning</title>
6592
7392
<sect1 id="tuning-mailboxes">
6593
<title>Reading and writing mailboxes</title>
7393
<title>Reading and Writing Mailboxes</title>
6596
7396
Mutt's performance when reading mailboxes can be improved in two ways:
6650
7449
<sect1 id="tuning-messages">
6651
<title>Reading messages from remote folders</title>
7450
<title>Reading Messages from Remote Folders</title>
6654
7453
Reading messages from remote folders such as IMAP an POP can be
6655
slow especially for large mailboxes since mutt only caches a very
7454
slow especially for large mailboxes since Mutt only caches a very
6656
7455
limited number of recently viewed messages (usually 10) per
6657
7456
session (so that it will be gone for the next session.)
6661
7460
To improve performance and permanently cache whole messages,
6662
please refer to mutt's so-called
7461
please refer to Mutt's so-called
6663
7462
<link linkend="body-caching">body caching</link> for details.
6668
7467
<sect1 id="tuning-search">
6669
<title>Searching and limiting</title>
7468
<title>Searching and Limiting</title>
6672
7471
When searching mailboxes either via a search or a limit action, for
6673
some patterns mutt distinguishes between regular expression and string
7472
some patterns Mutt distinguishes between regular expression and string
6674
7473
searches. For regular expressions, patterns are prefixed with
6675
7474
<quote>˜</quote> and with <quote>=</quote> for string searches.