- rebuilt manual.txt
git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@479
e385b8ad-14ed-0310-8656-
cc95a2468c6d
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 ",". Mutt-ng then asks you for the email subject. Again,
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 ",". Mutt-ng then asks you for the email subject. Again,
set editor = "nano"
set editor = "emacs"
set editor = "nano"
set editor = "emacs"
If you don't set your preferred editor in your configuration, mutt-ng
first looks whether the environment variable $VISUAL is set, and if so, it
takes its value as editor command. Otherwise, it has a look at $EDITOR and
If you don't set your preferred editor in your configuration, mutt-ng
first looks whether the environment variable $VISUAL is set, and if so, it
takes its value as editor command. Otherwise, it has a look at $EDITOR and
Once you have finished editing the body of your mail message, you are
returned to the compose menu. The following options are available:
Once you have finished editing the body of your mail message, you are
returned to the compose menu. The following options are available:
> production server that we want to set up before our customer's
> project will go live.
> 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
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
set attribution = "On %d, %n wrote:"
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)]:"
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]:
The example above results in the following attribution:
* Michael Svensson <svensson@foobar.com> [05-03-06 17:02]:
> production server that we want to set up before our customer's
> project will go live.
> 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
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
lists linuxevent@luga\.at vuln-dev@ mutt-ng-users@
lists linuxevent@luga\.at vuln-dev@ mutt-ng-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.
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.
----- End forwarded message -----
----- 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.
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.
set realname='Mutt-ng user' ; ignore x-
set realname='Mutt-ng 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
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
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
set realname="Michael \"MuttDude\" Elkins"
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.
``\\'' means to insert a literal ``\'' into the line. ``\n'' and ``\r''
have their usual C meanings of linefeed and carriage-return, respectively.
# folder-hook . \
set realname="Michael \"MuttDude\" Elkins"
# 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
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
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.
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.
my_hdr X-Operating-System: `uname -a`
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.
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.
set record=+sent_on_$HOSTNAME
set record=+sent_on_$HOSTNAME
sets the record variable to the string +sent_on_ and appends the value of
the evironment variable $HOSTNAME.
sets the record variable to the string +sent_on_ and appends the value of
the evironment variable $HOSTNAME.
set imap_home_namespace = $folder
set imap_home_namespace = $folder
would set the value of imap-home-namespace to the value to which folder is
currently set to.
would set the value of imap-home-namespace to the value to which folder is
currently set to.
macro generic <F1> "!less -r /path/to/manual" "Show manual"
macro pager <F1> "!less -r /path/to/manual" "Show manual"
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:
for generic, pager and index .The alternative is to define a custom
variable like so:
macro pager <F1> "$user_manualcmd<enter>" "Show manual"
macro index <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"
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
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
set user_foo = 42
set user_foo = 666
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
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
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
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.
any query or operation (except the noted expansion within other
statements) will lead to an error message.
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 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 $muttng_docdir/manual.txt"
to:
set user_manualcmd = "!less -r $muttng_docdir/manual.txt"
which works everywhere if a manual is installed.
Please note that by the type of quoting, muttng determines when to expand
which works everywhere if a manual is installed.
Please note that by the type of quoting, muttng determines when to expand
folder-hook . "set user_current_folder = $muttng_folder_name"
folder-hook . "set user_current_folder = $muttng_folder_name"
will be already be translated to the following when reading the startup
files:
folder-hook . "set user_current_folder = some_folder"
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 muttng opens. On the
contrary,
folder-hook . 'set user_current_folder = $muttng_folder_name'
with some_folder being the name of the first folder muttng opens. On the
contrary,
folder-hook . 'set user_current_folder = $muttng_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.
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.
folder-hook . 'source ~/.mutt/score-$muttng_folder_name'
folder-hook . 'source ~/.mutt/score-$muttng_folder_name'
which can be used to source files containing score commands depending on
the folder the user enters.
which can be used to source files containing score commands depending on
the folder the user enters.
set user_magic_number = 42
set folder = $user_magic_number
set user_magic_number = 42
set folder = $user_magic_number
4. Defining/Using aliases
Usage: alias key address [ , address, ... ]
4. Defining/Using aliases
Usage: alias key address [ , address, ... ]
alias muttdude me@cs.hmc.edu (Michael Elkins)
alias theguys manny, moe, jack
alias muttdude me@cs.hmc.edu (Michael Elkins)
alias theguys manny, moe, jack
Unlike other mailers, Mutt-ng 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 source .Consequently, you can have multiple
Unlike other mailers, Mutt-ng 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 source .Consequently, you can have multiple
source ~/.mail_aliases
set alias_file=~/.mail_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
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
folder-hook mutt set sort=threads
folder-hook mutt set sort=threads
However, the sorting method is not restored to its previous value when
reading a different mailbox. To specify a default command, use the pattern
``.'':
folder-hook . set sort=date-sent
However, the sorting method is not restored to its previous value when
reading a different mailbox. To specify a default command, use the pattern
``.'':
folder-hook . set sort=date-sent
8. Keyboard macros
Usage: macro menu key sequence [ description ]
8. Keyboard macros
Usage: macro menu key sequence [ description ]
set COLORFGBG="green;black"
export COLORFGBG
set COLORFGBG="green;black"
export COLORFGBG
Note: The S-Lang library requires you to use the lightgray and brown
keywords instead of white and yellow when setting this variable.
Note: The S-Lang library requires you to use the lightgray and brown
keywords instead of white and yellow when setting this variable.
unignore organization organisation x-mailer: x-newsreader: x-mailing-list:
unignore posted-to:
unignore organization organisation x-mailer: x-newsreader: x-mailing-list:
unignore posted-to:
11. Alternative addresses
Usage: [un]alternates regexp [ regexp ... ]
11. Alternative addresses
Usage: [un]alternates regexp [ regexp ... ]
format that can also be displayed nicely on old fixed-size terminals.
For introductory information on format=flowed messages, see
format that can also be displayed nicely on old fixed-size terminals.
For introductory information on format=flowed messages, see
- <http://www.joeclark.org/ffaq.html> .
+ <http://www.joeclark.org/ffaq.html>.
12.2. Receiving: Display Setup
12.2. Receiving: Display Setup
The code above makes the line break 10 columns before the right side of
the terminal.
The code above makes the line break 10 columns before the right side of
the terminal.
set max_line_length = 120
set max_line_length = 120
The example above will give you lines not longer than 120 characters.
When you view at format=flowed messages, you will often see the quoting
The example above will give you lines not longer than 120 characters.
When you view at format=flowed messages, you will often see the quoting
>production server that we want to set up before our customer's
>project will go live.
>production server that we want to set up before our customer's
>project will go live.
This obviously doesn't look very nice, and it makes it very hard to
differentiate between text and quoting character. The solution is to
configure mutt-ng to "stuff" the quoting:
set stuff_quoted
This obviously doesn't look very nice, and it makes it very hard to
differentiate between text and quoting character. The solution is to
configure mutt-ng to "stuff" the quoting:
set stuff_quoted
This will lead to a nicer result that is easier to read:
> Bill, can you please send last month's progress report to Mr.
This will lead to a nicer result that is easier to read:
> Bill, can you please send last month's progress report to Mr.
> production server that we want to set up before our customer's
> project will go live.
> production server that we want to set up before our customer's
> project will go live.
12.3. Sending
If you want mutt-ng to send emails with format=flowed set, you need to
12.3. Sending
If you want mutt-ng to send emails with format=flowed set, you need to
Additionally, you have to use an editor which supports writing
format=flowed-conforming emails. For vim, this is done by adding w to the
formatoptions (see :h formatoptions and :h fo-table) when writing emails.
Additionally, you have to use an editor which supports writing
format=flowed-conforming emails. For vim, this is done by adding w to the
formatoptions (see :h formatoptions and :h fo-table) when writing emails.
my_hdr Organization: A Really Big Company, Anytown, USA
my_hdr Organization: A Really Big Company, Anytown, USA
in your .muttrc.
Note: space characters are not allowed between the keyword and the colon
in your .muttrc.
Note: space characters are not allowed between the keyword and the colon
17. Defining the order of headers when viewing messages
Usage: hdr_order header1 header2 header3
17. Defining the order of headers when viewing messages
Usage: hdr_order header1 header2 header3
hdr_order From Date: From: To: Cc: Subject:
hdr_order From Date: From: To: Cc: Subject:
18. Specify default save filename
Usage: save-hook [!]pattern filename
18. Specify default save filename
Usage: save-hook [!]pattern filename
save-hook me@(turing\\.)?cs\\.hmc\\.edu$ +elkins
save-hook aol\\.com$ +spam
save-hook me@(turing\\.)?cs\\.hmc\\.edu$ +elkins
save-hook aol\\.com$ +spam
Also see the fcc-save-hook command.
19. Specify default Fcc: mailbox when composing
Also see the fcc-save-hook command.
19. Specify default Fcc: mailbox when composing
message-hook ~A 'set pager=builtin'
message-hook '~f freshmeat-news' 'set pager="less \"+/^ subject:.*\""'
message-hook ~A 'set pager=builtin'
message-hook '~f freshmeat-news' 'set pager="less \"+/^ subject:.*\""'
23. Choosing the cryptographic key of the recipient
Usage: crypt-hook pattern keyid
23. Choosing the cryptographic key of the recipient
Usage: crypt-hook pattern keyid
score "~f nion@muttng\.org" 50
score "~f @sco\.com" -100
score "~f nion@muttng\.org" 50
score "~f @sco\.com" -100
If the pattern matches, it is also possible to set the score value of the
current message to a certain value and then stop evaluation:
score "~f santaclaus@northpole\.int" =666
If the pattern matches, it is also possible to set the score value of the
current message to a certain value and then stop evaluation:
score "~f santaclaus@northpole\.int" =666
What is important to note is that negative score values will be rounded up
to 0.
What is important to note is that negative score values will be rounded up
to 0.
color index black yellow "~n 10-"
color index red yellow "~n 100-"
color index black yellow "~n 10-"
color index red yellow "~n 100-"
The rules above mark all messages with a score between 10 and 99 with
black and yellow, and messages with a score greater or equal 100 with red
and yellow. This might be unusual to you if you're used to e.g. slrn's
The rules above mark all messages with a score between 10 and 99 with
black and yellow, and messages with a score greater or equal 100 with red
and yellow. This might be unusual to you if you're used to e.g. slrn's
spam "X-PerlMX-Spam: .*Probability=([0-9]+)%" "%1/PM"
set spam_separator=", "
spam "X-PerlMX-Spam: .*Probability=([0-9]+)%" "%1/PM"
set spam_separator=", "
If I then received a message that DCC registered with ``many'' hits under
the ``Fuz2'' checksum, and that PureMessage registered with a 97%
probability of being spam, that message's spam tag would read90+/DCC-Fuz2,
If I then received a message that DCC registered with ``many'' hits under
the ``Fuz2'' checksum, and that PureMessage registered with a 97%
probability of being spam, that message's spam tag would read90+/DCC-Fuz2,
spam "^From: .*MAILER-DAEMON" "999"
spam "^From: .*MAILER-DAEMON" "999"
28. Setting variables
Usage: set [no|inv]variable [=value] [ variable ... ] Usage: toggle
28. Setting variables
Usage: set [no|inv]variable [=value] [ variable ... ] Usage: toggle
The question mark is actually only required for boolean and quadoption
variables.
The question mark is actually only required for boolean and quadoption
variables.
set config_charset = "..."
set config_charset = "..."
and replacing the dots with the actual character set. To avoid problems
while maintaining the setup, vim user's may want to use modelines as show
in:
# vim:fileencoding=...:
and replacing the dots with the actual character set. To avoid problems
while maintaining the setup, vim user's may want to use modelines as show
in:
# vim:fileencoding=...:
while, again, replacing the dots with the appropriate name. This tells vim
as which character set to read and save the file.
while, again, replacing the dots with the appropriate name. This tells vim
as which character set to read and save the file.
ifdef <item> <command>
ifndef <item> <command>
ifdef <item> <command>
ifndef <item> <command>
...whereby <item> can be one of:
o a function name
...whereby <item> can be one of:
o a function name
ifdef feature_pop 'source ~/.mutt-ng/setup-pop'
ifdef feature_nntp 'source ~/.mutt-ng/setup-nntp'
ifdef feature_pop 'source ~/.mutt-ng/setup-pop'
ifdef feature_nntp 'source ~/.mutt-ng/setup-nntp'
...to only source ˜/.mutt-ng/setup-imap if IMAP support is built in, only
source ˜/.mutt-ng/setup-pop if POP support is built in and only source
˜/.mutt-ng/setup-nntp if NNTP support is built in.
...to only source ˜/.mutt-ng/setup-imap if IMAP support is built in, only
source ˜/.mutt-ng/setup-pop if POP support is built in and only source
˜/.mutt-ng/setup-nntp if NNTP support is built in.
ifdef imap_mail_check 'set imap_mail_check = 300'
ifdef imap_mail_check 'set imap_mail_check = 300'
Provided for completeness is the test for menu names. To set
pager-index-lines only if the pager menu is available, use:
ifdef pager 'set pager_index_lines = 10'
Provided for completeness is the test for menu names. To set
pager-index-lines only if the pager menu is available, use:
ifdef pager 'set pager_index_lines = 10'
For completeness, too, the opposite of ifdef is provided: ifndef which
only executes the command if the test fails. For example, the following
two examples are equivalent:
For completeness, too, the opposite of ifdef is provided: ifndef which
only executes the command if the test fails. For example, the following
two examples are equivalent:
ifdef feature_ncurses 'source ~/.mutt-ng/setup-ncurses'
ifndef feature_ncurses 'source ~/.mutt-ng/setup-slang'
ifdef feature_ncurses 'source ~/.mutt-ng/setup-ncurses'
ifndef feature_ncurses 'source ~/.mutt-ng/setup-slang'
...and...
ifdef feature_slang 'source ~/.mutt-ng/setup-slang'
ifndef feature_slang 'source ~/.mutt-ng/setup-ncurses'
...and...
ifdef feature_slang 'source ~/.mutt-ng/setup-slang'
ifndef feature_slang 'source ~/.mutt-ng/setup-ncurses'
32. Obsolete Variables
In the process of ensuring and creating more consistency, many variables
32. Obsolete Variables
In the process of ensuring and creating more consistency, many variables
grouped, ORed, and negated. For a complete listing of these patterns,
please refer to table patterns in the Reference chapter.
grouped, ORed, and negated. For a complete listing of these patterns,
please refer to table patterns in the Reference chapter.
- It must be noted that in this table, EXPR, USER , ID and SUBJECT are
- regular expressions. For ranges, the forms <[MAX], >>[MIN], [MIN]- and
- -[MAX] are also possible.
+ It must be noted that in this table, EXPR is a regular expression. For
+ ranges, the forms <[MAX], >>[MIN], [MIN]- and -[MAX] are also possible.
The pattern above matches all messages that contain ``SPAM'' in the
subject and are unread.
The pattern above matches all messages that contain ``SPAM'' in the
subject and are unread.
(~b mutt-ng|~s Mutt-ng)
!~x '@synflood\.at'
(~b mutt-ng|~s Mutt-ng)
!~x '@synflood\.at'
The first pattern matches all messages that were sent by one of the
mutt-ng maintainers, while the seconds pattern matches all messages that
contain ``mutt-ng'' in the message body or ``Mutt-ng'' in the subject. The
The first pattern matches all messages that were sent by one of the
mutt-ng maintainers, while the seconds pattern matches all messages that
contain ``mutt-ng'' in the message body or ``Mutt-ng'' in the subject. The
~d 18/10/2004-2w
~d 28/12/2004*1d
~d 18/10/2004-2w
~d 28/12/2004*1d
The first pattern matches all dates between January 1st, 2005 and January
1st 2006. The second pattern matches all dates between October 18th, 2004
and October 4th 2004 (2 weeks before 18/10/2004), while the third pattern
The first pattern matches all dates between January 1st, 2005 and January
1st 2006. The second pattern matches all dates between October 18th, 2004
and October 4th 2004 (2 weeks before 18/10/2004), while the third pattern
~d <3d # messages newer than 3 days
~d =1m # messages that are exactly one month old
~d <3d # messages newer than 3 days
~d =1m # messages that are exactly one month old
3. Format Strings
3.1. Introduction
3. Format Strings
3.1. Introduction
set status_format = "%v on %h: ..."
set status_format = "%v on %h: ..."
mutt-ng will replace the sequence %v with the version string and %h with
the host's name. When you are, for example, running mutt-ng version 1.5.9i
on host mailhost, you'll see the following when you're in the index:
Mutt-ng 1.5.9i on mailhost: ...
mutt-ng will replace the sequence %v with the version string and %h with
the host's name. When you are, for example, running mutt-ng version 1.5.9i
on host mailhost, you'll see the following when you're in the index:
Mutt-ng 1.5.9i on mailhost: ...
In the index, there're more useful information one could want to see:
o which mailbox is open
In the index, there're more useful information one could want to see:
o which mailbox is open
set status_format = "%v on %h: %B: ...
set status_format = "%v on %h: %B: ...
When the currently opened mailbox is Inbox, this will be expanded to:
Mutt-ng 1.5.9i on mailhost: Inbox: ...
When the currently opened mailbox is Inbox, this will be expanded to:
Mutt-ng 1.5.9i on mailhost: Inbox: ...
For the number of certain types of messages, one more feature of the
format strings is extremely useful. If there aren't messages of a certain
type, it may not be desired to print just that there aren't any but
For the number of certain types of messages, one more feature of the
format strings is extremely useful. If there aren't messages of a certain
type, it may not be desired to print just that there aren't any but
set status_format = "%v on %h: %B %?n?%n new? ...
set status_format = "%v on %h: %B %?n?%n new? ...
This feature is called nonzero-printing and works as this: some expandos
may be optionally printed nonzero, i.e. a portion of the format string is
only evaluated if the value of the expando is different from zero. The
This feature is called nonzero-printing and works as this: some expandos
may be optionally printed nonzero, i.e. a portion of the format string is
only evaluated if the value of the expando is different from zero. The
%?<item>?<string if nonzero>?
%?<item>?<string if nonzero>?
which tells mutt-ng to only look at <string if nonzero> if the value of
the %<item%gt; expando is different from zero. In our example, we used n
as the expando to check for and %n new as the optional nonzero string.
which tells mutt-ng to only look at <string if nonzero> if the value of
the %<item%gt; expando is different from zero. In our example, we used n
as the expando to check for and %n new as the optional nonzero string.
%?<item>?<string if nonzero>&<string if zero>?
%?<item>?<string if nonzero>&<string if zero>?
Using this we can make mutt-ng to do the following:
o make it print ``n new messages'' whereby n is the count but only if
Using this we can make mutt-ng to do the following:
o make it print ``n new messages'' whereby n is the count but only if
set status_format = "%v on %h: %B: %?n?%n new messages&no new messages? ...
set status_format = "%v on %h: %B: %?n?%n new messages&no new messages? ...
This doubles the use of the ``new messages'' string because it'll get
always printed. Thus, it can be shortened to:
set status_format = "%v on %h: %B: %?n?%n&no? new messages ...
This doubles the use of the ``new messages'' string because it'll get
always printed. Thus, it can be shortened to:
set status_format = "%v on %h: %B: %?n?%n&no? new messages ...
As you might see from this rather simple example, one can create very
complex but fancy status messages. Please see the reference chapter for
expandos and those which may be printed nonzero.
As you might see from this rather simple example, one can create very
complex but fancy status messages. Please see the reference chapter for
expandos and those which may be printed nonzero.
set status_format = "%v on %h: %B: %?n?%n&no? new messages %|-"
set status_format = "%v on %h: %B: %?n?%n&no? new messages %|-"
%>X
Since the previous expando stops at the end of line, there must be
%>X
Since the previous expando stops at the end of line, there must be
set status_format = "%B: %?n?%n&no? new messages %> (%v on %h)"
set status_format = "%B: %?n?%n&no? new messages %> (%v on %h)"
4. Using Tags
Sometimes it is desirable to perform an operation on a group of messages
4. Using Tags
Sometimes it is desirable to perform an operation on a group of messages
send-hook . 'unmy_hdr From:'
send-hook ~C'^b@b\.b$' my_hdr from: c@c.c
send-hook . 'unmy_hdr From:'
send-hook ~C'^b@b\.b$' my_hdr from: c@c.c
5.1. Message Matching in Hooks
Hooks that act upon messages (send-hook, save-hook, fcc-hook,message-hook
5.1. Message Matching in Hooks
Hooks that act upon messages (send-hook, save-hook, fcc-hook,message-hook
send-hook '~t ^me@cs\.hmc\.edu$' 'my_hdr From: Mutt-ng User <user@host>'
send-hook '~t ^me@cs\.hmc\.edu$' 'my_hdr From: Mutt-ng User <user@host>'
which would execute the given command when sending mail to me@cs.hmc.edu.
However, it is not required that you write the pattern to match using the
which would execute the given command when sending mail to me@cs.hmc.edu.
However, it is not required that you write the pattern to match using the
set sidebar_visible="yes"
set sidebar_width=25
set sidebar_visible="yes"
set sidebar_width=25
If you want to specify the mailboxes you can do so with:
set mbox='=INBOX'
If you want to specify the mailboxes you can do so with:
set mbox='=INBOX'
You can also specify the colors for mailboxes with new mails by using:
color sidebar_new red black
color sidebar white black
You can also specify the colors for mailboxes with new mails by using:
color sidebar_new red black
color sidebar white black
The available functions are:
Table 4.1. Default Sidebar Function Bindings
The available functions are:
Table 4.1. Default Sidebar Function Bindings
macro index B ':toggle sidebar_visible^M'
macro pager B ':toggle sidebar_visible^M'
macro index B ':toggle sidebar_visible^M'
macro pager B ':toggle sidebar_visible^M'
You can then go up and down by pressing Ctrl-P and Ctrl-N, and switch on
and off the sidebar simply by pressing 'B'.
You can then go up and down by pressing Ctrl-P and Ctrl-N, and switch on
and off the sidebar simply by pressing 'B'.
set query_command = "mutt_ldap_query.pl '%s'"
set query_command = "mutt_ldap_query.pl '%s'"
The wrapper script should accept the query on the command-line. It should
return a one line message, then each matching response on a single line,
each line containing a tab separated address then name thensome other
The wrapper script should accept the query on the command-line. It should
return a one line message, then each matching response on a single line,
each line containing a tab separated address then name thensome other
blong@fiction.net Brandon Long mutt and more
roessler@guug.de Thomas Roessler mutt pgp
blong@fiction.net Brandon Long mutt and more
roessler@guug.de Thomas Roessler mutt pgp
There are two mechanisms for accessing the query function of mutt. One is
to do a query from the index menu using the query function (default: Q).
This will prompt for a query, then bring up the query menu which will list
There are two mechanisms for accessing the query function of mutt. One is
to do a query from the index menu using the query function (default: Q).
This will prompt for a query, then bring up the query menu which will list
From me@cs.hmc.edu Fri, 11 Apr 1997 11:44:56 PST
From me@cs.hmc.edu Fri, 11 Apr 1997 11:44:56 PST
to denote the start of a new message (this is often referred to as the
``From_'' line).
to denote the start of a new message (this is often referred to as the
``From_'' line).
This tells mutt-ng to apply a score of 42 to all messages whose sender
specified a valid realname and a valid email address. Using
score !~* =42
This tells mutt-ng to apply a score of 42 to all messages whose sender
specified a valid realname and a valid email address. Using
score !~* =42
on the contrary applies a score of 42 to all messages not matching those
criteria which are very strict:
on the contrary applies a score of 42 to all messages not matching those
criteria which are very strict:
account-hook imap://host1/ 'set imap_user=me1 imap_pass=foo'
account-hook imap://host2/ 'set tunnel="ssh host2 /usr/libexec/imapd"'
account-hook imap://host1/ 'set imap_user=me1 imap_pass=foo'
account-hook imap://host2/ 'set tunnel="ssh host2 /usr/libexec/imapd"'
18. Start a WWW Browser on URLs (EXTERNAL)
If a message contains URLs (unified resource locator = address in the WWW
18. Start a WWW Browser on URLs (EXTERNAL)
If a message contains URLs (unified resource locator = address in the WWW
macro index \cb |urlview\n
macro pager \cb |urlview\n
macro index \cb |urlview\n
macro pager \cb |urlview\n
19. Compressed folders Support (OPTIONAL)
If Mutt-ng was compiled with compressed folders support (by running the
19. Compressed folders Support (OPTIONAL)
If Mutt-ng was compiled with compressed folders support (by running the
close-hook \\.gz$ "gzip -c %t > %f"
append-hook \\.gz$ "gzip -c %t >> %f"
close-hook \\.gz$ "gzip -c %t > %f"
append-hook \\.gz$ "gzip -c %t >> %f"
You do not have to specify all of the commands. If you omit append-hook
,the folder will be open and closed again each time you will add to it. If
you omit close-hook (or give empty command) , the folder will be open in
You do not have to specify all of the commands. If you omit append-hook
,the folder will be open and closed again each time you will add to it. If
you omit close-hook (or give empty command) , the folder will be open in
open-hook \\.gz$ "gzip -cd %f > %t"
open-hook \\.gz$ "gzip -cd %f > %t"
If the command is empty, this operation is disabled for this file type.
19.2. Write a compressed mailbox
If the command is empty, this operation is disabled for this file type.
19.2. Write a compressed mailbox
close-hook \\.gz$ "gzip -c %t > %f"
close-hook \\.gz$ "gzip -c %t > %f"
If the command is empty, this operation is disabled for this file type,
and the file can only be open in the readonly mode.
If the command is empty, this operation is disabled for this file type,
and the file can only be open in the readonly mode.
append-hook \\.gz$ "gzip -c %t >> %f"
append-hook \\.gz$ "gzip -c %t >> %f"
When append-hook is used, the folder is not opened, which saves time, but
this means that we can not find out what the folder type is. Thus the
default ( mbox-type )type is always supposed (i.e. this is the format used
When append-hook is used, the folder is not opened, which saves time, but
this means that we can not find out what the folder type is. Thus the
default ( mbox-type )type is always supposed (i.e. this is the format used
open-hook \\.pgp$ "pgp -f < %f > %t"
close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId < %t > %f"
open-hook \\.pgp$ "pgp -f < %f > %t"
close-hook \\.pgp$ "pgp -fe YourPgpUserIdOrKeyId < %t > %f"
Please note, that PGP does not support appending to an encrypted folder,
so there is no append-hook defined.
Please note, that PGP does not support appending to an encrypted folder,
so there is no append-hook defined.
[-- Attachment #1: Description --]
[-- Type: text/plain, Encoding: 7bit, Size: 10000 --]
[-- Attachment #1: Description --]
[-- Type: text/plain, Encoding: 7bit, Size: 10000 --]
Where the Description is the description or filename given for the
attachment, and the Encoding is one of
7bit/8bit/quoted-printable/base64/binary.
Where the Description is the description or filename given for the
attachment, and the Encoding is one of
7bit/8bit/quoted-printable/base64/binary.
[-- image/gif is unsupported (use 'v' to view this part) --]
[-- image/gif is unsupported (use 'v' to view this part) --]
1.2. The Attachment Menu
The default binding for view-attachments is `v', which displays the
1.2. The Attachment Menu
The default binding for view-attachments is `v', which displays the
1 [text/plain, 7bit, 1K] /tmp/mutt-euler-8082-0 <no description>
2 [applica/x-gunzip, base64, 422K] ~/src/mutt-0.85.tar.gz <no description>
1 [text/plain, 7bit, 1K] /tmp/mutt-euler-8082-0 <no description>
2 [applica/x-gunzip, base64, 422K] ~/src/mutt-0.85.tar.gz <no description>
The '-' denotes that Mutt-ng will delete the file after sending (or
postponing, or canceling) the message. It can be toggled with the
toggle-unlink command (default: u). The next field is the MIME
The '-' denotes that Mutt-ng will delete the file after sending (or
postponing, or canceling) the message. It can be toggled with the
toggle-unlink command (default: u). The next field is the MIME
application/pgp pgp
audio/x-aiff aif aifc aiff
application/pgp pgp
audio/x-aiff aif aifc aiff
A sample mime.types file comes with the Mutt-ng distribution, and should
contain most of the MIME types you are likely to use.
A sample mime.types file comes with the Mutt-ng distribution, and should
contain most of the MIME types you are likely to use.
${HOME}/.mailcap:/usr/local/share/mutt/mailcap:/etc/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap
${HOME}/.mailcap:/usr/local/share/mutt/mailcap:/etc/mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap
where $HOME is your home directory.
In particular, the metamail distribution will install a mailcap file,
where $HOME is your home directory.
In particular, the metamail distribution will install a mailcap file,
Or, you could send the message as a file:
text/plain; more %s
Or, you could send the message as a file:
text/plain; more %s
Perhaps you would like to use lynx to interactively view a text/html
message:
text/html; lynx %s
Perhaps you would like to use lynx to interactively view a text/html
message:
text/html; lynx %s
In this case, lynx does not support viewing a file from stdin, so you must
use the %s syntax. Note: Some older versions of lynx contain a bug where
they will check the mailcap file for a viewer for text/html. They will
In this case, lynx does not support viewing a file from stdin, so you must
use the %s syntax. Note: Some older versions of lynx contain a bug where
they will check the mailcap file for a viewer for text/html. They will
text/html; lynx -dump %s | more
text/html; lynx -dump %s | more
Perhaps you wish to use lynx to view text/html files, and a pager on all
other text formats, then you would use the following:
text/html; lynx %s
text/*; more
Perhaps you wish to use lynx to view text/html files, and a pager on all
other text formats, then you would use the following:
text/html; lynx %s
text/*; more
This is the simplest form of a mailcap file.
3.2. Secure use of mailcap
This is the simplest form of a mailcap file.
3.2. Secure use of mailcap
text/test-mailcap-bug; cat %s; copiousoutput; test=charset=%{charset} \
&& test "`echo $charset | tr '[A-Z]' '[a-z]'`" != iso-8859-1
text/test-mailcap-bug; cat %s; copiousoutput; test=charset=%{charset} \
&& test "`echo $charset | tr '[A-Z]' '[a-z]'`" != iso-8859-1
3.3. Advanced mailcap Usage
3.3.1. Optional Fields
3.3. Advanced mailcap Usage
3.3.1. Optional Fields
text/html; lynx -dump %s ; copiousoutput
text/html; lynx -dump %s ; copiousoutput
This will cause lynx to format the text/html output as text/plain
and Mutt-ng will use your standard pager to display the results.
This will cause lynx to format the text/html output as text/plain
and Mutt-ng will use your standard pager to display the results.
text/html; lynx %s; nametemplate=%s.html
text/html; lynx %s; nametemplate=%s.html
test=<command>
This field specifies a command to run to test whether this mailcap
test=<command>
This field specifies a command to run to test whether this mailcap
text/html; netscape -remote 'openURL(%s)' ; test=RunningX
text/html; lynx %s
text/html; netscape -remote 'openURL(%s)' ; test=RunningX
text/html; lynx %s
In this example, Mutt-ng will run the program RunningX which will
return 0 if the X Window manager is running, and non-zero if it
isn't. If RunningX returns 0, then Mutt-ng will call netscape to
In this example, Mutt-ng will run the program RunningX which will
return 0 if the X Window manager is running, and non-zero if it
isn't. If RunningX returns 0, then Mutt-ng will call netscape to
image/gif; ; print= anytopnm %s | pnmtops | lpr; \
nametemplate=%s.gif
image/gif; ; print= anytopnm %s | pnmtops | lpr; \
nametemplate=%s.gif
Mutt-ng will skip the image/* entry and use the image/gif entry with the
print command.
Mutt-ng will skip the image/* entry and use the image/gif entry with the
print command.
text/html; lynx %s; nametemplate=%s.html
text/html; lynx -dump %s; nametemplate=%s.html; copiousoutput
text/html; lynx %s; nametemplate=%s.html
text/html; lynx -dump %s; nametemplate=%s.html; copiousoutput
For auto-view, Mutt-ng will choose the third entry because of the
copiousoutput tag. For interactive viewing, Mutt will run the program
RunningX to determine if it should use the first entry. If the program
For auto-view, Mutt-ng will choose the third entry because of the
copiousoutput tag. For interactive viewing, Mutt will run the program
RunningX to determine if it should use the first entry. If the program
Content-Type: text/plain; charset=iso-8859-1
Content-Type: text/plain; charset=iso-8859-1
then Mutt-ng will expand %{charset} to iso-8859-1. The default
metamail mailcap file uses this feature to test the charset to
spawn an xterm using the right charset to view the message.
then Mutt-ng will expand %{charset} to iso-8859-1. The default
metamail mailcap file uses this feature to test the charset to
spawn an xterm using the right charset to view the message.
# I'm always running netscape (if my computer had more memory, maybe)
text/html; netscape -remote 'openURL(%s)'
# I'm always running netscape (if my computer had more memory, maybe)
text/html; netscape -remote 'openURL(%s)'
This mailcap file shows quite a number of examples:
# Use xanim to view all videos Xanim produces a header on startup,
This mailcap file shows quite a number of examples:
# Use xanim to view all videos Xanim produces a header on startup,
# Send excel spreadsheets to my NT box
application/ms-excel; open.pl %s
# Send excel spreadsheets to my NT box
application/ms-excel; open.pl %s
4. MIME Autoview
In addition to explicitly telling Mutt-ng to view an attachment with
4. MIME Autoview
In addition to explicitly telling Mutt-ng to view an attachment with
auto_view text/html application/x-gunzip application/postscript
image/gif application/x-tar-gz
auto_view text/html application/x-gunzip application/postscript
image/gif application/x-tar-gz
Mutt-ng could use the following mailcap entries to automatically view
attachments of these types.
Mutt-ng could use the following mailcap entries to automatically view
attachments of these types.
application/x-tar-gz; gunzip -c %s | tar -tf - ; copiousoutput
application/postscript; ps2ascii %s; copiousoutput
application/x-tar-gz; gunzip -c %s | tar -tf - ; copiousoutput
application/postscript; ps2ascii %s; copiousoutput
``unauto_view'' can be used to remove previous entries from the autoview
list. This can be used with message-hook to autoview messages based on
size, etc. ``unauto_view *'' will remove all previous entries.
``unauto_view'' can be used to remove previous entries from the autoview
list. This can be used with message-hook to autoview messages based on
size, etc. ``unauto_view *'' will remove all previous entries.
alternative_order text/enriched text/plain text
application/postscript image/*
alternative_order text/enriched text/plain text
application/postscript image/*
Next, mutt will check if any of the types have a defined auto-view, and
use that. Failing that, Mutt-ng will look for any text type. As a last
attempt, mutt willlook for any type it knows how to handle.
Next, mutt will check if any of the types have a defined auto-view, and
use that. Failing that, Mutt-ng will look for any text type. As a last
attempt, mutt willlook for any type it knows how to handle.
mime_lookup application/octet-stream application/X-Lotus-Manuscript
mime_lookup application/octet-stream application/X-Lotus-Manuscript
In addition, the unmime_lookup command may be used to disable this feature
for any particular mime-type if it had been set, for example, in a global
muttrc.
In addition, the unmime_lookup command may be used to disable this feature
for any particular mime-type if it had been set, for example, in a global
muttrc.
mailto:joe@host?Attach=~/.gnupg/secring.gpg
mailto:joe@host?Attach=~/.gnupg/secring.gpg
will send out the user's private gnupg keyring to joe@host if the user
doesn't follow the information on screen carefully enough.
will send out the user's private gnupg keyring to joe@host if the user
doesn't follow the information on screen carefully enough.
| ~B | EXPR | messages which contain EXPR in the |
| | | whole message |
|------------------+-------------+---------------------------------------|
| ~B | EXPR | messages which contain EXPR in the |
| | | whole message |
|------------------+-------------+---------------------------------------|
- | ~c | USER | messages carbon-copied to USER |
+ | ~c | EXPR | messages carbon-copied to EXPR |
|------------------+-------------+---------------------------------------|
| ~C | EXPR | message is either to: or cc: EXPR |
|------------------+-------------+---------------------------------------|
|------------------+-------------+---------------------------------------|
| ~C | EXPR | message is either to: or cc: EXPR |
|------------------+-------------+---------------------------------------|
|------------------+-------------+---------------------------------------|
| ~F | | flagged messages |
|------------------+-------------+---------------------------------------|
|------------------+-------------+---------------------------------------|
| ~F | | flagged messages |
|------------------+-------------+---------------------------------------|
- | ~f | USER | messages originating from USER |
+ | ~f | EXPR | messages originating from EXPR |
|------------------+-------------+---------------------------------------|
| ~g | | cryptographically signed messages |
|------------------+-------------+---------------------------------------|
|------------------+-------------+---------------------------------------|
| ~g | | cryptographically signed messages |
|------------------+-------------+---------------------------------------|
|------------------+-------------+---------------------------------------|
| ~k | | message contains PGP key material |
|------------------+-------------+---------------------------------------|
|------------------+-------------+---------------------------------------|
| ~k | | message contains PGP key material |
|------------------+-------------+---------------------------------------|
- | ~i | ID | message which match ID in the |
+ | ~i | EXPR | message which match ID in the |
| | | ``Message-ID'' field |
|------------------+-------------+---------------------------------------|
| ~L | EXPR | message is either originated or |
| | | ``Message-ID'' field |
|------------------+-------------+---------------------------------------|
| ~L | EXPR | message is either originated or |
|------------------+-------------+---------------------------------------|
| ~S | | superseded messages |
|------------------+-------------+---------------------------------------|
|------------------+-------------+---------------------------------------|
| ~S | | superseded messages |
|------------------+-------------+---------------------------------------|
- | ~s | SUBJECT | messages having SUBJECT in the |
+ | ~s | EXPR | messages having EXPR in the |
| | | ``Subject'' field. |
|------------------+-------------+---------------------------------------|
| ~T | | tagged messages |
|------------------+-------------+---------------------------------------|
| | | ``Subject'' field. |
|------------------+-------------+---------------------------------------|
| ~T | | tagged messages |
|------------------+-------------+---------------------------------------|
- | ~t | USER | messages addressed to USER |
+ | ~t | EXPR | messages addressed to EXPR |
|------------------+-------------+---------------------------------------|
| ~U | | unread messages |
|------------------+-------------+---------------------------------------|
|------------------+-------------+---------------------------------------|
| ~U | | unread messages |
|------------------+-------------+---------------------------------------|
+ | ~u | | message is addressed to a subscribed |
+ | | | mailing list |
+ |------------------+-------------+---------------------------------------|
| ~v | | message is part of a collapsed |
| | | thread. |
|------------------+-------------+---------------------------------------|
| ~v | | message is part of a collapsed |
| | | thread. |
|------------------+-------------+---------------------------------------|
| | | against alternates or any alias) |
+------------------------------------------------------------------------+
| | | against alternates or any alias) |
+------------------------------------------------------------------------+
- Where EXPR, USER, ID, and SUBJECT are regexp. Special attention has to be
- made when using regular expressions inside of patterns. Specifically,
- Mutt-ng'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 (\\).
+ Where EXPR are regexp. Special attention has to be made when using regular
+ expressions inside of patterns. Specifically, Mutt-ng'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.
*) The forms <[MAX], >[MIN] , [MIN]- and -[MAX] are allowed, too.
This is a read-only system property and specifies muttng's subversion
revision string.
This is a read-only system property and specifies muttng's subversion
revision string.