summaryrefslogtreecommitdiff
path: root/doc/texinfo/programs/mail.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/texinfo/programs/mail.texi')
-rw-r--r--doc/texinfo/programs/mail.texi997
1 files changed, 558 insertions, 439 deletions
diff --git a/doc/texinfo/programs/mail.texi b/doc/texinfo/programs/mail.texi
index 471bd189b..eaeb15d70 100644
--- a/doc/texinfo/programs/mail.texi
+++ b/doc/texinfo/programs/mail.texi
@@ -1,5 +1,5 @@
@c This is part of the GNU Mailutils manual.
-@c Copyright (C) 1999-2019 Free Software Foundation, Inc.
+@c Copyright (C) 1999--2024 Free Software Foundation, Inc.
@c See file mailutils.texi for copying conditions.
@comment *******************************************************************
@pindex mail
@@ -27,6 +27,7 @@ Configuration Files}, for a detailed description of their format.
@menu
* Invoking Mail:: Command Line Options.
* Reading Mail:: Reading Mail.
+* Saving and Recording:: Where Mail Messages are Stored.
* Composing Mail:: Composing Mail.
* MIME:: How to Attach Files.
* Scripting:: Scripting.
@@ -107,8 +108,7 @@ Sets content transfer encoding for use by the subsequent
@itemx --byname
Record outgoing messages in a file named after the first recipient.
The name is the login-name portion of the address found first on the
-@samp{To:} line in the mail header. This option sets the @samp{byname}
-variable, which see (@pxref{byname}).
+@samp{To:} line in the mail header.
@item -f
@itemx --file
@@ -465,13 +465,32 @@ Selects all messages with body matching the @var{string}. The matching
rules are the same as described above.
@end table
-A @dfn{message specifier} can be followed by @dfn{message part
-specifier}, enclosed in a pair of brackets. A @dfn{message part
-specifier} controls which part of a message should be operated upon.
-It is meaningful only for multipart messages. A @dfn{message part
-specifier} is a comma or whitespace-separated list of part numbers
-or ranges. Each part number can in turn be @dfn{message part specifier},
-thus allowing for operating upon multiply-encoded messages.
+@anchor{message part specification}
+Some @command{mail} commands can operate on parts of multipart
+messages. In arguments to such commands, a message part is indicated by
+suffixing the message specifier by a dot and the number of that part
+in the message (message parts, as well as messages, are indexed from
+1). For example, the command
+
+@example
+write 4.1
+@end example
+
+@noindent
+will operate on part 1 of the message 4. Message parts can in turn be
+multipart messages. Such nested subparts are indicated in a similar
+manner, for example:
+
+@example
+write 4.1.2
+@end example
+
+@noindent
+which means subpart 2 of the part 1 of message 4.@footnote{For
+compatibility with earlier versions of @command{mailutils}, a message
+part can also be specified as a list of numbers enclosed in a pair of
+brackets, such as @samp{4[2]}, instead of @samp{4.2}. This syntax is
+deprecated and will be withdrawn from future releases.}
The following are the examples of valid message lists:
@@ -494,7 +513,7 @@ All messages with the word @samp{watch} in the subject or body.
@item /watch :/watch $
Same as above plus the last message in the mailbox.
-@item 10[2]
+@item 10.2
Part 2 of the multipart message 10.
@end table
@@ -737,7 +756,7 @@ Displays current mailbox summary. E.g.:
Prints out the messages from @var{msglist}. The variable @code{crt}
determines the minimum number of lines the body of the message must
contain in order to be piped through pager command specified
-by environment variable @code{PAGER}. If @code{crt} is set to a numeric
+by environment variable @env{PAGER}. If @code{crt} is set to a numeric
value, this value is taken as the minimum number of lines. Otherwise,
if @code{crt} is set without a value then the height of the terminal
screen is used to compute the threshold. The number of lines on
@@ -754,13 +773,15 @@ Like print but also prints out ignored header fields.
@deffn {Mail command} decode [@var{msglist}]
@deffnx {Mail command} dec [@var{msglist}]
Print a multipart message. The @code{decode} command decodes and prints
-out specified message parts. E.g.
+out specified messages. The @var{msglist} can contain message parts
+(@pxref{message part specification}), in which case only specified
+message parts will be output.
@example
@cartouche
-? decode 15[2]
+? decode 15.2
+---------------------------------------
-| Message=15[2]
+| Message=15.2
| Type=message/delivery-status
| encoding=7bit
+---------------------------------------
@@ -794,9 +815,9 @@ Example:
@cartouche
? struct 2
2 multipart/mixed 14k
-2[1] text/plain 296
-2[2] application/octet-stream 5k
-2[3] text/x-diff 31k
+2.1 text/plain 296
+2.2 application/octet-stream 5k
+2.3 text/x-diff 31k
@end cartouche
@end example
@end deffn
@@ -827,6 +848,10 @@ Marks each message to be held in user's system mailbox. This command
does not override the effect of @code{delete} command.
@end deffn
+@deffn {Mail command} unread [@var{msglist}]
+Marks each message from the @var{msglist} as not having been read.
+@end deffn
+
@node Disposing of Messages
@subsubsection Disposing of Messages
@@ -872,7 +897,8 @@ command, unless the variable @code{keepsave} is set.
@deffn {Mail command} Save [@var{msglist}]
@deffnx {Mail command} S [@var{msglist}]
Like @code{save}, but the file to append messages to is named after the
-sender of the first message in @var{msglist}. For example:
+sender of the first message in @var{msglist}. The file name is
+selected as described in @ref{saving mail by name}. For example:
@example
@cartouche
@@ -894,13 +920,17 @@ If the file does not exist, it is created.
@deffn {Mail command} write [[@var{msglist}] @var{file}]
@deffnx {Mail command} w [[@var{msglist}] @var{file}]
Similar to @code{save}, except that only message body (without the
-header) is saved.
+header) is saved. The @var{msglist} can contain message parts
+(@pxref{message part specification}), in which case only specified
+message parts will be saved.
@end deffn
@deffn {Mail command} Write [@var{msglist}]
@deffnx {Mail command} W [@var{msglist}]
Similar to @code{Save}, except that only message body (without the
-header) is saved.
+header) is saved. The @var{msglist} can contain message parts
+(@pxref{message part specification}), in which case only specified
+message parts will be saved.
@end deffn
@deffn {Mail command} mbox [@var{msglist}]
@@ -921,14 +951,14 @@ states}).
@deffn {Mail command} copy [[@var{msglist}] @var{file}]
@deffnx {Mail command} c [[@var{msglist}] @var{file}]
-Similar to @code{save}, except that saved messages are not marked for
-deletion.
+Similar to @code{save}, except that saved messages are not marked as
+saved.
@end deffn
@deffn {Mail command} Copy [@var{msglist}]
@deffnx {Mail command} C [@var{msglist}]
-Similar to @code{Save}, except that saved messages are not marked for
-deletion.
+Similar to @code{Save}, except that saved messages are not marked as
+saved.
@end deffn
@node Editing Messages
@@ -985,42 +1015,76 @@ alternate names is displayed.
@deffn {Mail command} mail [@var{address}...]
@deffnx {Mail command} m [@var{address}...]
-Switches to compose mode. After composing the message, sends messages to
+Switches to compose mode. After composing the message, sends it to
the specified addresses.
+
+If the @code{record} variable is set, the composed message will be
+saved in the folder named by it.
+@end deffn
+
+@anchor{Mail}
+@deffn {Mail command} Mail [@var{address}...]
+@deffnx {Mail command} M [@var{address}...]
+Same as @code{mail}, but the name of the file to save the composed
+message is derived from its first recipient as outlined below.
+
+If the @code{outfolder} variable is set, and has a string value @var{s},
+the filename is @file{@var{s}/@var{recipient}}. If it is a boolean,
+then the @code{folder} variable is consulted. If it is set, then the
+filename is @file{@var{folder}/@var{recipient}}. Otherwise, the
+message will not be saved.
+
+The value @var{recipient} is derived from the email of the first
+recipient of the message. By default it is a local part of that
+email. If the @code{outfilename} variable has the value
+@samp{domain}, the domain part of the email is used. If this
+variable is set to @samp{email}, then entire email address is
+used.
+
+@xref{saving mail by name}, for a detailed discussion.
@end deffn
-@deffn {Mail command} reply [@var{msglist}]
-@deffnx {Mail command} respond [@var{msglist}]
-@deffnx {Mail command} r [@var{msglist}]
-For each message in @var{msglist}, switches to compose mode and sends
-the composed message to the sender and all recipients of the message.
+@deffn {Mail command} reply [@var{message}]
+@deffnx {Mail command} respond [@var{message}]
+@deffnx {Mail command} r [@var{message}]
+Mail a reply message to all recipients included in the header of the
+@var{message}. The subject header is formed by concatenating the
+value of the @code{replyprefix} variable and the subject from the
+message. If @code{record} is set to a filename, the response is
+saved at the end of that file.
@end deffn
@deffn {Mail command} Reply [@var{msglist}]
@deffnx {Mail command} Respond [@var{msglist}]
@deffnx {Mail command} R [@var{msglist}]
-Like @code{reply}, except that the composed message is sent only to
-originators of the specified messages.
+Mail a reply message to the sender of each message in the @var{msglist}.
+The subject header is formed by concatenating the value of the
+@code{replyprefix} variable and the subject header of from the
+first message in @var{msglist}. If @code{record} is set to a
+filename, the response is saved at the end of that file.
Notice, that setting mail variable @code{flipr} (@pxref{Mail
-Variables}) swaps the meanings of the two above commands,
-so that @code{reply} sends the message to the sender and all
-recipients of the message, whereas @code{Reply} sends it to
-originators only.
+Variables}) swaps the meanings of the two above commands
@end deffn
-@deffn {Mail command} followup [@var{msglist}]
-@deffnx {Mail command} fo [@var{msglist}]
-Switches to compose mode. After composing, sends the message to the
-originators and recipients of all messages in @var{msglist}.
+@deffn {Mail command} followup [@var{message}]
+@deffnx {Mail command} fo [@var{message}]
+Respond to @var{message}, recording the response in a file whose name
+is derived from the author of the message. @xref{saving mail by
+name}, for a discussion of how the file name is selected.
@end deffn
@deffn {Mail command} Followup [@var{msglist}]
@deffnx {Mail command} F [@var{msglist}]
-Similar to @code{followup}, but reply message is sent only to
-originators of messages in @var{msglist}.
+Same as @code{Reply}, but the response is saved in a file whose name
+is derived from the author of the first message. @xref{saving mail by
+name}, for a detailed discussion of how the file name is selected.
@end deffn
+By default, @command{mail} will preserve personal email parts when
+forming lists of recipient addresses. If this is not desired, unset
+the @code{fullnames} variable (@pxref{fullnames}).
+
To determine the sender of the message @command{mail} uses the
list of sender fields (@pxref{Controlling Sender Fields}). The first field
from this list is looked up in message headers. If it is found
@@ -1092,8 +1156,15 @@ Subject: Re: News
@kyindex sender, mail command
@kyindex nosender, mail command
-Commands @code{sender} and @code{nosender} are used to manipulate
-the contents of the sender field list.
+When @command{mail} needs to know the sender of a message, it
+looks it up in one or more headers of that message. Such headers
+constitute a @dfn{sender list}. The first header from the list
+that is present in the message and has a non-empty value is used.
+If none is found or if the sender list is empty, the value of the
+message envelope is used.
+
+The commands @code{sender} and @code{nosender} manipulate the sender
+list.
If the command @code{sender} is used without arguments, it displays
the contents of the sender field list. If arguments are given,
@@ -1161,6 +1232,55 @@ argument as a file name to execute and all subsequent arguments are
passed as positional parameters to this command. The @code{shell}
command can also be spelled as @code{!}.
+@node Saving and Recording
+@subsection Saving and Recording
+
+Several commands discussed in the previous section save messages in
+a disk file. The name of that file is either obtained from the
+@code{record} variable (@dfn{recording mail}) or is derived from the
+first recipient of the message (@dfn{saving by name}).
+
+The following commands record mails:
+
+@itemize @bullet
+@item @code{mail}
+@item @code{reply}
+@item @code{Reply}
+@end itemize
+
+The following commands save mail by name:
+
+@itemize @bullet
+@item @code{Copy}
+@item @code{Save}
+@item @code{Mail}
+@item @code{followup}
+@item @code{Followup}
+@end itemize
+
+@anchor{saving mail by name}
+Saving mail by name is controlled by three mail variables:
+@code{outfolder}, @code{folder}, and @code{outfilename}.
+The first, @code{outfolder}, is a boolean variable which, when set,
+enables saving mail by name. The @code{folder} variable defines a
+directory where mail files are stored. Name of file in that directory
+where the message will be saved is derived from the message
+recipient@footnote{In case of @code{Copy} and @code{Save}, message sender is
+used instead}. This process is controlled by the @code{outfilename}
+variable: if its value is @samp{local}, the file is named by the local
+part of the email (this is the default). If it is @samp{domain}, the
+domain part is used instead. Finally, if it's value is @samp{email},
+the entire email is used.
+
+As a GNU extension, @code{outfolder} can be a string variable. In
+that case its value names the directory to use instead of
+@code{folder}.
+
+The @code{mailx} variable, if set, disables GNU extensions. In this
+case, @code{outfolder} is used as a boolean value, and file names are
+derived from the local part of the email, ignoring the
+@code{outfilename} value.
+
@node Composing Mail
@subsection Composing Mail
@@ -1171,8 +1291,10 @@ capabilities through @dfn{compose escapes}. The @dfn{compose escapes}
are single-character commands, preceded by special @dfn{escape character},
which defaults to @samp{~}. The combination @code{escape character + command}
is recognized as a compose escape only if it occurs at the beginning of
-a line. If the escape character must appear at the beginning of a
-line, enter it twice.
+a line and the standard input is connected to a terminal. If the
+escape character must appear at the beginning of a line, enter it
+twice.
+
The actual escape character may be changed by setting the value of
@code{escape} mail variable (@pxref{Mail Variables}).
@@ -1924,101 +2046,79 @@ set
Following variables control the behavior of GNU @command{mail}:
-@table @code
-@kwindex append
-@item append
-@*Type: Boolean, Read-Only
+@c -----------------------------------------
+@deftypevr {mail} boolean append
@*Default: True
-@vrindex append, mail variable
+@*Comment: Read-Only
-Messages saved in @file{mbox} are appended to the end rather than
+Messages saved in @file{mbox} are appended to the end, rather than
prepended. This is the default and cannot be changed. This variable
exists only for compatibility with other @command{mailx}
implementations.
+@end deftypevr
-@kwindex appenddeadletter
-@item appenddeadletter
-@*Type: Boolean.
-@*Default: False.
-@vrindex appenddeadletter, mail variable
+@c -----------------------------------------
+@deftypevr {mail} boolean appenddeadletter
+@*Default: False
-If this variable is @code{True}, the contents of canceled letter is
+If this variable is set, the contents of canceled letter is
appended to the user's @file{dead.letter} file. Otherwise it overwrites
its contents.
+@end deftypevr
-@kwindex askbcc
-@item askbcc
-@*Type: Boolean.
-@*Default: False.
-@vrindex askbcc, mail variable
+@c -----------------------------------------
+@deftypevr {mail} boolean askbcc
+@*Default: False
When set to @code{True} the user will be prompted to enter @code{Bcc}
field before composing the message.
+@end deftypevr
-@kwindex askcc
-@item askcc
-@*Type: Boolean.
-@*Default: True.
-@vrindex askcc, mail variable
+@c -----------------------------------------
+@deftypevr {mail} boolean askcc
+@*Default: True
When set to @code{True} the user will be prompted to enter @code{Cc}
field before composing the message.
+@end deftypevr
-@kwindex asksub
-@item asksub
-@*Type: Boolean.
+@c -----------------------------------------
+@deftypevr {mail} boolean asksub
@*Default: True in interactive mode, False otherwise.
-@vrindex asksub, mail variable
When set to @code{True} the user will be prompted to enter @code{Subject}
field before composing the message.
+@end deftypevr
-@kwindex autoinc
-@item autoinc
-@*Type: Boolean.
-@*Default: True.
-@vrindex autoinc, mail variable
+@c -----------------------------------------
+@deftypevr {mail} boolean autoinc
+@*Default: True
Automatically incorporate newly arrived messages.
+@end deftypevr
-@kwindex autoprint
-@item autoprint
-@*Type: Boolean.
-@*Default: False.
-@vrindex autoprint, mail variable
+@c -----------------------------------------
+@deftypevr {mail} boolean autoprint
+@*Default: False
-Causes the delete command to behave like dp - thus, after deleting a
+Causes the delete command to behave like @code{dp}: after deleting a
message, the next one will be typed automatically.
+@end deftypevr
-@kwindex bang
-@item bang
-@*Type: Boolean.
-@*Default: False.
-@vrindex bang, mail variable
+@c -----------------------------------------
+@deftypevr {mail} boolean bang
+@*Default: False
When set, every occurrence of @code{!} in arguments to @code{!}
-command is replaced with the last executed command.
+escape is replaced with the last executed command.
-@anchor{byname}
-@kwindex byname
-@item byname
-@*Type: Boolean
-@*Default: Unset
-@vrindex byname, mail variable
-
-Record outgoing messages in a file named after the first recipient.
-The name is the login-name portion of the address found first on the
-@samp{To:} line in the mail header. This variable overrides the
-@samp{record} variable.
-
-It is set by the @option{--byname} (@option{-F}) command line option.
+@xref{Executing Shell Commands}, for details on the @code{!} escape.
+@end deftypevr
+@c -----------------------------------------
@anchor{datefield}
-@kwindex datefield
-@item datefield
-@*Type: Boolean.
-@*Default: False.
-@vrindex datefield, mail variable
+@deftypevr {mail} boolean datefield
+@*Default: False
By default the date in a header summary is taken from the @acronym{SMTP}
envelope of the message. Setting this variable tells @command{mail}
@@ -2027,69 +2127,68 @@ local time. Notice, that for messages lacking this field @command{mail}
will fall back to using @acronym{SMTP} envelope.
@xref{fromfield}.
+@end deftypevr
-@kwindex charset
-@item charset
-@*Type: string
+@c -----------------------------------------
+@deftypevr {mail} string charset
@*Default: @samp{auto}
-@vrindex charset, mail variable
The value of this variable is the character set used for input and
output operations. If the value is @samp{auto}, @command{mail} will
try to deduce the name of the character set from the value of
-@samp{LC_ALL} environment variable. If the variable contains the
+@env{LC_ALL} environment variable. If the variable contains the
character set part (e.g. @samp{nb_NO.utf-8}), it will be used.
Otherwise, @command{mail} will look up in its built-in database the
value of the character for this language/territory combination. If
-@samp{LC_ALL} is not set, the @samp{LANG} environment variable is
+@env{LC_ALL} is not set, the @env{LANG} environment variable is
inspected.
-The value of @samp{charset} controls both input and output
+The value of @code{charset} controls both input and output
operations. On input, it is used to set the value of the
@samp{charset} parameter in the @samp{Content-Type} MIME header, if
-its value begins with @samp{text/} and @samp{charset} is not present.
+its value begins with @samp{text/} and the @samp{charset} parameter is
+not present.
On output, it is used to display values of the header fields encodied
using RFC 2047. If the variable is unset, no decoding is performed
and the fields are printed as they are. Otherwise, they are recoded
to that character set.
+@end deftypevr
-@kwindex cmd
-@item cmd
-@*Type: String.
-@*Default: Unset.
-@vrindex cmd, mail variable
+@c -----------------------------------------
+@deftypevr {mail} string cmd
+@*Default: Unset
Contains default shell command for @code{pipe}.
+@end deftypevr
-@kwindex columns
-@item columns
-@*Type: Numeric.
+@c -----------------------------------------
+@deftypevr {mail} numeric columns
@*Default: Detected at startup by querying the terminal device. If this
-fails, the value of environment variable @code{COLUMNS} is used.
-@vrindex columns, mail variable
+fails, the value of environment variable @env{COLUMNS} is used.
This variable contains the number of columns on terminal screen.
+@end deftypevr
-@kwindex crt
-@item crt
-@*Type: Boolean or Numeric
+@c -----------------------------------------
+@anchor{crt}
+@deftypevr {mail} numeric crt
+@deftypevrx {mail} boolean crt
@*Default: True in interactive mode, False otherwise.
-@vrindex crt, mail variable
The variable @code{crt} determines the minimum number of lines the body
of the message must contain in order to be piped through pager command
-specified by environment variable @code{PAGER}. If @code{crt} is set
+specified by environment variable @env{PAGER}. If @code{crt} is set
to a numeric value, this value is taken as the threshold. Otherwise,
if @code{crt} is set without a value, then the height of the terminal
screen is used to compute the threshold. The number of lines on
screen is controlled by @code{screen} variable.
+@end deftypevr
-@kwindex debug
-@item debug
-@*Type: String to boolean
-@*Default: Not set
-@vrindex debug, mail variable
+@c -----------------------------------------
+@deftypevr {mail} boolean debug
+@deftypevrx {mail} string debug
+@*Default: Unset
Sets mailutils debug level. If set to string, the value must be a
valid Mailutils debugging specification. @xref{Debug Statement}, for
@@ -2099,12 +2198,11 @@ If unset (i.e. @code{set nodebug}), clears and disables all debugging
information. If set to @samp{true} (i.e. @code{set debug}), sets
maximum debugging (@samp{<trace7}) on mailbox and its underlying
objects.
+@end deftypevr
-@kwindex decode-fallback
-@item decode-fallback
-@*Type: String.
-@*Default: @samp{none}.
-@vrindex decode-fallback, mail variable
+@c -----------------------------------------
+@deftypevr {mail} string decode-fallback
+@*Default: @samp{none}
This variable controls the way to represent characters that cannot
be rendered using current character set. It can have three values:
@@ -2122,98 +2220,94 @@ your setup, this may screw-up your terminal settings.
Unprintable characters are represented by their octal codes. Printable
ones are printed @samp{as is}.
@end table
+@end deftypevr
-@kwindex debug
-@item debug
-@*Type: Boolean
-@*Default: Unset
-@vrindex debug, mail variable
-
-This variable is not used. It exists for compatibility with other
-@command{mailx} implementations and for future use.
-
-@kwindex dot
-@item dot
-@*Type: Boolean.
-@*Default: False.
-@vrindex dot, mail variable
+@c -----------------------------------------
+@deftypevr {mail} boolean dot
+@*Default: False
-If @code{True}, causes @command{mail} to interpret a period alone on a line as the
+If set, causes @command{mail} to interpret a period alone on a line as the
terminator of a message you are sending.
+@end deftypevr
-@kwindex emptystart
-@item emptystart
-@*Type: Boolean.
-@*Default: False.
-@vrindex emptystart, mail variable
-
-If the mailbox is empty, @command{mail} normally prints @samp{No mail for user} and
-exits immediately. If this option is set, @command{mail} will start no matter is
-the mailbox empty or not.
-
-@kwindex editheaders
-@item editheaders
-@*Type: Boolean.
-@*Default: False.
-@vrindex editheaders, mail variable
+@c -----------------------------------------
+@deftypevr {mail} boolean editheaders
+@*Default: False
When set, @command{mail} will include message headers in the text to
be the @code{~e} and @code{~v} escapes, thus allowing you to customize
the headers.
+@end deftypevr
+
+@c -----------------------------------------
+@deftypevr {mail} boolean emptystart
+@*Default: False
-@kwindex escape
-@item escape
-@*Type: String.
-@*Default: ~
-@vrindex escape, mail variable
+If the mailbox is empty, @command{mail} normally prints @samp{No mail
+for user} and exits immediately. If this option is set,
+@command{mail} will start no matter is the mailbox empty or not.
+@end deftypevr
-If defined, the first character of this option gives the character to
-denoting escapes.
+@c -----------------------------------------
+@deftypevr {mail} string escape
+@*Default: @samp{~}
-@kwindex flipr
-@item flipr
-@*Type: Boolean
+Current value of the command escape character.
+@end deftypevr
+
+@c -----------------------------------------
+@deftypevr {mail} boolean flipr
@*Default: Unset
-@vrindex flipr, mail variable
If set, the variable @code{flipr} swaps the meanings of @code{reply}
and @code{Reply} commands (@pxref{Replying}).
+@end deftypevr
+@c -----------------------------------------
@anchor{folder variable}
-@kwindex folder
-@item folder
-@*Type: String.
-@*Default: Unset.
-@vrindex folder, mail variable
+@deftypevr {mail} string folder
+@*Default: Unset
The name of the directory to use for storing folders of messages. If
unset, @env{$HOME} is assumed.
+@end deftypevr
+@c -----------------------------------------
@anchor{fromfield}
-@kwindex fromfield
-@item fromfield
-@*Type: Boolean.
-@*Default: True.
+@deftypevr {mail} boolean fromfield
+@*Default: True
By default the sender address is taken from the @samp{From} header.
Unsetting this variable tells @command{mail} to obtain it from the
-@acronym{SMTP} envelope, instead.
+@acronym{SMTP} envelope instead.
@xref{datefield}.
+@end deftypevr
+
+@c -----------------------------------------
+@anchor{fullnames}
+@deftypevr {mail} boolean fullnames
+@*Default: True
+
+Preserve personal parts (comments) of recipient addresses when replying to a
+message.
+
+When unset, only emails will be used.
-@kwindex header
-@item header
-@*Type: Boolean.
+@xref{Replying}.
+@end deftypevr
+
+@c -----------------------------------------
+@deftypevr {mail} boolean header
@*Default: True, unless started with @option{--nosum} (@option{-N}) option.
-@vrindex header, mail variable
Whether to run @code{headers} command automatically after entering
interactive mode.
+@end deftypevr
+@c -----------------------------------------
@anchor{headline}
-@kwindex headline
-@item headline
-@*Type: String
+@deftypevr {mail} string headline
@*Default: @samp{%>%a%4m %18f %16d %3l/%-5o %s}
Format string to use for the header summary. The @samp{%} character
@@ -2258,10 +2352,10 @@ Message attribute. One of the following letters, or a single
horizontal space, if none of them applies:
@multitable @columnfractions 0.2 0.6
-@item @samp{M} @tab the message was copied to the mailbox (@samp{mbox} command)
-@item @samp{P} @tab the message was preserved (@samp{hold} command)
-@item @samp{*} @tab the message was saved (@samp{save} or @samp{Save})
-@item @samp{T} @tab the message was tagged (@samp{tag})
+@item @samp{M} @tab the message was copied to the mailbox (@code{mbox} command)
+@item @samp{P} @tab the message was preserved (@code{hold} command)
+@item @samp{*} @tab the message was saved (@code{save} or @code{Save})
+@item @samp{T} @tab the message was tagged (@code{tag})
@item @samp{R} @tab the message was read
@item @samp{N} @tab the message is new (was not seen)
@item @samp{U} @tab the message was seen, but wasn't read
@@ -2269,7 +2363,7 @@ horizontal space, if none of them applies:
@item %d
The date when the message was received. It is determined from the
-message header set by the @samp{datefield} variable
+message header defined by the @samp{datefield} variable
(@pxref{datefield}). If that variable is not set, or the requested
header is not present in the message, the date from the envelope is
used.
@@ -2343,13 +2437,12 @@ A @samp{<} for the current message, otherwise a space.
@item %%
A @samp{%} character.
@end table
+@end deftypevr
-@kwindex hold
-@item hold
+@c -----------------------------------------
@anchor{the hold variable}
-@*Type: Boolean.
-@*Default: False.
-@vrindex hold, mail variable
+@deftypevr {mail} boolean hold
+@*Default: False
Determines the location where to store the messages in state
@samp{read} and (if the @code{keepsave} is also set) @samp{saved}.
@@ -2363,60 +2456,56 @@ detailed information on how such messages are processed
when the mailbox is being closed.
@xref{keepsave}, for the discussion of the @code{keepsave} variable.
+@end deftypevr
-@kwindex ignore
-@item ignore
-@*Type: Boolean.
-@*Default: False.
-@vrindex ignore, mail variable
+@c -----------------------------------------
+@deftypevr {mail} boolean ignore
+@*Default: False
When set to @code{True}, @command{mail} will ignore keyboard interrupts
when composing messages. Otherwise an interrupt will be taken as a
signal to abort composing.
+@end deftypevr
-@kwindex ignoreeof
-@item ignoreeof
-@*Type: Boolean.
-@*Default: False.
-@vrindex ignoreeof, mail variable
+@c -----------------------------------------
+@deftypevr {mail} boolean ignoreeof
+@*Default: False
Controls whether typing EOF character terminates the letter being
composed.
+@end deftypevr
-@kwindex indentprefix
-@item indentprefix
-@*Type: String.
+@c -----------------------------------------
+@deftypevr {mail} string indentprefix
@*Default: "\t" (a tab character).
-@vrindex indentprefix, mail variable
String used by the @code{~m} tilde escape for indenting quoted messages.
+@end deftypevr
-@kwindex inplacealiases
-@item inplacealiases
-@*Type: Boolean
+@c -----------------------------------------
+@deftypevr {mail} boolean inplacealiases
@*Default: False
If set, @command{mail} will expand aliases in the address header field
before entering send mode (@pxref{Composing Mail}). By default, the
address header fields are left intact while composing, the alias
expansion takes place immediately before sending message.
+@end deftypevr
-@kwindex keep
-@item keep
-@*Type: Boolean, Read-Only
+@c -----------------------------------------
+@deftypevr {mail} boolean keep
+@*Comment: Read-Only
@*Default: True
-@vrindex append, mail variable
Truncate the user's system mailbox when it is empty, instead of
removing it. This is the default and cannot be changed. This variable
exists only for compatibility with other @command{mailx} implementations.
+@end deftypevr
-@kwindex keepsave
+@c -----------------------------------------
@anchor{keepsave}
-@item keepsave
-@*Type: Boolean.
-@*Default: False.
-@vrindex keepsave, mail variable
+@deftypevr {mail} boolean keepsave
+@*Default: False
Controls whether saved messages should be retained. The location
where they will be retained is controlled by the @code{hold} variable
@@ -2427,12 +2516,12 @@ mailbox.
@xref{saved messages}, for a detailed information on how
the saved messages are processed when the mailbox is being closed.
+@end deftypevr
-@kwindex mailx
-@item mailx
-@*Type: Boolean.
-@*Default: False.
-@vrindex mailx, mail variable
+@c -----------------------------------------
+@anchor{mailx mail variable}
+@deftypevr {mail} boolean mailx
+@*Default: False
When set, enables @dfn{mailx compatibility mode}. This mode
has the following effects:
@@ -2446,13 +2535,27 @@ the body.
@item In send mode, if the composition was interrupted, @command{mail}
will exit with zero status. By default it exits with zero status only
if the message was sent successfully.
+
+@item The @code{outfolder} variable is treated as boolean.
+@pxref{outfolder}.
+
+@item The value of @code{outfilename} is ignored (assumed to be
+@samp{local}). @pxref{outfilename}.
+
+@item The values of @code{folder} and @code{record} variables are
+assumed relative to the home directory, unless they begin with
+@samp{/}, @samp{~}, or @samp{+}.
+
+@item If the value of the @code{sendmail} variable does not begin with
+a scheme specification, @samp{sendmail:/} is assumed. @xref{sendmail
+mail variable}.
@end itemize
+@end deftypevr
-@kwindex metamail
-@item metamail
-@*Type: Boolean or String.
-@*Default: True.
-@vrindex metamail, mail variable
+@c -----------------------------------------
+@deftypevr {mail} boolean metamail
+@deftypevrx {mail} string metamail
+@*Default: True
This variable controls operation of @code{decode} command. If
it is unset, @code{decode} will not attempt any interpretation
@@ -2471,23 +2574,21 @@ set metamail
# Use external program to display MIME parts:
set metamail="metamail -m mail -p"
@end example
+@end deftypevr
-@kwindex mime
-@item mime
-@*Type: String
-@*Default: Unset (false)
-@vrindex mime, mail variable
+@c -----------------------------------------
+@deftypevr {mail} string mime
+@*Default: False
If set, this variable instructs @command{mail} to compose MIME
messages.
It can be set from the command line using @option{--mime} option.
+@end deftypevr
-@kwindex mimenoask
-@item mimenoask
-@*Type: String
-@*Default: Empty
-@vrindex mimenoask, mail variable
+@c -----------------------------------------
+@deftypevr {mail} string mimenoask
+@*Default: Unset
By default @command{mail} asks for confirmation before running
interpreter to view a part of the multi-part message. If this variable
@@ -2503,22 +2604,21 @@ set mimenoask=text/*,image/jpeg
will disable prompting before displaying any textual files, no
matter what their subtype is, and before displaying files with
type @samp{image/jpeg}.
+@end deftypevr
-@kwindex metoo
-@item metoo
-@*Type: Boolean.
-@*Default: False.
-@vrindex metoo, mail variable
+@c -----------------------------------------
+@deftypevr {mail} boolean metoo
+@*Default: False
Usually, when an alias is expanded that contains the sender, the sender
is removed from the expansion. Setting this option causes the sender to
be included in the group.
+@end deftypevr
-@kwindex mode
-@item mode
-@*Type: String, Read-Only
+@c -----------------------------------------
+@deftypevr {mail} string mode
+@*Comment: Read-Only
@*Default: The name of current operation mode.
-@vrindex mode, mail variable
This variable keeps the name of the current operation mode. Its
possible values are:
@@ -2543,12 +2643,11 @@ The program operates in read mode. This is the default.
The program operates in send mode. This means it was given one or more
recipient addresses in the command line.
@end table
+@end deftypevr
-@kwindex nullbody
-@item nullbody
-@* Type: Boolean
-@* Default: True
-@vrindex nullbody, mail variable
+@c -----------------------------------------
+@deftypevr {mail} boolean nullbody
+@*Default: True
Controls whether @command{mail} accepts messages with an empty
body. The default value, @code{true}, means such messages are sent,
@@ -2568,151 +2667,169 @@ outputs something on its standard output or error:
/bin/mail -E'set nonullbody' -s 'Periodic synchronization'
@end group
@end example
+@end deftypevr
-@kwindex showenvelope
-@item showenvelope
-@*Type: Boolean
-@*Default: Unset
-
-If this variable is set, the @code{print} command will include the
-@acronym{STMP} envelope in its output.
-
-@kwindex nullbodymsg
-@item nullbodymsg
-@*Type: String
-@*Default: Null message body; hope that's ok
-@vrindex nullbodymsg
+@c -----------------------------------------
+@deftypevr {mail} string nullbodymsg
+@*Default: @samp{Null message body; hope that's ok}
-Keeps the text of the warning, displayed by @command{mail} before
+Text of the warning displayed by @comman