1 .\"@ nail.1 - S-nail(1) reference manual.
3 .\" Copyright (c) 2000-2008 Gunnar Ritter, Freiburg i. Br., Germany.
4 .\" Copyright (c) 2012 - 2017 Steffen (Daode) Nurpmeso <steffen@sdaoden.eu>.
6 .\" Copyright (c) 1980, 1990, 1993
7 .\" The Regents of the University of California. All rights reserved.
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
12 .\" 1. Redistributions of source code must retain the above copyright
13 .\" notice, this list of conditions and the following disclaimer.
14 .\" 2. Redistributions in binary form must reproduce the above copyright
15 .\" notice, this list of conditions and the following disclaimer in the
16 .\" documentation and/or other materials provided with the distribution.
17 .\" 3. Neither the name of the University nor the names of its contributors
18 .\" may be used to endorse or promote products derived from this software
19 .\" without specific prior written permission.
21 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 .\"@ S-nail(1): v14.9.0 / 2017-07-16
46 .\" If not ~/.mailrc, it breaks POSIX compatibility. And adjust main.c.
51 .ds OU [no v15-compat]
52 .ds ID [v15 behaviour may differ]
53 .ds NQ [Only new quoting rules]
64 .Nd send and receive Internet mail
70 .\" Keep in SYNC: ./nail.1:"SYNOPSIS, main()
79 .Op : Ns Fl a Ar attachment Ns \&:
80 .Op : Ns Fl b Ar bcc-addr Ns \&:
81 .Op : Ns Fl c Ar cc-addr Ns \&:
82 .Op Fl M Ar type | Fl m Ar file | Fl q Ar file | Fl t
85 .Fl S Ar var Ns Op Ns = Ns Ar value Ns
88 .Op : Ns Fl X Ar cmd Ns \&:
90 .Pf : Ar to-addr Ns \&:
91 .Op Fl Fl \~ Ns : Ns Ar mta-option Ns \&:
100 .Op Fl r Ar from-addr
102 .Fl S Ar var Ns Op Ns = Ns Ar value Ns
105 .Op : Ns Fl X Ar cmd Ns \&:
106 .Op Fl Fl \~ Ns : Ns Ar mta-option Ns \&:
115 .Op Fl r Ar from-addr
117 .Fl S Ar var Ns Op Ns = Ns Ar value Ns
119 .Op : Ns Fl X Ar cmd Ns \&:
121 .Op Fl Fl \~ Ns : Ns Ar mta-option Ns \&:
127 .Mx -toc -tree html pdf ps xhtml
130 .\" .Sh DESCRIPTION {{{
133 .Bd -filled -compact -offset indent
134 .Sy Compatibility note:
135 S-nail (\*(UA) will wrap up into \%S-mailx in v15.0 (circa 2019).
136 Backward incompatibility has to be expected \(en
139 .Sx "Shell-style argument quoting"
140 rules, for example, and shell metacharacters will become meaningful.
141 New and old behaviour is flagged \*(IN and \*(OU, and setting
144 .Sx "INTERNAL VARIABLES" ,
145 will choose new behaviour when applicable.
146 \*(OB flags what will vanish, and enabling
150 enables obsoletion warnings.
154 \*(UA provides a simple and friendly environment for sending and
156 It is intended to provide the functionality of the POSIX
158 command, but is MIME capable and optionally offers extensions for
159 line editing, S/MIME, SMTP and POP3, among others.
160 \*(UA divides incoming mail into its constituent messages and allows
161 the user to deal with them in any order.
165 .Sx "INTERNAL VARIABLES"
166 for manipulating messages and sending mail.
167 It provides the user simple editing capabilities to ease the composition
168 of outgoing messages, and increasingly powerful and reliable
169 non-interactive scripting capabilities.
171 .\" .Ss "Options" {{{
174 .Bl -tag -width ".It Fl BaNg"
177 Explicitly control which of the
179 shall be loaded: if the letter
181 is (case-insensitively) part of the
185 is loaded, likewise the letter
187 controls loading of the user's personal
189 file, whereas the letters
193 explicitly forbid loading of any resource files.
194 This option should be used by scripts: to avoid environmental noise they
197 from any configuration files and create a script-local environment,
198 explicitly setting any of the desired
199 .Sx "INTERNAL VARIABLES"
202 This option overrides
209 command for the given user email
211 after program startup is complete (all resource files are loaded, any
213 setting is being established; only
215 commands have not been evaluated yet).
216 Being a special incarnation of
218 macros for the purpose of bundling longer-lived
220 tings, activating such an email account also switches to the accounts
222 .Sx "primary system mailbox"
227 .It Fl a Ar file Ns Op Ar =input-charset Ns Op Ar #output-charset
230 to the message (for compose mode opportunities refer to
234 .Sx "Filename transformations"
237 will be performed, but shell word expansion is restricted to the tilde
241 not be accessible but contain a
243 character, then anything before the
245 will be used as the filename, anything thereafter as a character set
248 If an input character set is specified,
249 .Mx -ix "character set specification"
250 but no output character set, then the given input character set is fixed
251 as-is, and no conversion will be applied;
252 giving the empty string or the special string hyphen-minus
254 will be treated as if
256 has been specified (the default).
258 If an output character set has also been given then the conversion will
259 be performed exactly as specified and on-the-fly, not considering the
260 file's type and content.
261 As an exception, if the output character set is specified as the empty
262 string or hyphen-minus
264 then the default conversion algorithm (see
265 .Sx "Character sets" )
266 is applied (therefore no conversion is performed on-the-fly,
268 will be MIME-classified and its contents will be inspected first) \(em
269 without support for character set conversions
271 does not include the term
273 only this argument is supported.
276 (\*(OB: \*(UA will always use line-buffered output, to gain
277 line-buffered input even in batch mode enable batch mode via
282 Send a blind carbon copy to
289 .Sx "INTERNAL VARIABLES" ,
291 The option may be used multiple times.
293 .Sx "On sending mail, and non-interactive mode" .
297 Send carbon copies to the given receiver, if so allowed by
299 May be used multiple times.
304 the internal variable
306 which enables debug messages and disables message delivery,
307 among others; effectively turns almost any operation into a dry-run.
313 and thus discard messages with an empty message part body.
314 This command line option is \*(OB.
318 Just check if mail is present (in the system
320 or the one specified via
322 if yes, return an exit status of zero, a non-zero value otherwise.
323 To restrict the set of mails to consider in this evaluation a message
324 specification can be added with the option
329 Save the message to send in a file named after the local part of the
330 first recipient's address (instead of in
335 Read in the contents of the user's
337 .Sx "secondary mailbox"
339 (or the specified file) for processing;
340 when \*(UA is quit, it writes undeleted messages back to this file
346 argument will undergo some special
347 .Sx "Filename transformations"
352 is not an argument to the flag
354 but is instead taken from the command line after option processing has
358 that starts with a hyphen-minus, prefix with a relative path, as in
359 .Ql ./-hyphenbox.mbox .
365 and exit; a configurable summary view is available via the
371 Show a short usage summary.
377 to ignore tty interrupt signals.
383 of all messages that match the given
387 .Sx "Specifying messages"
392 option has been given in addition no header summary is produced,
393 but \*(UA will instead indicate via its exit status whether
399 note that any verbose output is suppressed in this mode and must instead
400 be enabled explicitly (e.g., by using the option
405 Special send mode that will flag standard input with the MIME
409 and use it as the main message body.
410 \*(ID Using this option will bypass processing of
411 .Va message-inject-head ,
414 .Va message-inject-tail .
420 Special send mode that will MIME classify the specified
422 and use it as the main message body.
423 \*(ID Using this option will bypass processing of
424 .Va message-inject-head ,
427 .Va message-inject-tail .
433 inhibit the initial display of message headers when reading mail or
438 for the internal variable
443 Standard flag that inhibits reading the system wide
448 allows more control over the startup sequence; also see
449 .Sx "Resource files" .
453 Special send mode that will initialize the message body with the
454 contents of the specified
456 which may be standard input
458 only in non-interactive context.
466 opened will be in read-only mode.
470 .It Fl r Ar from-addr
471 Whereas the source address that appears in the
473 header of a message (or in the
475 header if the former contains multiple addresses) is honoured by the
476 builtin SMTP transport, it is not used by a file-based
478 (Mail-Transfer-Agent) for the RFC 5321 reverse-path used for relaying
479 and delegating a message to its destination(s), for delivery errors
480 etc., but it instead uses the local identity of the initiating user.
483 When this command line option is used the given
485 will be assigned to the internal variable
487 but in addition the command line option
488 .Fl \&\&f Ar from-addr
489 will be passed to a file-based
491 whenever a message is sent.
494 include a user name the address components will be separated and
495 the name part will be passed to a file-based
501 If an empty string is passed as
503 then the content of the variable
505 (or, if that contains multiple addresses,
507 will be evaluated and used for this purpose whenever the file-based
516 command line options are used when contacting a file-based MTA, unless
517 this automatic deduction is enforced by
519 ing the internal variable
520 .Va r-option-implicit .
523 Remarks: many default installations and sites disallow overriding the
524 local user identity like this unless either the MTA has been configured
525 accordingly or the user is member of a group with special privileges.
529 .It Fl S Ar var Ns Op = Ns value
533 iable and, in case of a non-boolean variable which has a value, assign
537 .Sx "INTERNAL VARIABLES"
541 may be overwritten from within resource files,
542 the command line setting will be reestablished after all resource files
544 (\*(ID In the future such a setting may instead become
546 until the startup is complete.)
550 Specify the subject of the message to be sent.
551 Newline (NL) and carriage-return (CR) bytes are invalid and will be
552 normalized to space (SP) characters.
556 The message given (on standard input) is expected to contain, separated
557 from the message body by an empty line, a message header with
562 fields giving its recipients, which will be added to any recipients
563 specified on the command line.
564 If a message subject is specified via
566 then it will be used in favour of one given on the command line.
582 .Ql Mail-Followup-To: ,
583 by default created automatically dependent on message context, will
584 be used if specified (a special address massage will however still occur
586 Any other custom header field (also see
590 is passed through entirely
591 unchanged, and in conjunction with the options
595 it is possible to embed
596 .Sx "COMMAND ESCAPES" .
604 .Sx "primary system mailbox"
607 appropriate privileges presumed; effectively identical to
608 .Ql Fl \&\&f Ns \0%user .
617 will also show the list of
619 .Ql $ \*(uA -Xversion -Xx .
624 ting the internal variable
626 enables display of some informational context messages.
627 Using it twice increases the level of verbosity.
631 Add the given (or multiple for a multiline argument)
633 to the list of commands to be executed,
634 as a last step of program startup, before normal operation starts.
635 This is the only possibility to execute commands in non-interactive mode
636 when reading startup files is actively prohibited.
637 The commands will be evaluated as a unit, just as via
647 .Sx "COMMAND ESCAPES"
648 in compose mode even in non-interactive use cases.
649 This can be used to, e.g., automatically format the composed message
650 text before sending the message:
651 .Bd -literal -offset indent
652 $ ( echo 'line one. Word. Word2.';\e
653 echo '~| /usr/bin/fmt -tuw66' ) |\e
654 LC_ALL=C \*(uA -d~:/ -Sttycharset=utf-8 bob@exam.ple
659 Enables batch mode: standard input is made line buffered, the complete
660 set of (interactive) commands is available, processing of
661 .Sx "COMMAND ESCAPES"
662 is enabled in compose mode, and diverse
663 .Sx "INTERNAL VARIABLES"
664 are adjusted for batch necessities, exactly as if done via
680 The following prepares an email message in a batched dry run:
681 .Bd -literal -offset indent
682 $ LC_ALL=C printf 'm bob\en~s ubject\enText\en~.\enx\en' |\e
683 LC_ALL=C \*(uA -d#:/ -X'alias bob bob@exam.ple'
688 This flag forces termination of option processing in order to prevent
691 It also forcefully puts \*(UA into send mode, see
692 .Sx "On sending mail, and non-interactive mode" .
698 arguments and all receivers established via
702 are subject to the checks established by
705 .Sx "INTERNAL VARIABLES" .
708 allows their recognition all
710 arguments given at the end of the command line after a
712 separator will be passed through to a file-based
714 (Mail-Transfer-Agent) and persist for the entire session.
716 constraints do not apply to the content of
720 .\" .Ss "A starter" {{{
723 \*(UA is a direct descendant of
725 Mail, itself a successor of the Research
728 .Dq was there from the start
731 It thus represents the user side of the
733 mail system, whereas the system side (Mail-Transfer-Agent, MTA) was
734 traditionally taken by
736 and most MTAs provide a binary of this name for compatibility purposes.
741 of \*(UA then the system side is not a mandatory precondition for mail
745 Because \*(UA strives for compliance with POSIX
747 it is likely that some configuration settings have to be adjusted before
748 using it is a smooth experience.
749 (Rather complete configuration examples can be found in the section
753 resource file bends those standard imposed settings of the
754 .Sx "INTERNAL VARIABLES"
755 a bit towards more user friendliness and safety already.
763 in order to suppress the automatic moving of messages to the
765 .Sx "secondary mailbox"
767 that would otherwise occur (see
768 .Sx "Message states" ) ,
771 to not remove empty system MBOX mailbox files in order not to mangle
772 file permissions when files eventually get recreated (all empty (MBOX)
773 mailbox files will be removed unless this variable is set whenever
775 mode has been enabled).
780 in order to synchronize \*(UA with the exit status report of the used
787 to enter interactive startup even if the initial mailbox is empty,
789 to allow editing of headers as well as
791 to not strip down addresses in compose mode, and
793 to include the message that is being responded to when
798 It should be remarked that the file mode creation mask can be
799 explicitly managed via the variable
801 \*(UA will not follow symbolic links when opening files for writing,
802 sufficient system support provided.
805 .\" .Ss "On sending mail, and non-interactive mode" {{{
806 .Ss "On sending mail, and non-interactive mode"
808 To send a message to one or more people, using a local or a built-in
810 (Mail-Transfer-Agent) transport to actually deliver the generated mail
811 message, \*(UA can be invoked with arguments which are the names of
812 people to whom the mail will be sent, and the command line options
816 can be used to add (blind) carbon copy receivers:
818 .Bd -literal -offset indent
820 $ \*(uA -s ubject -a ttach.txt bill@exam.ple
822 # But... try it in an isolated dry-run mode (-d) first
823 $ LC_ALL=C \*(uA -d -:/ -Ssendwait -Sttycharset=utf8 \e
824 -b bcc@exam.ple -c cc@exam.ple \e
825 -. '(Lovely) Bob <bob@exam.ple>' eric@exam.ple
828 $ LC_ALL=C \*(uA -d -:/ -Sv15-compat -Ssendwait -Sttycharset=utf8 \e
829 -S mta=smtps://mylogin@exam.ple:465 -Ssmtp-auth=none \e
830 -S from=scriptreply@exam.ple \e
836 If standard input is a terminal rather than the message to be sent,
837 the user is expected to type in the message contents.
838 In this compose mode \*(UA treats lines beginning with the character
840 special \(en these are so-called
841 .Sx "COMMAND ESCAPES" ,
842 which can be used to read in files, process shell commands, add and edit
843 attachments and more; e.g., the command escape
845 will start the text editor to revise the message in its current state,
847 allows editing of the most important message headers, with
849 custom headers can be created (more specifically than with
852 gives an overview of most other available command escapes.
856 at the beginning of an empty line leaves compose mode and causes the
857 message to be sent, whereas typing
860 twice will abort the current letter (saving its contents in the file
871 .Sx "INTERNAL VARIABLES"
872 can be used to alter default behavior.
873 E.g., messages are sent asynchronously, without supervision, unless the
876 is set, therefore send errors will not be recognizable until then.
881 will automatically startup a text editor when compose mode is entered,
883 allows editing of headers additionally to plain body content, whereas
887 will cause the user to be prompted actively for (blind) carbon-copy
888 recipients, respectively, if the given list is empty.
891 Especially when using public mail provider accounts with the SMTP
893 it is often necessary to set
897 (even finer control via
898 .Va smtp-hostname ) ,
899 which (even if empty) also causes creation of
906 Saving a copy of sent messages in a
908 mailbox may be desirable \(en as for most mailbox
910 targets the value will undergo
911 .Sx "Filename transformations" .
914 for the purpose of arranging a complete environment of settings that can
915 be switched to with a single command or command line option may be
918 has example configurations for some of the well-known public mail
919 providers, and also gives a compact overview on how to setup a secure
920 SSL/TLS environment.)
925 sandbox dry-run tests will prove correctness.
929 .Sx "On URL syntax and credential lookup"
930 will spread light on the different ways of how to specify user email
931 account credentials, the
933 variable chains, and accessing protocol-specific resources,
936 goes into the details of character encodings, and how to use them for
937 interpreting the input data given in
939 and representing messages and MIME part contents in
941 and reading the section
942 .Sx "The mime.types files"
943 should help to understand how the MIME-type of outgoing attachments are
944 classified, and what can be done for fine-tuning.
945 Over the wire a configurable
947 .Pf ( Ql Content-Transfer-Encoding: )
948 may be applied to the message data.
951 Message recipients (as specified on the command line or defined in
956 may not only be email addressees but can also be names of mailboxes and
957 even complete shell command pipe specifications.
960 is not set then only network addresses (see
962 for a description of mail addresses) and plain user names (including MTA
963 aliases) may be used, other types will be filtered out, giving a warning
967 can be used to generate standard compliant network addresses.
969 .\" When changing any of the following adjust any RECIPIENTADDRSPEC;
970 .\" grep the latter for the complete picture
974 is set then extended recipient addresses will optionally be accepted:
975 Any name which starts with a vertical bar
977 character specifies a command pipe \(en the command string following the
979 is executed and the message is sent to its standard input;
980 Likewise, any name that starts with the character solidus
982 or the character sequence dot solidus
984 is treated as a file, regardless of the remaining content;
985 likewise a name that solely consists of a hyphen-minus
987 Any other name which contains a commercial at
989 character is treated as a network address;
990 Any other name which starts with a plus sign
992 character specifies a mailbox name;
993 Any other name which contains a solidus
995 character but no exclamation mark
999 character before also specifies a mailbox name;
1000 What remains is treated as a network address.
1002 .Bd -literal -offset indent
1003 $ echo bla | \*(uA -Sexpandaddr -s test ./mbox.mbox
1004 $ echo bla | \*(uA -Sexpandaddr -s test '|cat >> ./mbox.mbox'
1005 $ echo safe | LC_ALL=C \e
1006 \*(uA -:/ -Sv15-compat -Ssendwait -Sttycharset=utf8 \e
1007 -Sexpandaddr=fail,-all,+addr,failinvaddr -s test \e
1012 It is possible to create personal distribution lists via the
1014 command, so that, for instance, the user can send mail to
1016 and have it go to a group of people.
1017 These aliases have nothing in common with the system wide aliases that
1018 may be used by the MTA, which are subject to the
1022 and are often tracked in a file
1028 Personal aliases will be expanded by \*(UA before the message is sent,
1029 and are thus a convenient alternative to specifying each addressee by
1030 itself; they correlate with the active set of
1037 .Dl alias cohorts bill jkf mark kridle@ucbcory ~/mail/cohorts.mbox
1040 .Va on-compose-enter , on-compose-leave
1042 .Va on-compose-cleanup
1043 hook variables may be set to
1045 d macros to automatically adjust some settings dependent
1046 on receiver, sender or subject contexts, and via the
1047 .Va on-compose-splice
1049 .Va on-compose-splice-shell
1050 variables, the former also to be set to a
1052 d macro, increasingly powerful mechanisms to perform automated message
1053 adjustments are available.
1054 (\*(ID These hooks work for commands which newly create messages, namely
1055 .Ic forward , mail , reply
1060 for now provide only the hooks
1063 .Va on-resend-cleanup . )
1066 To avoid environmental noise scripts should
1068 \*(UA from any configuration files and create a script-local
1069 environment, ideally with the command line options
1071 to disable any configuration file in conjunction with repetitions of
1073 to specify variables:
1075 .Bd -literal -offset indent
1076 $ env LC_ALL=C \*(uA -:/ \e
1077 -Sv15-compat -Ssendwait -Sttycharset=utf-8 \e
1078 -Sexpandaddr=fail,-all,failinvaddr \e
1079 -S mta=smtps://mylogin@exam.ple:465 -Ssmtp-auth=login \e
1080 -S from=scriptreply@exam.ple \e
1081 -s 'Subject to go' -a attachment_file \e
1082 -. 'Recipient 1 <rec1@exam.ple>' rec2@exam.ple \e
1087 As shown, scripts can
1089 a locale environment, the above specifies the all-compatible 7-bit clean
1092 but will nonetheless take and send UTF-8 in the message text by using
1094 In interactive mode, which is introduced in the next section, messages
1095 can be sent by calling the
1097 command with a list of recipient addresses:
1099 .Bd -literal -offset indent
1100 $ \*(uA -d -Squiet -Semptystart
1101 "/var/spool/mail/user": 0 messages
1102 ? mail "Recipient 1 <rec1@exam.ple>", rec2@exam.ple
1104 ? # Will do the right thing (tm)
1105 ? m rec1@exam.ple rec2@exam.ple
1109 .\" .Ss "On reading mail, and interactive mode" {{{
1110 .Ss "On reading mail, and interactive mode"
1112 When invoked without addressees \*(UA enters interactive mode in which
1114 When used like that the user's system
1116 (for more on mailbox types please see the command
1118 is read in and a one line header of each message therein is displayed if
1122 The visual style of this summary of
1124 can be adjusted through the variable
1126 and the possible sorting criterion via
1132 can be performed with the command
1134 If the initially opened mailbox is empty \*(UA will instead exit
1135 immediately (after displaying a message) unless the variable
1144 will give a listing of all available commands and
1146 will give a summary of some common ones.
1147 If the \*(OPal documentation strings are available one can type
1150 and see the actual expansion of
1152 and what its purpose is, i.e., commands can be abbreviated
1153 (note that POSIX defines some abbreviations, so that the alphabetical
1154 order of commands does not necessarily relate to the abbreviations; it is
1155 however possible to define overwrites with
1156 .Ic commandalias ) .
1157 These commands can also produce a more
1162 Messages are given numbers (starting at 1) which uniquely identify
1163 messages; the current message \(en the
1165 \(en will either be the first new message, or the first unread message,
1166 or the first message of the mailbox; the internal variable
1168 will instead cause usage of the last message for this purpose.
1173 ful of header summaries containing the
1177 will display only the summaries of the given messages, defaulting to the
1181 Message content can be displayed with the command
1188 controls whether and when \*(UA will use the configured
1190 for display instead of directly writing to the user terminal
1192 the sole difference to the command
1194 which will always use the
1198 will instead only show the first
1200 of a message (maybe even compressed if
1203 Message display experience may improve by setting and adjusting
1204 .Va mime-counter-evidence ,
1206 .Sx "HTML mail and MIME attachments" .
1209 By default the current message
1211 is displayed, but like with many other commands it is possible to give
1212 a fancy message specification (see
1213 .Sx "Specifying messages" ) ,
1216 will display all unread messages,
1221 will type the messages 1 and 5,
1223 will type the messages 1 through 5, and
1227 will display the last and the next message, respectively.
1230 (a more substantial alias for
1232 will display a header summary of the given message specification list
1233 instead of their content, e.g., the following will search for subjects:
1236 .Dl ? from "'@Some subject to search for'"
1239 In the default setup all header fields of a message will be
1241 d, but fields can be white- or blacklisted for a variety of
1242 applications by using the command
1244 e.g., to restrict their display to a very restricted set for
1246 .Ql Ic \:headerpick Cd \:type retain Ar \:from to cc subject .
1247 In order to display all header fields of a message regardless of
1248 currently active ignore or retain lists, use the commands
1253 will show the raw message content.
1254 Note that historically the global
1256 not only adjusts the list of displayed headers, but also sets
1260 Dependent upon the configuration a line editor (see the section
1261 .Sx "On terminal control and line editor" )
1262 aims at making the user experience with the many
1265 When reading the system
1271 specified a mailbox explicitly prefixed with the special
1273 modifier (propagating the mailbox to a
1275 .Sx "primary system mailbox" ) ,
1276 then messages which have been read will be automatically moved to a
1278 .Sx "secondary mailbox" ,
1281 file, when the mailbox is left, either by changing the
1282 active mailbox or by quitting \*(UA (also see
1283 .Sx "Message states" )
1284 \(en this automatic moving from a system or primary to the secondary
1285 mailbox is not performed when the variable
1288 Messages can also be explicitly
1290 d to other mailboxes, whereas
1292 keeps the original message.
1294 can be used to write out data content of specific parts of messages.
1297 After examining a message the user can
1299 to the sender and all recipients (which will also be placed in
1302 .Va recipients-in-cc
1305 exclusively to the sender(s).
1307 ing a message will allow editing the new message: the original message
1308 will be contained in the message body, adjusted according to
1310 When replying to or forwarding a message recipient addresses will be
1311 stripped from comments and names unless the internal variable
1318 messages: the former will add a series of
1320 headers, whereas the latter will not; different to newly created
1321 messages editing is not possible and no copy will be saved even with
1323 unless the additional variable
1326 Of course messages can be
1328 and they can spring into existence again via
1330 or when the \*(UA session is ended via the
1335 To end a mail processing session one may either issue
1337 to cause a full program exit, which possibly includes
1338 automatic moving of read messages to the
1340 .Sx "secondary mailbox"
1342 as well as updating the \*(OPal line editor
1346 instead in order to prevent any of these actions.
1349 .\" .Ss "HTML mail and MIME attachments" {{{
1350 .Ss "HTML mail and MIME attachments"
1352 Messages which are HTML-only become more and more common and of course
1353 many messages come bundled with a bouquet of MIME (Multipurpose Internet
1354 Mail Extensions) parts for, e.g., attachments.
1355 To get a notion of MIME types, \*(UA will first read
1356 .Sx "The mime.types files"
1357 (as configured and allowed by
1358 .Va mimetypes-load-control ) ,
1359 and then add onto that types registered directly with
1361 It (normally) has a default set of types built-in, too.
1362 To improve interaction with faulty MIME part declarations which are
1363 often seen in real-life messages, setting
1364 .Va mime-counter-evidence
1365 will allow \*(UA to verify the given assertion and possibly provide
1366 an alternative MIME type.
1369 Whereas \*(UA \*(OPally supports a simple HTML-to-text converter for
1370 HTML messages, it cannot handle MIME types other than plain text itself.
1371 Instead programs need to become registered to deal with specific MIME
1372 types or file extensions.
1373 These programs may either prepare plain text versions of their input in
1374 order to enable \*(UA to integrate their output neatlessly in its own
1375 message visualization (a mode which is called
1376 .Cd copiousoutput ) ,
1377 or display the content themselves, for example in an external graphical
1378 window: such handlers will only be considered by and for the command
1382 To install a handler program for a specific MIME type an according
1383 .Va pipe-TYPE/SUBTYPE
1384 variable needs to be set; to instead define a handler for a specific
1385 file extension the respective
1387 variable can be used \(en these handlers take precedence.
1388 \*(OPally \*(UA supports mail user agent configuration as defined in
1389 RFC 1524; this mechanism (see
1390 .Sx "The Mailcap files" )
1391 will be queried for display or quote handlers if none of the former two
1392 .\" TODO v15-compat "will be" -> "is"
1393 did; it will be the sole source for handlers of other purpose.
1394 A last source for handlers is the MIME type definition itself, when
1395 a (\*(UA specific) type-marker was registered with the command
1397 (which many built-in MIME types do).
1400 E.g., to display a HTML message inline (that is, converted to a more
1401 fancy plain text representation than the built-in converter is capable to
1402 produce) with either of the text-mode browsers
1406 teach \*(UA about MathML documents and make it display them as plain
1407 text, and to open PDF attachments in an external PDF viewer,
1408 asynchronously and with some other magic attached:
1410 .Bd -literal -offset indent
1411 ? if [ "$features" !% +filter-html-tagsoup ]
1412 ? #set pipe-text/html='@* elinks -force-html -dump 1'
1413 ? set pipe-text/html='@* lynx -stdin -dump -force_html'
1414 ? # Display HTML as plain text instead
1415 ? #set pipe-text/html=@
1417 ? mimetype @ application/mathml+xml mathml
1418 ? wysh set pipe-application/pdf='@&=@ \e
1419 trap "rm -f \e"${MAILX_FILENAME_TEMPORARY}\e"" EXIT;\e
1420 trap "trap \e"\e" INT QUIT TERM; exit 1" INT QUIT TERM;\e
1421 mupdf "${MAILX_FILENAME_TEMPORARY}"'
1425 .\" .Ss "Mailing lists" {{{
1428 \*(UA offers some support to ease handling of mailing lists.
1431 promotes all given arguments to known mailing lists, and
1433 sets their subscription attribute, creating them first as necessary.
1438 automatically, but only resets the subscription attribute.)
1439 Using the commands without arguments will show (a subset of) all
1440 currently defined mailing lists.
1445 can be used to mark out messages with configured list addresses
1446 in the header display.
1449 \*(OPally mailing lists may also be specified as (extended) regular
1450 expressions, which allows matching of many addresses with a single
1452 However, all fully qualified list addresses are matched via a fast
1453 dictionary, whereas expressions are placed in (a) list(s) which is
1454 (are) matched sequentially.
1456 .Bd -literal -offset indent
1457 ? set followup-to followup-to-honour=ask-yes \e
1458 reply-to-honour=ask-yes
1459 ? wysh mlist a1@b1.c1 a2@b2.c2 '.*@lists\e.c3$'
1460 ? mlsubscribe a4@b4.c4 exact@lists.c3
1465 .Va followup-to-honour
1467 .Ql Mail-\:Followup-\:To:
1468 header is honoured when the message is being replied to (via
1474 controls whether this header is created when sending mails; it will be
1475 created automatically for a couple of reasons, too, like when the
1477 .Dq mailing list specific
1482 is used to respond to a message with its
1483 .Ql Mail-Followup-To:
1487 A difference in between the handling of known and subscribed lists is
1488 that the address of the sender is usually not part of a generated
1489 .Ql Mail-Followup-To:
1490 when addressing the latter, whereas it is for the former kind of lists.
1491 Usually because there are exceptions: say, if multiple lists are
1492 addressed and not all of them are subscribed lists.
1494 For convenience \*(UA will, temporarily, automatically add a list
1495 address that is presented in the
1497 header of a message that is being responded to to the list of known
1499 Shall that header have existed \*(UA will instead, dependent on the
1501 .Va reply-to-honour ,
1504 for this purpose in order to accept a list administrators' wish that
1505 is supposed to have been manifested like that (but only if it provides
1506 a single address which resides on the same domain as what is stated in
1510 .\" .Ss "Signed and encrypted messages with S/MIME" {{{
1511 .Ss "Signed and encrypted messages with S/MIME"
1513 \*(OP S/MIME provides two central mechanisms:
1514 message signing and message encryption.
1515 A signed message contains some data in addition to the regular text.
1516 The data can be used to verify that the message was sent using a valid
1517 certificate, that the sender's address in the message header matches
1518 that in the certificate, and that the message text has not been altered.
1519 Signing a message does not change its regular text;
1520 it can be read regardless of whether the recipient's software is able to
1522 It is thus usually possible to sign all outgoing messages if so desired.
1525 Encryption, in contrast, makes the message text invisible for all people
1526 except those who have access to the secret decryption key.
1527 To encrypt a message, the specific recipient's public encryption key
1529 It is therefore not possible to send encrypted mail to people unless their
1530 key has been retrieved from either previous communication or public key
1532 A message should always be signed before it is encrypted.
1533 Otherwise, it is still possible that the encrypted message text is
1537 A central concept to S/MIME is that of the certification authority (CA).
1538 A CA is a trusted institution that issues certificates.
1539 For each of these certificates it can be verified that it really
1540 originates from the CA, provided that the CA's own certificate is
1542 A set of CA certificates is usually delivered with OpenSSL and installed
1544 If you trust the source of your OpenSSL software installation,
1545 this offers reasonable security for S/MIME on the Internet.
1547 .Va smime-ca-no-defaults
1548 to avoid using the default certificates and point
1552 to a trusted pool of certificates.
1553 In general, a certificate cannot be more secure than the method its CA
1554 certificate has been retrieved with.
1557 This trusted pool of certificates is used by the command
1559 to ensure that the given S/MIME messages can be trusted.
1560 If so, verified sender certificates that were embedded in signed
1561 messages can be saved locally with the command
1563 and used by \*(UA to encrypt further communication with these senders:
1565 .Bd -literal -offset indent
1567 ? set smime-encrypt-USER@HOST=FILENAME \e
1568 smime-cipher-USER@HOST=AES256
1572 To sign outgoing messages in order to allow receivers to verify the
1573 origin of these messages a personal S/MIME certificate is required.
1574 \*(UA supports password-protected personal certificates (and keys),
1575 for more on this, and its automatization, please see the section
1576 .Sx "On URL syntax and credential lookup" .
1578 .Sx "S/MIME step by step"
1579 shows examplarily how such a private certificate can be obtained.
1580 In general, if such a private key plus certificate
1582 is available, all that needs to be done is to set some variables:
1584 .Bd -literal -offset indent
1585 ? set smime-sign-cert=ME@HERE.com.paired \e
1586 smime-sign-message-digest=SHA256 \e
1591 Variables of interest for S/MIME in general are
1594 .Va smime-ca-flags ,
1595 .Va smime-ca-no-defaults ,
1597 .Va smime-crl-file .
1598 For S/MIME signing of interest are
1600 .Va smime-sign-cert ,
1601 .Va smime-sign-include-certs
1603 .Va smime-sign-message-digest .
1604 Additional variables of interest for S/MIME en- and decryption:
1607 .Va smime-encrypt-USER@HOST .
1610 \*(ID Note that neither S/MIME signing nor encryption applies to
1611 message subjects or other header fields yet.
1612 Thus they may not contain sensitive information for encrypted messages,
1613 and cannot be trusted even if the message content has been verified.
1614 When sending signed messages,
1615 it is recommended to repeat any important header information in the
1619 .\" .Ss "On URL syntax and credential lookup" {{{
1620 .Ss "On URL syntax and credential lookup"
1622 \*(IN For accessing protocol-specific resources usage of Uniform
1623 Resource Locators (URL, RFC 1738) has become omnipresent.
1624 \*(UA expects and understands URLs in the following form;
1627 denote optional parts, optional either because there also exist other
1628 ways to define the information in question or because support of the
1629 part is protocol-specific (e.g.,
1631 is used by the local maildir and the IMAP protocol, but not by POP3);
1636 are specified they must be given in URL percent encoded form (RFC 3986;
1642 .Dl PROTOCOL://[USER[:PASSWORD]@]server[:port][/path]
1645 Note that these \*(UA URLs most often do not conform to any real
1646 standard, but instead represent a normalized variant of RFC 1738 \(en
1647 they are not used in data exchange but only meant as a compact,
1648 easy-to-use way of defining and representing information in
1649 a well-known notation.
1652 Many internal variables of \*(UA exist in multiple versions, called
1653 variable chains for the rest of this document: the plain
1658 .Ql variable-USER@HOST .
1665 had been specified in the respective URL, otherwise it refers to the plain
1671 that had been found when doing the user chain lookup as is described
1674 will never be in URL percent encoded form, whether it came from an URL
1675 or not; i.e., variable chain name extensions of
1676 .Sx "INTERNAL VARIABLES"
1677 must not be URL percent encoded.
1680 For example, whether an hypothetical URL
1681 .Ql smtp://hey%3Ayou@our.house
1682 had been given that includes a user, or whether the URL was
1683 .Ql smtp://our.house
1684 and the user had been found differently, to lookup the variable chain
1685 .Va smtp-use-starttls
1686 \*(UA first looks for whether
1687 .Ql smtp-\:use-\:starttls-\:hey:you@our.house
1688 is defined, then whether
1689 .Ql smtp-\:use-\:starttls-\:our.house
1690 exists before finally ending up looking at the plain variable itself.
1693 \*(UA obeys the following logic scheme when dealing with the
1694 necessary credential information of an account:
1700 has been given in the URL the variables
1704 are looked up; if no such variable(s) can be found then \*(UA will,
1705 when enforced by the \*(OPal variables
1706 .Va netrc-lookup-HOST
1713 specific entry which provides a
1715 name: this lookup will only succeed if unambiguous (one possible matching
1718 It is possible to load encrypted
1723 If there is still no
1725 then \*(UA will fall back to the user who is supposed to run \*(UA,
1726 the identity of which has been fixated during \*(UA startup and is
1727 known to be a valid user on the current host.
1730 Authentication: unless otherwise noted this will lookup the
1731 .Va PROTOCOL-auth-USER@HOST , PROTOCOL-auth-HOST , PROTOCOL-auth
1732 variable chain, falling back to a protocol-specific default should this
1738 has been given in the URL, then if the
1740 has been found through the \*(OPal
1742 that may have already provided the password, too.
1743 Otherwise the variable chain
1744 .Va password-USER@HOST , password-HOST , password
1745 is looked up and used if existent.
1747 Afterwards the complete \*(OPal variable chain
1748 .Va netrc-lookup-USER@HOST , netrc-lookup-HOST , netrc-lookup
1752 cache is searched for a password only (multiple user accounts for
1753 a single machine may exist as well as a fallback entry without user
1754 but with a password).
1756 If at that point there is still no password available, but the
1757 (protocols') chosen authentication type requires a password, then in
1758 interactive mode the user will be prompted on the terminal.
1763 S/MIME verification works relative to the values found in the
1767 header field(s), which means that the values of
1768 .Va smime-sign , smime-sign-cert , smime-sign-include-certs
1770 .Va smime-sign-message-digest
1771 will not be looked up using the
1775 chains from above but instead use the corresponding values from the
1776 message that is being worked on.
1777 In unusual cases multiple and different
1781 combinations may therefore be involved \(en on the other hand those
1782 unusual cases become possible.
1783 The usual case is as short as:
1786 .Dl set mta=smtp://USER:PASS@HOST smtp-use-starttls \e
1787 .Dl \ \ \ \ smime-sign smime-sign-cert=+smime.pair
1792 contains complete example configurations.
1795 .\" .Ss "Character sets" {{{
1796 .Ss "Character sets"
1798 \*(OP \*(UA detects the character set of the terminal by using
1799 mechanisms that are controlled by the
1801 environment variable
1806 in that order, see there).
1807 The internal variable
1809 will be set to the detected terminal character set accordingly,
1810 and will thus show up in the output of commands like, e.g.,
1816 However, the user may give a value for
1818 during startup, so that it is possible to send mail in a completely
1820 locale environment, an option which can be used to generate and send,
1821 e.g., 8-bit UTF-8 input data in a pure 7-bit US-ASCII
1823 environment (an example of this can be found in the section
1824 .Sx "On sending mail, and non-interactive mode" ) .
1825 Changing the value does not mean much beside that, because several
1826 aspects of the real character set are implied by the locale environment
1827 of the system, which stays unaffected by
1831 If the \*(OPal character set conversion capabilities are not available
1833 does not include the term
1837 will be the only supported character set,
1838 it is simply assumed that it can be used to exchange 8-bit messages
1839 (over the wire an intermediate, configurable
1842 and the rest of this section does not apply;
1843 it may however still be necessary to explicitly set it if automatic
1844 detection fails, since in that case it defaults to
1845 .\" (Keep in SYNC: ./nail.1:"Character sets", ./config.h:CHARSET_*!)
1846 LATIN1 a.k.a. ISO-8859-1.
1849 \*(OP When reading messages, their text is converted into
1851 as necessary in order to display them on the users terminal.
1852 Unprintable characters and invalid byte sequences are detected
1853 and replaced by proper substitution characters.
1854 Character set mappings for source character sets can be established with
1857 which may be handy to work around faulty character set catalogues (e.g.,
1858 to add a missing LATIN1 to ISO-8859-1 mapping), or to enforce treatment
1859 of one character set as another one (e.g., to interpret LATIN1 as CP1252).
1861 .Va charset-unknown-8bit
1862 to deal with another hairy aspect of message interpretation.
1865 When sending messages all their parts and attachments are classified.
1866 Whereas no character set conversion is performed on those parts which
1867 appear to be binary data,
1868 the character set being used must be declared within the MIME header of
1869 an outgoing text part if it contains characters that do not conform to
1870 the set of characters that are allowed by the email standards.
1871 Permissible values for character sets used in outgoing messages can be
1876 which defines a catch-all last-resort fallback character set that is
1877 implicitly appended to the list of character sets in
1881 When replying to a message and the variable
1882 .Va reply-in-same-charset
1883 is set, then the character set of the message being replied to
1884 is tried first (still being a subject of
1885 .Ic charsetalias ) .
1886 And it is also possible to make \*(UA work even more closely related to
1887 the current locale setting automatically by using the variable
1888 .Va sendcharsets-else-ttycharset ,
1889 please see there for more information.
1892 All the specified character sets are tried in order unless the
1893 conversion of the part or attachment succeeds.
1894 If none of the tried (8-bit) character sets is capable to represent the
1895 content of the part or attachment,
1896 then the message will not be sent and its text will optionally be
1900 In general, if a message saying
1901 .Dq cannot convert from a to b
1902 appears, either some characters are not appropriate for the currently
1903 selected (terminal) character set,
1904 or the needed conversion is not supported by the system.
1905 In the first case, it is necessary to set an appropriate
1907 locale and/or the variable
1911 The best results are usually achieved when \*(UA is run in a UTF-8
1912 locale on an UTF-8 capable terminal, in which case the full Unicode
1913 spectrum of characters is available.
1914 In this setup characters from various countries can be displayed,
1915 while it is still possible to use more simple character sets for sending
1916 to retain maximum compatibility with older mail clients.
1919 On the other hand the POSIX standard defines a locale-independent 7-bit
1920 .Dq portable character set
1921 that should be used when overall portability is an issue, the even more
1922 restricted subset named
1923 .Dq portable filename character set
1924 consists of A-Z, a-z, 0-9, period
1932 .\" .Ss "Message states" {{{
1933 .Ss "Message states"
1935 \*(UA differentiates in between several different message states;
1936 the current state will be reflected in header summary displays if
1938 is configured to do so (via the internal variable
1940 and messages can also be selected and be acted upon depending on their
1942 .Sx "Specifying messages" ) .
1943 When operating on the system
1947 .Sx "primary system mailbox" ,
1948 special actions, like the automatic moving of messages to the
1950 .Sx "secondary mailbox"
1952 may be applied when the mailbox is left (also implicitly via
1953 a successful exit of \*(UA, but not if the special command
1955 is used) \(en however, because this may be irritating to users which
1958 mail-user-agents, the default global
1964 variables in order to suppress this behaviour.
1966 .Bl -hang -width ".It Ql new"
1968 Message has neither been viewed nor moved to any other state.
1969 Such messages are retained even in the
1971 .Sx "primary system mailbox" .
1974 Message has neither been viewed nor moved to any other state, but the
1975 message was present already when the mailbox has been opened last:
1976 Such messages are retained even in the
1978 .Sx "primary system mailbox" .
1981 The message has been processed by one of the following commands:
2000 will always try to automatically
2006 logical message, and may thus mark multiple messages as read, the
2008 command will do so if the internal variable
2013 command is used, messages that are in a
2015 .Sx "primary system mailbox"
2018 state when the mailbox is left will be saved in the
2020 .Sx "secondary mailbox"
2022 unless the internal variable
2027 The message has been processed by one of the following commands:
2033 can be used to access such messages.
2036 The message has been processed by a
2038 command and it will be retained in its current location.
2041 The message has been processed by one of the following commands:
2047 command is used, messages that are in a
2049 .Sx "primary system mailbox"
2052 state when the mailbox is left will be deleted; they will be saved in the
2054 .Sx "secondary mailbox"
2056 when the internal variable
2062 In addition to these message states, flags which otherwise have no
2063 technical meaning in the mail system except allowing special ways of
2064 addressing them when
2065 .Sx "Specifying messages"
2066 can be set on messages.
2067 These flags are saved with messages and are thus persistent, and are
2068 portable between a set of widely used MUAs.
2070 .Bl -hang -width ".It Ic answered"
2072 Mark messages as having been answered.
2074 Mark messages as being a draft.
2076 Mark messages which need special attention.
2080 .\" .Ss "Specifying messages" {{{
2081 .Ss "Specifying messages"
2088 can be given a list of message numbers as arguments to apply to a number
2089 of messages at once.
2092 deletes messages 1 and 2,
2095 will delete the messages 1 through 5.
2096 In sorted or threaded mode (see the
2100 will delete the messages that are located between (and including)
2101 messages 1 through 5 in the sorted/threaded order, as shown in the
2104 The following special message names exist:
2107 .Bl -tag -width ".It Ar BaNg"
2109 The current message, the so-called
2113 The message that was previously the current message.
2116 The parent message of the current message,
2117 that is the message with the Message-ID given in the
2119 field or the last entry of the
2121 field of the current message.
2124 The next previous undeleted message,
2125 or the next previous deleted message for the
2128 In sorted/threaded mode,
2129 the next previous such message in the sorted/threaded order.
2132 The next undeleted message,
2133 or the next deleted message for the
2136 In sorted/threaded mode,
2137 the next such message in the sorted/threaded order.
2140 The first undeleted message,
2141 or the first deleted message for the
2144 In sorted/threaded mode,
2145 the first such message in the sorted/threaded order.
2149 In sorted/threaded mode,
2150 the last message in the sorted/threaded order.
2154 selects the message addressed with
2158 is any other message specification,
2159 and all messages from the thread that begins at it.
2160 Otherwise it is identical to
2165 the thread beginning with the current message is selected.
2170 All messages that were included in the
2171 .Sx "Message list arguments"
2172 of the previous command.
2175 An inclusive range of message numbers.
2176 Selectors that may also be used as endpoints include any of
2181 .Dq any substring matches
2184 header, which will match addresses (too) even if
2186 is set (and POSIX says
2187 .Dq any address as shown in a header summary shall be matchable in this form ) ;
2190 variable is set, only the local part of the address is evaluated
2191 for the comparison, not ignoring case, and the setting of
2193 is completely ignored.
2194 For finer control and match boundaries use the
2198 .It Ar / Ns Ar string
2199 All messages that contain
2201 in the subject field (case ignored).
2208 the string from the previous specification of that type is used again.
2210 .It Xo Op Ar @ Ns Ar name-list Ns
2213 All messages that contain the given case-insensitive search
2215 ession; if the \*(OPal regular expression (see
2217 support is available
2219 will be interpreted as (an extended) one if any of the
2221 (extended) regular expression characters is seen: in this case this
2222 should match strings correctly which are in the locale
2226 .Ar @ Ns Ar name-list
2227 part is missing, the search is restricted to the subject field body,
2230 specifies a comma-separated list of header fields to search, as in
2232 .Dl '@to,from,cc@Someone i ought to know'
2234 In order to search for a string that includes a
2236 (commercial at) character the
2238 is effectively non-optional, but may be given as the empty string.
2239 Some special header fields may be abbreviated:
2253 respectively and case-insensitively.
2258 can be used to search in (all of) the header(s) of the message, and the
2267 can be used to perform full text searches \(en whereas the former
2268 searches only the body, the latter also searches the message header.
2270 This message specification performs full text comparison, but even with
2271 regular expression support it is almost impossible to write a search
2272 expression that savely matches only a specific address domain.
2273 To request that the content of the header is treated as a list of
2274 addresses, and to strip those down to the plain email address which the
2275 search expression is to be matched against, prefix the header name
2276 (abbreviation) with a tilde
2279 .Dl @~f@@a\e.safe\e.domain\e.match$
2282 All messages of state
2286 is one or multiple of the following colon modifiers:
2288 .Bl -tag -compact -width ".It Ar :M"
2293 Old messages (any not in state
2315 messages (cf. the variable
2316 .Va markanswered ) .
2321 \*(OP Messages classified as spam (see
2322 .Sx "Handling spam" . )
2324 \*(OP Messages with unsure spam classification.
2330 \*(OP IMAP-style SEARCH expressions may also be used.
2331 This addressing mode is available with all types of mailbox
2333 s; \*(UA will perform the search locally as necessary.
2334 Strings must be enclosed by double quotes
2336 in their entirety if they contain whitespace or parentheses;
2337 within the quotes, only reverse solidus
2339 is recognized as an escape character.
2340 All string searches are case-insensitive.
2341 When the description indicates that the
2343 representation of an address field is used,
2344 this means that the search string is checked against both a list
2347 .Bd -literal -offset indent
2348 (\*qname\*q \*qsource\*q \*qlocal-part\*q \*qdomain-part\*q)
2353 and the addresses without real names from the respective header field.
2354 These search expressions can be nested using parentheses, see below for
2358 .Bl -tag -compact -width ".It Ar _n_u"
2359 .It Ar ( criterion )
2360 All messages that satisfy the given
2362 .It Ar ( criterion1 criterion2 ... criterionN )
2363 All messages that satisfy all of the given criteria.
2365 .It Ar ( or criterion1 criterion2 )
2366 All messages that satisfy either
2371 To connect more than two criteria using
2373 specifications have to be nested using additional parentheses,
2375 .Ql (or a (or b c)) ,
2379 .Ql ((a or b) and c) .
2382 operation of independent criteria on the lowest nesting level,
2383 it is possible to achieve similar effects by using three separate
2387 .It Ar ( not criterion )
2388 All messages that do not satisfy
2390 .It Ar ( bcc \*q Ns Ar string Ns Ar \*q )
2391 All messages that contain
2393 in the envelope representation of the
2396 .It Ar ( cc \*q Ns Ar string Ns Ar \*q )
2397 All messages that contain
2399 in the envelope representation of the
2402 .It Ar ( from \*q Ns Ar string Ns Ar \*q )
2403 All messages that contain
2405 in the envelope representation of the
2408 .It Ar ( subject \*q Ns Ar string Ns Ar \*q )
2409 All messages that contain
2414 .It Ar ( to \*q Ns Ar string Ns Ar \*q )
2415 All messages that contain
2417 in the envelope representation of the
2420 .It Ar ( header name \*q Ns Ar string Ns Ar \*q )
2421 All messages that contain
2426 .It Ar ( body \*q Ns Ar string Ns Ar \*q )
2427 All messages that contain
2430 .It Ar ( text \*q Ns Ar string Ns Ar \*q )
2431 All messages that contain
2433 in their header or body.
2434 .It Ar ( larger size )
2435 All messages that are larger than
2438 .It Ar ( smaller size )
2439 All messages that are smaller than
2443 .It Ar ( before date )
2444 All messages that were received before
2446 which must be in the form
2450 denotes the day of the month as one or two digits,
2452 is the name of the month \(en one of
2453 .Ql Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ,
2456 is the year as four digits, e.g.,
2460 All messages that were received on the specified date.
2461 .It Ar ( since date )
2462 All messages that were received since the specified date.
2463 .It Ar ( sentbefore date )
2464 All messages that were sent on the specified date.
2465 .It Ar ( senton date )
2466 All messages that were sent on the specified date.
2467 .It Ar ( sentsince date )
2468 All messages that were sent since the specified date.
2470 The same criterion as for the previous search.
2471 This specification cannot be used as part of another criterion.
2472 If the previous command line contained more than one independent
2473 criterion then the last of those criteria is used.
2477 .\" .Ss "On terminal control and line editor" {{{
2478 .Ss "On terminal control and line editor"
2480 \*(OP Terminal control will be realized through one of the standard
2482 libraries, either the
2484 or, alternatively, the
2486 both of which will be initialized to work with the environment variable
2488 Terminal control will enhance or enable interactive usage aspects, e.g.,
2489 .Sx "Coloured display" ,
2490 and extend behaviour of the Mailx-Line-Editor (MLE), which may learn the
2491 byte-sequences of keys like the cursor and function keys.
2494 The internal variable
2496 can be used to overwrite settings or to learn (correct(ed)) keycodes.
2497 \*(UA may also become a fullscreen application by entering the
2498 so-called ca-mode and switching to an alternative exclusive screen
2499 (content) shall the terminal support it and the internal variable
2501 has been set explicitly.
2502 Actual interaction with the chosen library can be disabled completely by
2503 setting the internal variable
2504 .Va termcap-disable ;
2506 will be queried regardless, which is true even if the \*(OPal library
2507 support has not been enabled at configuration time as long as some other
2508 \*(OP which (may) query terminal control sequences has been enabled.
2511 \*(OP The built-in Mailx-Line-Editor (MLE) should work in all
2512 environments which comply to the ISO C standard
2514 and will support wide glyphs if possible (the necessary functionality
2515 had been removed from ISO C, but was included in
2517 Prevent usage of a line editor in interactive mode by setting the
2519 .Va line-editor-disable .
2520 Especially if the \*(OPal terminal control support is missing setting
2521 entries in the internal variable
2523 will help shall the MLE misbehave, see there for more.
2524 The MLE can support a little bit of
2530 feature is available then input from line editor prompts will be saved
2531 in a history list that can be searched in and be expanded from.
2532 Such saving can be prevented by prefixing input with any amount of
2534 Aspects of history, like allowed content and maximum size, as well as
2535 whether history shall be saved persistently, can be configured with the
2539 .Va history-gabby-persist
2544 The MLE supports a set of editing and control commands.
2545 By default (as) many (as possible) of these will be assigned to a set of
2546 single-letter control codes, which should work on any terminal (and can
2547 be generated by holding the
2549 key while pressing the key of desire, e.g.,
2553 command is available then the MLE commands can also be accessed freely
2554 by assigning the command name, which is shown in parenthesis in the list
2555 below, to any desired key-sequence, and the MLE will instead and also use
2557 to establish its built-in key bindings
2558 (more of them if the \*(OPal terminal control is available),
2559 an action which can then be suppressed completely by setting
2560 .Va line-editor-no-defaults .
2561 .Sx "Shell-style argument quoting"
2562 notation is used in the following;
2563 combinations not mentioned either cause job control signals or do not
2564 generate a (unique) keycode:
2568 .Bl -tag -compact -width ".It Ql \eBa"
2570 Go to the start of the line
2572 .Pf ( Cd mle-go-home ) .
2575 Move the cursor backward one character
2577 .Pf ( Cd mle-go-bwd ) .
2580 Forward delete the character under the cursor;
2581 quits \*(UA if used on the empty line unless the internal variable
2585 .Pf ( Cd mle-del-fwd ) .
2588 Go to the end of the line
2590 .Pf ( Cd mle-go-end ) .
2593 Move the cursor forward one character
2595 .Pf ( Cd mle-go-fwd ) .
2598 Cancel current operation, full reset.
2599 If there is an active history search or tabulator expansion then this
2600 command will first reset that, reverting to the former line content;
2601 thus a second reset is needed for a full reset in this case
2603 .Pf ( Cd mle-reset ) .
2606 Backspace: backward delete one character
2608 .Pf ( Cd mle-del-bwd ) .
2612 Horizontal tabulator:
2613 try to expand the word before the cursor, supporting the usual
2614 .Sx "Filename transformations"
2616 .Pf ( Cd mle-complete ) .
2618 .Cd mle-quote-rndtrip .
2622 commit the current line
2624 .Pf ( Cd mle-commit ) .
2627 Cut all characters from the cursor to the end of the line
2629 .Pf ( Cd mle-snarf-end ) .
2634 .Pf ( Cd mle-repaint ) .
2637 \*(OP Go to the next history entry
2639 .Pf ( Cd mle-hist-fwd ) .
2642 (\*(OPally context-dependent) Invokes the command
2646 \*(OP Go to the previous history entry
2648 .Pf ( Cd mle-hist-bwd ) .
2651 Toggle roundtrip mode shell quotes, where produced,
2654 .Pf ( Cd mle-quote-rndtrip ) .
2655 This setting is temporary, and will be forgotten once the command line
2656 is committed; also see
2660 \*(OP Complete the current line from (the remaining) older history entries
2662 .Pf ( Cd mle-hist-srch-bwd ) .
2665 \*(OP Complete the current line from (the remaining) newer history entries
2667 .Pf ( Cd mle-hist-srch-fwd ) .
2670 Paste the snarf buffer
2672 .Pf ( Cd mle-paste ) .
2680 .Pf ( Cd mle-snarf-line ) .
2683 Prompts for a Unicode character (its hexadecimal number) to be inserted
2685 .Pf ( Cd mle-prompt-char ) .
2686 Note this command needs to be assigned to a single-letter control code
2687 in order to become recognized and executed during input of
2688 a key-sequence (only three single-letter control codes can be used for
2689 that shortcut purpose); this control code is special-treated and cannot
2690 be part of any other sequence, because any occurrence will perform the
2692 function immediately.
2695 Cut the characters from the one preceding the cursor to the preceding
2698 .Pf ( Cd mle-snarf-word-bwd ) .
2701 Move the cursor forward one word boundary
2703 .Pf ( Cd mle-go-word-fwd ) .
2706 Move the cursor backward one word boundary
2708 .Pf ( Cd mle-go-word-bwd ) .
2711 Escape: reset a possibly used multibyte character input state machine
2712 and \*(OPally a lingering, incomplete key binding
2714 .Pf ( Cd mle-cancel ) .
2715 This command needs to be assigned to a single-letter control code in
2716 order to become recognized and executed during input of a key-sequence
2717 (only three single-letter control codes can be used for that shortcut
2719 This control code may also be part of a multi-byte sequence, but if
2720 a sequence is active and the very control code is currently also an
2721 expected input, then it will first be consumed by the active sequence.
2724 (\*(OPally context-dependent) Invokes the command
2728 (\*(OPally context-dependent) Invokes the command
2732 (\*(OPally context-dependent) Invokes the command
2736 Cut the characters from the one after the cursor to the succeeding word
2739 .Pf ( Cd mle-snarf-word-fwd ) .
2750 this will immediately reset a possibly active search etc.
2755 ring the audible bell.
2759 .\" .Ss "Coloured display" {{{
2760 .Ss "Coloured display"
2762 \*(OP \*(UA can be configured to support a coloured display and font
2763 attributes by emitting ANSI a.k.a. ISO 6429 SGR (select graphic
2764 rendition) escape sequences.
2765 Usage of colours and font attributes solely depends upon the
2766 capability of the detected terminal type that is defined by the
2767 environment variable
2769 and which can be fine-tuned by the user via the internal variable
2773 On top of what \*(UA knows about the terminal the boolean variable
2775 defines whether the actually applicable colour and font attribute
2776 sequences should also be generated when output is going to be paged
2777 through the external program defined by the environment variable
2782 This is not enabled by default because different pager programs need
2783 different command line switches or other configuration in order to
2784 support those sequences.
2785 \*(UA however knows about some widely used pagers and in a clean
2786 environment it is often enough to simply set
2788 please refer to that variable for more on this topic.
2793 is set then any active usage of colour and font attribute sequences
2794 is suppressed, but without affecting possibly established
2799 To define and control colours and font attributes a single multiplexer
2800 command family exists:
2802 shows or defines colour mappings for the given colour type (e.g.,
2805 can be used to remove mappings of a given colour type.
2806 Since colours are only available in interactive mode, it may make
2807 sense to conditionalize the colour setup by encapsulating it with
2810 .Bd -literal -offset indent
2811 if terminal && [ "$features" =% +colour ]
2812 colour iso view-msginfo ft=bold,fg=green
2813 colour iso view-header ft=bold,fg=red from,subject
2814 colour iso view-header fg=red
2816 uncolour iso view-header from,subject
2817 colour iso view-header ft=bold,fg=magenta,bg=cyan
2818 colour 256 view-header ft=bold,fg=208,bg=230 "subject,from"
2819 colour mono view-header ft=bold
2820 colour mono view-header ft=bold,ft=reverse subject,from
2825 .\" .Ss "Handling spam" {{{
2828 \*(OP \*(UA can make use of several spam interfaces for the purpose of
2829 identification of, and, in general, dealing with spam messages.
2830 A precondition of most commands in order to function is that the
2832 variable is set to one of the supported interfaces.
2833 Once messages have been identified as spam their (volatile)
2835 state can be prompted: the
2839 message specifications will address respective messages and their
2841 entries will be used when displaying the
2843 in the header display.
2848 rates the given messages and sets their
2851 If the spam interface offers spam scores those can also be displayed in
2852 the header display by including the
2862 will interact with the Bayesian filter of the chosen interface and learn
2863 the given messages as
2867 respectively; the last command can be used to cause
2869 of messages; it adheres to their current
2871 state and thus reverts previous teachings.
2876 will simply set and clear, respectively, the mentioned volatile
2878 message flag, without any interface interaction.
2887 requires a running instance of the
2889 server in order to function, started with the option
2891 shall Bayesian filter learning be possible.
2893 .Bd -literal -offset indent
2894 $ spamd -i localhost:2142 -i /tmp/.spamsock -d [-L] [-l]
2895 $ spamd --listen=localhost:2142 --listen=/tmp/.spamsock \e
2896 --daemonize [--local] [--allow-tell]
2900 Thereafter \*(UA can make use of these interfaces:
2902 .Bd -literal -offset indent
2903 $ \*(uA -Sspam-interface=spamc -Sspam-maxsize=500000 \e
2904 -Sspamc-command=/usr/local/bin/spamc \e
2905 -Sspamc-arguments="-U /tmp/.spamsock" -Sspamc-user=
2907 $ \*(uA -Sspam-interface=spamc -Sspam-maxsize=500000 \e
2908 -Sspamc-command=/usr/local/bin/spamc \e
2909 -Sspamc-arguments="-d localhost -p 2142" -Sspamc-user=
2913 Using the generic filter approach allows usage of programs like
2915 Here is an example, requiring it to be accessible via
2918 .Bd -literal -offset indent
2919 $ \*(uA -Sspam-interface=filter -Sspam-maxsize=500000 \e
2920 -Sspamfilter-ham="bogofilter -n" \e
2921 -Sspamfilter-noham="bogofilter -N" \e
2922 -Sspamfilter-nospam="bogofilter -S" \e
2923 -Sspamfilter-rate="bogofilter -TTu 2>/dev/null" \e
2924 -Sspamfilter-spam="bogofilter -s" \e
2925 -Sspamfilter-rate-scanscore="1;^(.+)$"
2929 Because messages must exist on local storage in order to be scored (or
2930 used for Bayesian filter training), it is possibly a good idea to
2931 perform the local spam check last:
2933 .Bd -literal -offset indent
2934 define spamdelhook {
2936 spamset (header x-dcc-brand-metrics "bulk")
2937 # Server-side spamassassin(1)
2938 spamset (header x-spam-flag "YES")
2939 del :s # TODO we HAVE to be able to do `spamrate :u ! :sS'
2945 set folder-hook-FOLDER=spamdelhook
2949 See also the documentation for the variables
2950 .Va spam-interface , spam-maxsize ,
2951 .Va spamc-command , spamc-arguments , spamc-user ,
2952 .Va spamfilter-ham , spamfilter-noham , spamfilter-nospam , \
2955 .Va spamfilter-rate-scanscore .
2958 .\" }}} (DESCRIPTION)
2961 .\" .Sh COMMANDS {{{
2964 Each command is typed on a line by itself,
2965 and may take arguments following the command word.
2966 An unquoted reverse solidus
2968 at the end of a command line
2970 the newline character: it is discarded and the next line of input is
2971 used as a follow-up line, with all leading whitespace removed;
2972 once the entire command line is completed, and after removal of the
2973 whitespace characters
2974 .Cm space , tabulator , newline
2975 as well as those defined by the variable
2977 from the beginning and end of the line, the processing documented in the
2979 Placing any whitespace characters at the beginning of a line will
2980 prevent a possible addition of the command line to the \*(OPal
2984 Apart from this generic cleanup mechanism \*(UA uses command-specific
2985 syntax rules for command line arguments, documented in the following.
2986 This is a completely different approach to the
2988 ell, which implements a standardized (programming) language, and
2989 performs several successive transformation steps after decomposing the
2990 given command line into tokens adhering standardized syntax guidelines.
2991 This sometimes has side-effects for shell-style arguments, for example
2993 without positional parameters is not collapsed to nothing, as can be
2994 seen in the example shown for the command
2998 Command names may be abbreviated, in which case the first command that
2999 matches the given prefix will be used.
3002 can be used to show the list of all commands, either alphabetically
3003 sorted or in prefix search order (these do not match, also because the
3004 POSIX standard prescribes a set of abbreviations).
3005 \*(OPally the command
3009 when given an argument, will show a documentation string for the
3010 command matching the expanded argument, as in
3012 which should be a shorthand of
3014 with these documentation strings both commands support a more
3016 listing mode which includes the argument type of the command and other
3017 information which applies; a handy suggestion might thus be:
3019 .Bd -literal -offset indent
3021 # Before v15: need to enable sh(1)ell-style on _entire_ line!
3022 localopts 1;wysh set verbose;ignerr eval "${@}";return ${?}
3024 ? commandalias xv '\ecall __xv'
3028 .\" .Ss "Command modifiers" {{{
3029 .Ss "Command modifiers"
3031 Commands may be prefixed by one or multiple command modifiers.
3035 The modifier reverse solidus
3038 to be placed first, prevents
3040 expansions on the remains of the line, e.g.,
3042 will always evaluate the command
3044 even if an (command)alias of the same name exists.
3046 content may itself contain further command modifiers, including
3047 an initial reverse solidus to prevent further expansions.
3053 indicates that any error generated by the following command should be
3054 ignored by the state machine and not cause a program exit with enabled
3056 or for the standardized exit cases in
3061 .Sx "INTERNAL VARIABLES" ,
3062 will be set to the real exit status of the command regardless.
3065 Some commands support the
3068 modifier: if used, they expect the name of a variable, which can itself
3069 be a variable, i.e., shell expansion is applied, as their first
3070 argument, and will place their computation result in it instead of the
3071 default location (it is usually written to standard output).
3073 The given name will be tested for being a valid
3075 variable name, and may therefore only consist of upper- and lowercase
3076 characters, digits, and the underscore; the hyphen-minus may be used as
3077 a non-portable extension; digits may not be used as first, hyphen-minus
3078 may not be used as last characters.
3079 In addition the name may either not be one of the known
3080 .Sx "INTERNAL VARIABLES" ,
3081 or must otherwise refer to a writable (non-boolean) value variable.
3082 The actual put operation may fail nonetheless, e.g., if the variable
3083 expects a number argument only a number will be accepted.
3084 Any error during these operations causes the command as such to fail,
3085 and the error number
3088 .Va ^ERR Ns -NOTSUP ,
3095 Last, but not least, the modifier
3098 can be used for some old and established commands to choose the new
3099 .Sx "Shell-style argument quoting"
3100 rules over the traditional
3101 .Sx "Old-style argument quoting" .
3105 .\" .Ss "Message list arguments" {{{
3106 .Ss "Message list arguments"
3108 Some commands expect arguments that represent messages (actually
3109 their symbolic message numbers), as has been documented above under
3110 .Sx "Specifying messages"
3112 If no explicit message list has been specified, the next message
3113 forward that satisfies the command's requirements will be used,
3114 and if there are no messages forward of the current message,
3115 the search proceeds backwards;
3116 if there are no good messages at all to be found, an error message is
3117 shown and the command is aborted.
3120 .\" .Ss "Old-style argument quoting" {{{
3121 .Ss "Old-style argument quoting"
3123 \*(ID This section documents the old, traditional style of quoting
3124 non-message-list arguments to commands which expect this type of
3125 arguments: whereas still used by the majority of such commands, the new
3126 .Sx "Shell-style argument quoting"
3127 may be available even for those via
3130 .Sx "Command modifiers" .
3131 Nonetheless care must be taken, because only new commands have been
3132 designed with all the capabilities of the new quoting rules in mind,
3133 which can, e.g., generate control characters.
3136 .Bl -bullet -offset indent
3138 An argument can be enclosed between paired double-quotes
3143 any whitespace, shell word expansion, or reverse solidus characters
3144 (except as described next) within the quotes are treated literally as
3145 part of the argument.
3146 A double-quote will be treated literally within single-quotes and vice
3148 Inside such a quoted string the actually used quote character can be
3149 used nonetheless by escaping it with a reverse solidus
3155 An argument that is not enclosed in quotes, as above, can usually still
3156 contain space characters if those spaces are reverse solidus escaped, as in
3160 A reverse solidus outside of the enclosing quotes is discarded
3161 and the following character is treated literally as part of the argument.
3165 .\" .Ss "Shell-style argument quoting" {{{
3166 .Ss "Shell-style argument quoting"
3168 Commands which don't expect message-list arguments use
3170 ell-style, and therefore POSIX standardized, argument parsing and
3172 \*(ID Most new commands only support these new rules and are flagged
3173 \*(NQ, some elder ones can use them with the command modifier
3175 in the future only this type of argument quoting will remain.
3178 A command line is parsed from left to right and an input token is
3179 completed whenever an unquoted, otherwise ignored, metacharacter is seen.
3180 Metacharacters are vertical bar
3186 as well as all characters from the variable
3189 .Cm space , tabulator , newline .
3190 The additional metacharacters left and right parenthesis
3192 and less-than and greater-than signs
3196 supports are not used, and are treated as ordinary characters: for one
3197 these characters are a vivid part of email addresses, and it seems
3198 highly unlikely that their function will become meaningful to \*(UA.
3200 .Bd -filled -offset indent
3201 .Sy Compatibility note:
3202 \*(ID Please note that even many new-style commands do not yet honour
3204 to parse their arguments: whereas the
3206 ell is a language with syntactic elements of clearly defined semantics,
3207 \*(UA parses entire input lines and decides on a per-command base what
3208 to do with the rest of the line.
3209 This also means that whenever an unknown command is seen all that \*(UA
3210 can do is cancellation of the processing of the remains of the line.
3212 It also often depends on an actual subcommand of a multiplexer command
3213 how the rest of the line should be treated, and until v15 we are not
3214 capable to perform this deep inspection of arguments.
3215 Nonetheless, at least the following commands which work with positional
3216 parameters fully support
3218 for an almost shell-compatible field splitting:
3219 .Ic call , call_if , read , vpospar , xcall .
3223 Any unquoted number sign
3225 at the beginning of a new token starts a comment that extends to the end
3226 of the line, and therefore ends argument processing.
3227 An unquoted dollar sign
3229 will cause variable expansion of the given name, which must be a valid
3231 ell-style variable name (see
3233 .Sx "INTERNAL VARIABLES"
3236 (shell) variables can be accessed through this mechanism, brace
3237 enclosing the name is supported (i.e., to subdivide a token).
3240 Whereas the metacharacters
3241 .Cm space , tabulator , newline
3242 only complete an input token, vertical bar
3248 also act as control operators and perform control functions.
3249 For now supported is semicolon
3251 which terminates a single command, therefore sequencing the command line
3252 and making the remainder of the line a subject to reevaluation.
3253 With sequencing, multiple command argument types and quoting rules may
3254 therefore apply to a single line, which can become problematic before
3255 v15: e.g., the first of the following will cause surprising results.
3258 .Dl ? echo one; set verbose; echo verbose=$verbose.
3259 .Dl ? echo one; wysh set verbose; echo verbose=$verbose.
3262 Quoting is a mechanism that will remove the special meaning of
3263 metacharacters and reserved words, and will prevent expansion.
3264 There are four quoting mechanisms: the escape character, single-quotes,
3265 double-quotes and dollar-single-quotes:
3268 .Bl -bullet -offset indent
3270 The literal value of any character can be preserved by preceding it
3271 with the escape character reverse solidus
3275 Arguments which are enclosed in
3276 .Ql 'single-\:quotes'
3277 retain their literal value.
3278 A single-quote cannot occur within single-quotes.
3281 The literal value of all characters enclosed in
3282 .Ql \(dqdouble-\:quotes\(dq
3283 is retained, with the exception of dollar sign
3285 which will cause variable expansion, as above, backquote (grave accent)
3287 (which not yet means anything special), reverse solidus
3289 which will escape any of the characters dollar sign
3291 (to prevent variable expansion), backquote (grave accent)
3295 (to prevent ending the quote) and reverse solidus
3297 (to prevent escaping, i.e., to embed a reverse solidus character as-is),
3298 but has no special meaning otherwise.
3301 Arguments enclosed in
3302 .Ql $'dollar-\:single-\:quotes'
3303 extend normal single quotes in that reverse solidus escape sequences are
3304 expanded as follows:
3306 .Bl -tag -compact -width "Ql \eNNN"
3308 bell control character (ASCII and ISO-10646 BEL).
3310 backspace control characer (ASCII and ISO-10646 BS).
3312 escape control character (ASCII and ISO-10646 ESC).
3316 form feed control character (ASCII and ISO-10646 FF).
3318 line feed control character (ASCII and ISO-10646 LF).
3320 carriage return control character (ASCII and ISO-10646 CR).
3322 horizontal tabulator control character (ASCII and ISO-10646 HT).
3324 vertical tabulator control character (ASCII and ISO-10646 VT).
3326 emits a reverse solidus character.
3330 double quote (escaping is optional).
3332 eight-bit byte with the octal value
3334 (one to three octal digits), optionally prefixed by an additional
3336 A 0 byte will suppress further output for the quoted argument.
3338 eight-bit byte with the hexadecimal value
3340 (one or two hexadecimal characters).
3341 A 0 byte will suppress further output for the quoted argument.
3343 the Unicode / ISO-10646 character with the hexadecimal codepoint value
3345 (one to eight hexadecimal digits) \(em note that Unicode defines the
3346 maximum codepoint ever to be supported as
3351 This escape is only supported in locales that support Unicode (see
3352 .Sx "Character sets" ) ,
3353 in other cases the sequence will remain unexpanded unless the given code
3354 point is ASCII compatible or (if the \*(OPal character set conversion is
3355 available) can be represented in the current locale.
3356 The character NUL will suppress further output for the quoted argument.
3360 except it takes only one to four hexadecimal digits.
3362 Emits the non-printable (ASCII and compatible) C0 control codes
3363 0 (NUL) to 31 (US), and 127 (DEL).
3364 Printable representations of ASCII control codes can be created by
3365 mapping them to a different part of the ASCII character set, which is
3366 possible by adding the number 64 for the codes 0 to 31, e.g., 7 (BEL) is
3367 .Ql 7 + 64 = 71 = G .
3368 The real operation is a bitwise logical XOR with 64 (bit 7 set, see
3370 thus also covering code 127 (DEL), which is mapped to 63 (question mark):
3371 .Ql ? vexpr ^ 127 64 .
3373 Whereas historically circumflex notation has often been used for
3374 visualization purposes of control codes, e.g.,
3376 the reverse solidus notation has been standardized:
3378 Some control codes also have standardized (ISO-10646, ISO C) aliases,
3379 as shown above (e.g.,
3383 whenever such an alias exists it will be used for display purposes.
3384 The control code NUL
3386 a non-standard extension) will suppress further output for the remains
3387 of the token (which may extend beyond the current quote), or, depending
3388 on the context, the remains of all arguments for the current command.
3390 Non-standard extension: expand the given variable name, as above.
3391 Brace enclosing the name is supported.
3393 Not yet supported, just to raise awareness: Non-standard extension.
3400 .Bd -literal -offset indent
3401 ? echo 'Quotes '${HOME}' and 'tokens" differ!"# no comment
3402 ? echo Quotes ${HOME} and tokens differ! # comment
3403 ? echo Don"'"t you worry$'\ex21' The sun shines on us. $'\eu263A'
3407 .\" .Ss "Raw data arguments for codec commands" {{{
3408 .Ss "Raw data arguments for codec commands"
3410 A special set of commands, which all have the string
3412 in their name, e.g.,
3416 take raw string data as input, which means that the content of the
3417 command input line is passed completely unexpanded and otherwise
3418 unchanged: like this the effect of the actual codec is visible without
3419 any noise of possible shell quoting rules etc., i.e., the user can input
3420 one-to-one the desired or questionable data.
3421 To gain a level of expansion, the entire command line can be
3425 .Bd -literal -offset indent
3426 ? vput shcodec res encode /usr/Sch\[:o]nes Wetter/heute.txt
3428 $'/usr/Sch\eu00F6nes Wetter/heute.txt'
3430 $'/usr/Sch\eu00F6nes Wetter/heute.txt'
3431 ? eval shcodec d $res
3432 /usr/Sch\[:o]nes Wetter/heute.txt
3436 .\" .Ss "Filename transformations" {{{
3437 .Ss "Filename transformations"
3439 Filenames, where expected, and unless documented otherwise, are
3440 subsequently subject to the following filename transformations, in
3443 .Bl -bullet -offset indent
3445 If the given name is a registered
3447 it will be replaced with the expanded shortcut.
3450 The filename is matched against the following patterns or strings:
3452 .Bl -hang -compact -width ".Ar %user"
3454 (Number sign) is expanded to the previous file.
3456 (Percent sign) is replaced by the invoking
3457 .Mx -ix "primary system mailbox"
3458 user's primary system mailbox, which either is the (itself expandable)
3460 if that is set, the standardized absolute pathname indicated by
3462 if that is set, or a built-in compile-time default otherwise.
3464 Expands to the primary system mailbox of
3466 (and never the value of
3468 regardless of its actual setting).
3470 (Ampersand) is replaced with the invoking users
3471 .Mx -ix "secondary mailbox"
3472 secondary mailbox, the
3479 directory (if that variable is set).
3481 Expands to the same value as
3483 but has special meaning when used with, e.g., the command
3485 the file will be treated as a primary system mailbox by, e.g., the
3489 commands, meaning that messages that have been read in the current
3490 session will be moved to the
3492 mailbox instead of simply being flagged as read.
3496 Meta expansions are applied to the resulting filename, as applicable to
3497 the resulting file access protocol (also see
3498 .Sx "On URL syntax and credential lookup" ) .
3499 If the fully expanded filename results in multiple pathnames and the
3500 command is expecting only one file, an error results.
3502 For the file-protocol, a leading tilde
3504 character will be replaced by the expansion of
3506 except when followed by a valid user name, in which case the home
3507 directory of the given user is used instead.
3509 In addition a shell expansion as if specified in double-quotes (see
3510 .Sx "Shell-style argument quoting" )
3511 is applied, so that any occurrence of
3515 will be replaced by the expansion of the variable, if possible;
3516 .Sx "INTERNAL VARIABLES"
3519 (shell) variables can be accessed through this mechanism.
3521 In interactive context, in order to allow simple value acceptance (via
3523 arguments will usually be displayed in a properly quoted form, e.g., a file
3524 .Ql diet\e is \ecurd.txt
3526 .Ql 'diet\e is \ecurd.txt' .
3530 .\" .Ss "Commands" {{{
3533 The following commands are available:
3535 .Bl -tag -width ".It Ic BaNg"
3542 command which follows, replacing unescaped exclamation marks with the
3543 previously executed command if the internal variable
3546 This command supports
3549 .Sx "Command modifiers" ,
3550 and manages the error number
3552 A 0 or positive exit status
3554 reflects the exit status of the command, negative ones that
3555 an error happened before the command was executed, or that the program
3556 did not exit cleanly, but, e.g., due to a signal: the error number is
3557 .Va ^ERR Ns -CHILD ,
3561 In conjunction with the
3563 modifier the following special cases exist:
3564 a negative exit status occurs if the collected data could not be stored
3565 in the given variable, which is a
3567 error that should otherwise not occur.
3568 .Va ^ERR Ns -CANCELED
3569 indicates that no temporary file could be created to collect the command
3570 output at first glance.
3571 In case of catchable out-of-memory situations
3573 will occur and \*(UA will try to store the empty string, just like with
3574 all other detected error conditions.
3579 The comment-command causes the entire line to be ignored.
3581 this really is a normal command which' purpose is to discard its
3584 indicating special character, which means that, e.g., trailing comments
3585 on a line are not possible.
3589 Goes to the next message in sequence and types it
3595 Display the preceding message, or the n'th previous message if given
3596 a numeric argument n.
3600 Show the current message number (the
3605 Show a brief summary of commands.
3606 \*(OP Given an argument a synopsis for the command in question is
3607 shown instead; commands can be abbreviated in general and this command
3608 can be used to see the full expansion of an abbreviation including the
3609 synopsis, try, e.g.,
3614 and see how the output changes.
3615 This mode also supports a more
3617 output, which will provide the informations documented for
3628 .It Ic account , unaccount
3629 (ac, una) Creates, selects or lists (an) account(s).
3630 Accounts are special incarnations of
3632 macros and group commands and variable settings which together usually
3633 arrange the environment for the purpose of creating an email account.
3634 Different to normal macros settings which are covered by
3636 \(en here by default enabled! \(en will not be reverted before the
3641 (case-insensitive) always exists, and all but it can be deleted by the
3642 latter command, and in one operation with the special name
3645 Without arguments a listing of all defined accounts is shown.
3646 With one argument the given account is activated: the system
3648 of that account will be activated (as via
3650 a possibly installed
3652 will be run, and the internal variable
3655 The two argument form is identical to defining a macro as via
3657 .Bd -literal -offset indent
3659 set folder=~/mail inbox=+syste.mbox record=+sent.mbox
3660 set from='(My Name) myname@myisp.example'
3661 set mta=smtp://mylogin@smtp.myisp.example
3668 Perform email address codec transformations on raw-data argument, rather
3669 according to email standards (RFC 5322; \*(ID will furtherly improve).
3673 .Sx "Command modifiers" ) ,
3674 and manages the error number
3676 The first argument must be either
3677 .Ar [+[+[+]]]e[ncode] ,
3681 and specifies the operation to perform on the rest of the line.
3684 Decoding will show how a standard-compliant MUA will display the given
3685 argument, which should be an email address.
3686 Please be aware that most MUAs have difficulties with the address
3687 standards, and vary wildly when (comments) in parenthesis,
3689 strings, or quoted-pairs, as below, become involved.
3690 \*(ID \*(UA currently does not perform decoding when displaying addresses.
3693 Skinning is identical to decoding but only outputs the plain address,
3694 without any string, comment etc. components.
3695 Another difference is that it may fail with the error number
3699 if decoding fails to find a(n) (valid) email address, in which case the
3700 unmodified input will be output again.
3703 Encoding supports four different modes, lesser automated versions can be
3704 chosen by prefixing one, two or three plus signs: the standard imposes
3705 a special meaning on some characters, which thus have to be transformed
3706 to so-called quoted-pairs by pairing them with a reverse solidus
3708 in order to remove the special meaning; this might change interpretation
3709 of the entire argument from what has been desired, however!
3710 Specify one plus sign to remark that parenthesis shall be left alone,
3711 two for not turning double quotation marks into quoted-pairs, and three
3712 for also leaving any user-specified reverse solidus alone.
3713 The result will always be valid, if a successful exit status is reported.
3714 \*(ID Addresses need to be specified in between angle brackets
3717 if the construct becomes more difficult, otherwise the current parser
3718 will fail; it is not smart enough to guess right.
3720 .Bd -literal -offset indent
3721 ? addrc enc "Hey, you",<diet@exam.ple>\e out\e there
3722 "\e"Hey, you\e", \e\e out\e\e there" <diet@exam.ple>
3723 ? addrc d "\e"Hey, you\e", \e\e out\e\e there" <diet@exam.ple>
3724 "Hey, you", \e out\e there <diet@exam.ple>
3725 ? addrc s "\e"Hey, you\e", \e\e out\e\e there" <diet@exam.ple>
3732 .It Ic alias , unalias
3733 (a, una) Aliases are a method of creating personal distribution lists
3734 that map a single alias name to none to multiple real receivers;
3735 these aliases become expanded after message composing is completed.
3736 The latter command removes the given list of aliases, the special name
3738 will discard all existing aliases.
3739 The former command shows all currently defined aliases when used without
3740 arguments, and with one argument the expansion of the given alias.
3741 With more than one argument, creates or appends to the alias name given
3742 as the first argument the remaining arguments.
3743 Alias names are restricted to alphabetic characters, digits, the
3744 underscore, hyphen-minus, the number sign, colon, commercial at and
3745 period, the last character can also be the dollar sign:
3746 .Ql [[:alnum:]_#:@.-]+$? .
3750 .It Ic alternates , unalternates
3751 \*(NQ (alt) Manage a list of alternate addresses or names of the active user,
3752 members of which will be removed from recipient lists.
3753 The latter command removes the given list of alternates, the special name
3755 will discard all existing aliases.
3756 The former command manages the error number
3758 and shows the current set of alternates when used without arguments; in
3759 this mode it supports
3762 .Sx "Command modifiers" ) .
3763 Otherwise the given arguments (after being checked for validity) are
3764 appended to the list of alternate names; in
3766 mode they replace that list instead.
3767 There is a set of implicit alternates which is formed of the values of
3776 .It Ic answered , unanswered
3777 Take a message lists and mark each message as having been answered,
3778 having not been answered, respectively.
3779 Messages will be marked answered when being
3781 to automatically if the
3785 .Sx "Message states" .
3790 .It Ic bind , unbind
3791 \*(OP\*(NQ The bind command extends the MLE (see
3792 .Sx "On terminal control and line editor" )
3793 with freely configurable key bindings.
3794 The latter command removes from the given context the given key binding,
3795 both of which may be specified as a wildcard
3799 will remove all bindings of all contexts.
3800 Due to initialization order unbinding will not work for built-in key
3801 bindings upon program startup, however: please use
3802 .Va line-editor-no-defaults
3803 for this purpose instead.
3806 With one argument the former command shows all key bindings for the
3807 given context, specifying an asterisk
3809 will show the bindings of all contexts; a more verbose listing will be
3810 produced if either of
3815 With two or more arguments a binding is (re)established:
3816 the first argument is the context to which the binding shall apply,
3817 the second argument is a comma-separated list of the
3819 which form the binding, and any remaining arguments form the expansion.
3820 To indicate that a binding shall not be auto-committed, but that the
3821 expansion shall instead be furtherly editable by the user, a commercial at
3823 (that will be removed) can be placed last in the expansion, from which
3824 leading and trailing whitespace will finally be removed.
3825 Reverse solidus cannot be used as the last character of expansion.
3828 Contexts define when a binding applies, i.e., a binding will not be seen
3829 unless the context for which it is defined for is currently active.
3830 This is not true for the shared binding
3832 which is the foundation for all other bindings and as such always
3833 applies, its bindings, however, only apply secondarily.
3834 The available contexts are the shared
3838 context which is used in all not otherwise documented situations, and
3840 which applies to compose mode only.
3844 which form the binding are specified as a comma-separated list of
3845 byte-sequences, where each list entry corresponds to one key(press).
3846 A list entry may, indicated by a leading colon character
3848 also refer to the name of a terminal capability; several dozen names
3849 will be compiled in and may be specified either by their
3851 or, if existing, by their
3853 name, regardless of the actually used \*(OPal terminal control library.
3854 It is possible to use any capability, as long as the name is resolvable
3855 by the \*(OPal control library or was defined via the internal variable
3857 Input sequences are not case-normalized, so that an exact match is
3858 required to update or remove a binding.
3861 .Bd -literal -offset indent
3862 ? bind base $'\eE',d mle-snarf-word-fwd # Esc(ape)
3863 ? bind base $'\eE',$'\ec?' mle-snarf-word-bwd # Esc, Delete
3864 ? bind default $'\ecA',:khome,w 'echo An editable binding@'
3865 ? bind default a,b,c rm -irf / @ # Another editable binding
3866 ? bind default :kf1 File %
3867 ? bind compose :kf1 ~e
3871 Note that the entire comma-separated list is first parsed (over) as a
3872 shell-token with whitespace as the field separator, before being parsed
3873 and expanded for real with comma as the field separator, therefore
3874 whitespace needs to be properly quoted, see
3875 .Sx "Shell-style argument quoting" .
3876 Using Unicode reverse solidus escape sequences renders a binding
3877 defunctional if the locale does not support Unicode (see
3878 .Sx "Character sets" ) ,
3879 and using terminal capabilities does so if no (corresponding) terminal
3880 control support is (currently) available.
3883 The following terminal capability names are built-in and can be used in
3885 or (if available) the two-letter
3888 See the respective manual for a list of capabilities.
3891 can be used to show all the capabilities of
3893 or the given terminal type;
3896 flag will also show supported (non-standard) extensions.
3899 .Bl -tag -compact -width kcuuf_or_kcuuf
3900 .It Cd kbs Ns \0or Cd kb
3902 .It Cd kdch1 Ns \0or Cd kD
3904 .It Cd kDC Ns \0or Cd *4
3905 \(em shifted variant.
3906 .It Cd kel Ns \0or Cd kE
3907 Clear to end of line.
3908 .It Cd kext Ns \0or Cd @9
3910 .It Cd kich1 Ns \0or Cd kI
3912 .It Cd kIC Ns \0or Cd #3
3913 \(em shifted variant.
3914 .It Cd khome Ns \0or Cd kh
3916 .It Cd kHOM Ns \0or Cd #2
3917 \(em shifted variant.
3918 .It Cd kend Ns \0or Cd @7
3920 .It Cd knp Ns \0or Cd kN
3922 .It Cd kpp Ns \0or Cd kP
3924 .It Cd kcub1 Ns \0or Cd kl
3925 Left cursor (with more modifiers: see below).
3926 .It Cd kLFT Ns \0or Cd #4
3927 \(em shifted variant.
3928 .It Cd kcuf1 Ns \0or Cd kr
3929 Right cursor (ditto).
3930 .It Cd kRIT Ns \0or Cd %i
3931 \(em shifted variant.
3932 .It Cd kcud1 Ns \0or Cd kd
3933 Down cursor (ditto).
3935 \(em shifted variant (only terminfo).
3936 .It Cd kcuu1 Ns \0or Cd ku
3939 \(em shifted variant (only terminfo).
3940 .It Cd kf0 Ns \0or Cd k0
3942 Add one for each function key up to
3947 .It Cd kf10 Ns \0or Cd k;
3949 .It Cd kf11 Ns \0or Cd F1
3951 Add one for each function key up to
3959 Some terminals support key-modifier combination extensions, e.g.,
3961 For example, the delete key,
3963 in its shifted variant, the name is mutated to
3965 then a number is appended for the states
3977 .Ql Shift+Alt+Control
3979 The same for the left cursor key,
3981 .Cd KLFT , KLFT3 , KLFT4 , KLFT5 , KLFT6 , KLFT7 , KLFT8 .
3984 It is advisable to use an initial escape or other control character (e.g.,
3986 for bindings which describe user key combinations (as opposed to purely
3987 terminal capability based ones), in order to avoid ambiguities whether
3988 input belongs to key sequences or not; it also reduces search time.
3991 may help shall keys and sequences be falsely recognized.
3996 \*(NQ Calls the given macro, which must have been created via
4001 Parameters given to macros are implicitly local to the macro's scope, and
4002 may be accessed via special (positional) parameters, e.g.,
4007 The positional parameters may be removed by
4009 ing them off the stack (exceeding the supported number of arguments
4011 .Va ^ERR Ns -OVERFLOW ) ,
4012 and are otherwise controllable via
4014 Macro execution can be terminated at any time by calling
4018 Calling macros recursively will at some time excess the stack size
4019 limit, causing a hard program abortion; if recursively calling a macro
4020 is the last command of the current macro, consider to use the command
4022 which will first release all resources of the current macro before
4023 replacing the current macro with the called one.
4024 Numeric and string operations can be performed via
4028 may be helpful to recreate argument lists.
4030 .Bd -literal -offset indent
4032 echo Parameter 1 of ${#} is ${1}, all: ${*} / ${@}
4035 call exmac Hello macro exmac!
4039 Caveats: \*(UA parses entire input lines and decides on a per-command
4040 base what to do with the rest of the line, different to the
4042 ell, which implements a standardized (programming) language, and
4043 performs several successive transformation steps after decomposing the
4044 given command line into tokens adhering standardized syntax guidelines.
4045 E.g., in the following code snippets of otherwise identical meaning,
4046 a shell will see zero arguments, whereas \*(UA sees one, unless an
4047 additional expansion (via
4051 .Bd -literal -offset indent
4052 $ cat > t.sh << '___'; cat > t.rc << '___'
4064 $ sh t.sh; \*(uA -X'source t.rc' -Xx
4075 if the given macro has been created via
4077 but doesn't fail nor warn if the macro doesn't exist.
4081 (ch) Change the working directory to
4083 or the given argument.
4089 \*(OP Only applicable to S/MIME signed messages.
4090 Takes a message list and a filename and saves the certificates
4091 contained within the message signatures to the named file in both
4092 human-readable and PEM format.
4093 The certificates can later be used to send encrypted messages to the
4094 respective message senders by setting
4095 .Va smime-encrypt-USER@HOST
4100 .It Ic charsetalias , uncharsetalias
4101 \*(NQ Manage (character set conversion) character set alias mappings,
4102 as documented in the section
4103 .Sx "Character sets" .
4104 Character set aliases are expanded recursively, but no expansion is
4105 performed on values of the user-settable variables, e.g.,
4107 These are effectively no-operations if character set conversion
4108 is not available (i.e., no
4112 Without arguments the list of all currently defined aliases is shown,
4113 with one argument the expansion of the given alias.
4114 Otherwise all given arguments are treated as pairs of character sets and
4115 their desired target alias name, creating new or changing already
4116 existing aliases, as necessary.
4118 The latter deletes all aliases given as arguments, the special argument
4120 will remove all aliases.
4124 (ch) Change the working directory to
4126 or the given argument.
4132 .It Ic collapse , uncollapse
4133 Only applicable to threaded mode.
4134 Takes a message list and makes all replies to these messages invisible
4135 in header summaries, except for
4139 Also when a message with collapsed replies is displayed,
4140 all of these are automatically uncollapsed.
4141 The latter command undoes collapsing.
4146 .It Ic colour , uncolour
4147 \*(OP\*(NQ Manage colour mappings of and for a
4148 .Sx "Coloured display" .
4149 The type of colour is given as the (case-insensitive) first argument,
4150 which must be one of
4152 for 256-colour terminals,
4157 for the standard 8-colour ANSI / ISO 6429 color palette and
4161 for monochrome terminals.
4162 Monochrome terminals cannot deal with colours, but only (some) font
4166 Without further arguments the list of all currently defined mappings
4167 for the given colour type is shown (as a special case giving
4171 will show the mappings of all types).
4172 Otherwise the second argument defines the mappable slot, and the third
4173 argument a (comma-separated list of) colour and font attribute
4174 specification(s), and the optional fourth argument can be used to
4175 specify a precondition: if conditioned mappings exist they are tested in
4176 (creation) order unless a (case-insensitive) match has been found, and
4177 the default mapping (if any has been established) will only be chosen as
4179 The types of precondition available depend on the mappable slot (see
4180 .Sx "Coloured display"
4181 for some examples), the following of which exist:
4184 Mappings prefixed with
4186 are used for the \*(OPal built-in Mailx-Line-Editor (MLE, see
4187 .Sx "On terminal control and line editor" )
4188 and do not support preconditions.
4190 .Bl -tag -compact -width view-partinfo
4192 This mapping is used for the position indicator that is visible when
4193 a line cannot be fully displayed on the screen.
4200 Mappings prefixed with
4202 are used in header summaries, and they all understand the preconditions
4204 (the current message) and
4206 for elder messages (only honoured in conjunction with
4207 .Va datefield-markout-older ) .
4209 .Bl -tag -compact -width view-partinfo
4211 This mapping is used for the
4213 that can be created with the
4217 formats of the variable
4220 For the complete header summary line except the
4222 and the thread structure.
4224 For the thread structure which can be created with the
4226 format of the variable
4231 Mappings prefixed with
4233 are used when displaying messages.
4235 .Bl -tag -compact -width view-partinfo
4237 This mapping is used for so-called
4239 lines, which are MBOX file format specific header lines.
4242 A comma-separated list of headers to which the mapping applies may be
4243 given as a precondition; if the \*(OPal regular expression support is
4244 available then if any of the
4246 (extended) regular expression characters is seen the precondition will
4247 be evaluated as (an extended) one.
4249 For the introductional message info line.
4250 .It Ar view-partinfo
4251 For MIME part info lines.
4255 The following (case-insensitive) colour definitions and font attributes
4256 are understood, multiple of which can be specified in a comma-separated
4266 It is possible (and often applicable) to specify multiple font
4267 attributes for a single mapping.
4270 foreground colour attribute:
4280 To specify a 256-color mode a decimal number colour specification in
4281 the range 0 to 255, inclusive, is supported, and interpreted as follows:
4283 .Bl -tag -compact -width "999 - 999"
4285 the standard ISO 6429 colors, as above.
4287 high intensity variants of the standard colors.
4289 216 colors in tuples of 6.
4291 grayscale from black to white in 24 steps.
4293 .Bd -literal -offset indent
4295 fg() { printf "\e033[38;5;${1}m($1)"; }
4296 bg() { printf "\e033[48;5;${1}m($1)"; }
4298 while [ $i -lt 256 ]; do fg $i; i=$(($i + 1)); done
4299 printf "\e033[0m\en"
4301 while [ $i -lt 256 ]; do bg $i; i=$(($i + 1)); done
4302 printf "\e033[0m\en"
4306 background colour attribute (see
4308 for possible values).
4314 will remove for the given colour type (the special type
4316 selects all) the given mapping; if the optional precondition argument is
4317 given only the exact tuple of mapping and precondition is removed.
4320 will remove all mappings (no precondition allowed), thus
4322 will remove all established mappings.
4327 .It Ic commandalias , uncommandalias
4328 \*(NQ Define or list, and remove, respectively, command aliases.
4329 An (command)alias can be used everywhere a normal command can be used,
4330 but always takes precedence: any arguments that are given to the command
4331 alias are joined onto the alias expansion, and the resulting string
4332 forms the command line that is, in effect, executed.
4333 The latter command removes all given aliases, the special name
4335 will remove all existing aliases.
4336 When used without arguments the former shows a list of all currently
4337 known aliases, with one argument only the expansion of the given one.
4339 With two or more arguments a command alias is defined or updated: the
4340 first argument is the name under which the remaining command line should
4341 be accessible, the content of which can be just about anything.
4342 An alias may itself expand to another alias, but to avoid expansion loops
4343 further expansion will be prevented if an alias refers to itself or if
4344 an expansion depth limit is reached.
4345 Explicit expansion prevention is available via reverse solidus
4348 .Sx "Command modifiers" .
4349 .Bd -literal -offset indent
4351 \*(uA: `commandalias': no such alias: xx
4352 ? commandalias xx echo hello,
4354 commandalias xx 'echo hello,'
4363 (C) Copy messages to files whose names are derived from the author of
4364 the respective message and do not mark them as being saved;
4365 otherwise identical to
4370 (c) Copy messages to the named file and do not mark them as being saved;
4371 otherwise identical to
4376 Show the name of the current working directory, as reported by
4381 .Sx "Command modifiers" ) .
4382 The return status is tracked via
4387 \*(OP For unencrypted messages this command is identical to
4389 Encrypted messages are first decrypted, if possible, and then copied.
4393 \*(OP For unencrypted messages this command is identical to
4395 Encrypted messages are first decrypted, if possible, and then copied.
4399 .It Ic define , undefine
4400 Without arguments the current list of macros, including their content,
4401 is shown, otherwise a macro is defined, replacing an existing macro of
4403 A macro definition is a sequence of commands in the following form:
4404 .Bd -literal -offset indent
4413 A defined macro can be invoked explicitly by using the
4418 commands, or implicitly if a macro hook is triggered, e.g., a
4420 It is possible to localize adjustments, like creation, deletion and
4422 .Sx "INTERNAL VARIABLES" ,
4425 command; the scope which is localized depends on how (i.e.,
4427 normal macro, folder hook, hook,
4429 switch) the macro is invoked.
4430 Execution of a macro body can be stopped from within by calling
4434 ed macro, given positional parameters can be
4436 ed, or become completely replaced, removed etc. via
4439 The latter command deletes the given macro, the special name
4441 will discard all existing macros.
4442 Creation and deletion of (a) macro(s) can be performed from within
4447 .It Ic delete , undelete
4448 (d, u) Marks the given message list as being or not being
4450 respectively; if no argument has been specified then the usual search
4451 for a visible message is performed, as documented for
4452 .Sx "Message list arguments" ,
4453 showing only the next input prompt if the search fails.
4454 Deleted messages will neither be saved in the
4456 .Sx "secondary mailbox"
4458 nor will they be available for most other commands.
4461 variable is set, the new
4463 or the last message restored, respectively, is automatically
4473 Superseded by the multiplexer
4479 Delete the given messages and automatically
4483 if one exists, regardless of the setting of
4490 up or down by one message when given
4494 argument, respectively.
4498 .It Ic draft , undraft
4499 Take message lists and mark each given message as being draft, or not
4500 being draft, respectively, as documented in the section
4501 .Sx "Message states" .
4505 \*(NQ (ec) Echoes arguments to standard output and writes a trailing
4506 newline, whereas the otherwise identical
4509 .Sx "Shell-style argument quoting"
4511 .Sx "Filename transformations"
4512 are applied to the expanded arguments.
4518 except that is echoes to standard error.
4521 In interactive sessions the \*(OPal message ring queue for
4523 will be used instead, if available.
4529 but does not write a trailing newline.
4535 but does not write a trailing newline.
4539 (e) Point the text editor (as defined in
4541 at each message from the given list in turn.
4542 Modified contents are discarded unless the
4544 variable is set, and are not used unless the mailbox can be written to
4545 and the editor returns a successful exit status.
4550 .Ic if Ns \0/\: Ic elif Ns \0/\: Ic else Ns \0/\: Ic endif
4551 conditional \(em if the condition of a preceding
4553 was false, check the following condition and execute the following block
4554 if it evaluates true.
4559 .Ic if Ns \0/\: Ic elif Ns \0/\: Ic else Ns \0/\: Ic endif
4560 conditional \(em if none of the conditions of the preceding
4564 commands was true, the
4570 (en) Marks the end of an
4571 .Ic if Ns \0/\: Ic elif Ns \0/\: Ic else Ns \0/\: Ic endif
4572 conditional execution block.
4577 \*(NQ \*(UA has a strict notion about which variables are
4578 .Sx "INTERNAL VARIABLES"
4579 and which are managed in the program
4581 Since some of the latter are a vivid part of \*(UAs functioning,
4582 however, they are transparently integrated into the normal handling of
4583 internal variables via
4587 To integrate other environment variables of choice into this
4588 transparent handling, and also to export internal variables into the
4589 process environment where they normally are not, a
4591 needs to become established with this command, as in, e.g.,
4594 .Dl environ link PERL5LIB TZ
4597 Afterwards changing such variables with
4599 will cause automatic updates of the program environment, and therefore
4600 be inherited by newly created child processes.
4601 Sufficient system support provided (it was in BSD as early as 1987, and
4602 is standardized since Y2K) removing such variables with
4604 will remove them also from the program environment, but in any way
4605 the knowledge they ever have been
4608 Note that this implies that
4610 may cause loss of such links.
4615 will remove an existing link, but leaves the variables as such intact.
4616 Additionally the subcommands
4620 are provided, which work exactly the same as the documented commands
4624 but (additionally un)link the variable(s) with the program environment
4625 and thus immediately export them to, or remove them from (if possible),
4626 respectively, the program environment.
4631 \*(OP Since \*(UA uses the console as a user interface it can happen
4632 that messages scroll by too fast to become recognized.
4633 An error message ring queue is available which stores duplicates of any
4634 error message and notifies the user in interactive sessions whenever
4635 a new error has occurred.
4636 The queue is finite: if its maximum size is reached any new message
4637 replaces the eldest.
4640 can be used to manage this message queue: if given
4642 or no argument the queue will be displayed and cleared,
4644 will only clear all messages from the queue.
4648 \*(NQ Construct a command by concatenating the arguments, separated with
4649 a single space character, and then evaluate the result.
4650 This command passes through the exit status
4654 of the evaluated command; also see
4656 .Bd -literal -offset indent
4667 call yyy '\ecall xxx' "b\e$'\et'u ' "
4675 (ex or x) Exit from \*(UA without changing the active mailbox and skip
4676 any saving of messages in the
4678 .Sx "secondary mailbox"
4680 as well as a possibly tracked line editor
4682 The optional status number argument will be passed through to
4684 \*(ID For now it can happen that the given status will be overwritten,
4685 later this will only occur if a later error needs to be reported onto an
4686 otherwise success indicating status.
4692 but open the mailbox read-only.
4697 (fi) The file command switches to a new mailbox.
4698 Without arguments it shows status information of the current mailbox.
4699 If an argument is given, it will write out changes (such as deletions)
4700 the user has made, open a new mailbox, update the internal variables
4701 .Va mailbox-resolved
4703 .Va mailbox-display ,
4704 and optionally display a summary of
4711 .Sx "Filename transformations"
4712 will be applied to the
4716 prefixes are, i.e., URL syntax is understood, e.g.,
4717 .Ql maildir:///tmp/mdirbox :
4718 if a protocol prefix is used the mailbox type is fixated and neither
4719 the auto-detection (read on) nor the
4722 \*(OPally URLs can also be used to access network resources, and it is
4723 possible to proxy all network traffic over a SOCKS5 server given via
4727 .Dl \*(IN protocol://[user[:password]@]host[:port][/path]
4728 .Dl \*(OU protocol://[user@]host[:port][/path]
4731 \*(OPally supported network protocols are
4735 (POP3 with SSL/TLS encrypted transport),
4741 part is valid only for IMAP; there it defaults to
4743 Network URLs require a special encoding as documented in the section
4744 .Sx "On URL syntax and credential lookup" .
4747 If the resulting file protocol (MBOX database)
4749 is located on a local filesystem then the list of all registered
4751 s is traversed in order to see whether a transparent intermediate
4752 conversion step is necessary to handle the given mailbox, in which case
4753 \*(UA will use the found hook to load and save data into and from
4754 a temporary file, respectively.
4755 Changing hooks will not affect already opened mailboxes.
4756 For example, the following creates hooks for the
4758 compression tool and a combined compressed and encrypted format:
4760 .Bd -literal -offset indent
4762 gzip 'gzip -dc' 'gzip -c' \e
4763 zst.pgp 'gpg -d | zstd -dc' 'zstd -19 -zc | gpg -e'
4767 MBOX database files are generally locked during file operations in order
4768 to avoid inconsistencies due to concurrent modifications.
4769 \*(OPal Mailbox files which \*(UA treats as the system
4774 .Sx "primary system mailbox" Ns
4775 es in general will also be protected by so-called dotlock files, the
4776 traditional way of mail spool file locking: for any file
4780 will be created for the duration of the synchronization \(em
4781 as necessary a privilege-separated dotlock child process will be used
4782 to accommodate for necessary privilege adjustments in order to create
4783 the dotlock file in the same directory
4784 and with the same user and group identities as the file of interest.
4787 \*(UA by default uses tolerant POSIX rules when reading MBOX database
4788 files, but it will detect invalid message boundaries in this mode and
4789 complain (even more with
4791 if any is seen: in this case
4793 can be used to create a valid MBOX database from the invalid input.
4796 If no protocol has been fixated, and
4798 refers to a directory with the subdirectories
4803 then it is treated as a folder in
4806 The maildir format stores each message in its own file, and has been
4807 designed so that file locking is not necessary when reading or writing
4811 \*(ID If no protocol has been fixated and no existing file has
4812 been found, the variable
4814 controls the format of mailboxes yet to be created.
4819 .It Ic filetype , unfiletype
4820 \*(NQ Define or list, and remove, respectively, file handler hooks,
4821 which provide (shell) commands that enable \*(UA to load and save MBOX
4822 files from and to files with the registered file extensions;
4823 it will use an intermediate temporary file to store the plain data.
4824 The latter command removes the hooks for all given extensions,
4826 will remove all existing handlers.
4828 When used without arguments the former shows a list of all currently
4829 defined file hooks, with one argument the expansion of the given alias.
4830 Otherwise three arguments are expected, the first specifying the file
4831 extension for which the hook is meant, and the second and third defining
4832 the load- and save commands, respectively, to deal with the file type,
4833 both of which must read from standard input and write to standard
4835 Changing hooks will not affect already opened mailboxes (\*(ID except below).
4836 \*(ID For now too much work is done, and files are oftened read in twice
4837 where once would be sufficient: this can cause problems if a filetype is
4838 changed while such a file is opened; this was already so with the
4839 built-in support of .gz etc. in Heirloom, and will vanish in v15.
4840 \*(ID For now all handler strings are passed to the
4841 .Ev SHELL for evaluation purposes; in the future a
4843 prefix to load and save commands may mean to bypass this shell instance:
4844 placing a leading space will avoid any possible misinterpretations.
4845 .Bd -literal -offset indent
4846 ? filetype bz2 'bzip2 -dc' 'bzip2 -zc' \e
4847 gz 'gzip -dc' 'gzip -c' xz 'xz -dc' 'xz -zc' \e
4848 zst 'zstd -dc' 'zstd -19 -zc' \e
4849 zst.pgp 'gpg -d | zstd -dc' 'zstd -19 -zc | gpg -e'
4850 ? set record=+sent.zst.pgp
4855 .It Ic flag , unflag
4856 Take message lists and mark the messages as being flagged, or not being
4857 flagged, respectively, for urgent/special attention.
4859 .Sx "Message states" .
4868 With no arguments, list the names of the folders in the folder directory.
4869 With an existing folder as an argument,
4870 lists the names of folders below the named folder.
4876 but saves the message in a file named after the local part of the first
4877 recipient's address (instead of in
4884 but saves the message in a file named after the local part of the first
4885 recipient's address (instead of in
4892 but responds to all recipients regardless of the
4897 .It Ic followupsender
4900 but responds to the sender only regardless of the
4908 but saves the message in a file named after the local part of the
4909 recipient's address (instead of in
4914 Takes a message and the address of a recipient
4915 and forwards the message to him.
4916 The text of the original message is included in the new one,
4917 with the value of the
4918 .Va forward-inject-head
4919 variable preceding it.
4920 To filter the included header fields to the desired subset use the
4922 slot of the white- and blacklisting command
4924 Only the first part of a multipart message is included unless
4925 .Va forward-as-attachment ,
4926 and recipient addresses will be stripped from comments, names etc.
4927 unless the internal variable
4933 (f) Takes a list of message specifications and displays a summary of
4934 their message headers, exactly as via
4936 An alias of this command is
4939 .Sx "Specifying messages" .
4950 \*(OB Superseded by the multiplexer
4954 \*(OB Superseded by the multiplexer
4957 .It Ic ghost , unghost
4960 .Ic uncommandalias .
4964 .It Ic headerpick , unheaderpick
4965 \*(NQ Multiplexer command to manage white- and blacklisting
4966 selections of header fields for a variety of applications.
4967 Without arguments the set of contexts that have settings is displayed.
4968 When given arguments, the first argument is the context to which the
4969 command applies, one of (case-insensitive)
4971 for display purposes (via, e.g.,
4974 for selecting which headers shall be stored persistently when
4980 ing messages (note that MIME related etc. header fields should not be
4981 ignored in order to not destroy usability of the message in this case),
4983 for stripping down messages when
4985 ing message (has no effect if
4986 .Va forward-as-attachment
4989 for defining user-defined set of fields for the command
4992 The current settings of the given context are displayed if it is the
4994 A second argument denotes the type of restriction that is to be chosen,
4995 it may be (a case-insensitive prefix of)
4999 for white- and blacklisting purposes, respectively.
5000 Establishing a whitelist suppresses inspection of the corresponding
5003 If no further argument is given the current settings of the given type
5004 will be displayed, otherwise the remaining arguments specify header
5005 fields, which \*(OPally may be given as regular expressions, to be added
5007 The special wildcard field (asterisk,
5009 will establish a (fast) shorthand setting which covers all fields.
5011 The latter command always takes three or more arguments and can be used
5012 to remove selections, i.e., from the given context, the given type of
5013 list, all the given headers will be removed, the special argument
5015 will remove all headers.
5019 (h) Show the current group of headers, the size of which depends on
5022 and the style of which can be adjusted with the variable
5024 If a message-specification is given the group of headers containing the
5025 first message therein is shown and the message at the top of the screen
5038 (this mode also supports a more
5042 the list of history entries;
5045 argument selects and evaluates the respective history entry,
5046 which will become the new history top; a negative number is used as an
5047 offset to the current command, e.g.,
5049 will select the last command, the history top.
5050 The default mode if no arguments are given is
5053 .Sx "On terminal control and line editor"
5054 for more on this topic.
5060 Takes a message list and marks each message therein to be saved in the
5065 .Sx "secondary mailbox"
5067 Does not override the
5070 \*(UA deviates from the POSIX standard with this command, because a
5072 command issued after
5074 will display the following message, not the current one.
5079 (i) Part of the nestable
5080 .Ic if Ns \0/\: Ic elif Ns \0/\: Ic else Ns \0/\: Ic endif
5081 conditional execution construct \(em if the given condition is true then
5082 the encapsulated block is executed.
5083 The POSIX standards supports the (case-insensitive) conditions
5088 end, all remaining conditions are non-portable extensions.
5089 \*(ID These commands do not yet use
5090 .Sx "Shell-style argument quoting"
5091 and therefore do not know about input tokens, so that syntax
5092 elements have to be surrounded by whitespace; in v15 \*(UA will inspect
5093 all conditions bracket group wise and consider the tokens, representing
5094 values and operators, therein, which also means that variables will
5095 already have been expanded at that time (just like in the shell).
5097 .Bd -literal -offset indent
5106 The (case-insensitive) condition
5108 erminal will evaluate to true if the standard input is a terminal, i.e.,
5109 in interactive sessions.
5110 Another condition can be any boolean value (see the section
5111 .Sx "INTERNAL VARIABLES"
5112 for textual boolean representations) to mark an enwrapped block as
5115 .Dq always execute .
5116 (It shall be remarked that a faulty condition skips all branches until
5121 .Sx "Shell-style argument quoting"
5122 will be used, and this command will simply interpret expanded tokens.)
5123 It is possible to check
5124 .Sx "INTERNAL VARIABLES"
5127 variables for existence or compare their expansion against a user given
5128 value or another variable by using the
5130 .Pf ( Dq variable next )
5131 conditional trigger character;
5132 a variable on the right hand side may be signalled using the same
5134 Variable names may be enclosed in a pair of matching braces.
5135 When this mode has been triggered, several operators are available:
5138 Integer operators treat the arguments on the left and right hand side of
5139 the operator as integral numbers and compare them arithmetically.
5140 It is an error if any of the operands is not a valid integer, an empty
5141 argument (which implies it had been quoted) is treated as if it were 0.
5142 Available operators are
5146 (less than or equal to),
5152 (greater than or equal to), and
5157 String data operators compare the left and right hand side according to
5158 their textual content.
5159 Unset variables are treated as the empty string.
5160 The behaviour of string operators can be adjusted by prefixing the
5161 operator with the modifier trigger commercial at
5163 followed by none to multiple modifiers: for now supported is
5165 which turns the comparison into a case-insensitive one: this is
5166 implied if no modifier follows the trigger.
5169 Available string operators are
5173 (less than or equal to),
5179 (greater than or equal to),
5183 (is substring of) and
5185 (is not substring of).
5186 By default these operators work on bytes and (therefore) do not take
5187 into account character set specifics.
5188 If the case-insensitivity modifier has been used, case is ignored
5189 according to the rules of the US-ASCII encoding, i.e., bytes are
5193 When the \*(OPal regular expression support is available, the additional
5199 They treat the right hand side as an extended regular expression that is
5200 matched according to the active locale (see
5201 .Sx "Character sets" ) ,
5202 i.e., character sets should be honoured correctly.
5205 Conditions can be joined via AND-OR lists (where the AND operator is
5207 and the OR operator is
5209 which have equal precedence and will be evaluated with left
5210 associativity, thus using the same syntax that is known for the
5212 It is also possible to form groups of conditions and lists by enclosing
5213 them in pairs of brackets
5214 .Ql [\ \&.\&.\&.\ ] ,
5215 which may be interlocked within each other, and also be joined via
5219 The results of individual conditions and entire groups may be modified
5220 via unary operators: the unary operator
5222 will reverse the result.
5224 .Bd -literal -offset indent
5225 # (This not in v15, there [ -n "$debug"]!)
5229 if [ "$ttycharset" == UTF-8 ] || [ "$ttycharset" @i== UTF8 ]
5230 echo *ttycharset* is UTF-8, the former case-sensitive!
5233 if [ "${t1}" == "${t2}" ]
5234 echo These two variables are equal
5236 if [ "$features" =% +regex ] && [ "$TERM" @i=~ "^xterm\&.*" ]
5237 echo ..in an X terminal
5239 if [ [ true ] && [ [ "${debug}" != '' ] || \e
5240 [ "$verbose" != '' ] ] ]
5243 if true && [ "$debug" != '' ] || [ "${verbose}" != '' ]
5244 echo Left associativity, as is known from the shell
5253 Superseded by the multiplexer
5258 Shows the names of all available commands, alphabetically sorted.
5259 If given any non-whitespace argument the list will be shown in the order
5260 in which command prefixes are searched.
5261 \*(OP In conjunction with a set variable
5263 additional information will be provided for each command: the argument
5264 type will be indicated, the documentation string will be shown,
5265 and the set of command flags will show up:
5267 .Bl -tag -compact -width ".It Ql BaNg"
5268 .It Ql "vput modifier"
5269 command supports the command modifier
5271 .It Ql "errno in *!*"
5272 the error number is tracked in
5275 commands needs an active mailbox, a
5277 .It Ql "ok: batch or interactive"
5278 command may only be used in interactive or
5281 .It Ql "ok: send mode"
5282 command can be used in send mode.
5283 .It Ql "not ok: compose mode"
5284 command is not available when in compose mode.
5285 .It Ql "not ok: during startup"
5286 command cannot be used during program startup, e.g., while loading
5287 .Sx "Resource files" .
5288 .It Ql "ok: in subprocess"
5289 command is allowed to be used when running in a subprocess instance,
5290 e.g., from within a macro that is called via
5291 .Va on-compose-splice .
5296 This command can be used to localize changes to variables, meaning that
5297 their state will be reverted to the former one once the covered scope
5299 It can only be used inside of macro definition blocks introduced by
5303 and is interpreted as a boolean (string, see
5304 .Sx "INTERNAL VARIABLES" ) ;
5307 of an account is left once it is switched off again.
5308 .Bd -literal -offset indent
5309 define temporary_settings {
5310 set possibly_global_option1
5315 set possibly_global_option2
5324 enables change localization and calls
5326 which explicitly resets localization, then any value changes within
5328 will still be reverted by
5330 \*(ID Once the outermost level, the one which enabled localization
5331 first, is left, but no earlier, all adjustments will be unrolled.
5332 \*(ID Likewise worth knowing, if in this example
5334 changes to a different
5336 which sets some variables that are yet covered by localizations, their
5337 scope will be extended, and in fact leaving the
5339 will (thus) restore settings in (likely) global scope which actually
5340 were defined in a local, private context.
5344 Reply to messages that come in via known
5347 .Pf ( Ic mlsubscribe )
5348 mailing lists, or pretend to do so (see
5349 .Sx "Mailing lists" ) :
5352 functionality this will actively resort and even remove message
5353 recipients in order to generate a message that is supposed to be sent to
5355 For example it will also implicitly generate a
5356 .Ql Mail-Followup-To:
5357 header if that seems useful, regardless of the setting of the variable
5359 For more documentation please refer to
5360 .Sx "On sending mail, and non-interactive mode" .
5366 but saves the message in a file named after the local part of the first
5367 recipient's address (instead of in
5372 (m) Takes a (list of) recipient address(es) as (an) argument(s),
5373 or asks on standard input if none were given;
5374 then collects the remaining mail content and sends it out.
5375 For more documentation please refer to
5376 .Sx "On sending mail, and non-interactive mode" .
5380 (mb) The given message list is to be sent to the
5382 .Sx "secondary mailbox"
5384 when \*(UA is quit; this is the default action unless the variable
5387 \*(ID This command can only be used in a
5389 .Sx "primary system mailbox" .
5393 .It Ic mimetype , unmimetype
5394 Without arguments the content of the MIME type cache will displayed;
5395 a more verbose listing will be produced if either of
5400 When given arguments they will be joined, interpreted as shown in
5401 .Sx "The mime.types files"
5403 .Sx "HTML mail and MIME attachments" ) ,
5404 and the resulting entry will be added (prepended) to the cache.
5405 In any event MIME type sources are loaded first as necessary \(en
5406 .Va mimetypes-load-control
5407 can be used to fine-tune which sources are actually loaded.
5409 The latter command deletes all specifications of the given MIME type, thus
5410 .Ql ? unmimetype text/plain
5411 will remove all registered specifications for the MIME type
5415 will discard all existing MIME types, just as will
5417 but which also reenables cache initialization via
5418 .Va mimetypes-load-control .
5422 .It Ic mlist , unmlist
5423 The latter command removes all given mailing-lists, the special name
5425 can be used to remove all registered lists.
5426 The former will list all currently defined mailing lists (and their
5427 attributes, if any) when used without arguments; a more verbose listing
5428 will be produced if either of
5433 Otherwise all given arguments will be added and henceforth be recognized
5435 If the \*(OPal regular expression support is available then mailing
5436 lists may also be specified as (extended) regular expressions (see
5442 \*(ID Only available in interactive mode, this command allows to display
5443 MIME parts which require external MIME handler programs to run which do
5444 not integrate in \*(UAs normal
5447 .Sx "HTML mail and MIME attachments" ) .
5448 (\*(ID No syntax to directly address parts, this restriction may vanish.)
5449 The user will be asked for each non-text part of the given message in
5450 turn whether the registered handler shall be used to display the part.
5454 .It Ic mlsubscribe , unmlsubscribe
5455 The latter command removes the subscription attribute from all given
5456 mailing-lists, the special name
5458 can be used to do so for any registered list.
5459 The former will list all currently defined mailing lists which have
5460 a subscription attribute when used without arguments; a more verbose
5461 listing will be produced if either of
5466 Otherwise this attribute will be set for all given mailing lists,
5467 newly creating them as necessary (as via
5476 but moves the messages to a file named after the local part of the
5477 sender address of the first message (instead of in
5484 but marks the messages for deletion if they were transferred
5491 but also displays header fields which would not pass the
5493 selection, and all MIME parts.
5501 on the given messages, even in non-interactive mode and as long as the
5502 standard output is a terminal.
5508 \*(OP When used without arguments or if
5510 has been given the content of the
5512 cache is shown, loading it first as necessary.
5515 then the cache will only be initialized and
5517 will remove its contents.
5518 Note that \*(UA will try to load the file only once, use
5519 .Ql Ic \&\&netrc Ns \:\0\:clear
5520 to unlock further attempts.
5525 .Sx "On URL syntax and credential lookup" ;
5527 .Sx "The .netrc file"
5528 documents the file format in detail.
5532 Checks for new mail in the current folder without committing any changes
5534 If new mail is present, a message is shown.
5538 the headers of each new message are also shown.
5539 This command is not available for all mailbox types.
5547 Goes to the next message in sequence and types it.
5548 With an argument list, types the next matching message.
5562 If the current folder is accessed via a network connection, a
5564 command is sent, otherwise no operation is performed.
5570 but also displays header fields which would not pass the
5572 selection, and all MIME parts.
5580 on the given messages, even in non-interactive mode and as long as the
5581 standard output is a terminal.
5589 but also pipes header fields which would not pass the
5591 selection, and all parts of MIME
5592 .Ql multipart/alternative
5597 (pi) Takes a message list and a shell command
5598 and pipes the messages through the command.
5599 Without an argument the current message is piped through the command
5606 every message is followed by a formfeed character.
5627 (q) Terminates the session, saving all undeleted, unsaved messages in
5630 .Sx "secondary mailbox"
5632 preserving all messages marked with
5636 or never referenced in the system
5638 and removing all other messages from the
5640 .Sx "primary system mailbox" .
5641 If new mail has arrived during the session,
5643 .Dq You have new mail
5645 If given while editing a mailbox file with the command line option
5647 then the edit file is rewritten.
5648 A return to the shell is effected,
5649 unless the rewrite of edit file fails,
5650 in which case the user can escape with the exit command.
5651 The optional status number argument will be passed through to
5653 \*(ID For now it can happen that the given status will be overwritten,
5654 later this will only occur if a later error needs to be reported onto an
5655 otherwise success indicating status.
5659 \*(NQ Read a line from standard input, or the channel set active via
5661 and assign the data, which will be splitted as indicated by
5663 to the given variables.
5664 The variable names are checked by the same rules as documented for
5666 and the same error codes will be seen in
5670 indicates the number of bytes read, it will be
5672 with the error number
5676 in case of I/O errors, or
5679 If there are more fields than variables, assigns successive fields to the
5680 last given variable.
5681 If there are less fields than variables, assigns the empty string to the
5683 .Bd -literal -offset indent
5686 ? echo "<$a> <$b> <$c>"
5688 ? wysh set ifs=:; read a b c;unset ifs
5689 hey2.0,:"'you ",:world!:mars.:
5690 ? echo $?/$^ERRNAME / <$a><$b><$c>
5691 0/NONE / <hey2.0,><"'you ",><world!:mars.:><><>
5696 \*(NQ Manages input channels for
5698 to be used to avoid complicated or impracticable code, like calling
5700 from within a macro in non-interactive mode.
5701 Without arguments, or when the first argument is
5703 a listing of all known channels is printed.
5704 Channels can otherwise be
5706 d, and existing channels can be
5710 d by giving the string used for creation.
5712 The channel name is expected to be a file descriptor number, or,
5713 if parsing the numeric fails, an input file name that undergoes
5714 .Sx "Filename transformations" .
5715 E.g. (this example requires a modern shell):
5716 .Bd -literal -offset indent
5717 $ LC_ALL=C printf 'echon "hey, "\enread a\enyou\enecho $a' |\e
5720 $ LC_ALL=C printf 'echon "hey, "\enread a\enecho $a' |\e
5721 LC_ALL=C 6<<< 'you' \*(uA -R#X'readctl create 6'
5735 Removes the named files or directories.
5736 If a name refer to a mailbox, e.g., a Maildir mailbox, then a mailbox
5737 type specific removal will be performed, deleting the complete mailbox.
5738 The user is asked for confirmation in interactive mode.
5742 Takes the name of an existing folder
5743 and the name for the new folder
5744 and renames the first to the second one.
5745 Both folders must be of the same type.
5749 (R) Replies to only the sender of each message of the given message
5750 list, by using the first message as the template to quote, for the
5754 will exchange this command with
5756 Unless the internal variable
5758 is set the recipient address will be stripped from comments, names etc.
5762 (r) Take a message and group-responds to it by addressing the sender
5763 and all recipients, subject to
5767 .Va followup-to-honour ,
5770 .Va recipients-in-cc
5771 influence response behaviour.
5772 Unless the internal variable
5774 is set recipient addresses will be stripped from comments, names etc.
5784 offers special support for replying to mailing lists.
5785 For more documentation please refer to
5786 .Sx "On sending mail, and non-interactive mode" .
5792 but initiates a group-reply regardless of the value of
5799 but responds to the sender only regardless of the value of
5806 but does not add any header lines.
5807 This is not a way to hide the sender's identity,
5808 but useful for sending a message again to the same recipients.
5812 Takes a list of messages and a user name
5813 and sends each message to the named user.
5815 and related header fields are prepended to the new copy of the message.
5818 is only performed if
5838 .It Ic respondsender
5844 (ret) Superseded by the multiplexer
5849 Only available inside the scope of a
5853 this will stop evaluation of any further macro content, and return
5854 execution control to the caller.
5855 The two optional parameters must be specified as positive decimal
5856 numbers and default to the value 0:
5857 the first argument specifies the signed 32-bit return value (stored in
5859 \*(ID and later extended to signed 64-bit),
5860 the second the signed 32-bit error number (stored in
5864 a non-0 exit status may cause the program to exit.
5870 but saves the messages in a file named after the local part of the
5871 sender of the first message instead of (in
5873 and) taking a filename argument; the variable
5875 is inspected to decide on the actual storage location.
5879 (s) Takes a message list and a filename and appends each message in turn
5880 to the end of the file.
5881 If no filename is given, the
5883 .Sx "secondary mailbox"
5886 The filename in quotes, followed by the generated character count
5887 is echoed on the user's terminal.
5890 .Sx "primary system mailbox"
5891 the messages are marked for deletion.
5892 .Sx "Filename transformations"
5896 \*(OB Superseded by the multiplexer
5900 \*(OB Superseded by the multiplexer
5904 \*(OB Superseded by the multiplexer
5909 Takes a message specification (list) and displays a header summary of
5910 all matching messages, as via
5912 This command is an alias of
5915 .Sx "Specifying messages" .
5919 Takes a message list and marks all messages as having been read.
5925 (se, \*(NQ uns) The latter command will delete all given variables,
5926 the former, when used without arguments, will show all variables which
5927 are currently known to \*(UA.
5928 A more verbose listing will be produced if
5934 Remarks: the list mode will not automatically link-in known
5936 variables, but only explicit addressing will, e.g., via
5938 using a variable in an
5940 condition or a string passed to
5944 ting, as well as some program-internal use cases.
5947 Otherwise the given variables (and arguments) are set or adjusted.
5948 Arguments are of the form
5950 (no space before or after
5954 if there is no value, i.e., a boolean variable.
5955 \*(ID In conjunction with the
5958 .Sx "Shell-style argument quoting"
5959 can be used to quote arguments as necessary.
5960 \*(ID Otherwise quotation marks may be placed around any part of the
5961 assignment statement to quote blanks or tabs.
5964 .Dl ? wysh set indentprefix=' -> '
5967 If an argument begins with
5971 the effect is the same as invoking the
5973 command with the remaining part of the variable
5974 .Pf ( Ql unset save ) .
5979 that is known to map to an environment variable will automatically cause
5980 updates in the program environment (unsetting a variable in the
5981 environment requires corresponding system support) \(em use the command
5983 for further environmental control.
5988 .Sx "INTERNAL VARIABLES"
5995 Apply shell quoting rules to the given raw-data arguments.
5999 .Sx "Command modifiers" ) .
6000 The first argument specifies the operation:
6004 cause shell quoting to be applied to the remains of the line, and
6005 expanded away thereof, respectively.
6006 If the former is prefixed with a plus-sign, the quoted result will not
6007 be roundtrip enabled, and thus can be decoded only in the very same
6008 environment that was used to perform the encode; also see
6009 .Cd mle-quote-rndtrip .
6010 If the coding operation fails the error number
6013 .Va ^ERR Ns -CANCELED ,
6014 and the unmodified input is used as the result; the error number may
6015 change again due to output or result storage errors.
6019 \*(NQ (sh) Invokes an interactive version of the shell,
6020 and returns its exit status.
6024 .It Ic shortcut , unshortcut
6025 Without arguments the list of all currently defined shortcuts is
6026 shown, with one argument the expansion of the given shortcut.
6027 Otherwise all given arguments are treated as pairs of shortcuts and
6028 their expansions, creating new or changing already existing shortcuts,
6030 The latter command will remove all given shortcuts, the special name
6032 will remove all registered shortcuts.
6036 \*(NQ Shift the positional parameter stack (starting at
6038 by the given number (which must be a positive decimal),
6039 or 1 if no argument has been given.
6040 It is an error if the value exceeds the number of positional parameters.
6041 If the given number is 0, no action is performed, successfully.
6042 The stack as such can be managed via
6044 Note this command will fail in
6046 and hook macros unless the positional parameter stack has been
6047 explicitly created in the current context via
6054 but performs neither MIME decoding nor decryption, so that the raw
6055 message text is shown.
6059 (si) Shows the size in characters of each message of the given
6064 \*(NQ Sleep for the specified number of seconds (and optionally
6065 milliseconds), by default interruptably.
6066 If a third argument is given the sleep will be uninterruptible,
6067 otherwise the error number
6071 if the sleep has been interrupted.
6072 The command will fail and the error number will be
6073 .Va ^ERR Ns -OVERFLOW
6074 if the given duration(s) overflow the time datatype, and
6076 if the given durations are no valid integers.
6081 .It Ic sort , unsort
6082 The latter command disables sorted or threaded mode, returns to normal
6083 message order and, if the
6086 displays a header summary.
6087 The former command shows the current sorting criterion when used without
6088 an argument, but creates a sorted representation of the current folder
6089 otherwise, and changes the
6091 command and the addressing modes such that they refer to messages in
6093 Message numbers are the same as in regular mode.
6097 a header summary in the new order is also displayed.
6098 Automatic folder sorting can be enabled by setting the
6100 variable, as in, e.g.,
6101 .Ql set autosort=thread .
6102 Possible sorting criterions are:
6105 .Bl -tag -compact -width "subject"
6107 Sort the messages by their
6109 field, that is by the time they were sent.
6111 Sort messages by the value of their
6113 field, that is by the address of the sender.
6116 variable is set, the sender's real name (if any) is used.
6118 Sort the messages by their size.
6120 \*(OP Sort the message by their spam score, as has been classified by
6123 Sort the messages by their message status.
6125 Sort the messages by their subject.
6127 Create a threaded display.
6129 Sort messages by the value of their
6131 field, that is by the address of the recipient.
6134 variable is set, the recipient's real name (if any) is used.
6140 \*(NQ (so) The source command reads commands from the given file.
6141 .Sx "Filename transformations"
6143 If the given expanded argument ends with a vertical bar
6145 then the argument will instead be interpreted as a shell command and
6146 \*(UA will read the output generated by it.
6147 Interpretation of commands read is stopped when an error is encountered.
6150 cannot be used from within macros that execute as
6151 .Va folder-hook Ns s
6154 i.e., it can only be called from macros that were
6159 \*(NQ The difference to
6161 (beside not supporting pipe syntax aka shell command input) is that
6162 this command will not generate an error nor warn if the given file
6163 argument cannot be opened successfully.
6167 \*(OP Takes a list of messages and clears their
6173 \*(OP Takes a list of messages and causes the
6175 to forget it has ever used them to train its Bayesian filter.
6176 Unless otherwise noted the
6178 flag of the message is inspected to chose whether a message shall be
6186 \*(OP Takes a list of messages and informs the Bayesian filter of the
6190 This also clears the
6192 flag of the messages in question.
6196 \*(OP Takes a list of messages and rates them using the configured
6197 .Va spam-interface ,
6198 without modifying the messages, but setting their
6200 flag as appropriate; because the spam rating headers are lost the rate
6201 will be forgotten once the mailbox is left.
6202 Refer to the manual section
6204 for the complete picture of spam handling in \*(UA.
6208 \*(OP Takes a list of messages and sets their
6214 \*(OP Takes a list of messages and informs the Bayesian filter of the
6220 flag of the messages in question.
6236 slot for white- and blacklisting header fields.
6240 (to) Takes a message list and types out the first
6242 lines of each message on the users' terminal.
6243 Unless a special selection has been established for the
6247 command, the only header fields that are displayed are
6258 It is possible to apply compression to what is displayed by setting
6260 Messages are decrypted and converted to the terminal character set
6265 (tou) Takes a message list and marks the messages for saving in the
6267 .Sx "secondary mailbox"
6269 \*(UA deviates from the POSIX standard with this command,
6272 command will display the following message instead of the current one.
6278 but also displays header fields which would not pass the
6280 selection, and all visualizable parts of MIME
6281 .Ql multipart/alternative
6286 (t) Takes a message list and types out each message on the users terminal.
6287 The display of message headers is selectable via
6289 For MIME multipart messages, all parts with a content type of
6291 all parts which have a registered MIME type handler (see
6292 .Sx "HTML mail and MIME attachments" )
6293 which produces plain text output, and all
6295 parts are shown, others are hidden except for their headers.
6296 Messages are decrypted and converted to the terminal character set
6300 can be used to display parts which are not displayable as plain text.
6343 \*(OB Superseded by the multiplexer
6347 \*(OB Superseded by the multiplexer
6352 Superseded by the multiplexer
6363 .It Ic unmlsubscribe
6374 Takes a message list and marks each message as not having been read.
6378 Superseded by the multiplexer
6382 \*(OB Superseded by the multiplexer
6386 \*(OB Superseded by the multiplexer
6408 Perform URL percent codec operations on the raw-data argument, rather
6409 according to RFC 3986.
6413 .Sx "Command modifiers" ) ,
6414 and manages the error number
6416 This is a character set agnostic and thus locale dependent operation,
6417 and it may decode bytes which are invalid in the current
6419 \*(ID This command does not know about URLs beside that.
6421 The first argument specifies the operation:
6425 perform plain URL percent en- and decoding, respectively.
6429 perform a slightly modified operation which should be better for
6430 pathnames: it does not allow a tilde
6432 and will neither accept hyphen-minus
6436 as an initial character.
6437 The remains of the line form the URL data which is to be converted.
6438 If the coding operation fails the error number
6441 .Va ^ERR Ns -CANCELED ,
6442 and the unmodified input is used as the result; the error number may
6443 change again due to output or result storage errors.
6447 \*(NQ Edit the values of or create the given variable(s) in the
6449 Boolean variables cannot be edited, and variables can also not be
6455 \*(NQ This command produces the same output as the listing mode of
6459 ity adjustments, but only for the given variables.
6463 \*(OP Takes a message list and verifies each message.
6464 If a message is not a S/MIME signed message,
6465 verification will fail for it.
6466 The verification process checks if the message was signed using a valid
6468 if the message sender's email address matches one of those contained
6469 within the certificate,
6470 and if the message content has been altered.
6483 \*(NQ Evaluate arguments according to a given operator.
6484 This is a multiplexer command which can be used to perform signed 64-bit
6485 numeric calculations as well as byte string and string operations.
6486 It uses polish notation, i.e., the operator is the first argument and
6487 defines the number and type, and the meaning of the remaining arguments.
6488 An empty argument is replaced with a 0 if a number is expected.
6492 .Sx "Command modifiers" ) .
6495 The result that is shown in case of errors is always
6497 for usage errors and numeric operations, and the empty string for byte
6498 string and string operations;
6499 if the latter two fail to provide result data for
6501 errors, e.g., when a search operation failed, they also set the
6504 .Va ^ERR Ns -NODATA .
6505 Except when otherwise noted numeric arguments are parsed as signed 64-bit
6506 numbers, and errors will be reported in the error number
6508 as the numeric error
6509 .Va ^ERR Ns -RANGE .
6512 Numeric operations work on one or two signed 64-bit integers.
6513 One integer is expected by assignment (equals sign
6515 which does nothing but parsing the argument, thus detecting validity and
6516 possible overflow conditions, and unary not (tilde
6518 which creates the bitwise complement.
6519 Two integers are used by addition (plus sign
6521 subtraction (hyphen-minus
6523 multiplication (asterisk
6527 and modulo (percent sign
6529 as well as for the bitwise operators logical or (vertical bar
6532 bitwise and (ampersand
6535 bitwise xor (circumflex
6537 the bitwise signed left- and right shifts
6540 as well as for the unsigned right shift
6544 All numeric operators can be suffixed with a commercial at
6548 this will turn the operation into a saturated one, which means that
6549 overflow errors and division and modulo by zero are no longer reported
6550 via the exit status, but the result will linger at the minimum or
6551 maximum possible value, instead of overflowing (or trapping).
6552 This is true also for the argument parse step.
6553 For the bitwise shifts, the saturated maximum is 63.
6554 Any catched overflow will be reported via the error number
6557 .Va ^ERR Ns -OVERFLOW .
6560 Character set agnostic string functions have no notion of locale
6561 settings and character sets.
6564 which performs the usual
6565 .Sx "Filename transformations"
6566 on its argument, and
6568 which generates a random string of the given length, or of
6570 bytes (a constant from
6572 if the value 0 is given; the random string will be base64url encoded
6573 according to RFC 4648, and thus be usable as a (portable) filename.
6576 Byte string operations work on 8-bit bytes and have no notion of locale
6577 settings and character sets, effectively assuming ASCII data.
6578 Operations that take one argument are
6580 which queries the length of the given argument, and
6582 which calculates the Chris Torek hash of the given argument.
6585 Byte string operations with two or more arguments are
6587 which byte-searches in the first for the second argument, and shows the
6588 resulting 0-based offset shall it have been found,
6590 which is identical to
6592 but works case-insensitively according to the rules of the ASCII
6595 will show a substring of its first argument:
6596 the second argument is the 0-based starting offset, the optional third
6597 argument can be used to specify the length of the desired substring,
6598 by default the entire string is used;
6599 this operation tries to work around faulty arguments (set
6601 for error logs), but reports them via the error number
6604 .Va ^ERR Ns -OVERFLOW .
6607 String operations work, sufficient support provided, according to the
6608 active user's locale encoding and character set (see
6609 .Sx "Character sets" ) .
6610 There is the one argument operation
6612 which (one-way) converts the argument to something safely printable on
6618 is a string operation that will try to match the first argument with the
6619 regular expression given as the second argument, as does
6621 but which is case-insensitive.
6622 If the optional third argument has been given then instead of showing
6623 the match offset a replacement operation is performed:
6624 the third argument is treated as if specified via dollar-single-quote
6626 .Sx "Shell-style argument quoting" ) ,
6627 and any occurrence of a positional parameter, e.g.,
6629 is replaced by the corresponding match group of the regular expression.
6631 .Bd -literal -offset indent
6632 ? vexpr -@ +1 -9223372036854775808
6633 ? vput vexpr res ir bananarama (.*)NanA(.*) '\e${1}au\e$2'
6640 \*(NQ Manage the positional parameter stack (see
6644 If the first argument is
6646 then the positional parameter stack of the current context, or the
6647 global one, if there is none, is cleared.
6650 then the remaining arguments will be used to (re)create the stack,
6651 if the parameter stack size limit is excessed an
6652 .Va ^ERR Ns -OVERFLOW
6656 If the first argument is
6658 a round-trip capable representation of the stack contents is created,
6659 with each quoted parameter separated from each other with the first
6662 and followed by the first character of
6664 if that is not empty and not identical to the first.
6665 If that results in no separation at all a
6671 .Sx "Command modifiers" ) .
6672 I.e., the subcommands
6676 can be used (in conjunction with
6678 to (re)create an argument stack from and to a single variable losslessly.
6680 .Bd -literal -offset indent
6681 ? vpospar set hey, "'you ", world!
6682 ? echo $#: <${1}><${2}><${3}>
6683 ? vput vpospar x quote
6685 ? echo $#: <${1}><${2}><${3}>
6686 ? eval vpospar set ${x}
6687 ? echo $#: <${1}><${2}><${3}>
6693 (v) Takes a message list and invokes the display editor on each message.
6694 Modified contents are discarded unless the
6696 variable is set, and are not used unless the mailbox can be written to
6697 and the editor returns a successful exit status.
6701 (w) For conventional messages the body without all headers is written.
6702 The original message is never marked for deletion in the originating
6704 The output is decrypted and converted to its native format as necessary.
6705 If the output file exists, the text is appended.
6706 If a message is in MIME multipart format its first part is written to
6707 the specified file as for conventional messages, handling of the remains
6708 depends on the execution mode.
6709 No special handling of compressed files is performed.
6711 In interactive mode the user is consecutively asked for the filenames of
6712 the processed parts.
6713 For convience saving of each part may be skipped by giving an empty
6714 value, the same result as writing it to
6716 Shell piping the part content by specifying a leading vertical bar
6718 character for the filename is supported.
6719 Other user input undergoes the usual
6720 .Sx "Filename transformations" ,
6721 and contents of the destination file are overwritten if the file
6724 \*(ID In non-interactive mode any part which does not specify a filename
6725 is ignored, and suspicious parts of filenames of the remaining parts are
6726 URL percent encoded (as via
6728 to prevent injection of malicious character sequences, resulting in
6729 a filename that will be written into the current directory.
6730 Existing files will not be overwritten, instead the part number or
6731 a dot are appended after a number sign
6733 to the name until file creation succeeds (or fails due to other
6738 \*(NQ The sole difference to
6740 is that the new macro is executed in place of the current one, which
6741 will not regain control: all resources of the current macro will be
6745 may become cleaned up if the teared down macro context is the outermost
6746 level of the cleanup stack.
6747 If this command is not used from within a
6749 ed macro it will silently be (a more expensive variant of)
6759 \*(NQ \*(UA presents message headers in
6761 fuls as described under the
6764 Without arguments this command scrolls to the next window of messages,
6765 likewise if the argument is
6769 scrolls to the last,
6771 scrolls to the first, and
6776 A number argument prefixed by
6780 indicates that the window is calculated in relation to the current
6781 position, and a number without a prefix specifies an absolute position.
6787 but scrolls to the next or previous window that contains at least one
6798 .\" .Sh COMMAND ESCAPES {{{
6799 .Sh "COMMAND ESCAPES"
6801 Here is a summary of the command escapes available in compose mode,
6802 which are used to perform special functions when composing messages.
6803 Command escapes are only recognized at the beginning of lines, and
6804 consist of a trigger (escape) and a command character.
6805 The actual escape character can be set via the internal variable
6807 it defaults to the tilde
6809 Otherwise ignored whitespace characters following the escape character
6810 will prevent a possible addition of the command line to the \*(OPal
6814 Unless otherwise noted all compose mode command escapes ensure proper
6815 updates of the variables which represent the error number
6821 is set they will, unless stated otherwise, error out message compose
6822 mode if an operation fails.
6823 It is however possible to place the character hyphen-minus
6825 after (possible whitespace following) the escape character, which has an
6826 effect equivalent to the command modifier
6828 If the \*(OPal key bindings are available it is possible to create
6830 ings specifically for the compose mode.
6833 .Bl -tag -width ".It Ic BaNg"
6836 Insert the string of text in the message prefaced by a single
6838 (If the escape character has been changed,
6839 that character must be doubled instead.)
6842 .It Ic ~! Ar command
6843 Execute the indicated shell
6845 which follows, replacing unescaped exclamation marks with the previously
6846 executed command if the internal variable
6848 is set, then return to the message.
6852 Same effect as typing the end-of-file character.
6855 .It Ic ~: Ar \*(UA-command Ns \0or Ic ~_ Ar \*(UA-command
6856 Execute the given \*(UA command.
6857 Not all commands, however, are allowed.
6861 Write a summary of command escapes.
6864 .It Ic ~< Ar filename
6869 .It Ic ~<! Ar command
6871 is executed using the shell.
6872 Its standard output is inserted into the message.
6875 .It Ic ~@ Op Ar filename...
6876 Append or edit the list of attachments.
6877 Does not manage the error number
6883 instead if this is a concern).
6886 arguments is expected as shell tokens (see
6887 .Sx "Shell-style argument quoting" ;
6888 token-separating commas are ignored, too), to be
6889 interpreted as documented for the command line option
6891 with the message number exception as below.
6895 arguments the attachment list is edited, entry by entry;
6896 if a filename is left empty, that attachment is deleted from the list;
6897 once the end of the list is reached either new attachments may be
6898 entered or the session can be quit by committing an empty
6902 For all mode, if a given filename solely consists of the number sign
6904 followed by a valid message number of the currently active mailbox, then
6905 the given message is attached as a
6908 As the shell comment character the number sign must be quoted.
6912 Inserts the string contained in the
6915 .Ql Ic ~i Ns \0Sign ) .
6916 \*(OB The escape sequences tabulator
6920 are understood (use the
6924 ting the variable(s) instead).
6928 Inserts the string contained in the
6931 .Ql Ic ~i Ns \0sign ) .
6932 \*(OB The escape sequences tabulator
6936 are understood (use the
6940 ting the variable(s) instead).
6943 .It Ic ~b Ar name ...
6944 Add the given names to the list of blind carbon copy recipients.
6947 .It Ic ~c Ar name ...
6948 Add the given names to the list of carbon copy recipients.
6952 Read the file specified by the
6954 variable into the message.
6958 Invoke the text editor on the message collected so far.
6959 After the editing session is finished,
6960 the user may continue appending text to the message.
6963 .It Ic ~F Ar messages
6964 Read the named messages into the message being sent, including all
6965 message headers and MIME parts.
6966 If no messages are specified, read in the current message, the
6970 .It Ic ~f Ar messages
6971 Read the named messages into the message being sent.
6972 If no messages are specified, read in the current message, the
6974 Strips down the list of header fields according to the
6976 white- and blacklist selection of
6978 For MIME multipart messages,
6979 only the first displayable part is included.
6983 Edit the message header fields
6988 by typing each one in turn and allowing the user to edit the field.
6989 The default values for these fields originate from the
6997 Edit the message header fields
7003 by typing each one in turn and allowing the user to edit the field.
7006 .It Ic ~I Ar variable
7007 Insert the value of the specified variable into the message.
7008 The message remains unaltered if the variable is unset or empty.
7009 \*(OB The escape sequences tabulator
7013 are understood (use the
7017 ting the variable(s) instead).
7020 .It Ic ~i Ar variable
7023 but adds a newline character at the end of a successful insertion.
7026 .It Ic ~M Ar messages
7027 Read the named messages into the message being sent,
7030 If no messages are specified, read the current message, the
7034 .It Ic ~m Ar messages
7035 Read the named messages into the message being sent,
7038 If no messages are specified, read the current message, the
7040 Strips down the list of header fields according to the
7042 white- and blacklist selection of
7044 For MIME multipart messages,
7045 only the first displayable part is included.
7049 Display the message collected so far,
7050 prefaced by the message header fields
7051 and followed by the attachment list, if any.
7055 Abort the message being sent,
7056 copying it to the file specified by the
7063 .It Ic ~R Ar filename
7066 but indent each line that has been read by
7070 .It Ic ~r Ar filename Op Ar HERE-delimiter
7071 Read the named file, object to the usual
7072 .Sx "Filename transformations" ,
7073 into the message; if (the expanded)
7077 then standard input is used, e.g., for pasting purposes.
7078 Only in this latter mode
7080 may be given: if it is data will be read in until the given
7082 is seen on a line by itself, and encountering EOF is an error; the
7084 is a required argument in non-interactive mode; if it is single-quote
7085 quoted then the pasted content will not be expanded, \*(ID otherwise
7086 a future version of \*(UA may perform shell-style expansion on the content.
7090 Cause the named string to become the current subject field.
7091 Newline (NL) and carriage-return (CR) bytes are invalid and will be
7092 normalized to space (SP) characters.
7095 .It Ic ~t Ar name ...
7096 Add the given name(s) to the direct recipient list.
7099 .It Ic ~U Ar messages
7100 Read in the given / current message(s) excluding all headers, indented by
7104 .It Ic ~u Ar messages
7105 Read in the given / current message(s), excluding all headers.
7109 Invoke an alternate editor (defined by the
7111 environment variable) on the message collected so far.
7112 Usually, the alternate editor will be a screen editor.
7113 After the editor is quit,
7114 the user may resume appending text to the end of the message.
7117 .It Ic ~w Ar filename
7118 Write the message onto the named file, which is object to the usual
7119 .Sx "Filename transformations" .
7121 the message is appended to it.
7127 except that the message is not saved at all.
7130 .It Ic ~| Ar command
7131 Pipe the message through the specified filter command.
7132 If the command gives no output or terminates abnormally,
7133 retain the original text of the message.
7136 is often used as a rejustifying filter.
7140 .It Ic ~^ Ar cmd Op Ar subcmd Op Ar arg3 Op Ar arg4
7141 Low-level command meant for scripted message access, i.e., for
7142 .Va on-compose-splice
7144 .Va on-compose-splice-shell .
7145 The used protocol is likely subject to changes, and therefore the
7146 mentioned hooks receive the used protocol version as an initial line.
7147 In general the first field of a response line represents a status code
7148 which specifies whether a command was successful or not, whether result
7149 data is to be expected, and if, the format of the result data.
7150 Does not manage the error number
7154 because errors are reported via the protocol
7155 (hard errors like I/O failures cannot be handled).
7156 This command has read-only access to several virtual pseudo headers in
7157 the \*(UA private namespace, which may not exist (except for the first):
7161 .Bl -tag -compact -width ".It Va BaNg"
7162 .It Ql Mailx-Command:
7163 The name of the command that generates the message, one of
7169 .It Ql Mailx-Raw-To:
7170 .It Ql Mailx-Raw-Cc:
7171 .It Ql Mailx-Raw-Bcc:
7172 Represent the frozen initial state of these headers before any
7173 transformation (e.g.,
7176 .Va recipients-in-cc
7179 .It Ql Mailx-Orig-From:
7180 .It Ql Mailx-Orig-To:
7181 .It Ql Mailx-Orig-Cc:
7182 .It Ql Mailx-Orig-Bcc:
7183 The values of said headers of the original message which has been
7185 .Ic reply , forward , resend .
7189 The status codes are:
7193 .Bl -tag -compact -width ".It Ql 210"
7195 Status ok; the remains of the line are the result.
7198 Status ok; the rest of the line is optionally used for more status.
7199 What follows are lines of result addresses, terminated by an empty line.
7200 The address lines consist of two fields, the first of which is the
7201 plain address, e.g.,
7203 separated by a single ASCII SP space from the second which contains the
7204 unstripped address, even if that is identical to the first field, e.g.,
7205 .Ql (Lovely) Bob <bob@exam.ple> .
7206 All the input, including the empty line, must be consumed before further
7207 commands can be issued.
7210 Status ok; the rest of the line is optionally used for more status.
7211 What follows are lines of furtherly unspecified string content,
7212 terminated by an empty line.
7213 All the input, including the empty line, must be consumed before further
7214 commands can be issued.
7217 Syntax error; invalid command.
7220 Syntax error in parameters or arguments.
7223 Error: an argument fails verification.
7224 For example an invalid address has been specified, or an attempt was
7225 made to modify anything in \*(UA's own namespace.
7228 Error: an otherwise valid argument is rendered invalid due to context.
7229 For example, a second address is added to a header which may consist of
7230 a single address only.
7235 If a command indicates failure then the message will have remained
7237 Most commands can fail with
7239 if required arguments are missing (false command usage).
7240 The following (case-insensitive) commands are supported:
7243 .Bl -hang -width ".It Cm header"
7245 This command allows listing, inspection, and editing of message headers.
7246 Header name case is not normalized, and case-insensitive comparison
7247 should be used when matching names.
7248 The second argument specifies the subcommand to apply, one of:
7250 .Bl -hang -width ".It Cm remove"
7252 Without a third argument a list of all yet existing headers is given via
7254 this command is the default command of
7256 if no second argument has been given.
7257 A third argument restricts output to the given header only, which may
7260 if no such field is defined.
7263 Shows the content of the header given as the third argument.
7264 Dependent on the header type this may respond with
7268 any failure results in
7272 This will remove all instances of the header given as the third
7277 if no such header can be found, and
7279 on \*(UA namespace violations.
7282 This will remove from the header given as the third argument the
7283 instance at the list position (counting from one!) given with the fourth
7288 if the list position argument is not a number or on \*(UA namespace
7291 if no such header instance exists.
7294 Create a new or an additional instance of the header given in the third
7295 argument, with the header body content as given in the fourth argument
7296 (the remains of the line).
7299 if the third argument specifies a free-form header field name that is
7300 invalid, or if body content extraction fails to succeed,
7302 if any extracted address does not pass syntax and/or security checks or
7303 on \*(UA namespace violations, and
7305 to indicate prevention of excessing a single-instance header \(em note that
7307 can be appended to (a space separator will be added automatically first).
7310 is returned upon success, followed by the name of the header and the list
7311 position of the newly inserted instance.
7312 The list position is always 1 for single-instance header fields.
7313 All free-form header fields are managed in a single list.
7318 This command allows listing, removal and addition of message attachments.
7319 The second argument specifies the subcommand to apply, one of:
7321 .Bl -hang -width ".It Cm remove"
7323 List all attachments via
7327 if no attachments exist.
7328 This command is the default command of
7330 if no second argument has been given.
7333 This will remove the attachment given as the third argument, and report
7337 if no such attachment can be found.
7338 If there exists any path component in the given argument, then an exact
7339 match of the path which has been used to create the attachment is used
7340 directly, but if only the basename of that path matches then all
7341 attachments are traversed to find an exact match first, and the removal
7342 occurs afterwards; if multiple basenames match, a
7345 Message attachments are treated as absolute pathnames.
7347 If no path component exists in the given argument, then all attachments
7348 will be searched for
7350 parameter matches as well as for matches of the basename of the path
7351 which has been used when the attachment has been created; multiple
7356 This will interpret the third argument as a number and remove the
7357 attachment at that list position (counting from one!), reporting
7361 if the argument is not a number or
7363 if no such attachment exists.
7366 Adds the attachment given as the third argument, specified exactly as
7367 documented for the command line option
7369 and supporting the message number extension as documented for
7373 upon success, with the index of the new attachment following,
7375 if the given file cannot be opened,
7377 if an on-the-fly performed character set conversion fails, otherwise
7379 is reported; this is also reported if character set conversion is
7380 requested but not available.
7383 This uses the same search mechanism as described for
7385 and prints any known attributes of the first found attachment via
7389 if no such attachment can be found.
7390 The attributes are written as lines of keyword and value tuples, the
7391 keyword being separated from the rest of the line with an ASCII SP space
7395 This uses the same search mechanism as described for
7397 and is otherwise identical to
7400 .It Cm attribute-set
7401 This uses the same search mechanism as described for
7403 and will assign the attribute given as the fourth argument, which is
7404 expected to be a value tuple of keyword and other data, separated by
7405 a ASCII SP space or TAB tabulator character.
7406 If the value part is empty, then the given attribute is removed, or
7407 reset to a default value if existence of the attribute is crucial.
7411 upon success, with the index of the found attachment following,
7413 for message attachments or if the given keyword is invalid, and
7415 if no such attachment can be found.
7416 The following keywords may be used (case-insensitively):
7418 .Bl -hang -compact -width ".It Ql filename"
7420 Sets the filename of the MIME part, i.e., the name that is used for
7421 display and when (suggesting a name for) saving (purposes).
7422 .It Ql content-description
7423 Associate some descriptive information to the attachment's content, used
7424 in favour of the plain filename by some MUAs.
7426 May be used for uniquely identifying MIME entities in several contexts;
7427 this expects a special reference address format as defined in RFC 2045
7430 upon address content verification failure.
7432 Defines the media type/subtype of the part, which is managed
7433 automatically, but can be overwritten.
7434 .It Ql content-disposition
7435 Automatically set to the string
7439 .It Cm attribute-set-at
7440 This uses the same search mechanism as described for
7442 and is otherwise identical to
7453 .\" .Sh INTERNAL VARIABLES {{{
7454 .Sh "INTERNAL VARIABLES"
7456 Internal \*(UA variables are controlled via the
7460 commands; prefixing a variable name with the string
7464 has the same effect as using
7470 Creation or editing of variables can be performed in the
7475 will give more insight on the given variable(s), and
7477 when called without arguments, will show a listing of all variables.
7478 Both commands support a more
7481 Some well-known variables will also become inherited from the
7484 implicitly, others can be imported explicitly with the command
7486 and henceforth share said properties.
7489 Two different kinds of internal variables exist.
7490 There are boolean variables, which can only be in one of the two states
7494 and value variables with a(n optional) string value.
7495 For the latter proper quoting is necessary upon assignment time, the
7496 introduction of the section
7498 documents the supported quoting rules.
7500 .Bd -literal -offset indent
7501 ? wysh set one=val\e 1 two="val 2" \e
7502 three='val "3"' four=$'val \e'4\e''; \e
7503 varshow one two three four; \e
7504 unset one two three four
7508 Dependent upon the actual option the string values will be interpreted
7509 as numbers, colour names, normal text etc., but there also exists
7510 a special kind of string value, the
7511 .Dq boolean string ,
7512 which must either be a decimal integer (in which case
7516 and any other value is true) or any of the (case-insensitive) strings
7522 for a false boolean and
7528 for a true boolean; a special kind of boolean string is the
7530 which is a boolean string that can optionally be prefixed with the
7531 (case-insensitive) term
7535 which causes prompting of the user in interactive mode, with the given
7536 boolean as the default value.
7538 .\" .Ss "Initial settings" {{{
7539 .\" (Keep in SYNC: ./nail.h:okeys, ./nail.rc, ./nail.1:"Initial settings")
7540 .Ss "Initial settings"
7542 The standard POSIX 2008/Cor 2-2016 mandates the following initial
7548 .Pf no Va autoprint ,
7562 .Pf no Va ignoreeof ,
7564 .Pf no Va keepsave ,
7566 .Pf no Va outfolder ,
7574 .Pf no Va sendwait ,
7583 Notes: \*(UA does not support the
7585 variable \(en use command line options or
7587 to pass options through to a
7589 And the default global
7591 file, which is loaded unless the
7593 (with according argument) or
7595 command line options have been used, or the
7596 .Ev MAILX_NO_SYSTEM_RC
7597 environment variable is set (see
7598 .Sx "Resource files" )
7599 bends those initial settings a bit, e.g., it sets the variables
7604 to name a few, establishes a default
7606 selection etc., and should thus be taken into account.
7609 .\" .Ss "Variables" {{{
7612 .Bl -tag -width ".It Va BaNg"
7616 \*(RO The exit status of the last command, or the
7621 This status has a meaning in the state machine: in conjunction with
7623 any non-0 exit status will cause a program exit, and in
7625 mode any error while loading (any of the) resource files will have the
7629 .Sx "Command modifiers" ,
7630 can be used to instruct the state machine to ignore errors.
7634 \*(RO The current error number
7635 .Pf ( Xr errno 3 ) ,
7636 which is set after an error occurred; it is also available via
7638 and the error name and documentation string can be queried via
7642 \*(ID This machinery is new and the error number is only really usable
7643 if a command explicitly states that it manages the variable
7645 for others errno will be used in case of errors, or
7647 if that is 0: it thus may or may not reflect the real error.
7648 The error number may be set with the command
7654 \*(RO This is a multiplexer variable which performs dynamic expansion of
7655 the requested state or condition, of which there are:
7658 .Bl -tag -compact -width ".It Va BaNg"
7662 .It Va ^ERR , ^ERRDOC , ^ERRNAME
7663 The number, documentation, and name of the current
7665 respectively, which is usually set after an error occurred.
7666 \*(ID This machinery is new and is usually reliable only if a command
7667 explicitly states that it manages the variable
7669 which is effectively identical to
7671 Each of those variables can be suffixed with a hyphen minus followed by
7672 a name or number, in which case the expansion refers to the given error.
7673 Note this is a direct mapping of (a subset of) the system error values:
7674 .Bd -literal -offset indent
7676 eval echo \e$1: \e$^ERR-$1: \e$^ERRNAME-$1: \e$^ERRDOC-$1
7677 vput vexpr i + "$1" 1
7689 \*(RO Expands all positional parameters (see
7691 separated by a space character.
7692 \*(ID The special semantics of the equally named special parameter of the
7694 are not yet supported.
7698 \*(RO Expands all positional parameters (see
7700 separated by a space character.
7701 If placed in double quotation marks, each positional parameter is
7702 properly quoted to expand to a single parameter again.
7706 \*(RO Expands to the number of positional parameters, i.e., the size of
7707 the positional parameter stack in decimal.
7711 \*(RO Inside the scope of a
7715 ed macro this expands to the name of the calling macro, or to the empty
7716 string if the macro is running from top-level.
7717 For the \*(OPal regular expression search and replace operator of
7719 this expands to the entire matching expression.
7720 It represents the program name in global context.
7724 \*(RO Access of the positional parameter stack.
7725 All further parameters can be accessed with this syntax, too, e.g.,
7728 etc.; positional parameters can be shifted off the stack by calling
7730 The parameter stack contains, e.g., the arguments of a
7734 d macro, the matching groups of the \*(OPal regular expression search
7735 and replace expression of
7737 and can be explicitly created or overwritten with the command
7742 \*(RO Is set to the active
7746 .It Va add-file-recipients
7747 \*(BO When file or pipe recipients have been specified,
7748 mention them in the corresponding address fields of the message instead
7749 of silently stripping them from their recipient list.
7750 By default such addressees are not mentioned.
7754 \*(BO Causes only the local part to be evaluated
7755 when comparing addresses.
7759 \*(BO Causes messages saved in the
7761 .Sx "secondary mailbox"
7763 to be appended to the end rather than prepended.
7764 This should always be set.
7768 \*(BO Causes \*(UA to prompt for the subject of each message sent.
7769 If the user responds with simply a newline,
7770 no subject field will be sent.
7774 \*(BO Causes the prompts for
7778 lists to appear after the message has been edited.
7782 \*(BO If set, \*(UA asks for files to attach at the end of each message,
7783 shall the list be found empty at that time.
7784 An empty line finalizes the list.
7788 \*(BO Causes the user to be prompted for carbon copy recipients
7789 (at the end of each message if
7793 are set) shall the list be found empty (at that time).
7794 An empty line finalizes the list.
7798 \*(BO Causes the user to be prompted for blind carbon copy
7799 recipients (at the end of each message if
7803 are set) shall the list be found empty (at that time).
7804 An empty line finalizes the list.
7808 \*(BO\*(OP Causes the user to be prompted if the message is to be
7809 signed at the end of each message.
7812 variable is ignored when this variable is set.
7816 \*(BO Alternative name for
7821 A sequence of characters to display in the
7825 as shown in the display of
7827 each for one type of messages (see
7828 .Sx "Message states" ) ,
7829 with the default being
7832 .Ql NU\ \ *HMFAT+\-$~
7835 variable is set, in the following order:
7837 .Bl -tag -compact -width ".It Ql _"
7859 start of a collapsed thread.
7861 an uncollapsed thread (TODO ignored for now).
7865 classified as possible spam.
7871 Specifies a list of recipients to which a blind carbon copy of each
7872 outgoing message will be sent automatically.
7876 Specifies a list of recipients to which a carbon copy of each outgoing
7877 message will be sent automatically.
7881 \*(BO Causes threads to be collapsed automatically when threaded mode
7888 \*(BO Enable automatic
7890 ing of a(n existing)
7896 commands, e.g., the message that becomes the new
7898 is shown automatically, as via
7905 Causes sorted mode (see the
7907 command) to be entered automatically with the value of this variable as
7908 sorting method when a folder is opened, e.g.,
7909 .Ql set autosort=thread .
7913 \*(BO Enables the substitution of all not (reverse-solidus) escaped
7916 characters by the contents of the last executed command for the
7918 shell escape command and
7920 one of the compose mode
7921 .Sx "COMMAND ESCAPES" .
7922 If this variable is not set no reverse solidus stripping is performed.
7926 \*(OP Terminals generate multi-byte sequences for certain forms of
7927 input, for example for function and other special keys.
7928 Some terminals however do not write these multi-byte sequences as
7929 a whole, but byte-by-byte, and the latter is what \*(UA actually reads.
7930 This variable specifies the timeout in milliseconds that the MLE (see
7931 .Sx "On terminal control and line editor" )
7932 waits for more bytes to arrive unless it considers a sequence
7938 \*(BO Sets some cosmetical features to traditional BSD style;
7939 has the same affect as setting
7941 and all other variables prefixed with
7943 it also changes the behaviour of
7945 (which does not exist in BSD).
7949 \*(BO Changes the letters shown in the first column of a header
7950 summary to traditional BSD style.
7954 \*(BO Changes the display of columns in a header summary to traditional
7959 \*(BO Changes some informational messages to traditional BSD style.
7965 field to appear immediately after the
7967 field in message headers and with the
7969 .Sx "COMMAND ESCAPES" .
7973 .It Va build-os , build-osenv
7974 \*(RO The operating system \*(UA has been build for, usually taken from
7980 respectively, the former being lowercased.
7984 The value that should appear in the
7988 MIME header fields when no character set conversion of the message data
7990 This defaults to US-ASCII, and the chosen character set should be
7991 US-ASCII compatible.
7995 \*(OP The default 8-bit character set that is used as an implicit last
7996 member of the variable
7998 This defaults to UTF-8 if character set conversion capabilities are
7999 available, and to ISO-8859-1 otherwise, in which case the only supported
8002 and this variable is effectively ignored.
8003 Refer to the section
8004 .Sx "Character sets"
8005 for the complete picture of character set conversion in \*(UA.
8008 .It Va charset-unknown-8bit
8009 \*(OP RFC 1428 specifies conditions when internet mail gateways shall
8011 the content of a mail message by using a character set with the name
8013 Because of the unclassified nature of this character set \*(UA will not
8014 be capable to convert this character set to any other character set.
8015 If this variable is set any message part which uses the character set
8017 is assumed to really be in the character set given in the value,
8018 otherwise the (final) value of
8020 is used for this purpose.
8022 This variable will also be taken into account if a MIME type (see
8023 .Sx "The mime.types files" )
8024 of a MIME message part that uses the
8026 character set is forcefully treated as text.
8030 The default value for the
8035 .It Va colour-disable
8036 \*(BO\*(OP Forcefully disable usage of colours.
8037 Also see the section
8038 .Sx "Coloured display" .
8042 \*(BO\*(OP Whether colour shall be used for output that is paged through
8044 Note that pagers may need special command line options, e.g.,
8052 in order to support colours.
8053 Often doing manual adjustments is unnecessary since \*(UA may perform
8054 adjustments dependent on the value of the environment variable
8056 (see there for more).
8060 .It Va contact-mail , contact-web
8061 \*(RO Addresses for contact per email and web, respectively, e.g., for
8062 bug reports, suggestions, or help regarding \*(UA.
8063 The former can be used directly:
8064 .Ql ? eval mail $contact-mail .
8068 In a(n interactive) terminal session, then if this valued variable is
8069 set it will be used as a threshold to determine how many lines the given
8070 output has to span before it will be displayed via the configured
8074 can be forced by setting this to the value
8076 setting it without a value will deduce the current height of the
8077 terminal screen to compute the treshold (see
8082 \*(ID At the moment this uses the count of lines of the message in wire
8083 format, which, dependent on the
8085 of the message, is unrelated to the number of display lines.
8086 (The software is old and historically the relation was a given thing.)
8090 Define a set of custom headers to be injected into newly composed or
8091 forwarded messages; it is also possible to create custom headers in
8094 which can be automated by setting one of the hooks
8095 .Va on-compose-splice
8097 .Va on-compose-splice-shell .
8098 The value is interpreted as a comma-separated list of custom headers to
8099 be injected, to include commas in the header bodies escape them with
8101 \*(ID Overwriting of automatically managed headers is neither supported
8104 .Dl ? set customhdr='Hdr1: Body1-1\e, Body1-2, Hdr2: Body2'
8108 Controls the appearance of the
8110 date and time format specification of the
8112 variable, that is used, for example, when viewing the summary of
8114 If unset, then the local receiving date is used and displayed
8115 unformatted, otherwise the message sending
8117 It is possible to assign a
8119 format string and control formatting, but embedding newlines via the
8121 format is not supported, and will result in display errors.
8123 .Ql %Y-%m-%d %H:%M ,
8125 .Va datefield-markout-older .
8128 .It Va datefield-markout-older
8129 Only used in conjunction with
8131 Can be used to create a visible distinction of messages dated more than
8132 a day in the future, or older than six months, a concept comparable to the
8134 option of the POSIX utility
8136 If set to the empty string, then the plain month, day and year of the
8138 will be displayed, but a
8140 format string to control formatting can be assigned.
8146 \*(BO Enables debug messages and obsoletion warnings, disables the
8147 actual delivery of messages and also implies
8153 .It Va disposition-notification-send
8155 .Ql Disposition-Notification-To:
8156 header (RFC 3798) with the message.
8160 .\" TODO .It Va disposition-notification-send-HOST
8162 .\".Va disposition-notification-send
8163 .\" for SMTP accounts on a specific host.
8164 .\" TODO .It Va disposition-notification-send-USER@HOST
8166 .\".Va disposition-notification-send
8167 .\"for a specific account.
8171 \*(BO When dot is set, a period
8173 on a line by itself during message input in (interactive or batch
8175 compose mode will be treated as end-of-message (in addition to the
8176 normal end-of-file condition).
8177 This behaviour is implied in
8183 .It Va dotlock-ignore-error
8184 \*(BO\*(OP Synchronization of mailboxes which \*(UA treats as
8186 .Sx "primary system mailbox" Ns
8187 es (see, e.g., the notes on
8188 .Sx "Filename transformations" ,
8189 as well as the documentation of
8191 will be protected with so-called dotlock files\(emthe traditional mail
8192 spool file locking method\(emin addition to system file locking.
8193 Because \*(UA ships with a privilege-separated dotlock creation program
8194 that should always be able to create such a dotlock file there is no
8195 good reason to ignore dotlock file creation errors, and thus these are
8196 fatal unless this variable is set.
8200 \*(BO If this variable is set then the editor is started automatically
8201 when a message is composed in interactive mode, as if the
8203 .Sx "COMMAND ESCAPES"
8207 variable is implied for this automatically spawned editor session.
8211 \*(BO When a message is edited while being composed,
8212 its header is included in the editable text.
8216 \*(BO When entering interactive mode \*(UA normally writes
8217 .Dq \&No mail for user
8218 and exits immediately if a mailbox is empty or does not exist.
8219 If this variable is set \*(UA starts even with an empty or non-existent
8220 mailbox (the latter behaviour furtherly depends upon
8226 \*(BO Let each command with a non-0 exit status, including every
8230 s a non-0 status, cause a program exit unless prefixed by
8233 .Sx "Command modifiers" ) .
8235 .Sx "COMMAND ESCAPES" ,
8236 but which use a different modifier for ignoring the error.
8237 Please refer to the variable
8239 for more on this topic.
8243 The first character of this value defines the escape character for
8244 .Sx "COMMAND ESCAPES"
8246 The default value is the character tilde
8248 If set to the empty string, command escapes are disabled.
8252 If not set then file and command pipeline targets are not allowed,
8253 and any such address will be filtered out, giving a warning message.
8254 If set without a value then all possible recipient address
8255 specifications will be accepted \(en see the section
8256 .Sx "On sending mail, and non-interactive mode"
8258 To accept them, but only in interactive mode, or when tilde commands
8259 were enabled explicitly by using one of the command line options
8263 set this to the (case-insensitive) value
8265 (it actually acts like
8266 .Ql restrict,-all,+name,+addr ,
8267 so that care for ordering issues must be taken) .
8269 In fact the value is interpreted as a comma-separated list of values.
8272 then the existence of disallowed specifications is treated as a hard
8273 send error instead of only filtering them out.
8274 The remaining values specify whether a specific type of recipient
8275 address specification is allowed (optionally indicated by a plus sign
8277 prefix) or disallowed (prefixed with a hyphen-minus
8281 addresses all possible address specifications,
8285 command pipeline targets,
8287 plain user names and (MTA) aliases and
8290 These kind of values are interpreted in the given order, so that
8291 .Ql restrict,\:fail,\:+file,\:-all,\:+addr
8292 will cause hard errors for any non-network address recipient address
8293 unless \*(UA is in interactive mode or has been started with the
8297 command line option; in the latter case(s) any address may be used, then.
8299 Historically invalid network addressees are silently stripped off.
8300 To change this so that any encountered invalid email address causes
8301 a hard error it must be ensured that
8303 is an entry in the above list.
8304 Setting this automatically enables network addressees
8305 (it actually acts like
8306 .Ql failinvaddr,+addr ,
8307 so that care for ordering issues must be taken) .
8311 Unless this variable is set additional
8313 (Mail-Transfer-Agent)
8314 arguments from the command line, as can be given after a
8316 separator, are ignored due to safety reasons.
8317 However, if set to the special (case-insensitive) value
8319 then the presence of additional MTA arguments is treated as a hard
8320 error that causes \*(UA to exit with failure status.
8321 A lesser strict variant is the otherwise identical
8323 which does accept such arguments in interactive mode, or if tilde
8324 commands were enabled explicitly by using one of the command line options
8331 \*(RO String giving a list of features \*(UA, preceded with a plus sign
8333 if the feature is available, and a hyphen-minus
8336 The output of the command
8338 will include this information in a more pleasant output.
8342 \*(BO This setting reverses the meanings of a set of reply commands,
8343 turning the lowercase variants, which by default address all recipients
8344 included in the header of a message
8345 .Pf ( Ic reply , respond , followup )
8346 into the uppercase variants, which by default address the sender only
8347 .Pf ( Ic Reply , Respond , Followup )
8350 .Ic replysender , respondsender , followupsender
8352 .Ic replyall , respondall , followupall
8353 are not affected by the current setting of
8358 The default path under which mailboxes are to be saved:
8359 filenames that begin with the plus sign
8361 will have the plus sign replaced with the value of this variable if set,
8362 otherwise the plus sign will remain unchanged when doing
8363 .Sx "Filename transformations" ;
8366 for more on this topic.
8367 The value supports a subset of transformations itself, and if the
8368 non-empty value does not start with a solidus
8372 will be prefixed automatically.
8373 Once the actual value is evaluated first, the internal variable
8375 will be updated for caching purposes.
8379 This variable can be set to the name of a
8381 macro which will be called whenever a
8384 The macro will also be invoked when new mail arrives,
8385 but message lists for commands executed from the macro
8386 only include newly arrived messages then.
8388 are activated by default in a folder hook, causing the covered settings
8389 to be reverted once the folder is left again.
8392 .It Va folder-hook-FOLDER
8397 Unlike other folder specifications, the fully expanded name of a folder,
8398 without metacharacters, is used to avoid ambiguities.
8399 However, if the mailbox resides under
8403 specification is tried in addition, e.g., if
8407 (and thus relative to the user's home directory) then
8408 .Pa /home/usr1/mail/sent
8410 .Ql folder-hook-/home/usr1/mail/sent
8411 first, but then followed by
8412 .Ql folder-hook-+sent .
8415 .It Va folder-resolved
8416 \*(RO Set to the fully resolved path of
8418 once that evaluation has occurred; rather internal.
8422 \*(BO Controls whether a
8423 .Ql Mail-Followup-To:
8424 header is generated when sending messages to known mailing lists.
8426 .Va followup-to-honour
8428 .Ic mlist , mlsubscribe , reply
8433 .It Va followup-to-honour
8435 .Ql Mail-Followup-To:
8436 header is honoured when group-replying to a message via
8440 This is a quadoption; if set without a value it defaults to
8450 .It Va forward-as-attachment
8451 \*(BO Original messages are normally sent as inline text with the
8454 and only the first part of a multipart message is included.
8455 With this setting enabled messages are sent as unmodified MIME
8457 attachments with all of their parts included.
8460 .It Va forward-inject-head
8461 The string to put before the text of a message with the
8463 command instead of the default
8464 .Dq -------- Original Message -------- .
8465 No heading is put if it is set to the empty string.
8466 This variable is ignored if the
8467 .Va forward-as-attachment
8472 The address (or a list of addresses) to put into the
8474 field of the message header, quoting RFC 5322:
8475 the author(s) of the message, that is, the mailbox(es) of the person(s)
8476 or system(s) responsible for the writing of the message.
8479 ing to messages these addresses are handled as if they were in the
8483 If the machine's hostname is not valid at the Internet (for example at
8484 a dialup machine) then either this variable or
8486 (\*(IN and with a defined SMTP protocol in
8489 adds even more fine-tuning capabilities),
8493 contains more than one address,
8496 variable is required (according to the standard RFC 5322).
8498 If a file-based MTA is used, then
8500 (or, if that contains multiple addresses,
8502 can nonetheless be enforced to appear as the envelope sender address at
8503 the MTA protocol level (the RFC 5321 reverse-path), either by using the
8505 command line option (with an empty argument; see there for the complete
8506 picture on this topic), or by setting the internal variable
8507 .Va r-option-implicit .
8511 \*(BO When replying to or forwarding a message \*(UA normally removes
8512 the comment and name parts of email addresses.
8513 If this variable is set such stripping is not performed,
8514 and comments, names etc. are retained.
8517 \*(OB Predecessor of
8518 .Va forward-inject-head .
8522 \*(BO Causes the header summary to be written at startup and after
8523 commands that affect the number of messages or the order of messages in
8528 mode a header summary will also be displayed on folder changes.
8529 The command line option
8537 A format string to use for the summary of
8539 similar to the ones used for
8542 Format specifiers in the given string start with a percent sign
8544 and may be followed by an optional decimal number indicating the field
8545 width \(em if that is negative, the field is to be left-aligned.
8546 Valid format specifiers are:
8549 .Bl -tag -compact -width ".It Ql _%%_"
8551 A plain percent sign.
8554 a space character but for the current message
8556 for which it expands to
8560 a space character but for the current message
8562 for which it expands to
8565 \*(OP The spam score of the message, as has been classified via the
8568 Shows only a replacement character if there is no spam support.
8570 Message attribute character (status flag); the actual content can be
8574 The date found in the
8576 header of the message when
8578 is set (the default), otherwise the date when the message was received.
8579 Formatting can be controlled by assigning a
8584 The indenting level in threaded mode.
8586 The address of the message sender.
8588 The message thread tree structure.
8589 (Note that this format does not support a field width.)
8591 The number of lines of the message, if available.
8595 The number of octets (bytes) in the message, if available.
8597 Message subject (if any).
8599 Message subject (if any) in double quotes.
8601 Message recipient flags: is the addressee of the message a known or
8602 subscribed mailing list \(en see
8607 The position in threaded/sorted order.
8611 .Ql %>\&%a\&%m\ %-18f\ %16d\ %4l/%\-5o\ %i%-s ,
8613 .Ql %>\&%a\&%m\ %20-f\ \ %16d\ %3l/%\-5o\ %i%-S
8624 .It Va headline-bidi
8625 Bidirectional text requires special treatment when displaying headers,
8626 because numbers (in dates or for file sizes etc.) will not affect the
8627 current text direction, in effect resulting in ugly line layouts when
8628 arabic or other right-to-left text is to be displayed.
8629 On the other hand only a minority of terminals is capable to correctly
8630 handle direction changes, so that user interaction is necessary for
8632 Note that extended host system support is required nonetheless, e.g.,
8633 detection of the terminal character set is one precondition;
8634 and this feature only works in an Unicode (i.e., UTF-8) locale.
8636 In general setting this variable will cause \*(UA to encapsulate text
8637 fields that may occur when displaying
8639 (and some other fields, like dynamic expansions in
8641 with special Unicode control sequences;
8642 it is possible to fine-tune the terminal support level by assigning
8644 no value (or any value other than
8649 will make \*(UA assume that the terminal is capable to properly deal
8650 with Unicode version 6.3, in which case text is embedded in a pair of
8651 U+2068 (FIRST STRONG ISOLATE) and U+2069 (POP DIRECTIONAL ISOLATE)
8653 In addition no space on the line is reserved for these characters.
8655 Weaker support is chosen by using the value
8657 (Unicode 6.3, but reserve the room of two spaces for writing the control
8658 sequences onto the line).
8663 select Unicode 1.1 support (U+200E, LEFT-TO-RIGHT MARK); the latter
8664 again reserves room for two spaces in addition.
8668 \*(OP If a line editor is available then this can be set to
8669 name the (expandable) path of the location of a permanent history file.
8674 .It Va history-gabby
8675 \*(BO\*(OP Add more entries to the history as is normally done.
8678 .It Va history-gabby-persist
8679 \*(BO\*(OP \*(UA's own MLE will not save the additional
8681 entries in persistent storage unless this variable is set.
8682 On the other hand it will not loose the knowledge of whether
8683 a persistent entry was gabby or not.
8689 \*(OP Setting this variable imposes a limit on the number of concurrent
8691 If set to the value 0 then no further history entries will be added, and
8692 loading and incorporation of the
8694 upon program startup can also be suppressed by doing this.
8695 Runtime changes will not be reflected, but will affect the number of
8696 entries saved to permanent storage.
8700 \*(BO This setting controls whether messages are held in the system
8702 and it is set by default.
8706 Use this string as hostname when expanding local addresses instead of
8707 the value obtained from
8711 It is used, e.g., in
8715 fields, as well as when generating
8717 MIME part related unique ID fields.
8718 Setting it to the empty string will cause the normal hostname to be
8719 used, but nonetheless enables creation of said ID fields.
8720 \*(IN in conjunction with the built-in SMTP
8723 also influences the results:
8724 one should produce some test messages with the desired combination of
8733 \*(BO\*(OP Can be used to turn off the automatic conversion of domain
8734 names according to the rules of IDNA (internationalized domain names
8736 Since the IDNA code assumes that domain names are specified with the
8738 character set, an UTF-8 locale charset is required to represent all
8739 possible international domain names (before conversion, that is).
8743 The input field separator that is used (\*(ID by some functions) to
8744 determine where to split input data.
8746 .Bl -tag -compact -width ".It MMM"
8748 Unsetting is treated as assigning the default value,
8751 If set to the empty value, no field splitting will be performed.
8753 If set to a non-empty value, all whitespace characters are extracted
8754 and assigned to the variable
8758 .Bl -tag -compact -width ".It MMM"
8761 will be ignored at the beginning and end of input.
8762 Diverging from POSIX shells default whitespace is removed in addition,
8763 which is owed to the entirely different line content extraction rules.
8765 Each occurrence of a character of
8767 will cause field-splitting, any adjacent
8769 characters will be skipped.
8774 \*(RO Automatically deduced from the whitespace characters in
8779 \*(BO Ignore interrupt signals from the terminal while entering
8780 messages; instead echo them as
8782 characters and discard the current line.
8786 \*(BO Ignore end-of-file conditions
8787 .Pf ( Ql control-D )
8788 in compose mode on message input and in interactive command input.
8789 If set an interactive command input session can only be left by
8790 explicitly using one of the commands
8794 and message input in compose mode can only be terminated by entering
8797 on a line by itself or by using the
8799 .Sx "COMMAND ESCAPES" ;
8800 Setting this implies the behaviour that
8808 If this is set to a non-empty string it will specify the users
8810 .Sx "primary system mailbox" ,
8813 and the system-dependent default, and (thus) be used to replace
8816 .Sx "Filename transformations" ;
8819 for more on this topic.
8820 The value supports a subset of transformations itself.
8828 .Sx "COMMAND ESCAPES"
8831 option for indenting messages,
8832 in place of the normal tabulator character
8834 which is the default.
8835 Be sure to quote the value if it contains spaces or tabs.
8839 \*(BO If set, an empty
8841 .Sx "primary system mailbox"
8842 file is not removed.
8843 Note that, in conjunction with
8845 any empty file will be removed unless this variable is set.
8846 This may improve the interoperability with other mail user agents
8847 when using a common folder directory, and prevents malicious users
8848 from creating fake mailboxes in a world-writable spool directory.
8849 \*(ID Only local regular (MBOX) files are covered, Maildir or other
8850 mailbox types will never be removed, even if empty.
8853 .It Va keep-content-length
8854 \*(BO When (editing messages and) writing MBOX mailbox files \*(UA can
8859 header fields that some MUAs generate by setting this variable.
8860 Since \*(UA does neither use nor update these non-standardized header
8861 fields (which in itself shows one of their conceptual problems),
8862 stripping them should increase interoperability in between MUAs that
8863 work with with same mailbox files.
8864 Note that, if this is not set but
8865 .Va writebackedited ,
8866 as below, is, a possibly performed automatic stripping of these header
8867 fields already marks the message as being modified.
8868 \*(ID At some future time \*(UA will be capable to rewrite and apply an
8870 to modified messages, and then those fields will be stripped silently.
8874 \*(BO When a message is saved it is usually discarded from the
8875 originating folder when \*(UA is quit.
8876 This setting causes all saved message to be retained.
8879 .It Va line-editor-disable
8880 \*(BO Turn off any enhanced line editing capabilities (see
8881 .Sx "On terminal control and line editor"
8885 .It Va line-editor-no-defaults
8886 \*(BO\*(OP Do not establish any default key binding.
8890 Error log message prefix string
8891 .Pf ( Ql "\*(uA: " ) .
8894 .It Va mailbox-display
8895 \*(RO The name of the current mailbox
8897 possibly abbreviated for display purposes.
8900 .It Va mailbox-resolved
8901 \*(RO The fully resolved path of the current mailbox.
8904 .It Va mailx-extra-rc
8905 An additional startup file that is loaded as the last of the
8906 .Sx "Resource files" .
8907 Use this file for commands that are not understood by other POSIX
8909 implementations, i.e., mostly anything which is not covered by
8910 .Sx "Initial settings" .
8914 \*(BO When a message is replied to and this variable is set,
8915 it is marked as having been
8918 .Sx "Message states" .
8922 \*(BO When opening MBOX mailbox databases \*(UA by default uses tolerant
8923 POSIX rules for detecting message boundaries (so-called
8925 lines) due to compatibility reasons, instead of the stricter rules that
8926 have been standardized in RFC 4155.
8927 This behaviour can be switched to the stricter RFC 4155 rules by
8928 setting this variable.
8929 (This is never necessary for any message newly generated by \*(UA,
8930 it only applies to messages generated by buggy or malicious MUAs, or may
8931 occur in old MBOX databases: \*(UA itself will choose a proper
8933 to avoid false interpretation of
8935 content lines in the MBOX database.)
8937 This may temporarily be handy when \*(UA complains about invalid
8939 lines when opening a MBOX: in this case setting this variable and
8940 re-opening the mailbox in question may correct the result.
8941 If so, copying the entire mailbox to some other file, as in
8942 .Ql copy * SOME-FILE ,
8943 will perform proper, all-compatible
8945 quoting for all detected messages, resulting in a valid MBOX mailbox.
8946 Finally the variable can be unset again:
8947 .Bd -literal -offset indent
8949 localopts yes; wysh set mbox-rfc4155;\e
8950 wysh File "${1}"; eval copy * "${2}"
8952 call mboxfix /tmp/bad.mbox /tmp/good.mbox
8957 \*(BO Internal development variable.
8960 .It Va message-id-disable
8961 \*(BO By setting this variable the generation of
8963 can be completely suppressed, effectively leaving this task up to the
8965 (Mail-Transfer-Agent) or the SMTP server.
8966 (According to RFC 5321 a SMTP server is not required to add this
8967 field by itself, so it should be ensured that it accepts messages without
8969 This variable also affects automatic generation of
8974 .It Va message-inject-head
8975 A string to put at the beginning of each new message.
8976 The escape sequences tabulator
8983 .It Va message-inject-tail
8984 A string to put at the end of each new message.
8985 The escape sequences tabulator
8993 \*(BO Usually, when an
8995 expansion contains the sender, the sender is removed from the expansion.
8996 Setting this option suppresses these removals.
9001 option to be passed through to the
9003 (Mail-Transfer-Agent); though most of the modern MTAs no longer document
9004 this flag, no MTA is known which does not support it (for historical
9008 .It Va mime-allow-text-controls
9009 \*(BO When sending messages, each part of the message is MIME-inspected
9010 in order to classify the
9013 .Ql Content-Transfer-Encoding:
9016 that is required to send this part over mail transport, i.e.,
9017 a computation rather similar to what the
9019 command produces when used with the
9023 This classification however treats text files which are encoded in
9024 UTF-16 (seen for HTML files) and similar character sets as binary
9025 octet-streams, forcefully changing any
9030 .Ql application/octet-stream :
9031 If that actually happens a yet unset charset MIME parameter is set to
9033 effectively making it impossible for the receiving MUA to automatically
9034 interpret the contents of the part.
9036 If this variable is set, and the data was unambiguously identified as
9037 text data at first glance (by a
9041 file extension), then the original
9043 will not be overwritten.
9046 .It Va mime-alternative-favour-rich
9047 \*(BO If this variable is set then rich MIME alternative parts (e.g.,
9048 HTML) will be preferred in favour of included plain text versions when
9049 displaying messages, provided that a handler exists which produces
9050 output that can be (re)integrated into \*(UA's normal visual display.
9051 (E.g., at the time of this writing some newsletters ship their full
9052 content only in the rich HTML part, whereas the plain text part only
9053 contains topic subjects.)
9056 .It Va mime-counter-evidence
9059 field is used to decide how to handle MIME parts.
9060 Some MUAs, however, do not use
9061 .Sx "The mime.types files"
9063 .Sx "HTML mail and MIME attachments" )
9064 or a similar mechanism to correctly classify content, but specify an
9065 unspecific MIME type
9066 .Pf ( Ql application/octet-stream )
9067 even for plain text attachments.
9068 If this variable is set then \*(UA will try to re-classify such MIME
9069 message parts, if possible, for example via a possibly existing
9070 attachment filename.
9071 A non-empty value may also be given, in which case a number is expected,
9072 actually a carrier of bits.
9073 Creating the bit-carrying number is a simple addition:
9074 .Bd -literal -offset indent
9075 ? !echo Value should be set to $((2 + 4 + 8))
9076 Value should be set to 14
9079 .Bl -bullet -compact
9081 If bit two is set (2) then the detected
9083 will be carried along with the message and be used for deciding which
9084 MIME handler is to be used, for example;
9085 when displaying such a MIME part the part-info will indicate the
9086 overridden content-type by showing a plus sign
9089 If bit three is set (4) then the counter-evidence is always produced
9090 and a positive result will be used as the MIME type, even forcefully
9091 overriding the parts given MIME type.
9093 If bit four is set (8) then as a last resort the actual content of
9094 .Ql application/octet-stream
9095 parts will be inspected, so that data which looks like plain text can be
9100 .It Va mime-encoding
9102 .Ql Content-Transfer-Encoding
9103 to use in outgoing text messages and message parts, where applicable.
9104 (7-bit clean text messages are sent as-is, without a transfer encoding.)
9107 .Bl -tag -compact -width ".It Ql _%%_"
9110 8-bit transport effectively causes the raw data be passed through
9111 unchanged, but may cause problems when transferring mail messages over
9112 channels that are not ESMTP (RFC 1869) compliant.
9113 Also, several input data constructs are not allowed by the
9114 specifications and may cause a different transfer-encoding to be used.
9115 .It Ql quoted-printable
9117 Quoted-printable encoding is 7-bit clean and has the property that ASCII
9118 characters are passed through unchanged, so that an english message can
9119 be read as-is; it is also acceptible for other single-byte locales that
9120 share many characters with ASCII, like, e.g., ISO-8859-1.
9121 The encoding will cause a large overhead for messages in other character
9122 sets: e.g., it will require up to twelve (12) bytes to encode a single
9123 UTF-8 character of four (4) bytes.
9125 .Pf (Or\0 Ql b64 . )
9126 The default encoding, it is 7-bit clean and will always be used for
9128 This encoding has a constant input:output ratio of 3:4, regardless of
9129 the character set of the input data it will encode three bytes of input
9130 to four bytes of output.
9131 This transfer-encoding is not human readable without performing
9136 .It Va mimetypes-load-control
9137 Can be used to control which of
9138 .Sx "The mime.types files"
9139 are loaded: if the letter
9141 is part of the option value, then the user's personal
9143 file will be loaded (if it exists); likewise the letter
9145 controls loading of the system wide
9146 .Pa /etc/mime.types ;
9147 directives found in the user file take precedence, letter matching is
9149 If this variable is not set \*(UA will try to load both files.
9150 Incorporation of the \*(UA-built-in MIME types cannot be suppressed,
9151 but they will be matched last (the order can be listed via
9154 More sources can be specified by using a different syntax: if the
9155 value string contains an equals sign
9157 then it is instead parsed as a comma-separated list of the described
9160 pairs; the given filenames will be expanded and loaded, and their
9161 content may use the extended syntax that is described in the section
9162 .Sx "The mime.types files" .
9163 Directives found in such files always take precedence (are prepended to
9164 the MIME type cache).
9169 To choose an alternate Mail-Transfer-Agent, set this option to either
9170 the full pathname of an executable (optionally prefixed with a
9172 protocol indicator), or \*(OPally a SMTP protocol URL, e.g., \*(IN
9174 .Dl smtps?://[user[:password]@]server[:port]
9177 .Ql [smtp://]server[:port] . )
9178 The default has been chosen at compile time.
9179 All supported data transfers are executed in child processes, which
9180 run asynchronously and without supervision unless either the
9185 If such a child receives a TERM signal, it will abort and
9192 For a file-based MTA it may be necessary to set
9194 in in order to choose the right target of a modern
9197 It will be passed command line arguments from several possible sources:
9200 if set, from the command line if given and the variable
9203 Argument processing of the MTA will be terminated with a
9208 The otherwise occurring implicit usage of the following MTA command
9209 line arguments can be disabled by setting the boolean variable
9210 .Va mta-no-default-arguments
9211 (which will also disable passing
9215 (for not treating a line with only a dot
9217 character as the end of input),
9225 variable is set); in conjunction with the
9227 command line option \*(UA will also (not) pass
9233 \*(OPally \*(UA can send mail over SMTP network connections to a single
9234 defined SMTP smart host by specifying a SMTP URL as the value (see
9235 .Sx "On URL syntax and credential lookup" ) .
9236 Note that with some mail providers it may be necessary to set the
9238 variable in order to use a specific combination of
9243 \*(UA also supports forwarding of all network traffic over a specified
9245 The following SMTP variants may be used:
9249 The plain SMTP protocol (RFC 5321) that normally lives on the
9250 server port 25 and requires setting the
9251 .Va smtp-use-starttls
9252 variable to enter a SSL/TLS encrypted session state.
9253 Assign a value like \*(IN
9254 .Ql smtp://[user[:password]@]server[:port]
9256 .Ql smtp://server[:port] )
9257 to choose this protocol.
9259 The so-called SMTPS which is supposed to live on server port 465
9260 and is automatically SSL/TLS secured.
9261 Unfortunately it never became a standardized protocol and may thus not
9262 be supported by your hosts network service database
9263 \(en in fact the port number has already been reassigned to other
9266 SMTPS is nonetheless a commonly offered protocol and thus can be
9267 chosen by assigning a value like \*(IN
9268 .Ql smtps://[user[:password]@]server[:port]
9270 .Ql smtps://server[:port] ) ;
9271 due to the mentioned problems it is usually necessary to explicitly
9276 Finally there is the SUBMISSION protocol (RFC 6409), which usually
9277 lives on server port 587 and is practically identically to the SMTP
9278 protocol from \*(UA's point of view beside that; it requires setting the
9279 .Va smtp-use-starttls
9280 variable to enter a SSL/TLS secured session state.
9281 Assign a value like \*(IN
9282 .Ql submission://[user[:password]@]server[:port]
9284 .Ql submission://server[:port] ) .
9289 .It Va mta-arguments
9290 Arguments to pass through to a file-based
9292 can be given via this variable, which is parsed according to
9293 .Sx "Shell-style argument quoting"
9294 into an array of arguments, and which will be joined onto MTA options
9295 from other sources, and then passed individually to the MTA:
9296 .Ql ? wysh set mta-arguments='-t -X \&"/tmp/my log\&"' .
9299 .It Va mta-no-default-arguments
9300 \*(BO Unless this variable is set \*(UA will pass some well known
9301 standard command line options to a file-based
9303 (Mail-Transfer-Agent), see there for more.
9307 Many systems use a so-called
9309 environment to ensure compatibility with
9311 This works by inspecting the name that was used to invoke the mail
9313 If this variable is set then the mailwrapper (the program that is
9314 actually executed when calling the file-based
9316 will treat its contents as that name.
9319 .It Va netrc-lookup-USER@HOST , netrc-lookup-HOST , netrc-lookup
9320 \*(BO\*(IN\*(OP Used to control usage of the users
9322 file for lookup of account credentials, as documented in the section
9323 .Sx "On URL syntax and credential lookup"
9327 .Sx "The .netrc file"
9328 documents the file format.
9340 then \*(UA will read the output of a shell pipe instead of the users
9342 file if this variable is set (to the desired shell command).
9343 This can be used to, e.g., store
9346 .Ql ? set netrc-pipe='gpg -qd ~/.netrc.pgp' .
9350 If this variable has the value
9352 newly created local folders will be in Maildir instead of MBOX format.
9356 Checks for new mail in the current folder each time the prompt is shown.
9357 A Maildir folder must be re-scanned to determine if new mail has arrived.
9358 If this variable is set to the special value
9360 then a Maildir folder will not be rescanned completely, but only
9361 timestamp changes are detected.
9365 \*(BO Causes the filename given in the
9368 and the sender-based filenames for the
9372 commands to be interpreted relative to the directory given in the
9374 variable rather than to the current directory,
9375 unless it is set to an absolute pathname.
9378 .It Va on-compose-cleanup
9379 Macro hook which will be called after the message has been sent (or not,
9380 in case of failures), as the very last step before unrolling compose mode
9382 This hook is run even in case of fatal errors, and it is advisable to
9383 perform only absolutely necessary actions, like cleaning up
9386 For compose mode hooks that may affect the message content please see
9387 .Va on-compose-enter , on-compose-leave , on-compose-splice .
9388 \*(ID This hook exists only because
9389 .Ic alias , alternates , commandalias , shortcut ,
9390 to name a few, are currently not covered by
9392 or a similar mechanism: any changes applied in compose mode will
9393 continue to be in effect thereafter.
9397 .It Va on-compose-enter , on-compose-leave
9398 Macro hooks which will be called before compose mode is entered,
9399 and after composing has been finished (but before the
9401 is injected, etc.), respectively.
9403 are enabled for these hooks, causing any setting to be forgotten after
9404 the message has been sent;
9405 .Va on-compose-cleanup
9406 can be used to perform any other necessary cleanup.
9407 The following (read-only) variables will be set temporarily during
9408 execution of the macros to represent the according message headers, or
9409 the empty string for non-existent; they correspond to accoding virtual
9410 temporary message headers that can be accessed via
9413 .Sx "COMMAND ESCAPES" :
9415 .Bl -tag -compact -width ".It Va mailx_subject"
9416 .It Va mailx-command
9417 The command that generates the message.
9418 .It Va mailx-subject
9424 .It Va mailx-to , mailx-cc , mailx-bcc
9425 The list of receiver addresses as a space-separated list.
9426 .It Va mailx-raw-to , mailx-raw-cc , mailx-raw-bcc
9427 The list of receiver addresses before any mangling (due to, e.g.,
9430 .Va recipients-in-cc )
9431 as a space-separated list.
9432 .It Va mailx-orig-from
9433 When replying, forwarding or resending, this will be set to the
9435 of the given message.
9436 .It Va mailx-orig-to , mailx-orig-cc , mailx-orig-bcc
9437 When replying, forwarding or resending, this will be set to the
9438 receivers of the given message.
9444 .It Va on-compose-splice , on-compose-splice-shell
9445 These hooks run once the normal compose mode is finished, but before the
9446 .Va on-compose-leave
9447 macro hook is called, the
9450 Both hooks will be executed in a subprocess, with their input and output
9451 connected to \*(UA such that they can act as if they would be an
9453 The difference in between them is that the latter is a
9455 command, whereas the former is a normal \*(UA macro, but which is
9456 restricted to a small set of commands (the
9460 will indicate said capability).
9462 are enabled for these hooks (in the parent process), causing any setting
9463 to be forgotten after the message has been sent;
9464 .Va on-compose-cleanup
9465 can be used to perform other cleanup as necessary.
9468 During execution of these hooks \*(UA will temporarily forget whether it
9469 has been started in interactive mode, (a restricted set of)
9470 .Sx "COMMAND ESCAPES"
9471 will always be available, and for guaranteed reproducibilities sake
9475 will be set to their defaults.
9476 The compose mode command
9478 has been especially designed for scriptability (via these hooks).
9479 The first line the hook will read on its standard input is the protocol
9480 version of said command escape, currently
9482 backward incompatible protocol changes have to be expected.
9485 Care must be taken to avoid deadlocks and other false control flow:
9486 if both involved processes wait for more input to happen at the
9487 same time, or one does not expect more input but the other is stuck
9488 waiting for consumption of its output, etc.
9489 There is no automatic synchronization of the hook: it will not be
9490 stopped automatically just because it, e.g., emits
9492 The hooks will however receive a termination signal if the parent enters
9494 \*(ID Protection against and interaction with signals is not yet given;
9495 it is likely that in the future these scripts will be placed in an
9496 isolated session, which is signalled in its entirety as necessary.
9498 .Bd -literal -offset indent
9499 wysh set on-compose-splice-shell=$'\e
9501 printf "hello $version! Headers: ";\e
9502 echo \e'~^header list\e';\e
9503 read status result;\e
9504 echo "status=$status result=$result";\e
9507 set on-compose-splice=ocsm
9510 echo Splice protocol version is $ver
9511 echo '~^h l'; read hl; vput vexpr es substring "${hl}" 0 1
9513 echoerr 'Cannot read header list'; echo '~x'; xit
9515 if [ "$hl" @i!% ' cc' ]
9516 echo '~^h i cc Diet is your <mirr.or>'; read es;\e
9517 vput vexpr es substring "${es}" 0 1
9519 echoerr 'Cannot insert Cc: header'; echo '~x'
9527 .It Va on-resend-cleanup
9529 .Va on-compose-cleanup ,
9530 but is only triggered by
9534 .It Va on-resend-enter
9536 .Va on-compose-enter ,
9537 but is only triggered by
9542 \*(BO If set, each message feed through the command given for
9544 is followed by a formfeed character
9548 .It Va password-USER@HOST , password-HOST , password
9549 \*(IN Variable chain that sets a password, which is used in case none has
9550 been given in the protocol and account-specific URL;
9551 as a last resort \*(UA will ask for a password on the user's terminal if
9552 the authentication method requires a password.
9553 Specifying passwords in a startup file is generally a security risk;
9554 the file should be readable by the invoking user only.
9556 .It Va password-USER@HOST
9557 \*(OU (see the chain above for \*(IN)
9558 Set the password for
9562 If no such variable is defined for a host,
9563 the user will be asked for a password on standard input.
9564 Specifying passwords in a startup file is generally a security risk;
9565 the file should be readable by the invoking user only.
9569 \*(BO Send messages to the
9571 command without performing MIME and character set conversions.
9575 .It Va pipe-TYPE/SUBTYPE
9576 When a MIME message part of type
9578 (case-insensitive) is displayed or quoted,
9579 its text is filtered through the value of this variable interpreted as
9581 Note that only parts which can be displayed inline as plain text (see
9583 are displayed unless otherwise noted, other MIME parts will only be
9584 considered by and for the command
9588 The special value commercial at
9590 forces interpretation of the message part as plain text, e.g.,
9591 .Ql set pipe-application/xml=@
9592 will henceforth display XML
9594 (The same could also be achieved by adding a MIME type marker with the
9597 And \*(OPally MIME type handlers may be defined via
9598 .Sx "The Mailcap files"
9599 \(em these directives,
9601 has already been used, should be referred to for further documentation.
9606 can in fact be used as a trigger character to adjust usage and behaviour
9607 of a following shell command specification more thoroughly by appending
9608 more special characters which refer to further mailcap directives, e.g.,
9609 the following hypothetical command specification could be used:
9611 .Bd -literal -offset indent
9612 ? set pipe-X/Y='@!++=@vim ${MAILX_FILENAME_TEMPORARY}'
9616 .Bl -tag -compact -width ".It Ql __"
9618 The command produces plain text to be integrated in \*(UAs output:
9622 If set the handler will not be invoked when a message is to be quoted,
9623 but only when it will be displayed:
9624 .Cd x-mailx-noquote .
9627 Run the command asynchronously, i.e., without blocking \*(UA:
9631 The command must be run on an interactive terminal, \*(UA will
9632 temporarily release the terminal to it:
9636 Request creation of a zero-sized temporary file, the absolute pathname
9637 of which will be made accessible via the environment variable
9638 .Ev MAILX_FILENAME_TEMPORARY :
9639 .Cd x-mailx-tmpfile .
9640 If given twice then the file will be unlinked automatically by \*(UA
9641 when the command loop is entered again at latest:
9642 .Cd x-mailx-tmpfile-unlink .
9645 Normally the MIME part content is passed to the handler via standard
9646 input; if this flag is set then the data will instead be written into
9647 .Ev MAILX_FILENAME_TEMPORARY
9648 .Pf ( Cd x-mailx-tmpfile-fill ) ,
9649 the creation of which is implied; note however that in order to cause
9650 deletion of the temporary file you still have to use two plus signs
9655 To avoid ambiguities with normal shell command content you can use
9656 another commercial at to forcefully terminate interpretation of
9657 remaining characters.
9658 (Any character not in this list will have the same effect.)
9662 Some information about the MIME part to be displayed is embedded into
9663 the environment of the shell command:
9666 .Bl -tag -compact -width ".It Ev _AIL__ILENAME__ENERATED"
9668 .It Ev MAILX_CONTENT
9669 The MIME content-type of the part, if known, the empty string otherwise.
9672 .It Ev MAILX_CONTENT_EVIDENCE
9674 .Va mime-counter-evidence
9675 includes the carry-around-bit (2), then this will be set to the detected
9676 MIME content-type; not only then identical to
9677 .Ev \&\&MAILX_CONTENT
9681 .It Ev MAILX_FILENAME
9682 The filename, if any is set, the empty string otherwise.
9685 .It Ev MAILX_FILENAME_GENERATED
9689 .It Ev MAILX_FILENAME_TEMPORARY
9690 If temporary file creation has been requested through the command prefix
9691 this variable will be set and contain the absolute pathname of the
9697 .It Va pipe-EXTENSION
9698 This is identical to
9699 .Va pipe-TYPE/SUBTYPE
9702 (normalized to lowercase using character mappings of the ASCII charset)
9703 names a file extension, e.g.,
9705 Handlers registered using this method take precedence.
9708 .It Va pop3-auth-USER@HOST , pop3-auth-HOST , pop3-auth
9709 \*(OP\*(IN Variable chain that sets the POP3 authentication method.
9710 The only possible value as of now is
9712 which is thus the default.
9715 .Mx Va pop3-bulk-load
9716 .It Va pop3-bulk-load-USER@HOST , pop3-bulk-load-HOST , pop3-bulk-load
9717 \*(BO\*(OP When accessing a POP3 server \*(UA loads the headers of
9718 the messages, and only requests the message bodies on user request.
9719 For the POP3 protocol this means that the message headers will be
9721 If this variable is set then \*(UA will download only complete messages
9722 from the given POP3 server(s) instead.
9724 .Mx Va pop3-keepalive
9725 .It Va pop3-keepalive-USER@HOST , pop3-keepalive-HOST , pop3-keepalive
9726 \*(OP POP3 servers close the connection after a period of inactivity;
9727 the standard requires this to be at least 10 minutes,
9728 but practical experience may vary.
9729 Setting this variable to a numeric value greater than
9733 command to be sent each value seconds if no other operation is performed.
9736 .It Va pop3-no-apop-USER@HOST , pop3-no-apop-HOST , pop3-no-apop
9737 \*(BO\*(OP Unless this variable is set the
9739 authentication method will be used when connecting to a POP3 server that
9743 is that the password is not sent in clear text over the wire and that
9744 only a single packet is sent for the user/password tuple.
9746 .Va pop3-no-apop-HOST
9749 .Mx Va pop3-use-starttls
9750 .It Va pop3-use-starttls-USER@HOST , pop3-use-starttls-HOST , pop3-use-starttls
9751 \*(BO\*(OP Causes \*(UA to issue a
9753 command to make an unencrypted POP3 session SSL/TLS encrypted.
9754 This functionality is not supported by all servers,
9755 and is not used if the session is already encrypted by the POP3S method.
9757 .Va pop3-use-starttls-HOST
9763 \*(BO This flag enables POSIX mode, which changes behaviour of \*(UA
9764 where that deviates from standardized behaviour.
9765 It will be set implicitly before the
9766 .Sx "Resource files"
9767 are loaded if the environment variable
9769 is set, and adjusting any of those two will be reflected by the other
9771 The following behaviour is covered and enforced by this mechanism:
9774 .Bl -bullet -compact
9776 In non-interactive mode, any error encountered while loading resource
9777 files during program startup will cause a program exit, whereas in
9778 interactive mode such errors will stop loading of the currently loaded
9779 (stack of) file(s, i.e., recursively).
9780 These exits can be circumvented on a per-command base by using
9783 .Sx "Command modifiers" ,
9784 for each command which shall be allowed to fail.
9788 will replace the list of alternate addresses instead of appending to it.
9791 Upon changing the active
9795 will be displayed even if
9802 implies the behaviour described by
9808 is extended to cover any empty mailbox, not only empty
9810 .Sx "primary system mailbox" Ns
9811 es: they will be removed when they are left in empty state otherwise.
9816 .It Va print-alternatives
9817 \*(BO When a MIME message part of type
9818 .Ql multipart/alternative
9819 is displayed and it contains a subpart of type
9821 other parts are normally discarded.
9822 Setting this variable causes all subparts to be displayed,
9823 just as if the surrounding part was of type
9824 .Ql multipart/mixed .
9828 The string used as a prompt in interactive mode.
9829 Whenever the variable is evaluated the value is expanded as via
9830 dollar-single-quote expansion (see
9831 .Sx "Shell-style argument quoting" ) .
9832 This (post-assignment, i.e., second) expansion can be used to embed
9833 status information, for example
9838 .Va mailbox-display .
9840 In order to embed characters which should not be counted when
9841 calculating the visual width of the resulting string, enclose the
9842 characters of interest in a pair of reverse solidus escaped brackets:
9844 a slot for coloured prompts is also available with the \*(OPal command
9846 Prompting may be prevented by setting this to the null string
9848 .Ql set noprompt ) .
9852 This string is used for secondary prompts, but is otherwise identical to
9859 \*(BO Suppresses the printing of the version when first invoked.
9863 If set, \*(UA starts a replying message with the original message
9864 prefixed by the value of the variable
9866 Normally, a heading consisting of
9867 .Dq Fromheaderfield wrote:
9868 is put before the quotation.
9873 variable, this heading is omitted.
9876 is assigned, only the headers selected by the
9879 selection are put above the message body,
9882 acts like an automatic
9884 .Sx "COMMAND ESCAPES"
9888 is assigned, all headers are put above the message body and all MIME
9889 parts are included, making
9891 act like an automatic
9894 .Va quote-as-attachment .
9897 .It Va quote-as-attachment
9898 \*(BO Add the original message in its entirety as a
9900 MIME attachment when replying to a message.
9901 Note this works regardless of the setting of
9906 \*(OP Can be set in addition to
9908 Setting this turns on a more fancy quotation algorithm in that leading
9909 quotation characters are compressed and overlong lines are folded.
9911 can be set to either one or two (space separated) numeric values,
9912 which are interpreted as the maximum (goal) and the minimum line length,
9913 respectively, in a spirit rather equal to the
9915 program, but line-, not paragraph-based.
9916 If not set explicitly the minimum will reflect the goal algorithmically.
9917 The goal cannot be smaller than the length of
9919 plus some additional pad.
9920 Necessary adjustments take place silently.
9923 .It Va r-option-implicit
9924 \*(BO Setting this option evaluates the contents of
9926 (or, if that contains multiple addresses,
9928 and passes the results onto the used (file-based) MTA as described for the
9930 option (empty argument case).
9933 .It Va recipients-in-cc
9940 are by default merged into the new
9942 If this variable is set, only the original
9946 the rest is merged into
9951 Unless this variable is defined, no copies of outgoing mail will be saved.
9952 If defined it gives the pathname, subject to the usual
9953 .Sx "Filename transformations" ,
9954 of a folder where all new, replied-to or forwarded messages are saved:
9955 when saving to this folder fails the message is not sent, but instead
9959 The standard defines that relative (fully expanded) paths are to be
9960 interpreted relative to the current directory
9962 to force interpretation relative to
9965 needs to be set in addition.
9969 \*(BO If this variable is set the meaning of
9971 will be extended to cover messages which target only file and pipe
9974 These address types will not appear in recipient lists unless
9975 .Va add-file-recipients
9979 .It Va record-resent
9980 \*(BO If this variable is set the meaning of
9982 will be extended to also cover the
9989 .It Va reply-in-same-charset
9990 \*(BO If this variable is set \*(UA first tries to use the same
9991 character set of the original message for replies.
9992 If this fails, the mechanism described in
9993 .Sx "Character sets"
9994 is evaluated as usual.
9997 .It Va reply-strings
9998 Can be set to a comma-separated list of (case-insensitive according to
9999 ASCII rules) strings which shall be recognized in addition to the
10000 built-in strings as
10002 reply message indicators \(en built-in are
10004 which is mandated by RFC 5322, as well as the german
10009 which often has been seen in the wild;
10010 I.e., the separating colon has to be specified explicitly.
10014 A list of addresses to put into the
10016 field of the message header.
10017 Members of this list are handled as if they were in the
10022 .It Va reply-to-honour
10025 header is honoured when replying to a message via
10029 This is a quadoption; if set without a value it defaults to
10033 .It Va rfc822-body-from_
10034 \*(BO This variable can be used to force displaying a so-called
10036 line for messages that are embedded into an envelope mail via the
10038 MIME mechanism, for more visual convenience.
10042 \*(BO Enable saving of (partial) messages in
10044 upon interrupt or delivery error.
10048 The number of lines that represents a
10057 line display and scrolling via
10059 If this variable is not set \*(UA falls back to a calculation based upon
10060 the detected terminal window size and the baud rate: the faster the
10061 terminal, the more will be shown.
10062 Overall screen dimensions and pager usage is influenced by the
10063 environment variables
10071 .It Va searchheaders
10072 \*(BO Expand message-list specifiers in the form
10074 to all messages containing the substring
10076 in the header field
10078 The string search is case insensitive.
10081 .It Va sendcharsets
10082 \*(OP A comma-separated list of character set names that can be used in
10083 outgoing internet mail.
10084 The value of the variable
10086 is automatically appended to this list of character sets.
10087 If no character set conversion capabilities are compiled into \*(UA then
10088 the only supported charset is
10091 .Va sendcharsets-else-ttycharset
10092 and refer to the section
10093 .Sx "Character sets"
10094 for the complete picture of character set conversion in \*(UA.
10097 .It Va sendcharsets-else-ttycharset
10098 \*(BO\*(OP If this variable is set, but
10100 is not, then \*(UA acts as if
10102 had been set to the value of the variable
10104 In effect this combination passes through the message data in the
10105 character set of the current locale encoding:
10106 therefore mail message text will be (assumed to be) in ISO-8859-1
10107 encoding when send from within a ISO-8859-1 locale, and in UTF-8
10108 encoding when send from within an UTF-8 locale.
10112 never comes into play as
10114 is implicitly assumed to be 8-bit and capable to represent all files the
10115 user may specify (as is the case when no character set conversion
10116 support is available in \*(UA and the only supported character set is
10118 .Sx "Character sets" ) .
10119 This might be a problem for scripts which use the suggested
10121 setting, since in this case the character set is US-ASCII by definition,
10122 so that it is better to also override
10128 An address that is put into the
10130 field of outgoing messages, quoting RFC 5322: the mailbox of the agent
10131 responsible for the actual transmission of the message.
10132 This field should normally not be used unless the
10134 field contains more than one address, on which case it is required.
10137 address is handled as if it were in the
10141 .Va r-option-implicit .
10144 \*(OB Predecessor of
10147 .It Va sendmail-arguments
10148 \*(OB Predecessor of
10149 .Va mta-arguments .
10151 .It Va sendmail-no-default-arguments
10152 \*(OB\*(BO Predecessor of
10153 .Va mta-no-default-arguments .
10155 .It Va sendmail-progname
10156 \*(OB Predecessor of
10161 \*(BO When sending a message wait until the
10163 (including the built-in SMTP one) exits before accepting further commands.
10165 with this variable set errors reported by the MTA will be recognizable!
10166 If the MTA returns a non-zero exit status,
10167 the exit status of \*(UA will also be non-zero.
10171 \*(BO This setting causes \*(UA to start at the last message
10172 instead of the first one when opening a mail folder.
10176 \*(BO Causes \*(UA to use the sender's real name instead of the plain
10177 address in the header field summary and in message specifications.
10181 \*(BO Causes the recipient of the message to be shown in the header
10182 summary if the message was sent by the user.
10186 The string to expand
10189 .Sx "COMMAND ESCAPES" ) .
10193 The string to expand
10196 .Sx "COMMAND ESCAPES" ) .
10200 Must correspond to the name of a readable file if set.
10201 The file's content is then appended to each singlepart message
10202 and to the first part of each multipart message.
10203 Be warned that there is no possibility to edit the signature for an
10204 individual message.
10207 .It Va skipemptybody
10208 \*(BO If an outgoing message does not contain any text in its first or
10209 only message part, do not send it but discard it silently (see also the
10210 command line option
10215 .It Va smime-ca-dir , smime-ca-file
10216 \*(OP Specify the location of trusted CA certificates in PEM (Privacy
10217 Enhanced Mail) format as a directory and a file, respectively, for the
10218 purpose of verification of S/MIME signed messages.
10219 It is possible to set both, the file will be loaded immediately, the
10220 directory will be searched whenever no match has yet been found.
10221 The set of CA certificates which are built into the SSL/TLS library can
10222 be explicitly turned off by setting
10223 .Va smime-ca-no-defaults ,
10224 and further fine-tuning is possible via
10225 .Va smime-ca-flags .
10228 .It Va smime-ca-flags
10229 \*(OP Can be used to fine-tune behaviour of the X509 CA certificate
10230 storage, and the certificate verification that is used.
10231 The actual values and their meanings are documented for
10235 .It Va smime-ca-no-defaults
10236 \*(BO\*(OP Do not load the default CA locations that are built into the
10237 used to SSL/TLS library to verify S/MIME signed messages.
10239 .Mx Va smime-cipher
10240 .It Va smime-cipher-USER@HOST , smime-cipher
10241 \*(OP Specifies the cipher to use when generating S/MIME encrypted
10242 messages (for the specified account).
10243 RFC 5751 mandates a default of
10246 Possible values are (case-insensitive and) in decreasing cipher strength:
10254 (DES EDE3 CBC, 168 bits; default if
10256 is not available) and
10258 (DES CBC, 56 bits).
10260 The actually available cipher algorithms depend on the cryptographic
10261 library that \*(UA uses.
10262 \*(OP Support for more cipher algorithms may be available through
10263 dynamic loading via, e.g.,
10264 .Xr EVP_get_cipherbyname 3
10265 (OpenSSL) if \*(UA has been compiled to support this.
10268 .It Va smime-crl-dir
10269 \*(OP Specifies a directory that contains files with CRLs in PEM format
10270 to use when verifying S/MIME messages.
10273 .It Va smime-crl-file
10274 \*(OP Specifies a file that contains a CRL in PEM format to use when
10275 verifying S/MIME messages.
10278 .It Va smime-encrypt-USER@HOST
10279 \*(OP If this variable is set, messages send to the given receiver are
10280 encrypted before sending.
10281 The value of the variable must be set to the name of a file that
10282 contains a certificate in PEM format.
10284 If a message is sent to multiple recipients,
10285 each of them for whom a corresponding variable is set will receive an
10286 individually encrypted message;
10287 other recipients will continue to receive the message in plain text
10289 .Va smime-force-encryption
10291 It is recommended to sign encrypted messages, i.e., to also set the
10296 .It Va smime-force-encryption
10297 \*(BO\*(OP Causes \*(UA to refuse sending unencrypted messages.
10301 \*(BO\*(OP S/MIME sign outgoing messages with the user's private key
10302 and include the user's certificate as a MIME attachment.
10303 Signing a message enables a recipient to verify that the sender used
10304 a valid certificate,
10305 that the email addresses in the certificate match those in the message
10306 header and that the message content has not been altered.
10307 It does not change the message text,
10308 and people will be able to read the message as usual.
10310 .Va smime-sign-cert , smime-sign-include-certs
10312 .Va smime-sign-message-digest .
10314 .Mx Va smime-sign-cert
10315 .It Va smime-sign-cert-USER@HOST , smime-sign-cert
10316 \*(OP Points to a file in PEM format.
10317 For the purpose of signing and decryption this file needs to contain the
10318 user's private key, followed by his certificate.
10320 For message signing
10322 is always derived from the value of
10324 (or, if that contains multiple addresses,
10326 For the purpose of encryption the recipient's public encryption key
10327 (certificate) is expected; the command
10329 can be used to save certificates of signed messages (the section
10330 .Sx "Signed and encrypted messages with S/MIME"
10331 gives some details).
10332 This mode of operation is usually driven by the specialized form.
10334 When decrypting messages the account is derived from the recipient
10339 of the message, which are searched for addresses for which such
10341 \*(UA always uses the first address that matches,
10342 so if the same message is sent to more than one of the user's addresses
10343 using different encryption keys, decryption might fail.
10345 For signing and decryption purposes it is possible to use encrypted
10346 keys, and the pseudo-host(s)
10347 .Ql USER@HOST.smime-cert-key
10348 for the private key
10350 .Ql USER@HOST.smime-cert-cert
10351 for the certificate stored in the same file)
10352 will be used for performing any necessary password lookup,
10353 therefore the lookup can be automatized via the mechanisms described in
10354 .Sx "On URL syntax and credential lookup" .
10355 For example, the hypothetical address
10357 could be driven with a private key / certificate pair path defined in
10358 .Va \&\&smime-sign-cert-bob@exam.ple ,
10359 and needed passwords would then be looked up via the pseudo hosts
10360 .Ql bob@exam.ple.smime-cert-key
10362 .Ql bob@exam.ple.smime-cert-cert ) .
10363 To include intermediate certificates, use
10364 .Va smime-sign-include-certs .
10366 .Mx Va smime-sign-include-certs
10367 .It Va smime-sign-include-certs-USER@HOST , smime-sign-include-certs
10368 \*(OP If used, this is supposed to a consist of a comma-separated list
10369 of files, each of which containing a single certificate in PEM format to
10370 be included in the S/MIME message in addition to the
10371 .Va smime-sign-cert
10373 This can be used to include intermediate certificates of the certificate
10374 authority, in order to allow the receiver's S/MIME implementation to
10375 perform a verification of the entire certificate chain, starting from
10376 a local root certificate, over the intermediate certificates, down to the
10377 .Va smime-sign-cert .
10378 Even though top level certificates may also be included in the chain,
10379 they won't be used for the verification on the receiver's side.
10381 For the purpose of the mechanisms involved here,
10383 refers to the content of the internal variable
10385 (or, if that contains multiple addresses,
10388 .Ql USER@HOST.smime-include-certs
10389 will be used for performing password lookups for these certificates,
10390 shall they have been given one, therefore the lookup can be automatized
10391 via the mechanisms described in
10392 .Sx "On URL syntax and credential lookup" .
10394 .Mx Va smime-sign-message-digest
10395 .It Va smime-sign-message-digest-USER@HOST , smime-sign-message-digest
10396 \*(OP Specifies the message digest to use when signing S/MIME messages.
10397 RFC 5751 mandates a default of
10399 Possible values are (case-insensitive and) in decreasing cipher strength:
10407 The actually available message digest algorithms depend on the
10408 cryptographic library that \*(UA uses.
10409 \*(OP Support for more message digest algorithms may be available
10410 through dynamic loading via, e.g.,
10411 .Xr EVP_get_digestbyname 3
10412 (OpenSSL) if \*(UA has been compiled to support this.
10413 Remember that for this
10415 refers to the variable
10417 (or, if that contains multiple addresses,
10421 \*(OB\*(OP To use the built-in SMTP transport, specify a SMTP URL in
10423 \*(ID For compatibility reasons a set
10425 is used in preference of
10429 .It Va smtp-auth-USER@HOST , smtp-auth-HOST , smtp-auth
10430 \*(OP Variable chain that controls the SMTP
10432 authentication method, possible values are
10438 as well as the \*(OPal methods
10444 method does not need any user credentials,
10446 requires a user name and all other methods require a user name and
10454 .Va smtp-auth-password
10456 .Va smtp-auth-user ) .
10461 .Va smtp-auth-USER@HOST :
10462 may override dependent on sender address in the variable
10465 .It Va smtp-auth-password
10466 \*(OP\*(OU Sets the global fallback password for SMTP authentication.
10467 If the authentication method requires a password, but neither
10468 .Va smtp-auth-password
10470 .Va smtp-auth-password-USER@HOST
10472 \*(UA will ask for a password on the user's terminal.
10474 .It Va smtp-auth-password-USER@HOST
10476 .Va smtp-auth-password
10477 for specific values of sender addresses, dependent upon the variable
10480 .It Va smtp-auth-user
10481 \*(OP\*(OU Sets the global fallback user name for SMTP authentication.
10482 If the authentication method requires a user name, but neither
10485 .Va smtp-auth-user-USER@HOST
10487 \*(UA will ask for a user name on the user's terminal.
10489 .It Va smtp-auth-user-USER@HOST
10492 for specific values of sender addresses, dependent upon the variable
10496 .It Va smtp-hostname
10497 \*(OP\*(IN Normally \*(UA uses the variable
10499 to derive the necessary
10501 information in order to issue a
10508 can be used to use the
10510 from the SMTP account
10517 from the content of this variable (or, if that is the empty string,
10519 or the local hostname as a last resort).
10520 This often allows using an address that is itself valid but hosted by
10521 a provider other than which (in
10523 is about to send the message.
10524 Setting this variable also influences generated
10530 .Mx Va smtp-use-starttls
10531 .It Va smtp-use-starttls-USER@HOST , smtp-use-starttls-HOST , smtp-use-starttls
10532 \*(BO\*(OP Causes \*(UA to issue a
10534 command to make an SMTP
10536 session SSL/TLS encrypted, i.e., to enable transport layer security.
10539 .It Va socks-proxy-USER@HOST , socks-proxy-HOST , socks-proxy
10540 \*(OP If this is set to the hostname (SOCKS URL) of a SOCKS5 server then
10541 \*(UA will proxy all of its network activities through it.
10542 This can be used to proxy SMTP, POP3 etc. network traffic through the
10543 Tor anonymizer, for example.
10544 The following would create a local SOCKS proxy on port 10000 that
10545 forwards to the machine
10547 and from which the network traffic is actually instantiated:
10548 .Bd -literal -offset indent
10549 # Create local proxy server in terminal 1 forwarding to HOST
10550 $ ssh -D 10000 USER@HOST
10551 # Then, start a client that uses it in terminal 2
10552 $ \*(uA -Ssocks-proxy-USER@HOST=localhost:10000
10556 .It Va spam-interface
10557 \*(OP In order to use any of the spam-related commands (like, e.g.,
10559 the desired spam interface must be defined by setting this variable.
10560 Please refer to the manual section
10561 .Sx "Handling spam"
10562 for the complete picture of spam handling in \*(UA.
10563 All or none of the following interfaces may be available:
10565 .Bl -tag -width ".It Ql _ilte_"
10571 .Pf ( Lk http://spamassassin.apache.org SpamAssassin )
10573 Different to the generic filter interface \*(UA will automatically add
10574 the correct arguments for a given command and has the necessary
10575 knowledge to parse the program's output.
10576 A default value for
10578 will have been compiled into the \*(UA binary if
10582 during compilation.
10583 Shall it be necessary to define a specific connection type (rather than
10584 using a configuration file for that), the variable
10585 .Va spamc-arguments
10586 can be used as in, e.g.,
10587 .Ql -d server.example.com -p 783 .
10588 It is also possible to specify a per-user configuration via
10590 Note that this interface does not inspect the
10592 flag of a message for the command
10596 generic spam filter support via freely configurable hooks.
10597 This interface is meant for programs like
10599 and requires according behaviour in respect to the hooks' exit
10600 status for at least the command
10603 meaning a message is spam,
10607 for unsure and any other return value indicating a hard error);
10608 since the hooks can include shell code snippets diverting behaviour
10609 can be intercepted as necessary.
10611 .Va spamfilter-ham , spamfilter-noham , spamfilter-nospam , \
10614 .Va spamfilter-spam ;
10616 .Sx "Handling spam"
10617 contains examples for some programs.
10618 The process environment of the hooks will have the variable
10619 .Ev MAILX_FILENAME_GENERATED
10621 Note that spam score support for
10623 is not supported unless the \*(OPtional regular expression support is
10625 .Va spamfilter-rate-scanscore
10631 .It Va spam-maxsize
10632 \*(OP Messages that exceed this size will not be passed through to the
10634 .Va spam-interface .
10635 If unset or 0, the default of 420000 bytes is used.
10638 .It Va spamc-command
10639 \*(OP The path to the
10643 .Va spam-interface .
10644 Note that the path is not expanded, but used
10646 A fallback path will have been compiled into the \*(UA binary if the
10647 executable had been found during compilation.
10650 .It Va spamc-arguments
10651 \*(OP Even though \*(UA deals with most arguments for the
10654 automatically, it may at least sometimes be desirable to specify
10655 connection-related ones via this variable, e.g.,
10656 .Ql -d server.example.com -p 783 .
10660 \*(OP Specify a username for per-user configuration files for the
10662 .Va spam-interface .
10663 If this is set to the empty string then \*(UA will use the name of the
10672 .It Va spamfilter-ham , spamfilter-noham , \
10673 spamfilter-nospam , spamfilter-rate , spamfilter-spam
10674 \*(OP Command and argument hooks for the
10676 .Va spam-interface .
10678 .Sx "Handling spam"
10679 contains examples for some programs.
10682 .It Va spamfilter-rate-scanscore
10683 \*(OP Because of the generic nature of the
10686 spam scores are not supported for it by default, but if the \*(OPnal
10687 regular expression support is available then setting this variable can
10688 be used to overcome this restriction.
10689 It is interpreted as follows: first a number (digits) is parsed that
10690 must be followed by a semicolon
10692 and an extended regular expression.
10693 Then the latter is used to parse the first output line of the
10694 .Va spamfilter-rate
10695 hook, and, in case the evaluation is successful, the group that has been
10696 specified via the number is interpreted as a floating point scan score.
10700 .It Va ssl-ca-dir , ssl-ca-file
10701 \*(OP Specify the location of trusted CA certificates in PEM (Privacy
10702 Enhanced Mail) format as a directory and a file, respectively, for the
10703 purpose of verification of SSL/TLS server certificates.
10704 It is possible to set both, the file will be loaded immediately, the
10705 directory will be searched whenever no match has yet been found.
10706 The set of CA certificates which are built into the SSL/TLS library can
10707 be explicitly turned off by setting
10708 .Va ssl-ca-no-defaults ,
10709 and further fine-tuning is possible via
10712 .Xr SSL_CTX_load_verify_locations 3
10713 for more information.
10714 \*(UA will try to use the TLS/SNI (ServerNameIndication) extension when
10715 establishing TLS connections to servers identified with hostnames.
10719 .It Va ssl-ca-flags
10720 \*(OP Can be used to fine-tune behaviour of the X509 CA certificate
10721 storage, and the certificate verification that is used (also see
10723 The value is expected to consist of a comma-separated list of
10724 configuration directives, with any intervening whitespace being ignored.
10725 The directives directly map to flags that can be passed to
10726 .Xr X509_STORE_set_flags 3 ,
10727 which are usually defined in a file
10728 .Pa openssl/x509_vfy.h ,
10729 and the availability of which depends on the used SSL/TLS library
10730 version: a directive without mapping is ignored (error log subject to
10732 Directives currently understood (case-insensitively) include:
10735 .Bl -tag -compact -width ".It Cd BaNg"
10736 .It Cd no-alt-chains
10737 If the initial chain is not trusted, do not attempt to build an
10739 Setting this flag will make OpenSSL certificate verification match that
10740 of older OpenSSL versions, before automatic building and checking of
10741 alternative chains has been implemented; also see
10742 .Cd trusted-first .
10743 .It Cd no-check-time
10744 Do not check certificate/CRL validity against current time.
10745 .It Cd partial-chain
10746 By default partial, incomplete chains which cannot be verified up to the
10747 chain top, a self-signed root certificate, will not verify.
10748 With this flag set, a chain succeeds to verify if at least one signing
10749 certificate of the chain is in any of the configured trusted stores of
10751 The OpenSSL manual page
10752 .Xr SSL_CTX_load_verify_locations 3
10753 gives some advise how to manage your own trusted store of CA certificates.
10755 Disable workarounds for broken certificates.
10756 .It Cd trusted-first
10757 Try building a chain using issuers in the trusted store first to avoid
10758 problems with server-sent legacy intermediate certificates.
10759 Newer versions of OpenSSL support alternative chain checking and enable
10760 it by default, resulting in the same behaviour; also see
10761 .Cd no-alt-chains .
10766 .It Va ssl-ca-no-defaults
10767 \*(BO\*(OP Do not load the default CA locations that are built into the
10768 used to SSL/TLS library to verify SSL/TLS server certificates.
10771 .It Va ssl-cert-USER@HOST , ssl-cert-HOST , ssl-cert
10772 \*(OP Variable chain that sets the filename for a SSL/TLS client
10773 certificate required by some servers.
10774 This is a direct interface to the
10778 function of the OpenSSL library, if available.
10780 .Mx Va ssl-cipher-list
10781 .It Va ssl-cipher-list-USER@HOST , ssl-cipher-list-HOST , ssl-cipher-list
10782 \*(OP Specifies a list of ciphers for SSL/TLS connections.
10783 This is a direct interface to the
10787 function of the OpenSSL library, if available; see
10790 .Xr SSL_CTX_set_cipher_list 3
10791 for more information.
10792 By default \*(UA does not set a list of ciphers, in effect using a
10794 specific cipher (protocol standards ship with a list of acceptable
10795 ciphers), possibly cramped to what the actually used SSL/TLS library
10796 supports \(en the manual section
10797 .Sx "An example configuration"
10798 also contains a SSL/TLS use case.
10801 .It Va ssl-config-file
10802 \*(OP If this variable is set \*(UA will call
10803 .Xr CONF_modules_load_file 3
10804 to allow OpenSSL to be configured according to the host system wide
10806 If a non-empty value is given then this will be used to specify the
10807 configuration file to be used instead of the global OpenSSL default;
10808 note that in this case it is an error if the file cannot be loaded.
10809 The application name will always be passed as
10813 .It Va ssl-curves-USER@HOST , ssl-curves-HOST , ssl-curves
10814 \*(OP Specifies a list of supported curves for SSL/TLS connections.
10815 This is a direct interface to the
10819 function of the OpenSSL library, if available; see
10820 .Xr SSL_CTX_set1_curves_list 3
10821 for more information.
10822 By default \*(UA does not set a list of curves.
10826 .It Va ssl-crl-dir , ssl-crl-file
10827 \*(OP Specify a directory / a file, respectively that contains a CRL in
10828 PEM format to use when verifying SSL/TLS server certificates.
10831 .It Va ssl-key-USER@HOST , ssl-key-HOST , ssl-key
10832 \*(OP Variable chain that sets the filename for the private key of
10833 a SSL/TLS client certificate.
10834 If unset, the name of the certificate file is used.
10835 The file is expected to be in PEM format.
10836 This is a direct interface to the
10840 function of the OpenSSL library, if available.
10842 .It Va ssl-method-USER@HOST , ssl-method-HOST , ssl-method
10843 \*(OB\*(OP Please use the newer and more flexible
10845 instead: if both values are set,
10847 will take precedence!
10848 Can be set to the following values, the actually used
10850 specification to which it is mapped is shown in parenthesis:
10852 .Pf ( Ql -ALL, TLSv1.2 ) ,
10854 .Pf ( Ql -ALL, TLSv1.1 ) ,
10856 .Pf ( Ql -ALL, TLSv1 )
10859 .Pf ( Ql -ALL, SSLv3 ) ;
10864 and thus includes the SSLv3 protocol.
10865 Note that SSLv2 is no longer supported at all.
10867 .Mx Va ssl-protocol
10868 .It Va ssl-protocol-USER@HOST , ssl-protocol-HOST , ssl-protocol
10869 \*(OP Specify the used SSL/TLS protocol.
10870 This is a direct interface to the
10874 function of the OpenSSL library, if available;
10875 otherwise an \*(UA internal parser is used which understands the
10876 following subset of (case-insensitive) command strings:
10882 as well as the special value
10884 Multiple specifications may be given via a comma-separated list which
10885 ignores any whitespace.
10888 plus sign prefix will enable a protocol, a
10890 hyphen-minus prefix will disable it, so that
10892 will enable only the TLSv1.2 protocol.
10894 It depends upon the used TLS/SSL library which protocols are actually
10895 supported and which protocols are used if
10897 is not set, but note that SSLv2 is no longer supported at all and
10899 Especially for older protocols explicitly securing
10900 .Va ssl-cipher-list
10901 may be worthwile, see
10902 .Sx "An example configuration" .
10905 .It Va ssl-rand-egd
10906 \*(OP Gives the pathname to an entropy daemon socket, see
10908 Not all SSL/TLS libraries support this.
10911 .It Va ssl-rand-file
10912 \*(OP Gives the filename to a file with random entropy data, see
10913 .Xr RAND_load_file 3 .
10914 If this variable is not set, or set to the empty string, or if the
10915 .Sx "Filename transformations"
10917 .Xr RAND_file_name 3
10918 will be used to create the filename if, and only if,
10920 documents that the SSL PRNG is not yet sufficiently seeded.
10921 If \*(UA successfully seeded the SSL PRNG then it will update the file
10922 .Pf ( Xr RAND_write_file 3 ) .
10923 This variable is only used if
10925 is not set (or not supported by the SSL/TLS library).
10928 .It Va ssl-verify-USER@HOST , ssl-verify-HOST , ssl-verify
10929 \*(OP Variable chain that sets the action to be performed if an error
10930 occurs during SSL/TLS server certificate validation against the
10931 specified or default trust stores
10934 or the SSL/TLS library built-in defaults (unless usage disallowed via
10935 .Va ssl-ca-no-defaults ) ,
10936 and as fine-tuned via
10938 Valid (case-insensitive) values are
10940 (fail and close connection immediately),
10942 (ask whether to continue on standard input),
10944 (show a warning and continue),
10946 (do not perform validation).
10952 If only set without an assigned value, then this setting inhibits the
10958 header fields that include obvious references to \*(UA.
10959 There are two pitfalls associated with this:
10960 First, the message id of outgoing messages is not known anymore.
10961 Second, an expert may still use the remaining information in the header
10962 to track down the originating mail user agent.
10963 If set to the value
10969 suppression does not occur.
10974 (\*(OP) This specifies a comma-separated list of
10979 .Sx "On terminal control and line editor" ,
10980 escape commas with reverse solidus) to be used to overwrite or define
10983 this variable will only be queried once at program startup and can
10984 thus only be specified in resource files or on the command line.
10987 String capabilities form
10989 pairs and are expected unless noted otherwise.
10990 Numerics have to be notated as
10992 where the number is expected in normal decimal notation.
10993 Finally, booleans do not have any value but indicate a true or false
10994 state simply by being defined or not; this indeed means that \*(UA
10995 does not support undefining an existing boolean.
10996 String capability values will undergo some expansions before use:
10997 for one notations like
11000 .Ql control-LETTER ,
11001 and for clarification purposes
11003 can be used to specify
11005 (the control notation
11007 could lead to misreadings when a left bracket follows, which it does for
11008 the standard CSI sequence);
11009 finally three letter octal sequences, as in
11012 To specify that a terminal supports 256-colours, and to define sequences
11013 that home the cursor and produce an audible bell, one might write:
11015 .Bd -literal -offset indent
11016 ? set termcap='Co#256,home=\eE[H,bel=^G'
11020 The following terminal capabilities are or may be meaningful for the
11021 operation of the built-in line editor or \*(UA in general:
11024 .Bl -tag -compact -width ".It Cd yay"
11026 .It Cd colors Ns \0or Cd Co
11028 numeric capability specifying the maximum number of colours.
11029 Note that \*(UA does not actually care about the terminal beside that,
11030 but always emits ANSI / ISO 6429 escape sequences.
11033 .It Cd rmcup Ns \0or Cd te Ns \0/ Cd smcup Ns \0or Cd ti
11036 .Cd enter_ca_mode ,
11037 respectively: exit and enter the alternative screen ca-mode,
11038 effectively turning \*(UA into a fullscreen application.
11039 This must be enabled explicitly by setting
11040 .Va termcap-ca-mode .
11042 .It Cd smkx Ns \0or Cd ks Ns \0/ Cd rmkx Ns \0or Cd ke
11046 respectively: enable and disable the keypad.
11047 This is always enabled if available, because it seems even keyboards
11048 without keypads generate other key codes for, e.g., cursor keys in that
11049 case, and only if enabled we see the codes that we are interested in.
11051 .It Cd ed Ns \0or Cd cd
11055 .It Cd clear Ns \0or Cd cl
11057 clear the screen and home cursor.
11058 (Will be simulated via
11063 .It Cd home Ns \0or Cd ho
11068 .It Cd el Ns \0or Cd ce
11070 clear to the end of line.
11071 (Will be simulated via
11073 plus repetitions of space characters.)
11075 .It Cd hpa Ns \0or Cd ch
11076 .Cd column_address :
11077 move the cursor (to the given column parameter) in the current row.
11078 (Will be simulated via
11084 .Cd carriage_return :
11085 move to the first column in the current row.
11086 The default built-in fallback is
11089 .It Cd cub1 Ns \0or Cd le
11091 move the cursor left one space (non-destructively).
11092 The default built-in fallback is
11095 .It Cd cuf1 Ns \0or Cd nd
11097 move the cursor right one space (non-destructively).
11098 The default built-in fallback is
11100 which is used by most terminals.
11108 Many more capabilities which describe key-sequences are documented for
11113 .It Va termcap-ca-mode
11114 \*(OP Allow usage of the
11118 terminal capabilities, effectively turning \*(UA into a fullscreen
11119 application, as documented for
11122 this variable will only be queried once at program startup and can
11123 thus only be specified in resource files or on the command line.
11126 .It Va termcap-disable
11127 \*(OP Disable any interaction with a terminal control library.
11128 If set only some generic fallback built-ins and possibly the content of
11130 describe the terminal to \*(UA.
11132 this variable will only be queried once at program startup and can
11133 thus only be specified in resource files or on the command line.
11137 If defined, gives the number of lines of a message to be displayed
11140 if unset, the first five lines are printed, if set to 0 the variable
11143 If the value is negative then its absolute value will be used for
11144 unsigned right shifting (see
11152 \*(BO If set then the
11154 command series will strip adjacent empty lines and quotations.
11158 The character set of the terminal \*(UA operates on,
11159 and the one and only supported character set that \*(UA can use if no
11160 character set conversion capabilities have been compiled into it,
11161 in which case it defaults to ISO-8859-1 unless it can deduce a value
11162 from the locale specified in the
11164 environment variable (if supported, see there for more).
11165 It defaults to UTF-8 if conversion is available.
11166 Refer to the section
11167 .Sx "Character sets"
11168 for the complete picture about character sets.
11171 .It Va typescript-mode
11172 \*(BO A special multiplex variable that disables all variables and
11173 settings which result in behaviour that interferes with running \*(UA in
11176 .Va colour-disable ,
11177 .Va line-editor-disable
11178 and (before startup completed only)
11179 .Va termcap-disable .
11180 Unsetting it does not restore the former state of the covered settings.
11184 For a safety-by-default policy \*(UA sets its process
11188 but this variable can be used to override that:
11189 set it to an empty value to do not change the (current) setting (on
11190 startup), otherwise the process file mode creation mask is updated to
11192 Child processes inherit the process file mode creation mask.
11195 .It Va user-HOST , user
11196 \*(IN Variable chain that sets a global fallback user name, which is
11197 used in case none has been given in the protocol and account-specific
11199 This variable defaults to the name of the user who runs \*(UA.
11203 \*(BO Setting this enables upward compatibility with \*(UA
11204 version 15.0 in respect to which configuration options are available and
11205 how they are handled.
11206 This manual uses \*(IN and \*(OU to refer to the new and the old way of
11207 doing things, respectively.
11211 \*(BO This setting, also controllable via the command line option
11213 causes \*(UA to be more verbose, e.g., it will display obsoletion
11214 warnings and SSL/TLS certificate chains.
11215 Even though marked \*(BO this option may be set twice in order to
11216 increase the level of verbosity even more, in which case even details of
11217 the actual message delivery and protocol conversations are shown.
11220 is sufficient to disable verbosity as such.
11227 .It Va version , version-date , version-major , version-minor , version-update
11228 \*(RO \*(UA version information: the first variable contains a string
11229 containing the complete version identification, the latter three contain
11230 only digits: the major, minor and update version numbers.
11231 The date is in ISO 8601 notation.
11232 The output of the command
11234 will include this information.
11237 .It Va writebackedited
11238 If this variable is set messages modified using the
11242 commands are written back to the current folder when it is quit;
11243 it is only honoured for writable folders in MBOX format, though.
11244 Note that the editor will be pointed to the raw message content in that
11245 case, i.e., neither MIME decoding nor decryption will have been
11246 performed, and proper RFC 4155
11248 quoting of newly added or edited content is also left as an excercise to
11251 .\" }}} (Variables)
11253 .\" }}} (INTERNAL VARIABLES)
11256 .\" .Sh ENVIRONMENT {{{
11260 .Dq environment variable
11261 should be considered an indication that these variables are either
11262 standardized as vivid parts of process environments, or that they are
11263 commonly found in there.
11264 The process environment is inherited from the
11266 once \*(UA is started, and unless otherwise explicitly noted handling of
11267 the following variables transparently integrates into that of the
11268 .Sx "INTERNAL VARIABLES"
11269 from \*(UA's point of view.
11270 This means that, e.g., they can be managed via
11274 causing automatic program environment updates (to be inherited by
11275 newly created child processes).
11278 In order to transparently integrate other environment variables equally
11279 they need to be imported (linked) with the command
11281 This command can also be used to set and unset non-integrated
11282 environment variables from scratch, sufficient system support provided.
11283 The following example, applicable to a POSIX shell, sets the
11285 environment variable for \*(UA only, and beforehand exports the
11287 in order to affect any further processing in the running shell:
11289 .Bd -literal -offset indent
11290 $ EDITOR="vim -u ${HOME}/.vimrc"
11292 $ COLUMNS=80 \*(uA -R
11295 .Bl -tag -width ".It Ev BaNg"
11298 The user's preferred width in column positions for the terminal screen
11300 Queried and used once on program startup, actively managed for child
11301 processes and the MLE (see
11302 .Sx "On terminal control and line editor" )
11303 in interactive mode thereafter.
11304 Ignored in non-interactive mode, which always uses 80 columns, unless in
11310 The name of the (mailbox)
11312 to use for saving aborted messages if
11314 is set; this defaults to
11321 is set no output will be generated, otherwise the contents of the file
11326 Pathname of the text editor to use in the
11330 .Sx "COMMAND ESCAPES" .
11331 A default editor is used if this value is not defined.
11335 The user's home directory.
11336 This variable is only used when it resides in the process environment.
11337 The calling user's home directory will be used instead if this directory
11338 does not exist, is not accessible or cannot be read.
11339 (No test for being writable is performed to allow usage by
11340 non-privileged users within read-only jails, but dependent on the
11341 variable settings this directory is a default write target, e.g. for
11349 .It Ev LC_ALL , LC_CTYPE , LANG
11350 \*(OP The (names in lookup order of the)
11354 which indicates the used
11355 .Sx "Character sets" .
11356 Runtime changes trigger automatic updates of the entire locale system,
11357 updating and overwriting also a
11363 The user's preferred number of lines on a page or the vertical screen
11364 or window size in lines.
11365 Queried and used once on program startup, actively managed for child
11366 processes in interactive mode thereafter.
11367 Ignored in non-interactive mode, which always uses 24 lines, unless in
11373 Pathname of the directory lister to use in the
11375 command when operating on local mailboxes.
11378 (path search through
11383 Upon startup \*(UA will actively ensure that this variable refers to the
11384 name of the user who runs \*(UA, in order to be able to pass a verified
11385 name to any newly created child process.
11389 Is used as the users
11391 .Sx "primary system mailbox"
11395 This is assumed to be an absolute pathname.
11399 \*(OP Overrides the default path search for
11400 .Sx "The Mailcap files" ,
11401 which is defined in the standard RFC 1524 as
11402 .Ql ~/.mailcap:\:/etc/mailcap:\:/usr/etc/mailcap:\:/usr/local/etc/mailcap .
11403 .\" TODO we should have a mailcaps-default virtual RDONLY option!
11404 (\*(UA makes it a configuration option, however.)
11405 Note this is not a search path, but a path search.
11409 Is used as a startup file instead of
11412 When \*(UA scripts are invoked on behalf of other users,
11413 either this variable should be set to
11417 command line option should be used in order to avoid side-effects from
11418 reading their configuration files.
11419 This variable is only used when it resides in the process environment.
11422 .It Ev MAILX_NO_SYSTEM_RC
11423 If this variable is set then reading of
11425 at startup is inhibited, i.e., the same effect is achieved as if \*(UA
11426 had been started up with the option
11428 (and according argument) or
11430 This variable is only used when it resides in the process environment.
11434 The name of the users
11436 .Sx "secondary mailbox"
11438 A logical subset of the special
11439 .Sx "Filename transformations"
11445 Traditionally this MBOX is used as the file to save messages from the
11447 .Sx "primary system mailbox"
11448 that have been read.
11450 .Sx "Message states" .
11454 \*(IN\*(OP This variable overrides the default location of the user's
11460 Pathname of the program to use for backing the command
11464 variable enforces usage of a pager for output.
11465 The default paginator is
11467 (path search through
11470 \*(UA inspects the contents of this variable: if its contains the string
11472 then a non-existing environment variable
11479 dependent on whether terminal control support is available and whether
11480 that supports full (alternative) screen mode or not (also see
11481 .Sx "On terminal control and line editor" ) .
11485 will optionally be set to
11492 A colon-separated list of directories that is searched by the shell when
11493 looking for commands, e.g.,
11494 .Ql /bin:/usr/bin:/usr/local/bin .
11497 .It Ev POSIXLY_CORRECT
11498 This variable is automatically looked for upon startup, see
11504 The shell to use for the commands
11509 .Sx "COMMAND ESCAPES"
11510 and when starting subprocesses.
11511 A default shell is used if this environment variable is not defined.
11514 .It Ev SOURCE_DATE_EPOCH
11515 This specifies a time in seconds since the Unix epoch (1970-01-01) to be
11516 used in place of the current time.
11517 This variable is looked up upon program startup, and its existence will
11518 switch \*(UA to a completely reproducible mode which causes
11519 deterministic random numbers, a special fixed (non-existent?)
11521 and more to be used and set.
11522 It is to be used during development or by software packagers.
11523 \*(ID Currently an invalid setting is only ignored, rather than causing
11524 a program abortion.
11526 .Dl $ SOURCE_DATE_EPOCH=`date +%s` \*(uA
11530 \*(OP The terminal type for which output is to be prepared.
11531 For extended colour and font control please refer to
11532 .Sx "Coloured display" ,
11533 and for terminal management in general to
11534 .Sx "On terminal control and line editor" .
11538 Used as directory for temporary files instead of
11540 if set, existent, accessible as well as read- and writable.
11541 This variable is only used when it resides in the process environment,
11542 but \*(UA will ensure at startup that this environment variable is
11543 updated to contain a usable temporary directory.
11549 (see there), but this variable is not standardized, should therefore not
11550 be used, and is only corrected if already set.
11554 Pathname of the text editor to use in the
11558 .Sx "COMMAND ESCAPES" .
11568 .Bl -tag -width ".It Pa BaNg"
11570 File giving initial commands, one of the
11571 .Sx "Resource files" .
11574 System wide initialization file, one of the
11575 .Sx "Resource files" .
11579 \*(OP Personal MIME type handler definition file, see
11580 .Sx "The Mailcap files" .
11581 This location is part of the RFC 1524 standard search path, which is
11582 a configuration option and can be overridden via
11586 .It Pa /etc/mailcap
11587 \*(OP System wide MIME type handler definition file, see
11588 .Sx "The Mailcap files" .
11589 This location is part of the RFC 1524 standard search path, which is
11590 a configuration option and can be overridden via
11594 The default value for
11596 The actually used path is a configuration option.
11599 .It Pa ~/.mime.types
11600 Personal MIME types, see
11601 .Sx "The mime.types files" .
11602 The actually used path is a configuration option.
11605 .It Pa /etc/mime.types
11606 System wide MIME types, see
11607 .Sx "The mime.types files" .
11608 The actually used path is a configuration option.
11612 \*(IN\*(OP The default location of the users
11614 file \(en the section
11615 .Sx "The .netrc file"
11616 documents the file format.
11617 The actually used path is a configuration option and can be overridden via
11624 The actually used path is a compile-time constant.
11628 .\" .Ss "Resource files" {{{
11629 .Ss "Resource files"
11631 Upon startup \*(UA reads in several resource files:
11633 .Bl -tag -width ".It Pa BaNg"
11636 System wide initialization file.
11637 Reading of this file can be suppressed, either by using the
11639 (and according argument) or
11641 command line options, or by setting the
11644 .Ev MAILX_NO_SYSTEM_RC .
11648 File giving initial commands.
11649 A different file can be chosen by setting the
11653 Reading of this file can be suppressed with the
11655 command line option.
11657 .It Va mailx-extra-rc
11658 Defines a startup file to be read after all other resource files.
11659 It can be used to specify settings that are not understood by other
11661 implementations, for example.
11662 This variable is only honoured when defined in a resource file, e.g.,
11664 .Sx "INTERNAL VARIABLES" .
11668 The content of these files is interpreted as follows:
11671 .Bl -bullet -compact
11673 The whitespace characters space, tabulator and newline,
11674 as well as those defined by the variable
11676 are removed from the beginning and end of input lines.
11678 Empty lines are ignored.
11680 Any other line is interpreted as a command.
11681 It may be spread over multiple input lines if the newline character is
11683 by placing a reverse solidus character
11685 as the last character of the line; whereas any leading whitespace of
11686 follow lines is ignored, trailing whitespace before a escaped newline
11687 remains in the input.
11689 If the line (content) starts with the number sign
11691 then it is a comment-command and also ignored.
11692 (The comment-command is a real command, which does nothing, and
11693 therefore the usual follow lines mechanism applies!)
11697 Unless \*(UA is about to enter interactive mode syntax errors that occur
11698 while loading these files are treated as errors and cause program exit.
11699 More files with syntactically equal content can be
11701 The following, saved in a file, would be an examplary content:
11703 .Bd -literal -offset indent
11704 # This line is a comment command. And y\e
11705 es, it is really continued here.
11712 .\" .Ss "The mime.types files" {{{
11713 .Ss "The mime.types files"
11716 .Sx "HTML mail and MIME attachments"
11717 \*(UA needs to learn about MIME (Multipurpose Internet Mail Extensions)
11718 media types in order to classify message and attachment content.
11719 One source for them are
11721 files, the loading of which can be controlled by setting the variable
11722 .Va mimetypes-load-control .
11723 Another is the command
11725 which also offers access to \*(UAs MIME type cache.
11727 files have the following syntax:
11729 .Bd -literal -offset indent
11730 type/subtype extension [extension ...]
11731 # E.g., text/html html htm
11737 define the MIME media type, as standardized in RFC 2046:
11739 is used to declare the general type of data, while the
11741 specifies a specific format for that type of data.
11742 One or multiple filename
11744 s, separated by whitespace, can be bound to the media type format.
11745 Comments may be introduced anywhere on a line with a number sign
11747 causing the remaining line to be discarded.
11749 \*(UA also supports an extended, non-portable syntax in especially
11750 crafted files, which can be loaded via the alternative value syntax of
11751 .Va mimetypes-load-control ,
11752 and prepends an optional
11756 .Dl [type-marker ]type/subtype extension [extension ...]
11759 The following type markers are supported:
11762 .Bl -tag -compact -width ".It Ar _n_u"
11764 Treat message parts with this content as plain text.
11769 Treat message parts with this content as HTML tagsoup.
11770 If the \*(OPal HTML-tagsoup-to-text converter is not available treat
11771 the content as plain text instead.
11775 but instead of falling back to plain text require an explicit content
11776 handler to be defined.
11781 for sending messages:
11783 .Va mime-allow-text-controls ,
11784 .Va mimetypes-load-control .
11785 For reading etc. messages:
11786 .Sx "HTML mail and MIME attachments" ,
11787 .Sx "The Mailcap files" ,
11789 .Va mime-counter-evidence ,
11790 .Va mimetypes-load-control ,
11791 .Va pipe-TYPE/SUBTYPE ,
11792 .Va pipe-EXTENSION .
11795 .\" .Ss "The Mailcap files" {{{
11796 .Ss "The Mailcap files"
11798 .\" TODO MAILCAP DISABLED
11799 .Sy This feature is not available in v14.9.0, sorry!
11801 .Dq User Agent Configuration Mechanism
11802 which \*(UA \*(OPally supports (see
11803 .Sx "HTML mail and MIME attachments" ) .
11804 It defines a file format to be used to inform mail user agent programs
11805 about the locally-installed facilities for handling various data
11806 formats, i.e., about commands and how they can be used to display, edit
11807 et cetera MIME part contents, as well as a default path search that
11808 includes multiple possible locations of
11812 environment variable that can be used to overwrite that (repeating here
11813 that it is not a search path, but instead a path search specification).
11814 Any existing files will be loaded in sequence, appending any content to
11815 the list of MIME type handler directives.
11819 files consist of a set of newline separated entries.
11820 Comment lines start with a number sign
11822 (in the first column!) and are ignored.
11823 Empty lines are also ignored.
11824 All other lines form individual entries that must adhere to the syntax
11826 To extend a single entry (not comment) its line can be continued on
11827 follow lines if newline characters are
11829 by preceding them with the reverse solidus character
11831 The standard does not specify how leading whitespace of follow lines
11832 is to be treated, therefore \*(UA retains it.
11836 entries consist of a number of semicolon
11838 separated fields, and the reverse solidus
11840 character can be used to escape any following character including
11841 semicolon and itself.
11842 The first two fields are mandatory and must occur in the specified
11843 order, the remaining fields are optional and may appear in any order.
11844 Leading and trailing whitespace of content is ignored (removed).
11847 The first field defines the MIME
11849 the entry is about to handle (case-insensitively, and no reverse solidus
11850 escaping is possible in this field).
11851 If the subtype is specified as an asterisk
11853 the entry is meant to match all subtypes of the named type, e.g.,
11855 would match any audio type.
11856 The second field defines the shell command which shall be used to
11858 MIME parts of the given type; it is implicitly called the
11865 shell commands message (MIME part) data is passed via standard input
11866 unless the given shell command includes one or more instances of the
11869 in which case these instances will be replaced with a temporary filename
11870 and the data will have been stored in the file that is being pointed to.
11873 shell commands data is assumed to be generated on standard output unless
11874 the given command includes (one ore multiple)
11876 In any case any given
11878 format is replaced with a(n already) properly quoted filename.
11879 Note that when a command makes use of a temporary file via
11881 then \*(UA will remove it again, as if the
11882 .Cd x-mailx-tmpfile ,
11883 .Cd x-mailx-tmpfile-fill
11885 .Cd x-mailx-tmpfile-unlink
11886 flags had been set; see below for more.
11889 The optional fields either define a shell command or an attribute (flag)
11890 value, the latter being a single word and the former being a keyword
11891 naming the field followed by an equals sign
11893 succeeded by a shell command, and as usual for any
11895 content any whitespace surrounding the equals sign will be removed, too.
11896 Optional fields include the following:
11899 .Bl -tag -width ".It Cd BaNg"
11901 A program that can be used to compose a new body or body part in the
11903 (Currently unused.)
11905 .It Cd composetyped
11908 field, but is to be used when the composing program needs to specify the
11910 header field to be applied to the composed data.
11911 (Currently unused.)
11914 A program that can be used to edit a body or body part in the given
11916 (Currently unused.)
11919 A program that can be used to print a message or body part in the given
11921 (Currently unused.)
11924 Specifies a program to be run to test some condition, e.g., the machine
11925 architecture, or the window system in use, to determine whether or not
11926 this mailcap entry applies.
11927 If the test fails, a subsequent mailcap entry should be sought; also see
11928 .Cd x-mailx-test-once .
11931 .It Cd needsterminal
11932 This flag field indicates that the given shell command must be run on
11933 an interactive terminal.
11934 \*(UA will temporarily release the terminal to the given command in
11935 interactive mode, in non-interactive mode this entry will be entirely
11936 ignored; this flag implies
11937 .Cd x-mailx-noquote .
11940 .It Cd copiousoutput
11941 A flag field which indicates that the output of the
11943 command will be an extended stream of textual output that can be
11944 (re)integrated into \*(UA's normal visual display.
11945 It is mutually exclusive with
11946 .Cd needsterminal .
11948 .It Cd textualnewlines
11949 A flag field which indicates that this type of data is line-oriented and
11950 that, if encoded in
11952 all newlines should be converted to canonical form (CRLF) before
11953 encoding, and will be in that form after decoding.
11954 (Currently unused.)
11956 .It Cd nametemplate
11957 This field gives a filename format, in which
11959 will be replaced by a random string, the joined combination of which
11960 will be used as the filename denoted by
11961 .Ev MAILX_FILENAME_TEMPORARY .
11962 One could specify that a GIF file being passed to an image viewer should
11963 have a name ending in
11966 .Ql nametemplate=%s.gif .
11967 Note that \*(UA ignores the name template unless that solely specifies
11968 a filename suffix that consists of (ASCII) alphabetic and numeric
11969 characters, the underscore and dot only.
11972 Names a file, in X11 bitmap (xbm) format, which points to an appropriate
11973 icon to be used to visually denote the presence of this kind of data.
11974 This field is not used by \*(UA.
11977 A textual description that describes this type of data.
11980 .It Cd x-mailx-even-if-not-interactive
11981 An extension flag test field \(em by default handlers without
11983 are entirely ignored in non-interactive mode, but if this flag is set
11984 then their use will be considered.
11985 It is an error if this flag is set for commands that use the flag
11986 .Cd needsterminal .
11989 .It Cd x-mailx-noquote
11990 An extension flag field that indicates that even a
11993 command shall not be used to generate message quotes
11994 (as it would be by default).
11997 .It Cd x-mailx-async
11998 Extension flag field that denotes that the given
12000 command shall be executed asynchronously, without blocking \*(UA.
12001 Cannot be used in conjunction with
12002 .Cd needsterminal .
12005 .It Cd x-mailx-test-once
12006 Extension flag which denotes whether the given
12008 command shall be evaluated once only and the (boolean) result be cached.
12009 This is handy if some global unchanging condition is to be queried, like
12010 .Dq running under the X Window System .
12013 .It Cd x-mailx-tmpfile
12014 Extension flag field that requests creation of a zero-sized temporary
12015 file, the name of which is to be placed in the environment variable
12016 .Ev MAILX_FILENAME_TEMPORARY .
12017 It is an error to use this flag with commands that include a
12022 .It Cd x-mailx-tmpfile-fill
12023 Normally the MIME part content is passed to the handler via standard
12024 input; if this flag is set then the data will instead be written into
12026 .Cd x-mailx-tmpfile .
12027 In order to cause deletion of the temporary file you will have to set
12028 .Cd x-mailx-tmpfile-unlink
12030 It is an error to use this flag with commands that include a
12035 .It Cd x-mailx-tmpfile-unlink
12036 Extension flag field that requests that the temporary file shall be
12037 deleted automatically when the command loop is entered again at latest.
12038 (Do not use this for asynchronous handlers.)
12039 It is an error to use this flag with commands that include a
12041 format, or in conjunction with
12042 .Cd x-mailx-async ,
12043 or without also setting
12044 .Cd x-mailx-tmpfile
12046 .Cd x-mailx-tmpfile-fill .
12049 .It Cd x-mailx-tmpfile-keep
12052 implies the three tmpfile related flags above, but if you want, e.g.,
12054 and deal with the temporary file yourself, you can add in this flag to
12056 .Cd x-mailx-tmpfile-unlink .
12061 The standard includes the possibility to define any number of additional
12062 entry fields, prefixed by
12064 Flag fields apply to the entire
12066 entry \(em in some unusual cases, this may not be desirable, but
12067 differentiation can be accomplished via separate entries, taking
12068 advantage of the fact that subsequent entries are searched if an earlier
12069 one does not provide enough information.
12072 command needs to specify the
12076 command shall not, the following will help out the latter (with enabled
12080 level \*(UA will show information about handler evaluation):
12082 .Bd -literal -offset indent
12083 application/postscript; ps-to-terminal %s; needsterminal
12084 application/postscript; ps-to-terminal %s; compose=idraw %s
12088 In fields any occurrence of the format string
12090 will be replaced by the
12093 Named parameters from the
12095 field may be placed in the command execution line using
12097 followed by the parameter name and a closing
12100 The entire parameter should appear as a single command line argument,
12101 regardless of embedded spaces; thus:
12103 .Bd -literal -offset indent
12105 Content-type: multipart/mixed; boundary=42
12108 multipart/*; /usr/local/bin/showmulti \e
12109 %t %{boundary} ; composetyped = /usr/local/bin/makemulti
12111 # Executed shell command
12112 /usr/local/bin/showmulti multipart/mixed 42
12116 .\" TODO v15: Mailcap: %n,%F
12117 Note that \*(UA does not support handlers for multipart MIME parts as
12118 shown in this example (as of today).
12119 \*(UA does not support the additional formats
12123 An example file, also showing how to properly deal with the expansion of
12125 which includes any quotes that are necessary to make it a valid shell
12126 argument by itself and thus will cause undesired behaviour when placed
12127 in additional user-provided quotes:
12129 .Bd -literal -offset indent
12131 text/richtext; richtext %s; copiousoutput
12133 text/x-perl; perl -cWT %s
12135 application/pdf; \e
12137 trap "rm -f ${infile}" EXIT\e; \e
12138 trap "exit 75" INT QUIT TERM\e; \e
12140 x-mailx-async; x-mailx-tmpfile-keep
12142 application/*; echo "This is \e"%t\e" but \e
12143 is 50 \e% Greek to me" \e; < %s head -c 1024 | cat -vET; \e
12144 copiousoutput; x-mailx-noquote
12149 .Sx "HTML mail and MIME attachments" ,
12150 .Sx "The mime.types files" ,
12153 .Va mime-counter-evidence ,
12154 .Va pipe-TYPE/SUBTYPE ,
12155 .Va pipe-EXTENSION .
12158 .\" .Ss "The .netrc file" {{{
12159 .Ss "The .netrc file"
12163 file contains user credentials for machine accounts.
12164 The default location in the user's
12166 directory may be overridden by the
12168 environment variable.
12169 The file consists of space, tabulator or newline separated tokens.
12170 \*(UA implements a parser that supports a superset of the original BSD
12171 syntax, but users should nonetheless be aware of portability glitches
12172 of that file format, shall their
12174 be usable across multiple programs and platforms:
12177 .Bl -bullet -compact
12179 BSD does not support single, but only double quotation marks, e.g.,
12180 .Ql password="pass with spaces" .
12182 BSD (only?) supports escaping of single characters via a reverse solidus
12183 (e.g., a space can be escaped via
12185 in- as well as outside of a quoted string.
12187 BSD does not require a final quotation mark of the last user input token.
12189 The original BSD (Berknet) parser also supported a format which allowed
12190 tokens to be separated with commas \(en whereas at least Hewlett-Packard
12191 still seems to support this syntax, \*(UA does not!
12193 As a non-portable extension some widely-used programs support
12194 shell-style comments: if an input line starts, after any amount of
12195 whitespace, with a number sign
12197 then the rest of the line is ignored.
12199 Whereas other programs may require that the
12201 file is accessible by only the user if it contains a
12203 token for any other
12207 \*(UA will always require these strict permissions.
12211 Of the following list of supported tokens \*(UA only uses (and caches)
12216 At runtime the command
12218 can be used to control \*(UA's
12222 .Bl -tag -width ".It Cd BaNg"
12223 .It Cd machine Ar name
12224 The hostname of the entries' machine, lowercase-normalized by \*(UA
12226 Any further file content, until either end-of-file or the occurrence
12231 first-class token is bound (only related) to the machine
12234 As an extension that should not be the cause of any worries
12235 \*(UA supports a single wildcard prefix for
12237 .Bd -literal -offset indent
12238 machine *.example.com login USER password PASS
12239 machine pop3.example.com login USER password PASS
12240 machine smtp.example.com login USER password PASS
12246 .Ql pop3.example.com ,
12250 .Ql local.smtp.example.com .
12251 Note that in the example neither
12252 .Ql pop3.example.com
12254 .Ql smtp.example.com
12255 will be matched by the wildcard, since the exact matches take
12256 precedence (it is however faster to specify it the other way around).
12259 This is the same as
12261 except that it is a fallback entry that is used shall none of the
12262 specified machines match; only one default token may be specified,
12263 and it must be the last first-class token.
12265 .It Cd login Ar name
12266 The user name on the remote machine.
12268 .It Cd password Ar string
12269 The user's password on the remote machine.
12271 .It Cd account Ar string
12272 Supply an additional account password.
12273 This is merely for FTP purposes.
12275 .It Cd macdef Ar name
12277 A macro is defined with the specified
12279 it is formed from all lines beginning with the next line and continuing
12280 until a blank line is (consecutive newline characters are) encountered.
12283 entries cannot be utilized by multiple machines, too, but must be
12284 defined following the
12286 they are intended to be used with.)
12289 exists, it is automatically run as the last step of the login process.
12290 This is merely for FTP purposes.
12297 .\" .Sh EXAMPLES {{{
12300 .\" .Ss "An example configuration" {{{
12301 .Ss "An example configuration"
12303 .Bd -literal -offset indent
12304 # This example assumes v15.0 compatibility mode
12307 # Request strict transport security checks!
12308 set ssl-verify=strict
12310 # Where are the up-to-date SSL certificates?
12311 # (Since we manage up-to-date ones explicitly, do not use any,
12312 # possibly outdated, default certificates shipped with OpenSSL)
12313 #set ssl-ca-dir=/etc/ssl/certs
12314 set ssl-ca-file=/etc/ssl/certs/ca-certificates.crt
12315 set ssl-ca-no-defaults
12316 #set ssl-ca-flags=partial-chain
12317 wysh set smime-ca-file="${ssl-ca-file}" \e
12318 smime-ca-no-defaults #smime-ca-flags="${ssl-ca-flags}"
12320 # Do not use protocols older than TLS v1.2.
12321 # Change this only when the remote server does not support it:
12322 # maybe use ssl-protocol-HOST (or -USER@HOST) syntax to define
12323 # such explicit exceptions, then, e.g.
12324 # set ssl-protocol-exam.ple='-ALL,+TLSv1.1'
12325 set ssl-protocol='-ALL,+TLSv1.2'
12327 # Explicitly define the list of ciphers, which may improve security,
12328 # especially with protocols older than TLS v1.2. See ciphers(1).
12329 # Including "@STRENGTH" will sort the final list by algorithm strength.
12330 # In reality it is possibly best to only use ssl-cipher-list-HOST
12331 # (or -USER@HOST), as necessary, again..
12332 set ssl-cipher-list=TLSv1.2:!aNULL:!eNULL:@STRENGTH
12334 # - TLSv1.2:!aNULL:!eNULL:\e
12335 # ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:\e
12336 # DHE-RSA-AES256-SHA:@STRENGTH
12337 # -ALL:!aNULL:!eNULL:!MEDIUM:!LOW:!MD5:!RC4:!EXPORT:@STRENGTH
12338 # Especially with TLSv1.3 curves selection may be desired:
12339 #set ssl-curves=P-521:P-384:P-256
12341 # Essential setting: select allowed character sets
12342 set sendcharsets=utf-8,iso-8859-1
12344 # A very kind option: when replying to a message, first try to
12345 # use the same encoding that the original poster used herself!
12346 set reply-in-same-charset
12348 # When replying, do not merge From: and To: of the original message
12349 # into To:. Instead old From: -> new To:, old To: -> merge Cc:.
12350 set recipients-in-cc
12352 # When sending messages, wait until the Mail-Transfer-Agent finishs.
12353 # Only like this you will be able to see errors reported through the
12354 # exit status of the MTA (including the built-in SMTP one)!
12357 # Only use built-in MIME types, no mime.types(5) files
12358 set mimetypes-load-control
12360 # Default directory where we act in (relative to $HOME)
12362 # A leading "+" (often) means: under *folder*
12363 # *record* is used to save copies of sent messages
12364 set MBOX=+mbox.mbox DEAD=+dead.txt \e
12365 record=+sent.mbox record-files record-resent
12367 # Make "file mymbox" and "file myrec" go to..
12368 shortcut mymbox %:+mbox.mbox myrec +sent.mbox
12370 # Not really optional, e.g., for S/MIME
12371 set from='Your Name <address@exam.ple>'
12373 # It may be necessary to set hostname and/or smtp-hostname
12374 # if the "SERVER" of mta and "domain" of from do not match.
12375 # The `urlencode' command can be used to encode USER and PASS
12376 set mta=(smtps?|submission)://[USER[:PASS]@]SERVER[:PORT] \e
12377 smtp-auth=login/plain... \e
12380 # Never refuse to start into interactive mode, and more
12382 colour-pager crt= \e
12383 followup-to followup-to-honour=ask-yes \e
12384 history-file=+.\*(uAhist history-size=-1 history-gabby \e
12385 mime-counter-evidence=0xE \e
12386 prompt='?\e?!\e![\e${account}#\e${mailbox-display}]? ' \e
12387 reply-to-honour=ask-yes \e
12390 # Only include the selected header fields when typing messages
12391 headerpick type retain from_ date from to cc subject \e
12392 message-id mail-followup-to reply-to
12393 # ...when forwarding messages
12394 headerpick forward retain subject date from to cc
12395 # ...when saving message, etc.
12396 #headerpick save ignore ^Original-.*$ ^X-.*$
12398 # Some mailing lists
12399 mlist '@xyz-editor\e.xyz$' '@xyzf\e.xyz$'
12400 mlsubscribe '^xfans@xfans\e.xyz$'
12402 # Handle a few file extensions (to store MBOX databases)
12403 filetype bz2 'bzip2 -dc' 'bzip2 -zc' \e
12404 gz 'gzip -dc' 'gzip -c' xz 'xz -dc' 'xz -zc' \e
12405 zst 'zstd -dc' 'zstd -19 -zc' \e
12406 zst.pgp 'gpg -d | zstd -dc' 'zstd -19 -zc | gpg -e'
12408 # A real life example of a very huge free mail provider
12409 # Instead of directly placing content inside `account',
12410 # we `define' a macro: like that we can switch "accounts"
12411 # from within *on-compose-splice*, for example!
12413 set folder=~/spool/XooglX inbox=+syste.mbox sent=+sent
12414 set from='Your Name <address@examp.ple>'
12415 set mta=smtp://USER:PASS@smtp.gmXil.com smtp-use-starttls
12421 # Here is a pretty large one which does not allow sending mails
12422 # if there is a domain name mismatch on the SMTP protocol level,
12423 # which would bite us if the value of from does not match, e.g.,
12424 # for people who have a sXXXXeforge project and want to speak
12425 # with the mailing list under their project account (in from),
12426 # still sending the message through their normal mail provider
12428 set folder=~/spool/XandeX inbox=+syste.mbox sent=+sent
12429 set from='Your Name <address@exam.ple>'
12430 set mta=smtps://USER:PASS@smtp.yaXXex.ru:465 \e
12431 hostname=yaXXex.com smtp-hostname=
12437 # Create some new commands so that, e.g., `ls /tmp' will..
12438 commandalias lls '!ls ${LS_COLOR_FLAG} -aFlrS'
12439 commandalias llS '!ls ${LS_COLOR_FLAG} -aFlS'
12441 # We do not support gpg(1) directly yet. But simple --clearsign'd
12442 # message parts can be dealt with as follows:
12445 wysh set pipe-text/plain=$'@*#++=@\e
12446 < "${MAILX_FILENAME_TEMPORARY}" awk \e
12447 -v TMPFILE="${MAILX_FILENAME_TEMPORARY}" \e'\e
12449 /^-----BEGIN PGP SIGNED MESSAGE-----/,/^$/ {\e
12452 print "--- GPG --verify ---";\e
12453 system("gpg --verify " TMPFILE " 2>&1");\e
12454 print "--- GPG --verify ---";\e
12458 /^-----BEGIN PGP SIGNATURE-----/,\e
12459 /^-----END PGP SIGNATURE-----/{\e
12466 commandalias V '\e'call V
12470 When storing passwords in
12472 appropriate permissions should be set on this file with
12473 .Ql $ chmod 0600 \*(ur .
12476 is available user credentials can be stored in the central
12478 file instead; e.g., here is a different version of the example account
12479 that sets up SMTP and POP3:
12481 .Bd -literal -offset indent
12483 set folder=~/spool/XandeX inbox=+syste.mbox sent=+sent
12484 set from='Your Name <address@exam.ple>'
12486 # Load an encrypted ~/.netrc by uncommenting the next line
12487 #set netrc-pipe='gpg -qd ~/.netrc.pgp'
12489 set mta=smtps://smtp.yXXXXx.ru:465 \e
12490 smtp-hostname= hostname=yXXXXx.com
12491 set pop3-keepalive=240 pop3-no-apop-pop.yXXXXx.ru
12492 commandalias xp fi pop3s://pop.yXXXXx.ru
12504 .Bd -literal -offset indent
12505 machine *.yXXXXx.ru login USER password PASS
12509 This configuration should now work just fine:
12512 .Dl $ echo text | \*(uA -dvv -AXandeX -s Subject user@exam.ple
12515 .\" .Ss "S/MIME step by step" {{{
12516 .Ss "S/MIME step by step"
12518 \*(OP The first thing you need for participating in S/MIME message
12519 exchange is your personal certificate, including a private key.
12520 The certificate contains public information, in particular your name and
12521 your email address(es), and the public key that is used by others to
12522 encrypt messages for you,
12523 and to verify signed messages they supposedly received from you.
12524 The certificate is included in each signed message you send.
12525 The private key must be kept secret.
12526 It is used to decrypt messages that were previously encrypted with your
12527 public key, and to sign messages.
12530 For personal use it is recommended that you get a S/MIME certificate
12531 from one of the major CAs on the Internet using your WWW browser.
12532 Many CAs offer such certificates for free.
12534 .Lk https://www.CAcert.org
12535 which issues client and server certificates to members of their
12536 community for free; their root certificate
12537 .Pf ( Lk https://\:www.cacert.org/\:certs/\:root.crt )
12538 is often not in the default set of trusted CA root certificates, though,
12539 which means you will have to download their root certificate separately
12540 and ensure it is part of our S/MIME certificate validation chain by
12543 or as a vivid member of the
12544 .Va smime-ca-file .
12545 But let us take a step-by-step tour on how to setup S/MIME with
12546 a certificate from CAcert.org despite this situation!
12549 First of all you will have to become a member of the CAcert.org
12550 community, simply by registrating yourself via the web interface.
12551 Once you are, create and verify all email addresses you want to be able
12552 to create signed and encrypted messages for/with using the corresponding
12553 entries of the web interface.
12554 Now ready to create S/MIME certificates, so let us create a new
12555 .Dq client certificate ,
12556 ensure to include all email addresses that should be covered by the
12557 certificate in the following web form, and also to use your name as the
12561 Create a private key and a certificate request on your local computer
12562 (please see the manual pages of the used commands for more in-depth
12563 knowledge on what the used arguments etc. do):
12566 .Dl $ openssl req -nodes -newkey rsa:4096 -keyout key.pem -out creq.pem
12569 Afterwards copy-and-paste the content of
12571 into the certificate-request (CSR) field of the web form on the
12572 CAcert.org website (you may need to unfold some
12573 .Dq advanced options
12574 to see the corresponding text field).
12575 This last step will ensure that your private key (which never left your
12576 box) and the certificate belong together (through the public key that
12577 will find its way into the certificate via the certificate-request).
12578 You are now ready and can create your CAcert certified certificate.
12579 Download and store or copy-and-paste it as
12584 In order to use your new S/MIME setup a combined private key/public key
12585 (certificate) file has to be created:
12588 .Dl $ cat key.pem pub.crt > ME@HERE.com.paired
12591 This is the file \*(UA will work with.
12592 If you have created your private key with a passphrase then \*(UA will
12593 ask you for it whenever a message is signed or decrypted.
12594 Set the following variables to henceforth use S/MIME (setting
12596 is of interest for verification only):
12598 .Bd -literal -offset indent
12599 ? set smime-ca-file=ALL-TRUSTED-ROOT-CERTS-HERE \e
12600 smime-sign-cert=ME@HERE.com.paired \e
12601 smime-sign-message-digest=SHA256 \e
12607 .\" .Ss "Using CRLs with S/MIME or SSL/TLS" {{{
12608 .Ss "Using CRLs with S/MIME or SSL/TLS"
12610 \*(OP Certification authorities (CAs) issue certificate revocation
12611 lists (CRLs) on a regular basis.
12612 These lists contain the serial numbers of certificates that have been
12613 declared invalid after they have been issued.
12614 Such usually happens because the private key for the certificate has
12616 because the owner of the certificate has left the organization that is
12617 mentioned in the certificate, etc.
12618 To seriously use S/MIME or SSL/TLS verification,
12619 an up-to-date CRL is required for each trusted CA.
12620 There is otherwise no method to distinguish between valid and
12621 invalidated certificates.
12622 \*(UA currently offers no mechanism to fetch CRLs, nor to access them on
12623 the Internet, so they have to be retrieved by some external mechanism.
12626 \*(UA accepts CRLs in PEM format only;
12627 CRLs in DER format must be converted, like, e.\|g.:
12630 .Dl $ openssl crl \-inform DER \-in crl.der \-out crl.pem
12633 To tell \*(UA about the CRLs, a directory that contains all CRL files
12634 (and no other files) must be created.
12639 variables, respectively, must then be set to point to that directory.
12640 After that, \*(UA requires a CRL to be present for each CA that is used
12641 to verify a certificate.
12650 In general it is a good idea to turn on
12656 twice) if something does not work well.
12657 Very often a diagnostic message can be produced that leads to the
12658 problems' solution.
12660 .\" .Ss "\*(UA shortly hangs on startup" {{{
12661 .Ss "\*(UA shortly hangs on startup"
12663 This can have two reasons, one is the necessity to wait for a file lock
12664 and cannot be helped, the other being that \*(UA calls the function
12666 in order to query the nodename of the box (sometimes the real one is
12667 needed instead of the one represented by the internal variable
12669 One may have varying success by ensuring that the real hostname and
12673 or, more generally, that the name service is properly setup \(en
12676 return the expected value?
12677 Does this local hostname have a domain suffix?
12678 RFC 6762 standardized the link-local top-level domain
12680 try again after adding an (additional) entry with this extension.
12683 .\" .Ss "I cannot login to Google mail aka GMail" {{{
12684 .Ss "I cannot login to Google mail aka GMail"
12686 Since 2014 some free service providers classify programs as
12688 unless they use a special authentification method (OAuth 2.0) which
12689 was not standardized for non-HTTP protocol authentication token query
12690 until August 2015 (RFC 7628).
12693 Different to Kerberos / GSSAPI, which is developed since the mid of the
12694 1980s, where a user can easily create a local authentication ticket for
12695 her- and himself with the locally installed
12697 program, that protocol has no such local part but instead requires
12698 a world-wide-web query to create or fetch a token; since there is no
12699 local cache this query would have to be performed whenever \*(UA is
12700 invoked (in interactive sessions situation may differ).
12703 \*(UA does not support OAuth.
12704 Because of this it is necessary to declare \*(UA a
12705 .Dq less secure app
12706 (on the providers account web page) in order to read and send mail.
12707 However, it also seems possible to take the following steps instead:
12712 give the provider the number of a mobile phone,
12715 .Dq 2-Step Verification ,
12717 create an application specific password (16 characters), and
12719 use that special password instead of the real Google account password in
12720 \*(UA (for more on that see the section
12721 .Sx "On URL syntax and credential lookup" ) .
12725 .\" .Ss "Not \(dqdefunctional\(dq, but the editor key does not work" {{{
12726 .Ss "Not \(dqdefunctional\(dq, but the editor key does not work"
12728 It can happen that the terminal library (see
12729 .Sx "On terminal control and line editor",
12732 reports different codes than the terminal really sends, in which case
12733 \*(UA will tell that a key binding is functional, but will not be able to
12734 recognize it because the received data does not match anything expected.
12735 Especially without the \*(OPal terminal capability library support one
12736 reason for this may be that the (possibly even non-existing) keypad
12737 is not turned on and the resulting layout reports the keypad control
12738 codes for the normal keyboard keys.
12743 ings will show the byte sequences that are expected.
12746 To overcome the situation, use, e.g., the program
12748 in conjunction with the command line option
12750 if available, to see the byte sequences which are actually produced
12751 by keypresses, and use the variable
12753 to make \*(UA aware of them.
12754 E.g., the terminal this is typed on produces some false sequences, here
12755 an example showing the shifted home key:
12757 .Bd -literal -offset indent
12760 # 1B 5B=[ 31=1 3B=; 32=2 48=H
12765 ? \*(uA -v -Stermcap='kHOM=\eE[H'
12775 .\" .Sh "IMAP CLIENT" {{{
12778 \*(OPally there is IMAP client support available.
12779 This part of the program is obsolete and will vanish in v15 with the
12780 large MIME and I/O layer rewrite, because it uses old-style blocking I/O
12781 and makes excessive use of signal based long code jumps.
12782 Support can hopefully be readded later based on a new-style I/O, with
12783 SysV signal handling.
12784 In fact the IMAP support had already been removed from the codebase, but
12785 was reinstantiated on user demand: in effect the IMAP code is at the
12786 level of \*(UA v14.8.16 (with
12788 being the sole exception), and should be treated with some care.
12795 protocol prefixes, and an IMAP-based
12798 IMAP URLs (paths) undergo inspections and possible transformations
12799 before use (and the command
12801 can be used to manually apply them to any given argument).
12802 Hierarchy delimiters are normalized, a step which is configurable via the
12804 variable chain, but defaults to the first seen delimiter otherwise.
12805 \*(UA supports internationalised IMAP names, and en- and decodes the
12806 names from and to the
12808 as necessary and possible.
12809 If a mailbox name is expanded (see
12810 .Sx "Filename transformations" )
12811 to an IMAP mailbox, all names that begin with `+' then refer to IMAP
12812 mailboxes below the
12814 target box, while folder names prefixed by `@' refer to folders below
12815 the hierarchy base.
12818 Note: some IMAP servers do not accept the creation of mailboxes in
12819 the hierarchy base, but require that they are created as subfolders of
12820 `INBOX' \(en with such servers a folder name of the form
12822 .Dl imaps://mylogin@imap.myisp.example/INBOX.
12824 should be used (the last character is the server's hierarchy
12826 The following IMAP-specific commands exist:
12829 .Bl -tag -width ".It Ic BaNg"
12832 Only applicable to cached IMAP mailboxes;
12833 takes a message list and reads the specified messages into the IMAP
12838 If operating in disconnected mode on an IMAP mailbox,
12839 switch to online mode and connect to the mail server while retaining
12840 the mailbox status.
12841 See the description of the
12843 variable for more information.
12847 If operating in online mode on an IMAP mailbox,
12848 switch to disconnected mode while retaining the mailbox status.
12849 See the description of the
12852 A list of messages may optionally be given as argument;
12853 the respective messages are then read into the cache before the
12854 connection is closed, thus
12856 makes the entire mailbox available for disconnected use.
12860 Sends command strings directly to the current IMAP server.
12861 \*(UA operates always in IMAP `selected state' on the current mailbox;
12862 commands that change this will produce undesirable results and should be
12864 Useful IMAP commands are:
12865 .Bl -tag -offset indent -width ".Ic getquotearoot"
12867 Takes the name of an IMAP mailbox as an argument and creates it.
12869 (RFC 2087) Takes the name of an IMAP mailbox as an argument
12870 and prints the quotas that apply to the mailbox.
12871 Not all IMAP servers support this command.
12873 (RFC 2342) Takes no arguments and prints the Personal Namespaces,
12874 the Other User's Namespaces and the Shared Namespaces.
12875 Each namespace type is printed in parentheses;
12876 if there are multiple namespaces of the same type,
12877 inner parentheses separate them.
12878 For each namespace a prefix and a hierarchy separator is listed.
12879 Not all IMAP servers support this command.
12884 Perform IMAP path transformations.
12888 .Sx "Command modifiers" ) ,
12889 and manages the error number
12891 The first argument specifies the operation:
12893 normalizes hierarchy delimiters (see
12895 and converts the strings from the locale
12897 to the internationalized variant used by IMAP,
12899 performs the reverse operation.
12904 The following IMAP-specific internal variables exist:
12907 .Bl -tag -width ".It Va BaNg"
12909 .It Va disconnected
12910 \*(BO When an IMAP mailbox is selected and this variable is set,
12911 no connection to the server is initiated.
12912 Instead, data is obtained from the local cache (see
12915 Mailboxes that are not present in the cache
12916 and messages that have not yet entirely been fetched from the server
12918 to fetch all messages in a mailbox at once,
12920 .No ` Ns Li copy * /dev/null Ns '
12921 can be used while still in connected mode.
12922 Changes that are made to IMAP mailboxes in disconnected mode are queued
12923 and committed later when a connection to that server is made.
12924 This procedure is not completely reliable since it cannot be guaranteed
12925 that the IMAP unique identifiers (UIDs) on the server still match the
12926 ones in the cache at that time.
12929 when this problem occurs.
12931 .It Va disconnected-USER@HOST
12932 The specified account is handled as described for the
12935 but other accounts are not affected.
12938 .It Va imap-auth-USER@HOST , imap-auth
12939 Sets the IMAP authentication method.
12940 Valid values are `login' for the usual password-based authentication
12942 `cram-md5', which is a password-based authentication that does not send
12943 the password over the network in clear text,
12944 and `gssapi' for GSS-API based authentication.
12948 Enables caching of IMAP mailboxes.
12949 The value of this variable must point to a directory that is either
12950 existent or can be created by \*(UA.
12951 All contents of the cache can be deleted by \*(UA at any time;
12952 it is not safe to make assumptions about them.
12955 .It Va imap-delim-USER@HOST , imap-delim-HOST , imap-delim
12956 The hierarchy separator used by the IMAP server.
12957 Whenever an IMAP path is specified it will undergo normalization.
12958 One of the normalization steps is the squeezing and adjustment of
12959 hierarchy separators.
12960 If this variable is set, any occurrence of any character of the given
12961 value that exists in the path will be replaced by the first member of
12962 the value; an empty value will cause the default to be used, it is
12964 If not set, we will reuse the first hierarchy separator character that
12965 is discovered in a user-given mailbox name.
12967 .Mx Va imap-keepalive
12968 .It Va imap-keepalive-USER@HOST , imap-keepalive-HOST , imap-keepalive
12969 IMAP servers may close the connection after a period of
12970 inactivity; the standard requires this to be at least 30 minutes,
12971 but practical experience may vary.
12972 Setting this variable to a numeric `value' greater than 0 causes
12973 a `NOOP' command to be sent each `value' seconds if no other operation
12977 .It Va imap-list-depth
12978 When retrieving the list of folders on an IMAP server, the
12980 command stops after it has reached a certain depth to avoid possible
12982 The value of this variable sets the maximum depth allowed.
12984 If the folder separator on the current IMAP server is a slash `/',
12985 this variable has no effect and the
12987 command does not descend to subfolders.
12989 .Mx Va imap-use-starttls
12990 .It Va imap-use-starttls-USER@HOST , imap-use-starttls-HOST , imap-use-starttls
12991 Causes \*(UA to issue a `STARTTLS' command to make an unencrypted
12992 IMAP session SSL/TLS encrypted.
12993 This functionality is not supported by all servers,
12994 and is not used if the session is already encrypted by the IMAPS method.
13000 .\" .Sh "SEE ALSO" {{{
13010 .Xr spamassassin 1 ,
13019 .Xr mailwrapper 8 ,
13025 .\" .Sh HISTORY {{{
13028 M. Douglas McIlroy writes in his article
13029 .Dq A Research UNIX Reader: Annotated Excerpts \
13030 from the Programmer's Manual, 1971-1986
13033 command already appeared in First Edition
13037 .Bd -ragged -offset indent
13038 Electronic mail was there from the start.
13039 Never satisfied with its exact behavior, everybody touched it at one
13040 time or another: to assure the safety of simultaneous access, to improve
13041 privacy, to survive crashes, to exploit uucp, to screen out foreign
13042 freeloaders, or whatever.
13043 Not until v7 did the interface change (Thompson).
13044 Later, as mail became global in its reach, Dave Presotto took charge and
13045 brought order to communications with a grab-bag of external networks
13051 Mail was written in 1978 by Kurt Shoens and developed as part of the
13054 distribution until 1995.
13055 Mail has then seen further development in open source
13057 variants, noticeably by Christos Zoulas in
13059 Based upon this Nail, later Heirloom Mailx, was developed by Gunnar
13060 Ritter in the years 2000 until 2008.
13061 Since 2012 S-nail is maintained by Steffen (Daode) Nurpmeso.
13062 This man page is derived from
13063 .Dq The Mail Reference Manual
13064 that was originally written by Kurt Shoens.
13071 .An "Kurt Shoens" ,
13072 .An "Edward Wang" ,
13073 .An "Keith Bostic" ,
13074 .An "Christos Zoulas" ,
13075 .An "Gunnar Ritter" ,
13076 .An "Steffen Nurpmeso" .
13083 provide contact addresses:
13085 .\" v15-compat: drop eval as `mail' will expand variable?
13086 .Dl ? echo $contact-web; eval mail $contact-mail
13089 .\" .Sh CAVEATS {{{
13092 \*(ID Interrupting an operation via
13096 from anywhere else but a command prompt is very problematic and likely
13097 to leave the program in an undefined state: many library functions
13098 cannot deal with the
13100 that this software (still) performs; even though efforts have been taken
13101 to address this, no sooner but in v15 it will have been worked out:
13102 interruptions have not been disabled in order to allow forceful breakage
13103 of hanging network connections, for example (all this is unrelated to
13107 The SMTP and POP3 protocol support of \*(UA is very basic.
13108 Also, if it fails to contact its upstream SMTP server, it will not make
13109 further attempts to transfer the message at a later time (setting
13114 If this is a concern, it might be better to set up a local SMTP server
13115 that is capable of message queuing.
13122 After deleting some message of a POP3 mailbox the header summary falsely
13123 claims that there are no messages to display, one needs to perform
13124 a scroll or dot movement to restore proper state.
13126 In threaded display a power user may encounter crashes very
13127 occasionally (this is may and very).
13131 in the source repository lists future directions.