neulab/tldr huggingface dataset:
~w filename Write the message onto the named file, which is object to the usual Filename transformations.  If the file exists, the message is appended to it.
~x        Same as ~q, except that the message is not saved at all.
Internal Mail variables are controlled via the set and unset commands; prefixing a variable name with the string ‘no’ and calling set has the same effect as using unset: ‘unset crt’ and ‘set nocrt’ do the same thing. varshow will give more insight on the given variable(s), and set, when called without arguments, will show a listing of all variables.  Both commands support a more verbose listing mode.  Some well-known variables will also become inherited from the program ENVIRONMENT implicitly, others can be imported explicitly with the command environ and henceforth share said properties.
Two different kinds of internal variables exist, and both of which can also form chains.  There are boolean variables, which can only be in one of the two states “set” and “unset”, and value variables with a(n optional) string value.  For the latter proper quoting is necessary upon assignment time, the introduction of the section COMMANDS documents the supported quoting rules.
? wysh set one=val\ 1 two="val 2" \ three='val "3"' four=$'val \'4\''; \ varshow one two three four; \ unset one two three four
Dependent upon the actual option string values may become interpreted as colour names, command specifications, normal text, etc.  They may be treated as numbers, in which case decimal values are expected if so documented, but otherwise any numeric format and base that is valid and understood by the vexpr command may be used, too.
There also exists a special kind of string value, the “boolean string”, which must either be a decimal integer (in which case ‘0’ is false and ‘1’ and any other value is true) or any of the (case-insensitive) strings ‘off’, ‘no’, ‘n’ and ‘false’ for a false boolean and ‘on’, ‘yes’, ‘y’ and ‘true’ for a true boolean; a special kind of boolean string is the “quadoption”: it can optionally be prefixed with the (case-insensitive) term ‘ask-’, as in ‘ask-yes’; in interactive mode the user will be prompted, otherwise the actual boolean is used.
Variable chains extend a plain ‘variable’ with ‘variable-HOST’ and ‘variable-USER@HOST’ variants.  Here ‘HOST’ will be converted to all lowercase when looked up (but not when the variable is set or unset!), [Option]ally IDNA converted, and indeed means ‘server:port’ if a ‘port’ had been specified in the contextual Uniform Resource Locator URL, see On URL syntax and credential lookup.  Even though this mechanism is based on URLs no URL percent encoding may be applied to neither of ‘USER’ nor ‘HOST’, variable chains need to be specified using raw data; the mentioned section contains examples.  Variables which support chains are explicitly documented as such, and Mail treats the base name of any such variable special, meaning that users should not create custom names like ‘variable-xyz’ in order to avoid false classifications and treatment of such variables.
Initial settings The standard POSIX 2008/Cor 2-2016 mandates the following initial variable settings: noallnet, noappend, asksub, noaskbcc, noautoprint, nobang, nocmd, nocrt, nodebug, nodot, escape set to ‘~’, noflipr, nofolder, header, nohold, noignore, noignoreeof, nokeep, nokeepsave, nometoo, nooutfolder, nopage, prompt set to ‘? ’, noquiet, norecord, save, nosendwait, noshowto, noSign, nosign, toplines set to ‘5’.
However, Mail has built-in some initial (and some default) settings which (may) diverge, others may become adjusted by one of the Resource files. Displaying the former is accomplished via set: ‘$ mail -:/ -v -Xset -Xx’. In general this implementation sets (and has extended the meaning of) sendwait, and does not support the noonehop variable – use command line options or mta-arguments to pass options through to a mta.  The default global resource file sets, among others, the variables hold, keep and keepsave, establishes a default headerpick selection etc., and should thus be taken into account.
Variables ?         (Read-only) The exit status of the last command, or the return value of the macro called last.  This status has a meaning in the state machine: in conjunction with errexit any non-0 exit status will cause a program exit, and in posix mode any error while loading (any of the) resource files will have the same effect. ignerr, one of the Command modifiers, can be used to instruct the state machine to ignore errors.
!         (Read-only) The current error number (errno(3)), which is set after an error occurred; it is also available via ^ERR, and the error name and documentation string can be queried via ^ERRNAME and ^ERRDOC.  [v15 behaviour may differ] This machinery is new and the error number is only really usable if a command explicitly states that it manages the variable !, for others errno will be used in case of errors, or ^ERR-INVAL if that is 0: it thus may or may not reflect the real error.  The error number may be set with the command return.
^         (Read-only) This is a multiplexer variable which performs dynamic expansion of the requested state or condition, of which there are:
^ERR, ^ERRDOC, ^ERRNAME The number, documentation, and name of the current errno(3), respectively, which is usually set after an error occurred.  The documentation is an [Option], the name is used if not available.  [v15 behaviour may differ] This machinery is new and is usually reliable only if a command explicitly states that it manages the variable !, which is effectively identical to ^ERR. Each of those variables can be suffixed with a hyphen minus followed by a name or number, in which case the expansion refers to the given error.  Note this is a direct mapping of (a subset of) the system error values:
define work { eval echo \$1: \$^ERR-$1:\ \$^ERRNAME-$1: \$^ERRDOC-$1 vput vexpr i + "$1" 1 if [ $i -lt 16 ] \xcall work $i end } call work 0
^ERRQUEUE-COUNT, ^ERRQUEUE-EXISTS The number of messages present in the [Option]al log queue of errors, and a boolean which indicates whether the queue is not empty, respectively; both are always 0 unless features includes ‘,+errors,’.
*         (Read-only) Expands all positional parameters (see 1), separated by the first character of the value of ifs.  [v15 behaviour may differ] The special semantics of the equally named special parameter of the sh(1) are not yet supported.
@         (Read-only) Expands all positional parameters (see 1), separated by a space character.  If placed in double quotation marks, each positional parameter is properly quoted to expand to a single parameter again.
#         (Read-only) Expands to the number of positional parameters, i.e., the size of the positional parameter stack in decimal.
0         (Read-only) Inside the scope of a defined and called macro this expands to the name of the calling macro, or to the empty string if the macro is running from top-level.  For the [Option]al regular expression search and replace operator of vexpr this expands to the entire matching expression.  It represents the program name in global context.
1         (Read-only) Access of the positional parameter stack.  All further parameters can be accessed with this syntax, too, ‘2’, ‘3’ etc.; positional parameters can be shifted off the stack by calling shift.  The parameter stack contains, for example, the arguments of a called defined macro, the matching groups of the [Option]al regular expression search and replace expression of vexpr, and can be explicitly created or overwritten with the command vpospar.
account   (Read-only) Is set to the active account.
add-file-recipients (Boolean) When file or pipe recipients have been specified, mention them in the corresponding address fields of the message instead of silently stripping them from their recipient list.  By default such addressees are not mentioned.
allnet    (Boolean) Causes only the local part to be evaluated when comparing addresses.
append    (Boolean) Causes messages saved in the secondary mailbox MBOX to be appended to the end rather than prepended.  This should always be set.
askatend  (Boolean) Causes the prompts for ‘Cc:’ and ‘Bcc:’ lists to appear after the message has been edited.
askattach (Boolean) If set, Mail asks an interactive user for files to attach at the end of each message; An empty line finalizes the list.
askcc     (Boolean) Causes the interactive user to be prompted for carbon copy recipients (at the end of each message if askatend or bsdcompat are set).
askbcc    (Boolean) Causes the interactive user to be prompted for blind carbon copy recipients (at the end of each message if askatend or bsdcompat are set).
asksend   (Boolean) Causes the interactive user to be prompted for confirmation to send the message or reenter compose mode after having been shown a preliminary envelope summary.
asksign   (Boolean)[Option] Causes the interactive user to be prompted if the message is to be signed at the end of each message.  The smime-sign variable is ignored when this variable is set.
asksub    (Boolean) Causes Mail to prompt the interactive user for the subject upon entering compose mode unless a subject already exists.
attrlist  A sequence of characters to display in the ‘attribute’ column of the headline as shown in the display of headers; each for one type of messages (see Message states), with the default being ‘NUROSPMFAT+-$~’ or ‘NU  *HMFAT+-$~’ if the bsdflags variable is set, in the following order:
‘N’       new. ‘U’       unread but old. ‘R’       new but read. ‘O’       read and old. ‘S’       saved. ‘P’       preserved. ‘M’       mboxed. ‘F’       flagged. ‘A’       answered. ‘T’       draft. ‘+’       [v15 behaviour may differ] start of a (collapsed) thread in threaded mode (see autosort, thread); ‘-’       [v15 behaviour may differ] an uncollapsed thread in threaded mode; only used in conjunction with -L. ‘$’       classified as spam. ‘~’       classified as possible spam.
autobcc   Specifies a list of recipients to which a blind carbon copy of each outgoing message will be sent automatically.
autocc    Specifies a list of recipients to which a carbon copy of each outgoing message will be sent automatically.
autocollapse (Boolean) Causes threads to be collapsed automatically when .Ql thread Ns ed sort mode is entered (see the collapse command).
autoprint (Boolean) Enable automatic typeing of a(n existing) “successive” message after delete and undelete commands: the message that becomes the new “dot” is shown automatically, as via dp or dt.
autosort  Causes sorted mode (see the sort command) to be entered automatically with the value of this variable as sorting method when a folder is opened, for example ‘set autosort=thread’.
bang      (Boolean) Enables the substitution of all not (reverse-solidus) escaped exclamation mark ‘!’ characters by the contents of the last executed command for the ! shell escape command and ~!, one of the compose mode COMMAND ESCAPES.  If this variable is not set no reverse solidus stripping is performed.
bind-timeout [Obsolete] Predecessor of bind-inter-byte-timeout.  [v15 behaviour may differ] Setting this automatically sets the successor.
bind-inter-byte-timeout [Option] Terminals may generate multi-byte sequences for special function keys, for example, but these sequences may not become read as a unit.  And multi-byte sequences can be defined freely via bind.  This variable specifies the timeout in milliseconds that the MLE (see On terminal control and line editor) waits for more bytes to arrive unless it considers a sequence “complete”. The default is 200, the maximum is about 10 seconds.  In the following example the comments state which sequences are affected by this timeout:
? bind base abc echo 0 # abc ? bind base ab,c echo 1 # ab ? bind base abc,d echo 2 # abc ? bind base ac,d echo 3 # ac ? bind base a,b,c echo 4 ? bind base a,b,c,d echo 5 ? bind base a,b,cc,dd echo 6 # cc and dd
bind-inter-key-timeout [Option] Multi-key bind sequences do not time out by default.  If this variable is set, then the current key sequence is forcefully terminated once the timeout (in milliseconds) triggers.  The value should be (maybe significantly) larger than bind-inter-byte-timeout, but may not excess the maximum, too.
bsdcompat (Boolean) Sets some cosmetical features to traditional BSD style; has the same affect as setting askatend and all other variables prefixed with ‘bsd’; it also changes the behaviour of emptystart (which does not exist in BSD).
bsdflags  (Boolean) Changes the letters shown in the first column of a header summary to traditional BSD style.
bsdheadline (Boolean) Changes the display of columns in a header summary to traditional BSD style.
bsdmsgs   (Boolean) Changes some informational messages to traditional BSD style.
bsdorder  (Boolean) Causes the ‘Subject:’ field to appear immediately after the ‘To:’ field in message headers and with the ~h COMMAND ESCAPES.
build-cc, build-ld, build-os, build-rest (Read-only) The build environment, including the compiler, the linker, the operating system Mail has been build for, usually taken from uname(1) via ‘uname -s’, and then lowercased, as well as all the possibly interesting rest of the configuration and build environment.  This information is also available in the verbose output of the command version.
charset-7bit The value that should appear in the ‘charset=’ parameter of ‘Content-Type:’ MIME header fields when no character set conversion of the message data was performed.  This defaults to US-ASCII, and the chosen character set should be US-ASCII compatible.
charset-8bit [Option] The default 8-bit character set that is used as an implicit last member of the variable sendcharsets.  This defaults to UTF-8 if character set conversion capabilities are available, and to ISO-8859-1 otherwise (unless the operating system environment is known to always and exclusively support UTF-8 locales), in which case the only supported character set is ttycharset and this variable is effectively ignored.
charset-unknown-8bit [Option] RFC 1428 specifies conditions when internet mail gateways shall “upgrade” the content of a mail message by using a character set with the name ‘unknown-8bit’.  Because of the unclassified nature of this character set Mail will not be capable to convert this character set to any other character set. If this variable is set any message part which uses the character set ‘unknown-8bit’ is assumed to really be in the character set given in the value, otherwise the (final) value of charset-8bit is used for this purpose.
This variable will also be taken into account if a MIME type (see The mime.types files) of a MIME message part that uses the ‘binary’ character set is forcefully treated as text.
cmd       The default value for the pipe command.
colour-disable (Boolean)[Option] Forcefully disable usage of colours.  Also see the section Coloured display.
colour-pager (Boolean)[Option] Whether colour shall be used for output that is paged through PAGER.  Note that pagers may need special command line options, for example less(1) requires the option -R and lv(1) the option -c in order to support colours.  Often doing manual adjustments is unnecessary since Mail may perform adjustments dependent on the value of the environment variable PAGER (see there for more).
contact-mail, contact-web (Read-only) Addresses for contact per email and web, respectively, for bug reports, suggestions, or anything else regarding Mail.  The former can be used directly: ‘? eval mail $contact-mail’.
content-description-forwarded-message, content-description-quote-attachment, content-description-smime-message, content-description-smime-signature [Option](partially) Strings which will be placed in according ‘Content-Description:’ headers if non-empty.  They all have default values, for example ‘Forwarded message’.
crt       In a(n interactive) terminal session, then if this valued variable is set it will be used as a threshold to determine how many lines the given output has to span before it will be displayed via the configured PAGER; Usage of the PAGER can be forced by setting this to the value ‘0’, setting it without a value will deduce the current height of the terminal screen to compute the threshold (see LINES, screen and stty(1)).  [v15 behaviour may differ] At the moment this uses the count of lines of the message in wire format, which, dependent on the mime-encoding of the message, is unrelated to the number of display lines.  (The software is old and historically the relation was a given thing.)
customhdr Define a set of custom headers to be injected into newly composed or forwarded messages.  A custom header consists of the field name followed by a colon ‘:’ and the field content body. Standard header field names cannot be overwritten by a custom header, with the exception of ‘Comments:’ and ‘Keywords:’. Different to the command line option -C the variable value is interpreted as a comma-separated list of custom headers: to include commas in header bodies they need to become escaped with reverse solidus ‘\’.  Headers can be managed more freely in Compose mode via ~^.
? set customhdr='Hdr1: Body1-1\, Body1-2, Hdr2: Body2'
datefield Controls the appearance of the ‘%d’ date and time format specification of the headline variable, that is used, for example, when viewing the summary of headers.  If unset, then the local receiving date is used and displayed unformatted, otherwise the message sending ‘Date:’.  It is possible to assign a strftime(3) format string and control formatting, but embedding newlines via the ‘%n’ format is not supported, and will result in display errors.  The default is ‘%Y-%m-%d %H:%M’, and also see datefield-markout-older.
datefield-markout-older Only used in conjunction with datefield.  Can be used to create a visible distinction of messages dated more than a day in the future, or older than six months, a concept comparable to the -l option of the POSIX utility ls(1).  If set to the empty string, then the plain month, day and year of the ‘Date:’ will be displayed, but a strftime(3) format string to control formatting can be assigned.  The default is ‘%Y-%m-%d’.
debug     (Boolean) (Almost) Enter a debug-only sandbox mode which generates many log messages, disables the actual delivery of messages, and also implies norecord as well as nosave.  Also see verbose.
disposition-notification-send (Boolean)[Option] Emit a ‘Disposition-Notification-To:’ header (RFC 3798) with the message.  This requires the from variable to be set.
dot       (Boolean) When dot is set, a period ‘.’ on a line by itself during message input in (interactive or batch -#) Compose mode will be treated as end-of-message (in addition to the normal end- of-file condition).  This behaviour is implied in posix mode with a set ignoreeof.
dotlock-disable (Boolean)[Option] Disable creation of dotlock files for MBOX databases.
dotlock-ignore-error [Obsolete](Boolean)[Option] Ignore failures when creating dotlock files.  Please use dotlock-disable instead.
editalong If this variable is set then the editor is started automatically when a message is composed in interactive mode.  If the value starts with the letter ‘v’ then this acts as if ~v, otherwise as if ~e (see COMMAND ESCAPES) had been specified.  The editheaders variable is implied for this automatically spawned editor session.
editheaders (Boolean) When a message is edited while being composed, its header is included in the editable text.
emptystart (Boolean) When entering interactive mode Mail normally writes “No mail for user” and exits immediately if a mailbox is empty or does not exist.  If this variable is set Mail starts even with an empty or non-existent mailbox (the latter behaviour furtherly depends upon bsdcompat, though).
errexit   (Boolean) Let each command with a non-0 exit status, including every called macro which returns a non-0 status, cause a program exit unless prefixed by ignerr (see Command modifiers).  This also affects COMMAND ESCAPES, but which use a different modifier for ignoring the error.  Please refer to the variable ? for more on this topic.
errors-limit [Option] Maximum number of entries in the errors queue.
escape    The first character of this value defines the escape character for COMMAND ESCAPES in Compose mode.  The default value is the character tilde ‘~’.  If set to the empty string, command escapes are disabled.
expandaddr If unset only user name and email address recipients are allowed On sending mail, and non-interactive mode.  If set without value all possible recipient types will be accepted.  A value is parsed as a comma-separated list of case-insensitive strings, and if that contains ‘restrict’ behaviour equals the former except when in interactive mode or if COMMAND ESCAPES were enabled via -~ or -#, in which case it equals the latter, allowing all address types.  ‘restrict’ really acts like ‘restrict,-all,+name,+addr’, so care for ordering issues must be taken.
Recipient types can be added and removed with a plus sign ‘+’ or hyphen-minus ‘-’ prefix, respectively.  By default invalid or disallowed types are filtered out and cause a warning, hard send errors need to be enforced by including ‘fail’.  The value ‘all’ covers all types, ‘fcc’ whitelists ‘Fcc:’ header targets regardless of other settings, ‘file’ file targets (it includes ‘fcc’), ‘pipe’ command pipeline targets, ‘name’ user names still unexpanded after alias and mta-aliases processing and thus left for expansion by the mta (invalid for the built-in SMTP one), and ‘addr’ network addresses.  Targets are interpreted in the given order, so that ‘restrict,fail,+file,-all,+addr’ will cause hard errors for any non-network address recipient address unless running interactively or having been started with the option -~ or -#; in the latter case(s) any type may be used.
User name receivers addressing valid local users can be expanded to fully qualified network addresses (also see hostname) by including ‘nametoaddr’ in the list.  Historically invalid recipients were stripped off without causing errors, this can be changed by making ‘failinvaddr’ an entry of the list (it really acts like ‘failinvaddr,+addr’).  Likewise, ‘domaincheck’ (really ‘domaincheck,+addr’) compares address domain names against a whitelist and strips off (‘fail’ for hard errors) addressees which fail this test; the domain name ‘localhost’ and the non- empty value of hostname (the real hostname otherwise) are always whitelisted, expandaddr-domaincheck can be set to extend this list.  Finally some address providers (for example -b, -c and all other command line recipients) will be evaluated as if specified within dollar-single-quotes (see Shell-style argument quoting) if the value list contains the string ‘shquote’.
expandaddr-domaincheck Can be set to a comma-separated list of domain names which should be whitelisted for the evaluation of the ‘domaincheck’ mode of expandaddr.  IDNA encoding is not automatically performed, addrcodec can be used to prepare the domain (of an address).
expandargv Unless this variable is set additional mta (Mail-Transfer-Agent) arguments from the command line, as can be given after a -- separator, results in a program termination with failure status. The same can be accomplished by using the special (case- insensitive) value ‘fail’.  A lesser strict variant is the otherwise identical ‘restrict’, which does accept such arguments in interactive mode, or if tilde commands were enabled explicitly by using one of the command line options -~ or -#.  The empty value will allow unconditional usage.
features  (Read-only) String giving a list of optional features.  Features are preceded with a plus sign ‘+’ if they are available, with a hyphen-minus ‘-’ otherwise.  To ease substring matching the string starts and ends with a comma.  The output of the command version includes this information in a more pleasant output.
flipr     (Boolean) This setting reverses the meanings of a set of reply commands, turning the lowercase variants, which by default address all recipients included in the header of a message (reply, respond, followup) into the uppercase variants, which by default address the sender only (Reply, Respond, Followup) and vice versa.
folder    The default path under which mailboxes are to be saved: filenames that begin with the plus sign ‘+’ will have the plus sign replaced with the value of this variable if set, otherwise the plus sign will remain unchanged when doing Filename transformations; also see folder for more on this topic, and know about standard imposed implications of outfolder.  The value supports a subset of transformations itself, and if the non-empty value does not start with a solidus ‘/’, then the value of HOME will be prefixed automatically.  Once the actual value is evaluated first, the internal variable folder-resolved will be updated for caching purposes.
folder-hook-FOLDER, folder-hook Names a defined macro which will be called whenever a folder is opened.  The macro will also be invoked when new mail arrives, but message lists for commands executed from the macro only include newly arrived messages then.  localopts are activated by default in a folder hook, causing the covered settings to be reverted once the folder is left again.
The specialized form will override the generic one if ‘FOLDER’ matches the file that is opened.  Unlike other folder specifications, the fully expanded name of a folder, without metacharacters, is used to avoid ambiguities.  However, if the mailbox resides under folder then the usual ‘+’ specification is tried in addition, so that if folder is “mail” (and thus relative to the user's home directory) then /home/usr1/mail/sent will be tried as ‘folder-hook-/home/usr1/mail/sent’ first, but then followed by ‘folder-hook-+sent’.
folder-resolved (Read-only) Set to the fully resolved path of folder once that evaluation has occurred; rather internal.
followup-to (Boolean) Controls whether a ‘Mail-Followup-To:’ header is generated when sending messages to known mailing lists.  The user as determined via from (or, if that contains multiple addresses, sender) will be placed in there if any list addressee is not a subscribed list.  Also see followup-to-honour and the commands mlist, mlsubscribe, reply and Lreply.
followup-to-add-cc (Boolean) Controls whether the user will be added to the messages' ‘Cc:’ list in addition to placing an entry in ‘Mail-Followup-To:’ (see followup-to).
followup-to-honour Controls whether a ‘Mail-Followup-To:’ header is honoured when group-replying to a message via reply or Lreply.  This is a quadoption; if set without a value it defaults to “yes”, and see followup-to.
forward-add-cc (Boolean) Whether senders of messages forwarded via ~F, ~f, ~m, ~U or ~u shall be made members of the carbon copies ‘Cc:’ list.
forward-as-attachment (Boolean) Original messages are normally sent as inline text with the forward command, and only the first part of a multipart message is included.  With this setting enabled messages are sent as unmodified MIME ‘message/rfc822’ attachments with all of their parts included.
forward-inject-head, forward-inject-tail The strings to put before and after the text of a message with the forward command, respectively.  The former defaults to ‘-------- Original Message --------\n’.  Special format directives in these strings will be expanded if possible, and if so configured the output will be folded according to quote-fold; for more please refer to quote-inject-head.  Injections will not be performed by forward if the variable forward-as-attachment is set — the COMMAND ESCAPES ~F, ~f, ~M, ~m, ~U, ~u always inject.
from      The address (or a list of addresses) to put into the ‘From:’ field of the message header, quoting RFC 5322: the author(s) of the message, that is, the mailbox(es) of the person(s) or system(s) responsible for the writing of the message.  According to that RFC setting the sender variable is required if from contains more than one address.  [v15 behaviour may differ] Please expect automatic management of the from and sender relationship.  Dependent on the context these addresses are handled as if they were in the list of alternates.
If a file-based MTA is used, then from (or, if that contains multiple addresses, sender) can nonetheless be used as the envelope sender address at the MTA protocol level (the RFC 5321 reverse-path), either via the -r command line option (without argument; see there for more), or by setting r-option-implicit.
If the machine's hostname is not valid at the Internet (for example at a dialup machine), then either this variable or hostname ([v15-compat] a SMTP-based mta adds even more fine- tuning capabilities with smtp-hostname) have to be set: if so the message and MIME part related unique ID fields ‘Message-ID:’ and ‘Content-ID:’ will be created (except when disallowed by message-id-disable or stealthmua).
fullnames (Boolean) Due to historical reasons comments and name parts of email addresses are removed by default when sending mail, replying to or forwarding a message.  If this variable is set such stripping is not performed.
fwdheading [Obsolete] Predecessor of forward-inject-head.
header    (Boolean) Causes the header summary to be written at startup and after commands that affect the number of messages or the order of messages in the current folder.  Unless in posix mode a header summary will also be displayed on folder changes.  The command line option -N can be used to set noheader.
headline  A format string to use for the summary of headers.  Format specifiers in the given string start with a percent sign ‘%’ and may be followed by an optional decimal number indicating the field width — if that is negative, the field is to be left- aligned.  Names and addresses are subject to modifications according to showname and showto.  Valid format specifiers are:
‘%%’      A plain percent sign. ‘%>’      “Dotmark”: a space character but for the current message (“dot”), for which it expands to ‘>’ (dependent on headline-plain). ‘%<’      “Dotmark”: a space character but for the current message (“dot”), for which it expands to ‘<’ (dependent on headline-plain). ‘%$’      [Option] The spam score of the message, as has been classified via the command spamrate.  Shows only a replacement character if there is no spam support. ‘%a’      Message attribute character (status flag); the actual content can be adjusted by setting attrlist. ‘%d’      The date found in the ‘Date:’ header of the message when datefield is set (the default), otherwise the date when the message was received.  Formatting can be controlled by assigning a strftime(3) format string to datefield (and datefield-markout-older). ‘%e’      The indenting level in ‘thread’ed sort mode. ‘%f’      The address of the message sender. ‘%i’      The message thread tree structure.  (Note that this format does not support a field width, and honours headline-plain.) ‘%L’      Mailing list status: is the addressee of the message a known ‘l’ (mlist) or ‘L’ mlsubscribed mailing list? The letter ‘P’ announces the presence of a RFC 2369 ‘List-Post:’ header, which makes a message a valuable target of Lreply. ‘%l’      The number of lines of the message, if available. ‘%m’      Message number. ‘%o’      The number of octets (bytes) in the message, if available. ‘%S’      Message subject (if any) in double quotes. ‘%s’      Message subject (if any). ‘%t’      The position in threaded/sorted order. ‘%U’      The value 0 except in an IMAP mailbox, where it expands to the UID of the message.
The default is ‘%>%a%m %-18f %16d %4l/%-5o %i%-s’, or ‘%>%a%m %20-f  %16d %3l/%-5o %i%-S’ if bsdcompat is set.  Also see attrlist, headline-plain and headline-bidi.
headline-bidi Bidirectional text requires special treatment when displaying headers, because numbers (in dates or for file sizes etc.) will not affect the current text direction, in effect resulting in ugly line layouts when arabic or other right-to-left text is to be displayed.  On the other hand only a minority of terminals is capable to correctly handle direction changes, so that user interaction is necessary for acceptable results.  Note that extended host system support is required nonetheless, e.g., detection of the terminal character set is one precondition; and this feature only works in an Unicode (i.e., UTF-8) locale.
In general setting this variable will cause Mail to encapsulate text fields that may occur when displaying headline (and some other fields, like dynamic expansions in prompt) with special Unicode control sequences; it is possible to fine-tune the terminal support level by assigning a value: no value (or any value other than ‘1’, ‘2’ and ‘3’) will make Mail assume that the terminal is capable to properly deal with Unicode version 6.3, in which case text is embedded in a pair of U+2068 (FIRST STRONG ISOLATE) and U+2069 (POP DIRECTIONAL ISOLATE) characters.  In addition no space on the line is reserved for these characters.
Weaker support is chosen by using the value ‘1’ (Unicode 6.3, but reserve the room of two spaces for writing the control sequences onto the line).  The values ‘2’ and ‘3’ select Unicode 1.1 support (U+200E, LEFT-TO-RIGHT MARK); the latter again reserves room for two spaces in addition.
headline-plain (Boolean) On Unicode (UTF-8) aware terminals enhanced graphical symbols are used by default for certain entries of headline.  If this variable is set only basic US-ASCII symbols will be used.
history-file [Option] The (expandable) location of a permanent history file for the MLE line editor (On terminal control and line editor). Also see history-size.
history-gabby [Option] Add more entries to the MLE history as is normally done. A comma-separated list of case-insensitive strings can be used to fine-tune which gabby entries shall be allowed.  If it contains ‘errors’, erroneous commands will also be added.  ‘all’ adds all optional entries, and is the fallback chattiness identifier of on-history-addition.
history-gabby-persist (Boolean)[Option] The history-gabby entries will not be saved in persistent storage unless this variable is set.  The knowledge of whether a persistent entry was gabby is not lost.  Also see history-file.
history-size [Option] Setting this variable imposes a limit on the number of concurrent history entries.  If set to the value 0 then no further history entries will be added, and loading and incorporation of the history-file upon program startup can also be suppressed by doing this.  Runtime changes will not be reflected before the history is saved or loaded (again).
hold      (Boolean) This setting controls whether messages are held in the system inbox, and it is set by default.
hostname  Used instead of the value obtained from uname(3) and getaddrinfo(3) as the hostname when expanding local addresses, for example in ‘From:’ (also see On sending mail, and non- interactive mode, for expansion of addresses that have a valid user-, but no domain name in angle brackets).  If either of from or this variable is set the message and MIME part related unique ID fields ‘Message-ID:’ and ‘Content-ID:’ will be created (except when disallowed by message-id-disable or stealthmua).  If the [Option]al IDNA support is available (see idna-disable) variable assignment is aborted when a necessary conversion fails.
Setting it to the empty string will cause the normal hostname to be used, but nonetheless enables creation of said ID fields. [v15-compat] in conjunction with the built-in SMTP mta smtp-hostname also influences the results: one should produce some test messages with the desired combination of hostname, and/or from, sender etc. first.
idna-disable (Boolean)[Option] Can be used to turn off the automatic conversion of domain names according to the rules of IDNA (internationalized domain names for applications).  Since the IDNA code assumes that domain names are specified with the ttycharset character set, an UTF-8 locale charset is required to represent all possible international domain names (before conversion, that is).
ifs       The input field separator that is used ([v15 behaviour may differ] by some functions) to determine where to split input data.
1.        Unsetting is treated as assigning the default value, ‘ \t\n’. 2.        If set to the empty value, no field splitting will be performed. 3.        If set to a non-empty value, all whitespace characters are extracted and assigned to the variable ifs-ws.
a.        ifs-ws will be ignored at the beginning and end of input.  Diverging from POSIX shells default whitespace is removed in addition, which is owed to the entirely different line content extraction rules. b.        Each occurrence of a character of ifs will cause field- splitting, any adjacent ifs-ws characters will be skipped.
ifs-ws    (Read-only) Automatically deduced from the whitespace characters in ifs.
ignore    (Boolean) Ignore interrupt signals from the terminal while entering messages; instead echo them as ‘@’ characters and discard the current line.
ignoreeof (Boolean) Ignore end-of-file conditions (‘control-D’) in Compose mode on message input and in interactive command input.  If set an interactive command input session can only be left by explicitly using one of the commands exit and quit, and message input in compose mode can only be terminated by entering a period ‘.’ on a line by itself or by using the ~. COMMAND ESCAPES; Setting this implies the behaviour that dot describes in posix mode.
inbox     If this is set to a non-empty string it will specify the user's primary system mailbox, overriding MAIL and the system-dependent default, and (thus) be used to replace ‘%’ when doing Filename transformations; also see folder for more on this topic.  The value supports a subset of transformations itself.
indentprefix String used by the ~m, ~M and ~R COMMAND ESCAPES and by the quote option for indenting messages, in place of the POSIX mandated default tabulator character ‘\t’.  Also see quote-chars.
keep      (Boolean) If set, an empty primary system mailbox file is not removed.  Note that, in conjunction with posix mode any empty file will be removed unless this variable is set.  This may improve the interoperability with other mail user agents when using a common folder directory, and prevents malicious users from creating fake mailboxes in a world-writable spool directory. [v15 behaviour may differ] Only local regular (MBOX) files are covered, Maildir and other mailbox types will never be removed, even if empty.
keep-content-length (Boolean) When (editing messages and) writing MBOX mailbox files Mail can be told to keep the ‘Content-Length:’ and ‘Lines:’ header fields that some MUAs generate by setting this variable. Since Mail does neither use nor update these non-standardized header fields (which in itself shows one of their conceptual problems), stripping them should increase interoperability in between MUAs that work with with same mailbox files.  Note that, if this is not set but writebackedited, as below, is, a possibly performed automatic stripping of these header fields already marks the message as being modified.  [v15 behaviour may differ] At some future time Mail will be capable to rewrite and apply an mime-encoding to modified messages, and then those fields will be stripped silently.
keepsave  (Boolean) When a message is saved it is usually discarded from the originating folder when Mail is quit.  This setting causes all saved message to be retained.
line-editor-cpl-word-breaks [Option] List of bytes which are used by the mle-complete tabulator completion to decide where word boundaries exist, by default ‘"'@=;|:’ [v15 behaviour may differ] This mechanism is yet restricted.
line-editor-disable (Boolean) Turn off any line editing capabilities (from Mails POW, see On terminal control and line editor for more).
line-editor-no-defaults (Boolean)[Option] Do not establish any default key binding.
log-prefix Error log message prefix string (‘mail: ’).
mailbox-display (Read-only) The name of the current mailbox (folder), possibly abbreviated for display purposes.
mailbox-resolved (Read-only) The fully resolved path of the current mailbox.
mailcap-disable (Boolean)[Option] Turn off consideration of MIME type handlers from, and implicit loading of The Mailcap files.
mailx-extra-rc An additional startup file that is loaded as the last of the Resource files.  Use this file for commands that are not understood by other POSIX mailx(1) implementations, i.e., mostly anything which is not covered by Initial settings.
markanswered (Boolean) When a message is replied to and this variable is set, it is marked as having been answered.  See the section Message states.
mbox-fcc-and-pcc (Boolean) By default all file and pipe message receivers (see expandaddr) will be fed valid MBOX database entry message data (see folder, mbox-rfc4155), and existing file targets will become extended in compliance to RFC 4155.  If this variable is unset then a plain standalone RFC 5322 message will be written, and existing file targets will be overwritten.
mbox-rfc4155 (Boolean) When opening MBOX mailbox databases, and in order to achieve compatibility with old software, the very tolerant POSIX standard rules for detecting message boundaries (so-called ‘From_’ lines) are used instead of the stricter rules from the standard RFC 4155.  This behaviour can be switched by setting this variable.
This may temporarily be handy when Mail complains about invalid ‘From_’ lines when opening a MBOX: in this case setting this variable and re-opening the mailbox in question may correct the result.  If so, copying the entire mailbox to some other file, as in ‘copy * SOME-FILE’, will perform proper, all-compatible ‘From_’ quoting for all detected messages, resulting in a valid MBOX mailbox.  ([v15 behaviour may differ] The better and non- destructive approach is to re-encode invalid messages, as if it would be created anew, instead of mangling the ‘From_’ lines; this requires the structural code changes of the v15 rewrite.) Finally the variable can be unset again:
define mboxfix { localopts yes; wysh set mbox-rfc4155;\ wysh File "${1}"; copy * "${2}" } call mboxfix /tmp/bad.mbox /tmp/good.mbox
memdebug  (Boolean) Internal development variable.  (Keeps memory debug enabled even if debug is not set.)
message-id-disable (Boolean) By setting this variable the generation of ‘Message-ID:’ and ‘Content-ID:’ message and MIME part headers can be completely suppressed, effectively leaving this task up to the mta (Mail-Transfer-Agent) or the SMTP server.  Note that according to RFC 5321 a SMTP server is not required to add this field by itself, so it should be ensured that it accepts messages without ‘Message-ID’.
message-inject-head A string to put at the beginning of each new message, followed by a newline.  [Obsolete] The escape sequences tabulator ‘\t’ and newline ‘\n’ are understood (use the wysh prefix when setting the variable(s) instead).
message-inject-tail A string to put at the end of each new message, followed by a newline.  [Obsolete] The escape sequences tabulator ‘\t’ and newline ‘\n’ are understood (use the wysh prefix when setting the variable(s) instead).  Also see on-compose-leave.
metoo     (Boolean) Usually, when an alias expansion contains the sender, the sender is removed from the expansion.  Setting this option suppresses these removals.  Note that a set metoo also causes a ‘-m’ option to be passed through to the mta (Mail-Transfer- Agent); though most of the modern MTAs no longer document this flag, no MTA is known which does not support it (for historical compatibility).
mime-allow-text-controls (Boolean) When sending messages, each part of the message is MIME-inspected in order to classify the ‘Content-Type:’ and ‘Content-Transfer-Encoding:’ (see mime-encoding) that is required to send this part over mail transport, i.e., a computation rather similar to what the file(1) command produces when used with the ‘--mime’ option.
This classification however treats text files which are encoded in UTF-16 (seen for HTML files) and similar character sets as binary octet-streams, forcefully changing any ‘text/plain’ or ‘text/html’ specification to ‘application/octet-stream’: If that actually happens a yet unset charset MIME parameter is set to ‘binary’, effectively making it impossible for the receiving MUA to automatically interpret the contents of the part.
If this variable is set, and the data was unambiguously identified as text data at first glance (by a ‘.txt’ or ‘.html’ file extension), then the original ‘Content-Type:’ will not be overwritten.
mime-alternative-favour-rich (Boolean) If this variable is set then rich MIME alternative parts (e.g., HTML) will be preferred in favour of included plain text versions when displaying messages, provided that a handler exists which produces output that can be (re)integrated into Mail's normal visual display.
mime-counter-evidence Normally the ‘Content-Type:’ field is used to decide how to handle MIME parts.  Some MUAs, however, do not use The mime.types files (also see HTML mail and MIME attachments) or a similar mechanism to correctly classify content, but specify an unspecific MIME type (‘application/octet-stream’) even for plain text attachments.  If this variable is set then Mail will try to re-classify such MIME message parts, if possible, for example via a possibly existing attachment filename.  A non-empty value may also be given, in which case a number is expected, actually a carrier of bits, best specified as a binary value, like ‘0b1111’.
•   If bit two is set (counting from 1, decimal 2) then the detected mimetype will be carried along with the message and be used for deciding which MIME handler is to be used, for example; when displaying such a MIME part the part-info will indicate the overridden content-type by showing a plus sign ‘+’. •   If bit three is set (decimal 4) then the counter-evidence is always produced and a positive result will be used as the MIME type, even forcefully overriding the parts given MIME type. •   If bit four is set (decimal 8) as a last resort the actual content of ‘application/octet-stream’ parts will be inspected, so that data which looks like plain text can be treated as such.  This mode is even more relaxed when data is to be displayed to the user or used as a message quote (data consumers which mangle data for display purposes, which includes masking of control characters, for example).
mime-encoding The MIME ‘Content-Transfer-Encoding’ to use in outgoing text messages and message parts, where applicable (7-bit clean text messages are without an encoding if possible):
‘8bit’    (Or ‘8b’.)  8-bit transport effectively causes the raw data be passed through unchanged, but may cause problems when transferring mail messages over channels that are not ESMTP (RFC 1869) compliant.  Also, several input data constructs are not allowed by the specifications and may cause a different transfer- encoding to be used.  By established rules and popular demand occurrences of ‘^From_’ (see mbox-rfc4155) will be MBOXO quoted (prefixed with greater-than sign ‘>’) instead of causing a non-destructive encoding like ‘quoted-printable’ to be chosen, unless context (like message signing) requires otherwise. ‘quoted-printable’ (Or ‘qp’.)  Quoted-printable encoding is 7-bit clean and has the property that ASCII characters are passed through unchanged, so that an english message can be read as-is; it is also acceptable for other single-byte locales that share many characters with ASCII, for example ISO-8859-1.  The encoding will cause a large overhead for messages in other character sets: for example it will require up to twelve (12) bytes to encode a single UTF-8 character of four (4) bytes.  It is the default encoding. ‘base64’  (Or ‘b64’.)  This encoding is 7-bit clean and will always be used for binary data.  This encoding has a constant input:output ratio of 3:4, regardless of the character set of the input data it will encode three bytes of input to four bytes of output.  This transfer- encoding is not human readable without performing a decoding step.
mime-force-sendout (Boolean)[Option] Whenever it is not acceptable to fail sending out messages because of non-convertible character content this variable may be set.  It will, as a last resort, classify the part content as ‘application/octet-stream’.  Please refer to the section Character sets for the complete picture of character set conversion in Mail.