neulab/tldr huggingface dataset:
mimetypes-load-control Can be used to control which of The mime.types files are loaded: if the letter ‘u’ is part of the option value, then the user's personal ~/.mime.types file will be loaded (if it exists); likewise the letter ‘s’ controls loading of the system wide /etc/ mime.types; directives found in the user file take precedence, letter matching is case-insensitive.  If this variable is not set Mail will try to load both files.  Incorporation of the Mail-built-in MIME types cannot be suppressed, but they will be matched last (the order can be listed via mimetype).
More sources can be specified by using a different syntax: if the value string contains an equals sign ‘=’ then it is instead parsed as a comma-separated list of the described letters plus ‘f=FILENAME’ pairs; the given filenames will be expanded and loaded, and their content may use the extended syntax that is described in the section The mime.types files.  Directives found in such files always take precedence (are prepended to the MIME type cache).
mta       Select an alternate Mail-Transfer-Agent by either specifying the full pathname of an executable (a ‘file://’ prefix may be given), or [Option]ally a SMTP aka SUBMISSION protocol URL [v15-compat]:
submissions://[user[:password]@]server[:port]
([no v15-compat]: ‘[smtp://]server[:port]’.)  The default has been chosen at compile time.  MTA data transfers are always performed in asynchronous child processes, and without supervision unless either the sendwait or the verbose variable is set.  Also see mta-bcc-ok.  [Option]ally expansion of aliases(5) can be performed by setting mta-aliases.
For testing purposes there is the ‘test’ pseudo-MTA, which dumps to standard output or optionally to a file, and honours mbox-fcc-and-pcc:
$ echo text | mail -:/ -Smta=test -s ubject ex@am.ple $ </dev/null mail -:/ -Smta=test://./xy ex@am.ple
For a file-based MTA it may be necessary to set mta-argv0 in in order to choose the right target of a modern mailwrapper(8) environment.  It will be passed command line arguments from several possible sources: from the variable mta-arguments if set, from the command line if given and the variable expandargv allows their use.  Argument processing of the MTA will be terminated with a -- separator.
The otherwise occurring implicit usage of the following MTA command line arguments can be disabled by setting the boolean variable mta-no-default-arguments (which will also disable passing -- to the MTA): -i (for not treating a line with only a dot ‘.’ character as the end of input), -m (shall the variable metoo be set) and -v (if the verbose variable is set); in conjunction with the -r command line option or r-option-implicit -f as well as possibly -F will (not) be passed.
[Option]ally Mail can send mail over SMTP aka SUBMISSION network connections to a single defined smart host by setting this variable to a SMTP or SUBMISSION URL (see On URL syntax and credential lookup).  An authentication scheme can be specified via the variable chain smtp-auth.  Encrypted network connections are [Option]ally available, the section Encrypted network communication should give an overview and provide links to more information on this.  Note that with some mail providers it may be necessary to set the smtp-hostname variable in order to use a specific combination of from, hostname and mta.  Network communication socket timeouts are configurable via socket-connect-timeout.  All generated network traffic may be proxied over a SOCKS socks-proxy, it can be logged by setting verbose twice.  The following SMTP variants may be used:
•   The plain SMTP protocol (RFC 5321) that normally lives on the server port 25 and requires setting the smtp-use-starttls variable to enter a TLS encrypted session state.  Assign a value like [v15-compat] ‘smtp://[user[:password]@]server[:port]’ ([no v15-compat] ‘smtp://server[:port]’) to choose this protocol.
•   The so-called SMTPS which is supposed to live on server port 465 and is automatically TLS secured.  Unfortunately it never became a standardized protocol and may thus not be supported by your hosts network service database – in fact the port number has already been reassigned to other protocols!
SMTPS is nonetheless a commonly offered protocol and thus can be chosen by assigning a value like [v15-compat] ‘smtps://[user[:password]@]server[:port]’ ([no v15-compat] ‘smtps://server[:port]’); due to the mentioned problems it is usually necessary to explicitly specify the port as ‘:465’, however.
•   The SUBMISSION protocol (RFC 6409) lives on server port 587 and is identically to the SMTP protocol from Mail's point of view; it requires setting smtp-use-starttls to enter a TLS secured session state; e.g., [v15-compat] ‘submission://[user[:password]@]server[:port]’.
•   The SUBMISSIONS protocol (RFC 8314) that lives on server port 465 and is TLS secured by default.  It can be chosen by assigning a value like [v15-compat] ‘submissions://[user[:password]@]server[:port]’.  Due to the problems mentioned for SMTPS above and the fact that SUBMISSIONS is new and a successor that lives on the same port as the historical engineering mismanagement named SMTPS, it is usually necessary to explicitly specify the port as ‘:465’.
mta-aliases [Option] If set to a path pointing to a text file in valid MTA (Postfix) aliases(5) format, the file is loaded and cached (manageable with mtaaliases), and henceforth plain ‘name’ (see expandaddr) message receiver names are recursively expanded as a last expansion step, after the distribution lists which can be created with alias.  Constraints on aliases(5) content support: only local addresses (names) which are valid usernames (‘[a-z_][a-z0-9_-]*[$]?’) are treated as expandable aliases, and [v15 behaviour may differ] ‘:include:/file/name’ directives are not supported.  By including ‘-name’ in expandaddr it can be asserted that only expanded names (mail addresses) are passed through to the MTA.
mta-arguments Arguments to pass through to a file-based mta (Mail-Transfer- Agent), parsed according to Shell-style argument quoting into an array of arguments which will be joined onto MTA options from other sources, for example ‘? wysh set mta-arguments='-t -X "/tmp/my log"'’.
mta-no-default-arguments (Boolean) Avoids passing standard command line options to a file- based mta (please see there).
mta-no-receiver-arguments (Boolean) By default all receiver addresses will be passed as command line options to a file-based mta.  Setting this variable disables this behaviour to aid those MTAs which employ special treatment of such arguments.  Doing so can make it necessary to pass a -t via mta-arguments, to testify the MTA that it should use the passed message as a template.
mta-argv0 Many systems use a so-called mailwrapper(8) environment to ensure compatibility with sendmail(1).  This works by inspecting the name that was used to invoke the mail delivery system.  If this variable is set then the mailwrapper (the program that is actually executed when calling the file-based mta) will treat its contents as that name.
mta-bcc-ok (Boolean) In violation of RFC 5322 some MTAs do not remove ‘Bcc:’ header lines from transported messages after having noted the respective receivers for addressing purposes.  (The MTAs Exim and Courier for example require the command line option -t to enforce removal.)  Unless this is set corresponding receivers are addressed by protocol-specific means or MTA command line options only, the header itself is stripped before being sent over the wire.
netrc-lookup-USER@HOST, netrc-lookup-HOST, netrc-lookup (Boolean)[v15-compat][Option] Used to control usage of the user's ~/.netrc file for lookup of account credentials, as documented in the section On URL syntax and credential lookup and for the command netrc; the section The .netrc file documents the file format.  Also see netrc-pipe.
netrc-pipe [v15-compat][Option] When ~/.netrc is loaded (see netrc and netrc-lookup) then Mail will read the output of a shell pipe instead of the user's ~/.netrc file if this variable is set (to the desired shell command).  This can be used to, for example, store ~/.netrc in encrypted form: ‘? set netrc-pipe='gpg -qd ~/.netrc.pgp'’.
newfolders [Option] If this variable has the value ‘maildir’, newly created local folders will be in Maildir instead of MBOX format.
newmail   Checks for new mail in the current folder each time the prompt is shown.  A Maildir folder must be re-scanned to determine if new mail has arrived.  If this variable is set to the special value ‘nopoll’ then a Maildir folder will not be rescanned completely, but only timestamp changes are detected.  Maildir folders are [Option]al.
outfolder (Boolean) Causes a non-absolute filename specified in record, as well as the sender-based filenames of the Copy, Save, Followup and followup commands to be interpreted relative to the folder directory rather than relative to the current directory.
on-account-cleanup-ACCOUNT, on-account-cleanup Macro hook which will be called once an account is left, as the very last step before unrolling per-account localopts.  This hook is run even in case of fatal errors, including those generated by switching to the account as such, and it is advisable to perform only absolutely necessary actions, like cleaning up alternates, for example.  The specialized form is used in favour of the generic one if found.
on-compose-cleanup Macro hook which will be called after the message has been sent (or not, in case of failures), as the very last step before unrolling compose mode localopts.  This hook is run even in case of fatal errors, and it is advisable to perform only absolutely necessary actions, like cleaning up alternates, for example.
For compose mode hooks that may affect the message content please see on-compose-enter, on-compose-leave, on-compose-splice.  [v15 behaviour may differ] This hook exists because alias, alternates, commandalias, shortcut, to name a few, are neither covered by localopts nor by local: changes applied in compose mode will continue to be in effect thereafter.
on-compose-enter, on-compose-leave Macro hooks which will be called once compose mode is entered, and after composing has been finished, respectively; the exact order of the steps taken is documented for ~., one of the COMMAND ESCAPES.  Context about the message being worked on can be queried via digmsg.  localopts are enabled for these hooks, and changes on variables will be forgotten after the message has been sent.  on-compose-cleanup can be used to perform other necessary cleanup steps.
Here is an example that injects a signature via message-inject-tail; instead using on-compose-splice to simply inject the file of desire via ~< or ~<! may be a better approach.
define t_ocl { vput ! i cat ~/.mysig if $? -eq 0 vput csop message-inject-tail trim-end $i end
# Alternatively readctl create ~/.mysig if $? -eq 0 readall i if $? -eq 0 vput csop message-inject-tail trim-end $i end readctl remove ~/.mysig end } set on-compose-leave=t_ocl
on-compose-splice, on-compose-splice-shell These hooks run once the normal compose mode is finished, but before the on-compose-leave macro hook is called etc.  Both hooks will be executed in a subprocess, with their input and output connected to Mail such that they can act as if they would be an interactive user.  The difference in between them is that the latter is a SHELL command, whereas the former is a normal defined macro, but which is restricted to a small set of commands (the verbose output of for example list will indicate said capability).  localopts are enabled for these hooks (in the parent process), causing any setting to be forgotten after the message has been sent; on-compose-cleanup can be used to perform other cleanup as necessary.
During execution of these hooks Mail will temporarily forget whether it has been started in interactive mode, (a restricted set of) COMMAND ESCAPES will always be available, and for guaranteed reproducibilities sake escape and ifs will be set to their defaults.  The compose mode command ~^ has been especially designed for scriptability (via these hooks).  The first line the hook will read on its standard input is the protocol version of said command escape, currently “0 0 2”: backward incompatible protocol changes have to be expected.
Care must be taken to avoid deadlocks and other false control flow: if both involved processes wait for more input to happen at the same time, or one does not expect more input but the other is stuck waiting for consumption of its output, etc.  There is no automatic synchronization of the hook: it will not be stopped automatically just because it, e.g., emits ‘~x’.  The hooks will however receive a termination signal if the parent enters an error condition.  [v15 behaviour may differ] Protection against and interaction with signals is not yet given; it is likely that in the future these scripts will be placed in an isolated session, which is signalled in its entirety as necessary.
define ocs_signature { read version echo '~< ~/.mysig' # '~<! fortune pathtofortunefile' } set on-compose-splice=ocs_signature
wysh set on-compose-splice-shell=$'\ read version;\ printf "hello $version!  Headers: ";\ echo \'~^header list\';\ read status result;\ echo "status=$status result=$result";\ '
define ocsm { read version echo Splice protocol version is $version echo '~^h l'; read hl; vput csop es subs "${hl}" 0 1 if "$es" != 2 echoerr 'Cannot read header list'; echo '~x'; xit endif if "$hl" !%?case ' cc' echo '~^h i cc "Diet is your <mirr.or>"'; read es;\ vput csop es substring "${es}" 0 1 if "$es" != 2 echoerr 'Cannot insert Cc: header'; echo '~x' # (no xit, macro finishes anyway) endif endif } set on-compose-splice=ocsm
on-history-addition This hook will be called if an entry is about to be added to the history of the MLE, as documented in On terminal control and line editor.  It will be called with three arguments: the first is the name of the input context (see bind), the second is either an empty string or the matching history-gabby type, and the third being the complete command line to be added.  The entry will not be added to history if the hook uses a non-0 return.  [v15 behaviour may differ] A future version will give the expanded command name as the third argument, followed by the tokenized command line as parsed in the remaining arguments, the first of which is the original unexpanded command name; i.e., one may do ‘shift 4’ and will then be able to access the positional parameters as usual via *, #, 1 etc.
on-main-loop-tick This hook will be called whenever the program's main event loop is about to read the next input line.  Note variable and other changes it performs are not scoped as via localopts!
on-program-exit This hook will be called when the program exits, whether via exit or quit, or because the send mode is done.  Note: this runs late and so terminal settings etc. are already teared down.
on-resend-cleanup [v15 behaviour may differ] Identical to on-compose-cleanup, but is only triggered by resend.
on-resend-enter [v15 behaviour may differ] Identical to on-compose-enter, but is only triggered by resend; currently there is no digmsg support, for example.
page      (Boolean) If set, each message feed through the command given for pipe is followed by a formfeed character ‘\f’.
password-USER@HOST, password-HOST, password [v15-compat] Variable chain that sets a password, which is used in case none has been given in the protocol and account-specific URL; as a last resort Mail will ask for a password on the user's terminal if the authentication method requires a password. Specifying passwords in a startup file is generally a security risk; the file should be readable by the invoking user only.
password-USER@HOST [no v15-compat] (see the chain above for [v15-compat]) Set the password for ‘USER’ when connecting to ‘HOST’.  If no such variable is defined for a host, the user will be asked for a password on standard input.  Specifying passwords in a startup file is generally a security risk; the file should be readable by the invoking user only.
piperaw   (Boolean) Send messages to the pipe command without performing MIME and character set conversions.
pipe-TYPE/SUBTYPE When a MIME message part of type ‘TYPE/SUBTYPE’ (case- insensitive) is displayed or quoted, its text is filtered through the value of this variable interpreted as a shell command.  Note that only parts which can be displayed inline as plain text (see copiousoutput) are displayed unless otherwise noted, other MIME parts will only be considered by and for the command mimeview.
The special value question mark ‘?’ forces interpretation of the message part as plain text, for example ‘set pipe-application/xml=?’ will henceforth display XML “as is”. (The same could also be achieved by adding a MIME type marker with the mimetype command.  And [Option]ally MIME type handlers may be defined via The Mailcap files — these directives, copiousoutput has already been used, should be referred to for further documentation.
The question mark ‘?’ can in fact be used as a trigger character to adjust usage and behaviour of a following shell command specification more thoroughly by appending more special characters which refer to further mailcap directives, for example the following hypothetical command specification could be used:
? set pipe-X/Y='?!++=? vim ${MAILX_FILENAME_TEMPORARY}'
‘*’       The command produces plain text to be integrated in Mails output: copiousoutput. ‘#’       If set the handler will not be invoked when a message is to be quoted, but only when it will be displayed: x-mailx-noquote. ‘&’       Run the command asynchronously, i.e., without blocking Mail: x-mailx-async.  The standard output of the command will go to /dev/null. ‘!’       The command must be run on an interactive terminal, Mail will temporarily release the terminal to it: needsterminal. ‘+’       Request creation of a zero-sized temporary file, the absolute pathname of which will be made accessible via the environment variable MAILX_FILENAME_TEMPORARY: x-mailx-tmpfile.  If given twice then the file will be unlinked automatically by Mail when the command loop is entered again at latest: x-mailx-tmpfile-unlink; it is an error to use automatic deletion in conjunction with x-mailx-async. ‘=’       Normally the MIME part content is passed to the handler via standard input; if this flag is set then the data will instead be written into MAILX_FILENAME_TEMPORARY (x-mailx-tmpfile-fill), the creation of which is implied; in order to cause automatic deletion of the temporary file two plus signs ‘++’ still have to be used. ‘?’       To avoid ambiguities with normal shell command content another question mark can be used to forcefully terminate interpretation of remaining characters.  (Any character not in this list will have the same effect.)
Some information about the MIME part to be displayed is embedded into the environment of the shell command:
MAILX_CONTENT            The MIME content-type of the part, if known, the empty string otherwise. MAILX_CONTENT_EVIDENCE   If mime-counter-evidence includes the carry-around-bit (2), then this will be set to the detected MIME content-type; not only then identical to MAILX_CONTENT otherwise. MAILX_EXTERNAL_BODY_URL  MIME parts of type ‘message/external-body access-type=url’ will store the access URL in this variable, it is empty otherwise.  URL targets should not be activated automatically, without supervision. MAILX_FILENAME           The filename, if any is set, the empty string otherwise. MAILX_FILENAME_GENERATED A random string. MAILX_FILENAME_TEMPORARY If temporary file creation has been requested through the command prefix this variable will be set and contain the absolute pathname of the temporary file.
pipe-EXTENSION This is identical to pipe-TYPE/SUBTYPE except that ‘EXTENSION’ (normalized to lowercase using character mappings of the ASCII charset) names a file extension, for example ‘xhtml’.  Handlers registered using this method take precedence.
pop3-auth-USER@HOST, pop3-auth-HOST, pop3-auth [Option][v15-compat] Variable chain that sets the POP3 authentication method.  Supported are the default ‘plain’, [v15-compat] ‘oauthbearer’ (see FAQ entry But, how about XOAUTH2 / OAUTHBEARER?), as well as [v15-compat] ‘external’ and ‘externanon’ for TLS secured connections which pass a client certificate via tls-config-pairs.  There may be the [Option]al method [v15-compat] ‘gssapi’.  ‘externanon’ does not need any user credentials, ‘external’ and ‘gssapi’ need a user, the remains also require a password.  ‘externanon’ solely builds upon the credentials passed via a client certificate, and is usually the way to go since tested servers do not actually follow RFC 4422, and fail if additional credentials are actually passed. Unless pop3-no-apop is set the ‘plain’ method will [Option]ally be replaced with APOP if possible (see there).
pop3-bulk-load-USER@HOST, pop3-bulk-load-HOST, pop3-bulk-load (Boolean)[Option] When accessing a POP3 server Mail loads the headers of the messages, and only requests the message bodies on user request.  For the POP3 protocol this means that the message headers will be downloaded twice.  If this variable is set then Mail will download only complete messages from the given POP3 server(s) instead.
pop3-keepalive-USER@HOST, pop3-keepalive-HOST, pop3-keepalive [Option] POP3 servers close the connection after a period of inactivity; the standard requires this to be at least 10 minutes, but practical experience may vary.  Setting this variable to a numeric value greater than ‘0’ causes a ‘NOOP’ command to be sent each value seconds if no other operation is performed.
pop3-no-apop-USER@HOST, pop3-no-apop-HOST, pop3-no-apop (Boolean)[Option] Unless this variable is set the MD5 based ‘APOP’ authentication method will be used instead of a chosen ‘plain’ pop3-auth when connecting to a POP3 server that advertises support.  The advantage of ‘APOP’ is that only a single packet is sent for the user/password tuple.  (Originally also that the password is not sent in clear text over the wire, but for one MD5 does not any longer offer sufficient security, and then today transport is almost ever TLS secured.)  Note that pop3-no-apop-HOST requires [v15-compat].
pop3-use-starttls-USER@HOST, pop3-use-starttls-HOST, pop3-use-starttls (Boolean)[Option] Causes Mail to issue a ‘STLS’ command to make an unencrypted POP3 session TLS encrypted.  This functionality is not supported by all servers, and is not used if the session is already encrypted by the POP3S method.  Note that pop3-use-starttls-HOST requires [v15-compat].
posix     (Boolean) This flag enables POSIX mode, which changes behaviour of Mail where that deviates from standardized behaviour.  It is automatically squared with the environment variable POSIXLY_CORRECT, changing the one will adjust the other.  The following behaviour is covered and enforced by this mechanism:
•   In non-interactive mode, any error encountered while loading resource files during program startup will cause a program exit, whereas in interactive mode such errors will stop loading of the currently loaded (stack of) file(s, i.e., recursively).  These exits can be circumvented on a per- command base by using ignerr, one of the Command modifiers, for each command which shall be allowed to fail. •   alternates will replace the list of alternate addresses instead of appending to it.  In addition alternates will only be honoured for any sort of message reply, and for aliases. •   The variable inserting COMMAND ESCAPES ~A, ~a, ~I and ~i will expand embedded character sequences ‘\t’ horizontal tabulator and ‘\n’ line feed.  [v15 behaviour may differ] For compatibility reasons this step will always be performed. •   Reading in messages via ~f (COMMAND ESCAPES) will use the ‘type’ not the ‘forward’ headerpick selection. •   Upon changing the active folder no summary of headers will be displayed even if header is set. •   Setting ignoreeof implies the behaviour described by dot. •   The variable keep is extended to cover any empty mailbox, not only empty primary system mailboxes: they will be removed when they are left in empty state otherwise.
print-alternatives (Boolean) When a MIME message part of type ‘multipart/alternative’ is displayed and it contains a subpart of type ‘text/plain’, other parts are normally discarded.  Setting this variable causes all subparts to be displayed, just as if the surrounding part was of type ‘multipart/mixed’.
prompt    The string used as a prompt in interactive mode.  Whenever the variable is evaluated the value is treated as if specified within dollar-single-quotes (see Shell-style argument quoting).  This (post-assignment, i.e., second) expansion can be used to embed status information, for example ?, !, account or mailbox-display.
In order to embed characters which should not be counted when calculating the visual width of the resulting string, enclose the characters of interest in a pair of reverse solidus escaped brackets: ‘\[\E[0m\]’; a slot for coloured prompts is also available with the [Option]al command colour.  Prompting may be prevented by setting this to the null string (aka ‘set noprompt’).
prompt2   This string is used for secondary prompts, but is otherwise identical to prompt.  The default is ‘.. ’.
quiet     (Boolean) Suppresses the printing of the version when first invoked.
quote     If set messages processed by variants of followup and reply will start with the original message, lines of which prefixed by indentprefix, taking into account quote-chars and quote-fold.  No headers will be quoted when set without value or for ‘noheading’, for ‘headers’ the ‘type’ headerpick selection will be included in the quote, ‘allbodies’ embeds the (body) contents of all MIME parts, and ‘allheaders’ also includes all headers.  The quoted message will be enclosed by the expansions of quote-inject-head and quote-inject-tail.  Also see quote-add-cc, quote-as-attachment and ~Q, one of the COMMAND ESCAPES.
quote-add-cc (Boolean) Whether senders of messages quoted via ~Q shall be made members of the carbon copies ‘Cc:’ list.
quote-as-attachment (Boolean) Add the original message in its entirety as a ‘message/rfc822’ MIME attachment when replying to a message. Note this works regardless of the setting of quote.
quote-chars Can be set to a string consisting of non-whitespace ASCII characters which shall be treated as quotation leaders, the default being ‘>|}:’.
quote-fold [Option] Can be set in addition to indentprefix, and creates a more fancy quotation in that leading quotation characters (quote-chars) are compressed and overlong lines are folded. quote-fold can be set to either one, two or three (space separated) numeric values, which are interpreted as the maximum (goal) and the minimum line length, respectively, in a spirit rather equal to the fmt(1) program, but line- instead of paragraph-based.  The third value is used as the maximum line length instead of the first if no better break point can be found; it is ignored unless it is larger than the minimum and smaller than the maximum.  If not set explicitly the minimum will reflect the goal algorithmically.  The goal cannot be smaller than the length of indentprefix plus some additional pad; necessary adjustments take place silently.
quote-inject-head, quote-inject-tail The strings to put before and after the text of a quoted message, if non-empty, and respectively.  The former defaults to ‘%f wrote:\n\n’.  Special format directives will be expanded if possible, and if so configured the output will be folded according to quote-fold.  Format specifiers in the given strings start with a percent sign ‘%’ and expand values of the original message, unless noted otherwise.  Note that names and addresses are not subject to the setting of showto.  Valid format specifiers are:
‘%%’      A plain percent sign. ‘%a’      The address(es) of the sender(s). ‘%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). ‘%f’      The full name(s) (name and address, as given) of the sender(s). ‘%i’      The ‘Message-ID:’. ‘%n’      The real name(s) of the sender(s) if there is one and showname allows usage, the address(es) otherwise. ‘%r’      The senders real name(s) if there is one, the address(es) otherwise.
r-option-implicit (Boolean) Setting this option evaluates the contents of from (or, if that contains multiple addresses, sender) and passes the results onto the used (file-based) MTA as described for the -r option (empty argument case).
recipients-in-cc (Boolean) When doing a reply, the original ‘From:’ and ‘To:’ as well as addressees which possibly came in via ‘Reply-To:’ and ‘Mail-Followup-To:’ are by default merged into the new ‘To:’.  If this variable is set a sensitive algorithm tries to place in ‘To:’ only the sender of the message being replied to, others are placed in ‘Cc:’.
record    Unless this variable is defined, no copies of outgoing mail will be saved.  If defined it gives the pathname, subject to the usual Filename transformations, of a folder where all new, replied-to or forwarded messages are saved: when saving to this folder fails the message is not sent, but instead saved to DEAD.  The standard defines that relative (fully expanded) paths are to be interpreted relative to the current directory (cwd), to force interpretation relative to folder outfolder needs to be set in addition.
record-files (Boolean) If this variable is set the meaning of record will be extended to cover messages which target only file and pipe recipients (see expandaddr).  These address types will not appear in recipient lists unless add-file-recipients is also set.
record-resent (Boolean) If this variable is set the meaning of record will be extended to also cover the resend and Resend commands.
reply-in-same-charset (Boolean) If this variable is set Mail first tries to use the same character set of the original message for replies.  If this fails, the mechanism described in Character sets is evaluated as usual.
reply-strings Can be set to a comma-separated list of (case-insensitive according to ASCII rules) strings which shall be recognized in addition to the built-in strings as ‘Subject:’ reply message indicators – built-in are ‘Re:’, which is mandated by RFC 5322, as well as the german ‘Aw:’, ‘Antw:’, and the ‘Wg:’ which often has been seen in the wild; I.e., the separating colon has to be specified explicitly.
reply-to  A list of addresses to put into the ‘Reply-To:’ field of the message header.  Members of this list are handled as if they were in the alternates list.
replyto   [Obsolete] Variant of reply-to.
reply-to-honour Controls whether a ‘Reply-To:’ header is honoured when replying to a message via reply or Lreply.  This is a quadoption; if set without a value it defaults to “yes”.
reply-to-swap-in Standards like DKIM and (in conjunction with) DMARC caused many Mailing lists to use sender address rewriting in the style of ‘Name via List <list@address>’, where the original sender address often being placed in ‘Reply-To:’.  If this is set and a ‘Reply-To:’ exists, and consists of only one addressee (!), then that is used in place of the pretended sender.  This works independently from reply-to-honour.  The optional value, a comma- separated list of strings, offers more fine-grained control on when swapping shall be used; for now supported is mlist, here swapping occurs if the sender is a mailing-list as defined by mlist.
rfc822-body-from_ (Boolean) This variable can be used to force displaying a so- called ‘From_’ line for messages that are embedded into an envelope mail via the ‘message/rfc822’ MIME mechanism, for more visual convenience, also see mbox-rfc4155.
save      (Boolean) Enable saving of (partial) messages in DEAD upon interrupt or delivery error.
screen    The number of lines that represents a “screenful” of lines, used in headers summary display, from searching, message topline display and scrolling via z.  If this variable is not set Mail falls back to a calculation based upon the detected terminal window size and the baud rate: the faster the terminal, the more will be shown.  Overall screen dimensions and pager usage is influenced by the environment variables COLUMNS and LINES and the variable crt.
searchheaders (Boolean) Expand message list specifiers in the form ‘/x:y’ to all messages containing the substring “y” in the header field ‘x’.  The string search is case insensitive.
sendcharsets [Option] A comma-separated list of character set names that can be used in outgoing internet mail.  The value of the variable charset-8bit is automatically appended to this list of character sets.  If no character set conversion capabilities are compiled into Mail then the only supported charset is ttycharset.  Also see sendcharsets-else-ttycharset and refer to the section Character sets for the complete picture of character set conversion in Mail.
sendcharsets-else-ttycharset (Boolean)[Option] If this variable is set, but sendcharsets is not, then Mail acts as if sendcharsets had been set to the value of the variable ttycharset.  In effect this combination passes through the message data in the character set of the current locale encoding: therefore mail message text will be (assumed to be) in ISO-8859-1 encoding when send from within a ISO-8859-1 locale, and in UTF-8 encoding when send from within an UTF-8 locale.
The 8-bit fallback charset-8bit never comes into play as ttycharset is implicitly assumed to be 8-bit and capable to represent all files the user may specify (as is the case when no character set conversion support is available in Mail and the only supported character set is ttycharset, see Character sets). This might be a problem for scripts which use the suggested ‘LC_ALL=C’ setting, since in this case the character set is US- ASCII by definition, so that it is better to also override ttycharset, then; and/or do something like the following in the resource file:
# Avoid ASCII "propagates to 8-bit" when scripting \if ! t && "$LC_ALL" != C && "$LC_CTYPE" != C \set sendcharsets-else-ttycharset \end
sender    An address that is put into the ‘Sender:’ field of outgoing messages, quoting RFC 5322: the mailbox of the agent responsible for the actual transmission of the message.  This field should normally not be used unless the from field contains more than one address, on which case it is required.  [v15 behaviour may differ] Please expect automatic management of the from and sender relationship.  Dependent on the context this address is handled as if it were in the list of alternates.  Also see -r, r-option-implicit.
sendmail  [Obsolete] Predecessor of mta.
sendmail-arguments [Obsolete] Predecessor of mta-arguments.
sendmail-no-default-arguments [Obsolete](Boolean) Predecessor of mta-no-default-arguments.
sendmail-progname [Obsolete] Predecessor of mta-argv0.
sendwait  Sending messages to the chosen mta or to command-pipe receivers (see On sending mail, and non-interactive mode) will be performed asynchronously.  This means that only startup errors of the respective program will be recognizable, but no delivery errors. Also, no guarantees can be made as to when the respective program will actually run, as well as to when they will have produced output.
If this variable is set then child program exit is waited for, and its exit status code is used to decide about success. Remarks: in conflict with the POSIX standard this variable is built-in to be initially set.  Another difference is that it can have a value, which is interpreted as a comma-separated list of case-insensitive strings naming specific subsystems for which synchronousness shall be ensured (only).  Possible values are ‘mta’ for mta delivery, and ‘pcc’ for command-pipe receivers.
showlast  (Boolean) This setting causes Mail to start at the last message instead of the first one when opening a mail folder, as well as with from and headers.
showname  (Boolean) Causes Mail to use the sender's real name instead of the plain address in the header field summary and in message specifications.
showto    (Boolean) Causes the recipient of the message to be shown in the header summary if the message was sent by the user.
Sign      The value backing ~A, one of the COMMAND ESCAPES.  Also see message-inject-tail, on-compose-leave and on-compose-splice.
sign      The value backing ~a, one of the COMMAND ESCAPES.  Also see message-inject-tail, on-compose-leave and on-compose-splice.
signature [Obsolete] Please use on-compose-splice or on-compose-splice-shell or on-compose-leave and (if necessary) message-inject-tail instead!
skipemptybody (Boolean) If an outgoing message has an empty first or only message part, do not send, but discard it, successfully (also see the command line option -E).
smime-ca-dir, smime-ca-file [Option] Specify the location of trusted CA certificates in PEM (Privacy Enhanced Mail) for the purpose of verification of S/MIME signed messages.  tls-ca-dir documents the necessary preparation steps to use the former.  The set of CA certificates which are built into the TLS library can be explicitly turned off by setting smime-ca-no-defaults, and further fine-tuning is possible via smime-ca-flags.
smime-ca-flags [Option] Can be used to fine-tune behaviour of the X509 CA certificate storage, and the certificate verification that is used.  The actual values and their meanings are documented for tls-ca-flags.
smime-ca-no-defaults (Boolean)[Option] Do not load the default CA locations that are built into the used to TLS library to verify S/MIME signed messages.
smime-cipher-USER@HOST, smime-cipher [Option] Specifies the cipher to use when generating S/MIME encrypted messages (for the specified account).  RFC 5751 mandates a default of ‘aes128’ (AES-128 CBC).  Possible values are (case-insensitive and) in decreasing cipher strength: ‘aes256’ (AES-256 CBC), ‘aes192’ (AES-192 CBC), ‘aes128’ (AES-128 CBC), ‘des3’ (DES EDE3 CBC, 168 bits; default if ‘aes128’ is not available) and ‘des’ (DES CBC, 56 bits).
The actually available cipher algorithms depend on the cryptographic library that Mail uses.  [Option] Support for more cipher algorithms may be available through dynamic loading via EVP_get_cipherbyname(3) (OpenSSL) if Mail has been compiled to support this.
smime-crl-dir [Option] Specifies a directory that contains files with CRLs in PEM format to use when verifying S/MIME messages.
smime-crl-file [Option] Specifies a file that contains a CRL in PEM format to use when verifying S/MIME messages.
smime-encrypt-USER@HOST [Option] If this variable is set, messages send to the given receiver are encrypted before sending.  The value of the variable must be set to the name of a file that contains a certificate in PEM format.
If a message is sent to multiple recipients, each of them for whom a corresponding variable is set will receive an individually encrypted message; other recipients will continue to receive the message in plain text unless the smime-force-encryption variable is set.  It is recommended to sign encrypted messages, i.e., to also set the smime-sign variable. content-description-smime-message will be inspected for messages which become encrypted.
smime-force-encryption (Boolean)[Option] Causes Mail to refuse sending unencrypted messages.
smime-sign (Boolean)[Option] S/MIME sign outgoing messages with the user's (from) private key and include the users certificate as a MIME attachment.  Signing a message enables a recipient to verify that the sender used a valid certificate, that the email addresses in the certificate match those in the message header and that the message content has not been altered.  It does not change the message text, and people will be able to read the message as usual.  content-description-smime-signature will be inspected. Also see smime-sign-cert, smime-sign-include-certs and smime-sign-digest.
smime-sign-cert-USER@HOST, smime-sign-cert [Option] Points to a file in PEM format.  For the purpose of signing and decryption this file needs to contain the user's private key, followed by his certificate.
For message signing ‘USER@HOST’ is always derived from the value of from (or, if that contains multiple addresses, sender).  For the purpose of encryption the recipients public encryption key (certificate) is expected; the command certsave can be used to save certificates of signed messages (the section Signed and encrypted messages with S/MIME gives some details).  This mode of operation is usually driven by the specialized form.
When decrypting messages the account is derived from the recipient fields (‘To:’ and ‘Cc:’) of the message, which are searched for addresses for which such a variable is set.  Mail always uses the first address that matches, so if the same message is sent to more than one of the user addresses using different encryption keys, decryption might fail.
Password-encrypted keys may be used for signing and decryption. Automated password lookup is possible via the “pseudo-hosts” ‘USER@HOST.smime-cert-key’ for the private key, and ‘USER@HOST.smime-cert-cert’ for the certificate stored in the same file.  For example, the hypothetical address ‘bob@exam.ple’ could be driven with a private key / certificate pair path defined in smime-sign-cert-bob@exam.ple, and the needed passwords would then be looked up as ‘bob@exam.ple.smime-cert-key’ and ‘bob@exam.ple.smime-cert-cert’.  When decrypting the value of from will be tried as a fallback to provide the necessary ‘USER@HOST’.  To include intermediate certificates, use smime-sign-include-certs.  The possible password sources are documented in On URL syntax and credential lookup.
smime-sign-digest-USER@HOST, smime-sign-digest [Option] Specifies the message digest to use when signing S/MIME messages.  Please remember that for this use case ‘USER@HOST’ refers to the variable from (or, if that contains multiple addresses, sender).  The available algorithms depend on the used cryptographic library, but at least one usable built-in algorithm is ensured as a default.  If possible the standard RFC 5751 will be violated by using ‘SHA512’ instead of the mandated ‘SHA1’ due to security concerns.  This variable is ignored for very old (released before 2010) cryptographic libraries which do not offer the necessary interface: it will be logged if that happened.
Mail will try to add built-in support for the following message digests, names are case-insensitive: ‘BLAKE2b512’, ‘BLAKE2s256’, ‘SHA3-512’, ‘SHA3-384’, ‘SHA3-256’, ‘SHA3-224’, as well as the widely available ‘SHA512’, ‘SHA384’, ‘SHA256’, ‘SHA224’, and the proposed insecure ‘SHA1’, finally ‘MD5’.  More digests may [Option]ally be available through dynamic loading via the OpenSSL function EVP_get_digestbyname(3).
smime-sign-include-certs-USER@HOST, smime-sign-include-certs [Option] If used, this is supposed to a consist of a comma- separated list of files, each of which containing a single certificate in PEM format to be included in the S/MIME message in addition to the smime-sign-cert certificate.  This can be used to include intermediate certificates of the certificate authority, in order to allow the receiver's S/MIME implementation to perform a verification of the entire certificate chain, starting from a local root certificate, over the intermediate certificates, down to the smime-sign-cert.  Even though top level certificates may also be included in the chain, they will not be used for the verification on the receiver's side.
For the purpose of the mechanisms involved here, ‘USER@HOST’ refers to the content of the internal variable from (or, if that contains multiple addresses, sender).  The pseudo-host ‘USER@HOST.smime-include-certs’ will be used for performing password lookups for these certificates, shall they have been given one, therefore the lookup can be automated via the mechanisms described in On URL syntax and credential lookup.
smime-sign-message-digest-USER@HOST, smime-sign-message-digest [Obsolete][Option] Predecessor(s) of smime-sign-digest.
smtp      [Obsolete][Option] To use the built-in SMTP transport, specify a SMTP URL in mta.  [v15 behaviour may differ] For compatibility reasons a set smtp is used in preference of mta.
smtp-auth-USER@HOST, smtp-auth-HOST, smtp-auth [Option] Variable chain that controls the SMTP mta authentication method, possible values are ‘none’ ([no v15-compat] default), ‘plain’ ([v15-compat] default), ‘login’, [v15-compat] ‘oauthbearer’ (see FAQ entry But, how about XOAUTH2 / OAUTHBEARER?) as well as [v15-compat] ‘external’ and ‘externanon’ for TLS secured connections which pass a client certificate via tls-config-pairs.  There may be the [Option]al methods ‘cram-md5’ and ‘gssapi’.  ‘none’ and ‘externanon’ do not need any user credentials, ‘external’ and ‘gssapi’ require a user name, and all other methods require a user name and a password.  ‘externanon’ solely builds upon the credentials passed via a client certificate, and is usually the way to go since tested servers do not actually follow RFC 4422 aka RFC 4954, and fail if additional credentials are passed.  Also see mta.  Note that smtp-auth-HOST is [v15-compat].  ([no v15-compat] Requires smtp-auth-password and smtp-auth-user.  Note for smtp-auth-USER@HOST: may override dependent on sender address in the variable from.)
smtp-auth-password [Option][no v15-compat] Sets the global fallback password for SMTP authentication.  If the authentication method requires a password, but neither smtp-auth-password nor a matching smtp-auth-password-USER@HOST can be found, Mail will ask for a password on the user's terminal.
smtp-auth-password-USER@HOST [no v15-compat] Overrides smtp-auth-password for specific values of sender addresses, dependent upon the variable from.
smtp-auth-user [Option][no v15-compat] Sets the global fallback user name for SMTP authentication.  If the authentication method requires a user name, but neither smtp-auth-user nor a matching smtp-auth-user-USER@HOST can be found, Mail will ask for a user name on the user's terminal.
smtp-auth-user-USER@HOST [no v15-compat] Overrides smtp-auth-user for specific values of sender addresses, dependent upon the variable from.
smtp-hostname [Option][v15-compat] Normally Mail uses the variable from to derive the necessary ‘USER@HOST’ information in order to issue a ‘MAIL FROM:<>’ SMTP mta command.  Setting smtp-hostname can be used to use the ‘USER’ from the SMTP account (mta or the user variable chain) and the given ‘HOST’ (hostname if the empty string is given, or the local hostname as a last resort).  This often allows using an address that is itself valid but hosted by a provider other than from which (in from) the message is sent. Setting this variable also influences generated ‘Message-ID:’ and ‘Content-ID:’ header fields.  If the [Option]al IDNA support is available (see idna-disable) variable assignment is aborted when a necessary conversion fails.
smtp-use-starttls-USER@HOST, smtp-use-starttls-HOST, smtp-use-starttls (Boolean)[Option] Causes Mail to issue a ‘STARTTLS’ command to make an SMTP mta session TLS encrypted, i.e., to enable transport layer security.
socket-connect-timeout [Option] A positive number that defines the timeout to wait for establishing a socket connection before forcing ^ERR-TIMEDOUT.
socks-proxy-USER@HOST, socks-proxy-HOST, socks-proxy [Option] If set to the URL of a SOCKS5 server then all network activities are proxied through it, except for the single DNS name lookup necessary to resolve the proxy URL (unnecessary when given an already resolved IP address).  It is automatically squared with the environment variable SOCKS5_PROXY, changing the one will adjust the other.  This example creates a local SOCKS5 proxy on port 10000 that forwards to the machine ‘HOST’ (with identity ‘USER’), and from which actual network traffic happens:
$ ssh -D 10000 USER@HOST $ mail -Ssocks-proxy=[socks5://]localhost:10000 # or =localhost:10000; no local DNS: =127.0.0.1:10000
spam-interface [Option] In order to use any of the spam-related commands (like spamrate) the desired spam interface must be defined by setting this variable.  Please refer to the manual section Handling spam for the complete picture of spam handling in Mail.  All or none of the following interfaces may be available: