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 v14.9.2 / 2017-08-01
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 Messages and attachments which consist of 7-bit clean data will be
1832 classified as consisting of
1835 This is a problem if the
1837 character set is a multibyte character set that is also 7-bit clean.
1838 For example, the Japanese character set ISO-2022-JP is 7-bit clean but
1839 capable to encode the rich set of Japanese Kanji, Hiragana and Katakana
1840 characters: in order to notify receivers of this character set the mail
1841 message must be MIME encoded so that the character set ISO-2022-JP can
1843 To achieve this, the variable
1845 must be set to ISO-2022-JP.
1846 (Today a better approach regarding email is the usage of UTF-8, which
1847 uses 8-bit bytes for non-US-ASCII data.)
1850 If the \*(OPal character set conversion capabilities are not available
1852 does not include the term
1856 will be the only supported character set,
1857 it is simply assumed that it can be used to exchange 8-bit messages
1858 (over the wire an intermediate, configurable
1861 and the rest of this section does not apply;
1862 it may however still be necessary to explicitly set it if automatic
1863 detection fails, since in that case it defaults to
1864 .\" (Keep in SYNC: ./nail.1:"Character sets", ./config.h:CHARSET_*!)
1865 LATIN1 a.k.a. ISO-8859-1.
1868 \*(OP When reading messages, their text is converted into
1870 as necessary in order to display them on the users terminal.
1871 Unprintable characters and invalid byte sequences are detected
1872 and replaced by proper substitution characters.
1873 Character set mappings for source character sets can be established with
1876 which may be handy to work around faulty character set catalogues (e.g.,
1877 to add a missing LATIN1 to ISO-8859-1 mapping), or to enforce treatment
1878 of one character set as another one (e.g., to interpret LATIN1 as CP1252).
1880 .Va charset-unknown-8bit
1881 to deal with another hairy aspect of message interpretation.
1884 When sending messages all their parts and attachments are classified.
1885 Whereas no character set conversion is performed on those parts which
1886 appear to be binary data,
1887 the character set being used must be declared within the MIME header of
1888 an outgoing text part if it contains characters that do not conform to
1889 the set of characters that are allowed by the email standards.
1890 Permissible values for character sets used in outgoing messages can be
1895 which defines a catch-all last-resort fallback character set that is
1896 implicitly appended to the list of character sets in
1900 When replying to a message and the variable
1901 .Va reply-in-same-charset
1902 is set, then the character set of the message being replied to
1903 is tried first (still being a subject of
1904 .Ic charsetalias ) .
1905 And it is also possible to make \*(UA work even more closely related to
1906 the current locale setting automatically by using the variable
1907 .Va sendcharsets-else-ttycharset ,
1908 please see there for more information.
1911 All the specified character sets are tried in order unless the
1912 conversion of the part or attachment succeeds.
1913 If none of the tried (8-bit) character sets is capable to represent the
1914 content of the part or attachment,
1915 then the message will not be sent and its text will optionally be
1919 In general, if a message saying
1920 .Dq cannot convert from a to b
1921 appears, either some characters are not appropriate for the currently
1922 selected (terminal) character set,
1923 or the needed conversion is not supported by the system.
1924 In the first case, it is necessary to set an appropriate
1926 locale and/or the variable
1930 The best results are usually achieved when \*(UA is run in a UTF-8
1931 locale on an UTF-8 capable terminal, in which case the full Unicode
1932 spectrum of characters is available.
1933 In this setup characters from various countries can be displayed,
1934 while it is still possible to use more simple character sets for sending
1935 to retain maximum compatibility with older mail clients.
1938 On the other hand the POSIX standard defines a locale-independent 7-bit
1939 .Dq portable character set
1940 that should be used when overall portability is an issue, the even more
1941 restricted subset named
1942 .Dq portable filename character set
1943 consists of A-Z, a-z, 0-9, period
1951 .\" .Ss "Message states" {{{
1952 .Ss "Message states"
1954 \*(UA differentiates in between several different message states;
1955 the current state will be reflected in header summary displays if
1957 is configured to do so (via the internal variable
1959 and messages can also be selected and be acted upon depending on their
1961 .Sx "Specifying messages" ) .
1962 When operating on the system
1966 .Sx "primary system mailbox" ,
1967 special actions, like the automatic moving of messages to the
1969 .Sx "secondary mailbox"
1971 may be applied when the mailbox is left (also implicitly via
1972 a successful exit of \*(UA, but not if the special command
1974 is used) \(en however, because this may be irritating to users which
1977 mail-user-agents, the default global
1983 variables in order to suppress this behaviour.
1985 .Bl -hang -width ".It Ql new"
1987 Message has neither been viewed nor moved to any other state.
1988 Such messages are retained even in the
1990 .Sx "primary system mailbox" .
1993 Message has neither been viewed nor moved to any other state, but the
1994 message was present already when the mailbox has been opened last:
1995 Such messages are retained even in the
1997 .Sx "primary system mailbox" .
2000 The message has been processed by one of the following commands:
2019 will always try to automatically
2025 logical message, and may thus mark multiple messages as read, the
2027 command will do so if the internal variable
2032 command is used, messages that are in a
2034 .Sx "primary system mailbox"
2037 state when the mailbox is left will be saved in the
2039 .Sx "secondary mailbox"
2041 unless the internal variable
2046 The message has been processed by one of the following commands:
2052 can be used to access such messages.
2055 The message has been processed by a
2057 command and it will be retained in its current location.
2060 The message has been processed by one of the following commands:
2066 command is used, messages that are in a
2068 .Sx "primary system mailbox"
2071 state when the mailbox is left will be deleted; they will be saved in the
2073 .Sx "secondary mailbox"
2075 when the internal variable
2081 In addition to these message states, flags which otherwise have no
2082 technical meaning in the mail system except allowing special ways of
2083 addressing them when
2084 .Sx "Specifying messages"
2085 can be set on messages.
2086 These flags are saved with messages and are thus persistent, and are
2087 portable between a set of widely used MUAs.
2089 .Bl -hang -width ".It Ic answered"
2091 Mark messages as having been answered.
2093 Mark messages as being a draft.
2095 Mark messages which need special attention.
2099 .\" .Ss "Specifying messages" {{{
2100 .Ss "Specifying messages"
2107 can be given a list of message numbers as arguments to apply to a number
2108 of messages at once.
2111 deletes messages 1 and 2,
2114 will delete the messages 1 through 5.
2115 In sorted or threaded mode (see the
2119 will delete the messages that are located between (and including)
2120 messages 1 through 5 in the sorted/threaded order, as shown in the
2123 The following special message names exist:
2126 .Bl -tag -width ".It Ar BaNg"
2128 The current message, the so-called
2132 The message that was previously the current message.
2135 The parent message of the current message,
2136 that is the message with the Message-ID given in the
2138 field or the last entry of the
2140 field of the current message.
2143 The next previous undeleted message,
2144 or the next previous deleted message for the
2147 In sorted/threaded mode,
2148 the next previous such message in the sorted/threaded order.
2151 The next undeleted message,
2152 or the next deleted message for the
2155 In sorted/threaded mode,
2156 the next such message in the sorted/threaded order.
2159 The first undeleted message,
2160 or the first deleted message for the
2163 In sorted/threaded mode,
2164 the first such message in the sorted/threaded order.
2168 In sorted/threaded mode,
2169 the last message in the sorted/threaded order.
2173 selects the message addressed with
2177 is any other message specification,
2178 and all messages from the thread that begins at it.
2179 Otherwise it is identical to
2184 the thread beginning with the current message is selected.
2189 All messages that were included in the
2190 .Sx "Message list arguments"
2191 of the previous command.
2194 An inclusive range of message numbers.
2195 Selectors that may also be used as endpoints include any of
2200 .Dq any substring matches
2203 header, which will match addresses (too) even if
2205 is set (and POSIX says
2206 .Dq any address as shown in a header summary shall be matchable in this form ) ;
2209 variable is set, only the local part of the address is evaluated
2210 for the comparison, not ignoring case, and the setting of
2212 is completely ignored.
2213 For finer control and match boundaries use the
2217 .It Ar / Ns Ar string
2218 All messages that contain
2220 in the subject field (case ignored).
2227 the string from the previous specification of that type is used again.
2229 .It Xo Op Ar @ Ns Ar name-list Ns
2232 All messages that contain the given case-insensitive search
2234 ession; if the \*(OPal regular expression (see
2236 support is available
2238 will be interpreted as (an extended) one if any of the
2240 (extended) regular expression characters is seen: in this case this
2241 should match strings correctly which are in the locale
2245 .Ar @ Ns Ar name-list
2246 part is missing, the search is restricted to the subject field body,
2249 specifies a comma-separated list of header fields to search, as in
2251 .Dl '@to,from,cc@Someone i ought to know'
2253 In order to search for a string that includes a
2255 (commercial at) character the
2257 is effectively non-optional, but may be given as the empty string.
2258 Some special header fields may be abbreviated:
2272 respectively and case-insensitively.
2277 can be used to search in (all of) the header(s) of the message, and the
2286 can be used to perform full text searches \(en whereas the former
2287 searches only the body, the latter also searches the message header.
2289 This message specification performs full text comparison, but even with
2290 regular expression support it is almost impossible to write a search
2291 expression that savely matches only a specific address domain.
2292 To request that the content of the header is treated as a list of
2293 addresses, and to strip those down to the plain email address which the
2294 search expression is to be matched against, prefix the header name
2295 (abbreviation) with a tilde
2298 .Dl @~f@@a\e.safe\e.domain\e.match$
2301 All messages of state
2305 is one or multiple of the following colon modifiers:
2307 .Bl -tag -compact -width ".It Ar :M"
2312 Old messages (any not in state
2334 messages (cf. the variable
2335 .Va markanswered ) .
2340 \*(OP Messages classified as spam (see
2341 .Sx "Handling spam" . )
2343 \*(OP Messages with unsure spam classification.
2349 \*(OP IMAP-style SEARCH expressions may also be used.
2350 This addressing mode is available with all types of mailbox
2352 s; \*(UA will perform the search locally as necessary.
2353 Strings must be enclosed by double quotes
2355 in their entirety if they contain whitespace or parentheses;
2356 within the quotes, only reverse solidus
2358 is recognized as an escape character.
2359 All string searches are case-insensitive.
2360 When the description indicates that the
2362 representation of an address field is used,
2363 this means that the search string is checked against both a list
2366 .Bd -literal -offset indent
2367 (\*qname\*q \*qsource\*q \*qlocal-part\*q \*qdomain-part\*q)
2372 and the addresses without real names from the respective header field.
2373 These search expressions can be nested using parentheses, see below for
2377 .Bl -tag -compact -width ".It Ar _n_u"
2378 .It Ar ( criterion )
2379 All messages that satisfy the given
2381 .It Ar ( criterion1 criterion2 ... criterionN )
2382 All messages that satisfy all of the given criteria.
2384 .It Ar ( or criterion1 criterion2 )
2385 All messages that satisfy either
2390 To connect more than two criteria using
2392 specifications have to be nested using additional parentheses,
2394 .Ql (or a (or b c)) ,
2398 .Ql ((a or b) and c) .
2401 operation of independent criteria on the lowest nesting level,
2402 it is possible to achieve similar effects by using three separate
2406 .It Ar ( not criterion )
2407 All messages that do not satisfy
2409 .It Ar ( bcc \*q Ns Ar string Ns Ar \*q )
2410 All messages that contain
2412 in the envelope representation of the
2415 .It Ar ( cc \*q Ns Ar string Ns Ar \*q )
2416 All messages that contain
2418 in the envelope representation of the
2421 .It Ar ( from \*q Ns Ar string Ns Ar \*q )
2422 All messages that contain
2424 in the envelope representation of the
2427 .It Ar ( subject \*q Ns Ar string Ns Ar \*q )
2428 All messages that contain
2433 .It Ar ( to \*q Ns Ar string Ns Ar \*q )
2434 All messages that contain
2436 in the envelope representation of the
2439 .It Ar ( header name \*q Ns Ar string Ns Ar \*q )
2440 All messages that contain
2445 .It Ar ( body \*q Ns Ar string Ns Ar \*q )
2446 All messages that contain
2449 .It Ar ( text \*q Ns Ar string Ns Ar \*q )
2450 All messages that contain
2452 in their header or body.
2453 .It Ar ( larger size )
2454 All messages that are larger than
2457 .It Ar ( smaller size )
2458 All messages that are smaller than
2462 .It Ar ( before date )
2463 All messages that were received before
2465 which must be in the form
2469 denotes the day of the month as one or two digits,
2471 is the name of the month \(en one of
2472 .Ql Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ,
2475 is the year as four digits, e.g.,
2479 All messages that were received on the specified date.
2480 .It Ar ( since date )
2481 All messages that were received since the specified date.
2482 .It Ar ( sentbefore date )
2483 All messages that were sent on the specified date.
2484 .It Ar ( senton date )
2485 All messages that were sent on the specified date.
2486 .It Ar ( sentsince date )
2487 All messages that were sent since the specified date.
2489 The same criterion as for the previous search.
2490 This specification cannot be used as part of another criterion.
2491 If the previous command line contained more than one independent
2492 criterion then the last of those criteria is used.
2496 .\" .Ss "On terminal control and line editor" {{{
2497 .Ss "On terminal control and line editor"
2499 \*(OP Terminal control will be realized through one of the standard
2501 libraries, either the
2503 or, alternatively, the
2505 both of which will be initialized to work with the environment variable
2507 Terminal control will enhance or enable interactive usage aspects, e.g.,
2508 .Sx "Coloured display" ,
2509 and extend behaviour of the Mailx-Line-Editor (MLE), which may learn the
2510 byte-sequences of keys like the cursor and function keys.
2513 The internal variable
2515 can be used to overwrite settings or to learn (correct(ed)) keycodes.
2516 \*(UA may also become a fullscreen application by entering the
2517 so-called ca-mode and switching to an alternative exclusive screen
2518 (content) shall the terminal support it and the internal variable
2520 has been set explicitly.
2521 Actual interaction with the chosen library can be disabled completely by
2522 setting the internal variable
2523 .Va termcap-disable ;
2525 will be queried regardless, which is true even if the \*(OPal library
2526 support has not been enabled at configuration time as long as some other
2527 \*(OP which (may) query terminal control sequences has been enabled.
2530 \*(OP The built-in Mailx-Line-Editor (MLE) should work in all
2531 environments which comply to the ISO C standard
2533 and will support wide glyphs if possible (the necessary functionality
2534 had been removed from ISO C, but was included in
2536 Prevent usage of a line editor in interactive mode by setting the
2538 .Va line-editor-disable .
2539 Especially if the \*(OPal terminal control support is missing setting
2540 entries in the internal variable
2542 will help shall the MLE misbehave, see there for more.
2543 The MLE can support a little bit of
2549 feature is available then input from line editor prompts will be saved
2550 in a history list that can be searched in and be expanded from.
2551 Such saving can be prevented by prefixing input with any amount of
2553 Aspects of history, like allowed content and maximum size, as well as
2554 whether history shall be saved persistently, can be configured with the
2558 .Va history-gabby-persist
2563 The MLE supports a set of editing and control commands.
2564 By default (as) many (as possible) of these will be assigned to a set of
2565 single-letter control codes, which should work on any terminal (and can
2566 be generated by holding the
2568 key while pressing the key of desire, e.g.,
2572 command is available then the MLE commands can also be accessed freely
2573 by assigning the command name, which is shown in parenthesis in the list
2574 below, to any desired key-sequence, and the MLE will instead and also use
2576 to establish its built-in key bindings
2577 (more of them if the \*(OPal terminal control is available),
2578 an action which can then be suppressed completely by setting
2579 .Va line-editor-no-defaults .
2580 .Sx "Shell-style argument quoting"
2581 notation is used in the following;
2582 combinations not mentioned either cause job control signals or do not
2583 generate a (unique) keycode:
2587 .Bl -tag -compact -width ".It Ql \eBa"
2589 Go to the start of the line
2591 .Pf ( Cd mle-go-home ) .
2594 Move the cursor backward one character
2596 .Pf ( Cd mle-go-bwd ) .
2599 Forward delete the character under the cursor;
2600 quits \*(UA if used on the empty line unless the internal variable
2604 .Pf ( Cd mle-del-fwd ) .
2607 Go to the end of the line
2609 .Pf ( Cd mle-go-end ) .
2612 Move the cursor forward one character
2614 .Pf ( Cd mle-go-fwd ) .
2617 Cancel current operation, full reset.
2618 If there is an active history search or tabulator expansion then this
2619 command will first reset that, reverting to the former line content;
2620 thus a second reset is needed for a full reset in this case
2622 .Pf ( Cd mle-reset ) .
2625 Backspace: backward delete one character
2627 .Pf ( Cd mle-del-bwd ) .
2631 Horizontal tabulator:
2632 try to expand the word before the cursor, supporting the usual
2633 .Sx "Filename transformations"
2635 .Pf ( Cd mle-complete ) .
2637 .Cd mle-quote-rndtrip .
2641 commit the current line
2643 .Pf ( Cd mle-commit ) .
2646 Cut all characters from the cursor to the end of the line
2648 .Pf ( Cd mle-snarf-end ) .
2653 .Pf ( Cd mle-repaint ) .
2656 \*(OP Go to the next history entry
2658 .Pf ( Cd mle-hist-fwd ) .
2661 (\*(OPally context-dependent) Invokes the command
2665 \*(OP Go to the previous history entry
2667 .Pf ( Cd mle-hist-bwd ) .
2670 Toggle roundtrip mode shell quotes, where produced,
2673 .Pf ( Cd mle-quote-rndtrip ) .
2674 This setting is temporary, and will be forgotten once the command line
2675 is committed; also see
2679 \*(OP Complete the current line from (the remaining) older history entries
2681 .Pf ( Cd mle-hist-srch-bwd ) .
2684 \*(OP Complete the current line from (the remaining) newer history entries
2686 .Pf ( Cd mle-hist-srch-fwd ) .
2689 Paste the snarf buffer
2691 .Pf ( Cd mle-paste ) .
2699 .Pf ( Cd mle-snarf-line ) .
2702 Prompts for a Unicode character (its hexadecimal number) to be inserted
2704 .Pf ( Cd mle-prompt-char ) .
2705 Note this command needs to be assigned to a single-letter control code
2706 in order to become recognized and executed during input of
2707 a key-sequence (only three single-letter control codes can be used for
2708 that shortcut purpose); this control code is special-treated and cannot
2709 be part of any other sequence, because any occurrence will perform the
2711 function immediately.
2714 Cut the characters from the one preceding the cursor to the preceding
2717 .Pf ( Cd mle-snarf-word-bwd ) .
2720 Move the cursor forward one word boundary
2722 .Pf ( Cd mle-go-word-fwd ) .
2725 Move the cursor backward one word boundary
2727 .Pf ( Cd mle-go-word-bwd ) .
2730 Escape: reset a possibly used multibyte character input state machine
2731 and \*(OPally a lingering, incomplete key binding
2733 .Pf ( Cd mle-cancel ) .
2734 This command needs to be assigned to a single-letter control code in
2735 order to become recognized and executed during input of a key-sequence
2736 (only three single-letter control codes can be used for that shortcut
2738 This control code may also be part of a multi-byte sequence, but if
2739 a sequence is active and the very control code is currently also an
2740 expected input, then it will first be consumed by the active sequence.
2743 (\*(OPally context-dependent) Invokes the command
2747 (\*(OPally context-dependent) Invokes the command
2751 (\*(OPally context-dependent) Invokes the command
2755 Cut the characters from the one after the cursor to the succeeding word
2758 .Pf ( Cd mle-snarf-word-fwd ) .
2769 this will immediately reset a possibly active search etc.
2774 ring the audible bell.
2778 .\" .Ss "Coloured display" {{{
2779 .Ss "Coloured display"
2781 \*(OP \*(UA can be configured to support a coloured display and font
2782 attributes by emitting ANSI a.k.a. ISO 6429 SGR (select graphic
2783 rendition) escape sequences.
2784 Usage of colours and font attributes solely depends upon the
2785 capability of the detected terminal type that is defined by the
2786 environment variable
2788 and which can be fine-tuned by the user via the internal variable
2792 On top of what \*(UA knows about the terminal the boolean variable
2794 defines whether the actually applicable colour and font attribute
2795 sequences should also be generated when output is going to be paged
2796 through the external program defined by the environment variable
2801 This is not enabled by default because different pager programs need
2802 different command line switches or other configuration in order to
2803 support those sequences.
2804 \*(UA however knows about some widely used pagers and in a clean
2805 environment it is often enough to simply set
2807 please refer to that variable for more on this topic.
2812 is set then any active usage of colour and font attribute sequences
2813 is suppressed, but without affecting possibly established
2818 To define and control colours and font attributes a single multiplexer
2819 command family exists:
2821 shows or defines colour mappings for the given colour type (e.g.,
2824 can be used to remove mappings of a given colour type.
2825 Since colours are only available in interactive mode, it may make
2826 sense to conditionalize the colour setup by encapsulating it with
2829 .Bd -literal -offset indent
2830 if terminal && [ "$features" =% +colour ]
2831 colour iso view-msginfo ft=bold,fg=green
2832 colour iso view-header ft=bold,fg=red from,subject
2833 colour iso view-header fg=red
2835 uncolour iso view-header from,subject
2836 colour iso view-header ft=bold,fg=magenta,bg=cyan
2837 colour 256 view-header ft=bold,fg=208,bg=230 "subject,from"
2838 colour mono view-header ft=bold
2839 colour mono view-header ft=bold,ft=reverse subject,from
2844 .\" .Ss "Handling spam" {{{
2847 \*(OP \*(UA can make use of several spam interfaces for the purpose of
2848 identification of, and, in general, dealing with spam messages.
2849 A precondition of most commands in order to function is that the
2851 variable is set to one of the supported interfaces.
2852 Once messages have been identified as spam their (volatile)
2854 state can be prompted: the
2858 message specifications will address respective messages and their
2860 entries will be used when displaying the
2862 in the header display.
2867 rates the given messages and sets their
2870 If the spam interface offers spam scores those can also be displayed in
2871 the header display by including the
2881 will interact with the Bayesian filter of the chosen interface and learn
2882 the given messages as
2886 respectively; the last command can be used to cause
2888 of messages; it adheres to their current
2890 state and thus reverts previous teachings.
2895 will simply set and clear, respectively, the mentioned volatile
2897 message flag, without any interface interaction.
2906 requires a running instance of the
2908 server in order to function, started with the option
2910 shall Bayesian filter learning be possible.
2912 .Bd -literal -offset indent
2913 $ spamd -i localhost:2142 -i /tmp/.spamsock -d [-L] [-l]
2914 $ spamd --listen=localhost:2142 --listen=/tmp/.spamsock \e
2915 --daemonize [--local] [--allow-tell]
2919 Thereafter \*(UA can make use of these interfaces:
2921 .Bd -literal -offset indent
2922 $ \*(uA -Sspam-interface=spamc -Sspam-maxsize=500000 \e
2923 -Sspamc-command=/usr/local/bin/spamc \e
2924 -Sspamc-arguments="-U /tmp/.spamsock" -Sspamc-user=
2926 $ \*(uA -Sspam-interface=spamc -Sspam-maxsize=500000 \e
2927 -Sspamc-command=/usr/local/bin/spamc \e
2928 -Sspamc-arguments="-d localhost -p 2142" -Sspamc-user=
2932 Using the generic filter approach allows usage of programs like
2934 Here is an example, requiring it to be accessible via
2937 .Bd -literal -offset indent
2938 $ \*(uA -Sspam-interface=filter -Sspam-maxsize=500000 \e
2939 -Sspamfilter-ham="bogofilter -n" \e
2940 -Sspamfilter-noham="bogofilter -N" \e
2941 -Sspamfilter-nospam="bogofilter -S" \e
2942 -Sspamfilter-rate="bogofilter -TTu 2>/dev/null" \e
2943 -Sspamfilter-spam="bogofilter -s" \e
2944 -Sspamfilter-rate-scanscore="1;^(.+)$"
2948 Because messages must exist on local storage in order to be scored (or
2949 used for Bayesian filter training), it is possibly a good idea to
2950 perform the local spam check last:
2952 .Bd -literal -offset indent
2953 define spamdelhook {
2955 spamset (header x-dcc-brand-metrics "bulk")
2956 # Server-side spamassassin(1)
2957 spamset (header x-spam-flag "YES")
2958 del :s # TODO we HAVE to be able to do `spamrate :u ! :sS'
2964 set folder-hook-FOLDER=spamdelhook
2968 See also the documentation for the variables
2969 .Va spam-interface , spam-maxsize ,
2970 .Va spamc-command , spamc-arguments , spamc-user ,
2971 .Va spamfilter-ham , spamfilter-noham , spamfilter-nospam , \
2974 .Va spamfilter-rate-scanscore .
2977 .\" }}} (DESCRIPTION)
2980 .\" .Sh COMMANDS {{{
2983 \*(UA reads input in lines.
2984 An unquoted reverse solidus
2986 at the end of a command line
2988 the newline character: it is discarded and the next line of input is
2989 used as a follow-up line, with all leading whitespace removed;
2990 once an entire line is completed, the whitespace characters
2991 .Cm space , tabulator , newline
2992 as well as those defined by the variable
2994 are removed from the beginning and end.
2995 Placing any whitespace characters at the beginning of a line will
2996 prevent a possible addition of the command line to the \*(OPal
3000 The beginning of such input lines is then scanned for the name of
3001 a known command: command names may be abbreviated, in which case the
3002 first command that matches the given prefix will be used.
3003 .Sx "Command modifiers"
3004 may prefix a command in order to modify its behaviour.
3005 A name may also be a
3007 which will become expanded until no more expansion is possible.
3008 Once the command that shall be executed is known, the remains of the
3009 input line will be interpreted according to command-specific rules:
3010 (\*(ID) some commands use
3011 .Sx "Shell-style argument quoting" ,
3012 so that a single input line may actually consist of multiple commands,
3013 but others pass it unchanged as
3014 .Sx "Raw data arguments for codec commands" .
3019 can be used to show the list of all commands, either alphabetically
3020 sorted or in prefix search order (these do not match, also because the
3021 POSIX standard prescribes a set of abbreviations).
3022 \*(OPally the command
3026 when given an argument, will show a documentation string for the
3027 command matching the expanded argument, as in
3029 which should be a shorthand of
3031 with these documentation strings both commands support a more
3033 listing mode which includes the argument type of the command and other
3034 information which applies; a handy suggestion might thus be:
3036 .Bd -literal -offset indent
3038 # Before v15: need to enable sh(1)ell-style on _entire_ line!
3039 localopts 1;wysh set verbose;ignerr eval "${@}";return ${?}
3041 ? commandalias xv '\ecall __xv'
3045 .\" .Ss "Command modifiers" {{{
3046 .Ss "Command modifiers"
3048 Commands may be prefixed by one or multiple command modifiers.
3052 The modifier reverse solidus
3055 to be placed first, prevents
3057 expansions on the remains of the line, e.g.,
3059 will always evaluate the command
3061 even if an (command)alias of the same name exists.
3063 content may itself contain further command modifiers, including
3064 an initial reverse solidus to prevent further expansions.
3070 indicates that any error generated by the following command should be
3071 ignored by the state machine and not cause a program exit with enabled
3073 or for the standardized exit cases in
3078 .Sx "INTERNAL VARIABLES" ,
3079 will be set to the real exit status of the command regardless.
3082 Some commands support the
3085 modifier: if used, they expect the name of a variable, which can itself
3086 be a variable, i.e., shell expansion is applied, as their first
3087 argument, and will place their computation result in it instead of the
3088 default location (it is usually written to standard output).
3090 The given name will be tested for being a valid
3092 variable name, and may therefore only consist of upper- and lowercase
3093 characters, digits, and the underscore; the hyphen-minus may be used as
3094 a non-portable extension; digits may not be used as first, hyphen-minus
3095 may not be used as last characters.
3096 In addition the name may either not be one of the known
3097 .Sx "INTERNAL VARIABLES" ,
3098 or must otherwise refer to a writable (non-boolean) value variable.
3099 The actual put operation may fail nonetheless, e.g., if the variable
3100 expects a number argument only a number will be accepted.
3101 Any error during these operations causes the command as such to fail,
3102 and the error number
3105 .Va ^ERR Ns -NOTSUP ,
3112 Last, but not least, the modifier
3115 can be used for some old and established commands to choose the new
3116 .Sx "Shell-style argument quoting"
3117 rules over the traditional
3118 .Sx "Old-style argument quoting" .
3122 .\" .Ss "Message list arguments" {{{
3123 .Ss "Message list arguments"
3125 Some commands expect arguments that represent messages (actually
3126 their symbolic message numbers), as has been documented above under
3127 .Sx "Specifying messages"
3129 If no explicit message list has been specified, the next message
3130 forward that satisfies the command's requirements will be used,
3131 and if there are no messages forward of the current message,
3132 the search proceeds backwards;
3133 if there are no good messages at all to be found, an error message is
3134 shown and the command is aborted.
3137 .\" .Ss "Old-style argument quoting" {{{
3138 .Ss "Old-style argument quoting"
3140 \*(ID This section documents the old, traditional style of quoting
3141 non-message-list arguments to commands which expect this type of
3142 arguments: whereas still used by the majority of such commands, the new
3143 .Sx "Shell-style argument quoting"
3144 may be available even for those via
3147 .Sx "Command modifiers" .
3148 Nonetheless care must be taken, because only new commands have been
3149 designed with all the capabilities of the new quoting rules in mind,
3150 which can, e.g., generate control characters.
3153 .Bl -bullet -offset indent
3155 An argument can be enclosed between paired double-quotes
3160 any whitespace, shell word expansion, or reverse solidus characters
3161 (except as described next) within the quotes are treated literally as
3162 part of the argument.
3163 A double-quote will be treated literally within single-quotes and vice
3165 Inside such a quoted string the actually used quote character can be
3166 used nonetheless by escaping it with a reverse solidus
3172 An argument that is not enclosed in quotes, as above, can usually still
3173 contain space characters if those spaces are reverse solidus escaped, as in
3177 A reverse solidus outside of the enclosing quotes is discarded
3178 and the following character is treated literally as part of the argument.
3182 .\" .Ss "Shell-style argument quoting" {{{
3183 .Ss "Shell-style argument quoting"
3185 Commands which don't expect message-list arguments use
3187 ell-style, and therefore POSIX standardized, argument parsing and
3189 \*(ID Most new commands only support these new rules and are flagged
3190 \*(NQ, some elder ones can use them with the command modifier
3192 in the future only this type of argument quoting will remain.
3195 A command line is parsed from left to right and an input token is
3196 completed whenever an unquoted, otherwise ignored, metacharacter is seen.
3197 Metacharacters are vertical bar
3203 as well as all characters from the variable
3206 .Cm space , tabulator , newline .
3207 The additional metacharacters left and right parenthesis
3209 and less-than and greater-than signs
3213 supports are not used, and are treated as ordinary characters: for one
3214 these characters are a vivid part of email addresses, and it seems
3215 highly unlikely that their function will become meaningful to \*(UA.
3217 .Bd -filled -offset indent
3218 .Sy Compatibility note:
3219 \*(ID Please note that even many new-style commands do not yet honour
3221 to parse their arguments: whereas the
3223 ell is a language with syntactic elements of clearly defined semantics,
3224 \*(UA parses entire input lines and decides on a per-command base what
3225 to do with the rest of the line.
3226 This also means that whenever an unknown command is seen all that \*(UA
3227 can do is cancellation of the processing of the remains of the line.
3229 It also often depends on an actual subcommand of a multiplexer command
3230 how the rest of the line should be treated, and until v15 we are not
3231 capable to perform this deep inspection of arguments.
3232 Nonetheless, at least the following commands which work with positional
3233 parameters fully support
3235 for an almost shell-compatible field splitting:
3236 .Ic call , call_if , read , vpospar , xcall .
3240 Any unquoted number sign
3242 at the beginning of a new token starts a comment that extends to the end
3243 of the line, and therefore ends argument processing.
3244 An unquoted dollar sign
3246 will cause variable expansion of the given name, which must be a valid
3248 ell-style variable name (see
3250 .Sx "INTERNAL VARIABLES"
3253 (shell) variables can be accessed through this mechanism, brace
3254 enclosing the name is supported (i.e., to subdivide a token).
3257 Whereas the metacharacters
3258 .Cm space , tabulator , newline
3259 only complete an input token, vertical bar
3265 also act as control operators and perform control functions.
3266 For now supported is semicolon
3268 which terminates a single command, therefore sequencing the command line
3269 and making the remainder of the line a subject to reevaluation.
3270 With sequencing, multiple command argument types and quoting rules may
3271 therefore apply to a single line, which can become problematic before
3272 v15: e.g., the first of the following will cause surprising results.
3275 .Dl ? echo one; set verbose; echo verbose=$verbose.
3276 .Dl ? echo one; wysh set verbose; echo verbose=$verbose.
3279 Quoting is a mechanism that will remove the special meaning of
3280 metacharacters and reserved words, and will prevent expansion.
3281 There are four quoting mechanisms: the escape character, single-quotes,
3282 double-quotes and dollar-single-quotes:
3285 .Bl -bullet -offset indent
3287 The literal value of any character can be preserved by preceding it
3288 with the escape character reverse solidus
3292 Arguments which are enclosed in
3293 .Ql 'single-\:quotes'
3294 retain their literal value.
3295 A single-quote cannot occur within single-quotes.
3298 The literal value of all characters enclosed in
3299 .Ql \(dqdouble-\:quotes\(dq
3300 is retained, with the exception of dollar sign
3302 which will cause variable expansion, as above, backquote (grave accent)
3304 (which not yet means anything special), reverse solidus
3306 which will escape any of the characters dollar sign
3308 (to prevent variable expansion), backquote (grave accent)
3312 (to prevent ending the quote) and reverse solidus
3314 (to prevent escaping, i.e., to embed a reverse solidus character as-is),
3315 but has no special meaning otherwise.
3318 Arguments enclosed in
3319 .Ql $'dollar-\:single-\:quotes'
3320 extend normal single quotes in that reverse solidus escape sequences are
3321 expanded as follows:
3323 .Bl -tag -compact -width "Ql \eNNN"
3325 bell control character (ASCII and ISO-10646 BEL).
3327 backspace control characer (ASCII and ISO-10646 BS).
3329 escape control character (ASCII and ISO-10646 ESC).
3333 form feed control character (ASCII and ISO-10646 FF).
3335 line feed control character (ASCII and ISO-10646 LF).
3337 carriage return control character (ASCII and ISO-10646 CR).
3339 horizontal tabulator control character (ASCII and ISO-10646 HT).
3341 vertical tabulator control character (ASCII and ISO-10646 VT).
3343 emits a reverse solidus character.
3347 double quote (escaping is optional).
3349 eight-bit byte with the octal value
3351 (one to three octal digits), optionally prefixed by an additional
3353 A 0 byte will suppress further output for the quoted argument.
3355 eight-bit byte with the hexadecimal value
3357 (one or two hexadecimal characters).
3358 A 0 byte will suppress further output for the quoted argument.
3360 the Unicode / ISO-10646 character with the hexadecimal codepoint value
3362 (one to eight hexadecimal digits) \(em note that Unicode defines the
3363 maximum codepoint ever to be supported as
3368 This escape is only supported in locales that support Unicode (see
3369 .Sx "Character sets" ) ,
3370 in other cases the sequence will remain unexpanded unless the given code
3371 point is ASCII compatible or (if the \*(OPal character set conversion is
3372 available) can be represented in the current locale.
3373 The character NUL will suppress further output for the quoted argument.
3377 except it takes only one to four hexadecimal digits.
3379 Emits the non-printable (ASCII and compatible) C0 control codes
3380 0 (NUL) to 31 (US), and 127 (DEL).
3381 Printable representations of ASCII control codes can be created by
3382 mapping them to a different part of the ASCII character set, which is
3383 possible by adding the number 64 for the codes 0 to 31, e.g., 7 (BEL) is
3384 .Ql 7 + 64 = 71 = G .
3385 The real operation is a bitwise logical XOR with 64 (bit 7 set, see
3387 thus also covering code 127 (DEL), which is mapped to 63 (question mark):
3388 .Ql ? vexpr ^ 127 64 .
3390 Whereas historically circumflex notation has often been used for
3391 visualization purposes of control codes, e.g.,
3393 the reverse solidus notation has been standardized:
3395 Some control codes also have standardized (ISO-10646, ISO C) aliases,
3396 as shown above (e.g.,
3400 whenever such an alias exists it will be used for display purposes.
3401 The control code NUL
3403 a non-standard extension) will suppress further output for the remains
3404 of the token (which may extend beyond the current quote), or, depending
3405 on the context, the remains of all arguments for the current command.
3407 Non-standard extension: expand the given variable name, as above.
3408 Brace enclosing the name is supported.
3410 Not yet supported, just to raise awareness: Non-standard extension.
3417 .Bd -literal -offset indent
3418 ? echo 'Quotes '${HOME}' and 'tokens" differ!"# no comment
3419 ? echo Quotes ${HOME} and tokens differ! # comment
3420 ? echo Don"'"t you worry$'\ex21' The sun shines on us. $'\eu263A'
3424 .\" .Ss "Raw data arguments for codec commands" {{{
3425 .Ss "Raw data arguments for codec commands"
3427 A special set of commands, which all have the string
3429 in their name, e.g.,
3433 take raw string data as input, which means that the content of the
3434 command input line is passed completely unexpanded and otherwise
3435 unchanged: like this the effect of the actual codec is visible without
3436 any noise of possible shell quoting rules etc., i.e., the user can input
3437 one-to-one the desired or questionable data.
3438 To gain a level of expansion, the entire command line can be
3442 .Bd -literal -offset indent
3443 ? vput shcodec res encode /usr/Sch\[:o]nes Wetter/heute.txt
3445 $'/usr/Sch\eu00F6nes Wetter/heute.txt'
3447 $'/usr/Sch\eu00F6nes Wetter/heute.txt'
3448 ? eval shcodec d $res
3449 /usr/Sch\[:o]nes Wetter/heute.txt
3453 .\" .Ss "Filename transformations" {{{
3454 .Ss "Filename transformations"
3456 Filenames, where expected, and unless documented otherwise, are
3457 subsequently subject to the following filename transformations, in
3460 .Bl -bullet -offset indent
3462 If the given name is a registered
3464 it will be replaced with the expanded shortcut.
3467 The filename is matched against the following patterns or strings:
3469 .Bl -hang -compact -width ".Ar %user"
3471 (Number sign) is expanded to the previous file.
3473 (Percent sign) is replaced by the invoking
3474 .Mx -ix "primary system mailbox"
3475 user's primary system mailbox, which either is the (itself expandable)
3477 if that is set, the standardized absolute pathname indicated by
3479 if that is set, or a built-in compile-time default otherwise.
3481 Expands to the primary system mailbox of
3483 (and never the value of
3485 regardless of its actual setting).
3487 (Ampersand) is replaced with the invoking users
3488 .Mx -ix "secondary mailbox"
3489 secondary mailbox, the
3496 directory (if that variable is set).
3498 Expands to the same value as
3500 but has special meaning when used with, e.g., the command
3502 the file will be treated as a primary system mailbox by, e.g., the
3506 commands, meaning that messages that have been read in the current
3507 session will be moved to the
3509 mailbox instead of simply being flagged as read.
3513 Meta expansions are applied to the resulting filename, as applicable to
3514 the resulting file access protocol (also see
3515 .Sx "On URL syntax and credential lookup" ) .
3516 If the fully expanded filename results in multiple pathnames and the
3517 command is expecting only one file, an error results.
3519 For the file-protocol, a leading tilde
3521 character will be replaced by the expansion of
3523 except when followed by a valid user name, in which case the home
3524 directory of the given user is used instead.
3526 In addition a shell expansion as if specified in double-quotes (see
3527 .Sx "Shell-style argument quoting" )
3528 is applied, so that any occurrence of
3532 will be replaced by the expansion of the variable, if possible;
3533 .Sx "INTERNAL VARIABLES"
3536 (shell) variables can be accessed through this mechanism.
3538 In interactive context, in order to allow simple value acceptance (via
3540 arguments will usually be displayed in a properly quoted form, e.g., a file
3541 .Ql diet\e is \ecurd.txt
3543 .Ql 'diet\e is \ecurd.txt' .
3547 .\" .Ss "Commands" {{{
3550 The following commands are available:
3552 .Bl -tag -width ".It Ic BaNg"
3559 command which follows, replacing unescaped exclamation marks with the
3560 previously executed command if the internal variable
3563 This command supports
3566 .Sx "Command modifiers" ,
3567 and manages the error number
3569 A 0 or positive exit status
3571 reflects the exit status of the command, negative ones that
3572 an error happened before the command was executed, or that the program
3573 did not exit cleanly, but, e.g., due to a signal: the error number is
3574 .Va ^ERR Ns -CHILD ,
3578 In conjunction with the
3580 modifier the following special cases exist:
3581 a negative exit status occurs if the collected data could not be stored
3582 in the given variable, which is a
3584 error that should otherwise not occur.
3585 .Va ^ERR Ns -CANCELED
3586 indicates that no temporary file could be created to collect the command
3587 output at first glance.
3588 In case of catchable out-of-memory situations
3590 will occur and \*(UA will try to store the empty string, just like with
3591 all other detected error conditions.
3596 The comment-command causes the entire line to be ignored.
3598 this really is a normal command which' purpose is to discard its
3601 indicating special character, which means that, e.g., trailing comments
3602 on a line are not possible.
3606 Goes to the next message in sequence and types it
3612 Display the preceding message, or the n'th previous message if given
3613 a numeric argument n.
3617 Show the current message number (the
3622 Show a brief summary of commands.
3623 \*(OP Given an argument a synopsis for the command in question is
3624 shown instead; commands can be abbreviated in general and this command
3625 can be used to see the full expansion of an abbreviation including the
3626 synopsis, try, e.g.,
3631 and see how the output changes.
3632 This mode also supports a more
3634 output, which will provide the informations documented for
3645 .It Ic account , unaccount
3646 (ac, una) Creates, selects or lists (an) account(s).
3647 Accounts are special incarnations of
3649 macros and group commands and variable settings which together usually
3650 arrange the environment for the purpose of creating an email account.
3651 Different to normal macros settings which are covered by
3653 \(en here by default enabled! \(en will not be reverted before the
3658 (case-insensitive) always exists, and all but it can be deleted by the
3659 latter command, and in one operation with the special name
3662 Without arguments a listing of all defined accounts is shown.
3663 With one argument the given account is activated: the system
3665 of that account will be activated (as via
3667 a possibly installed
3669 will be run, and the internal variable
3672 The two argument form is identical to defining a macro as via
3674 .Bd -literal -offset indent
3676 set folder=~/mail inbox=+syste.mbox record=+sent.mbox
3677 set from='(My Name) myname@myisp.example'
3678 set mta=smtp://mylogin@smtp.myisp.example
3685 Perform email address codec transformations on raw-data argument, rather
3686 according to email standards (RFC 5322; \*(ID will furtherly improve).
3690 .Sx "Command modifiers" ) ,
3691 and manages the error number
3693 The first argument must be either
3694 .Ar [+[+[+]]]e[ncode] ,
3698 and specifies the operation to perform on the rest of the line.
3701 Decoding will show how a standard-compliant MUA will display the given
3702 argument, which should be an email address.
3703 Please be aware that most MUAs have difficulties with the address
3704 standards, and vary wildly when (comments) in parenthesis,
3706 strings, or quoted-pairs, as below, become involved.
3707 \*(ID \*(UA currently does not perform decoding when displaying addresses.
3710 Skinning is identical to decoding but only outputs the plain address,
3711 without any string, comment etc. components.
3712 Another difference is that it may fail with the error number
3716 if decoding fails to find a(n) (valid) email address, in which case the
3717 unmodified input will be output again.
3720 Encoding supports four different modes, lesser automated versions can be
3721 chosen by prefixing one, two or three plus signs: the standard imposes
3722 a special meaning on some characters, which thus have to be transformed
3723 to so-called quoted-pairs by pairing them with a reverse solidus
3725 in order to remove the special meaning; this might change interpretation
3726 of the entire argument from what has been desired, however!
3727 Specify one plus sign to remark that parenthesis shall be left alone,
3728 two for not turning double quotation marks into quoted-pairs, and three
3729 for also leaving any user-specified reverse solidus alone.
3730 The result will always be valid, if a successful exit status is reported.
3731 \*(ID Addresses need to be specified in between angle brackets
3734 if the construct becomes more difficult, otherwise the current parser
3735 will fail; it is not smart enough to guess right.
3737 .Bd -literal -offset indent
3738 ? addrc enc "Hey, you",<diet@exam.ple>\e out\e there
3739 "\e"Hey, you\e", \e\e out\e\e there" <diet@exam.ple>
3740 ? addrc d "\e"Hey, you\e", \e\e out\e\e there" <diet@exam.ple>
3741 "Hey, you", \e out\e there <diet@exam.ple>
3742 ? addrc s "\e"Hey, you\e", \e\e out\e\e there" <diet@exam.ple>
3749 .It Ic alias , unalias
3750 (a, una) Aliases are a method of creating personal distribution lists
3751 that map a single alias name to none to multiple real receivers;
3752 these aliases become expanded after message composing is completed.
3753 The latter command removes the given list of aliases, the special name
3755 will discard all existing aliases.
3756 The former command shows all currently defined aliases when used without
3757 arguments, and with one argument the expansion of the given alias.
3758 With more than one argument, creates or appends to the alias name given
3759 as the first argument the remaining arguments.
3760 Alias names are restricted to alphabetic characters, digits, the
3761 underscore, hyphen-minus, the number sign, colon, commercial at and
3762 period, the last character can also be the dollar sign:
3763 .Ql [[:alnum:]_#:@.-]+$? .
3767 .It Ic alternates , unalternates
3768 \*(NQ (alt) Manage a list of alternate addresses or names of the active user,
3769 members of which will be removed from recipient lists.
3770 The latter command removes the given list of alternates, the special name
3772 will discard all existing aliases.
3773 The former command manages the error number
3775 and shows the current set of alternates when used without arguments; in
3776 this mode it supports
3779 .Sx "Command modifiers" ) .
3780 Otherwise the given arguments (after being checked for validity) are
3781 appended to the list of alternate names; in
3783 mode they replace that list instead.
3784 There is a set of implicit alternates which is formed of the values of
3793 .It Ic answered , unanswered
3794 Take a message lists and mark each message as having been answered,
3795 having not been answered, respectively.
3796 Messages will be marked answered when being
3798 to automatically if the
3802 .Sx "Message states" .
3807 .It Ic bind , unbind
3808 \*(OP\*(NQ The bind command extends the MLE (see
3809 .Sx "On terminal control and line editor" )
3810 with freely configurable key bindings.
3811 The latter command removes from the given context the given key binding,
3812 both of which may be specified as a wildcard
3816 will remove all bindings of all contexts.
3817 Due to initialization order unbinding will not work for built-in key
3818 bindings upon program startup, however: please use
3819 .Va line-editor-no-defaults
3820 for this purpose instead.
3823 With one argument the former command shows all key bindings for the
3824 given context, specifying an asterisk
3826 will show the bindings of all contexts; a more verbose listing will be
3827 produced if either of
3832 With two or more arguments a binding is (re)established:
3833 the first argument is the context to which the binding shall apply,
3834 the second argument is a comma-separated list of the
3836 which form the binding, and any remaining arguments form the expansion.
3837 To indicate that a binding shall not be auto-committed, but that the
3838 expansion shall instead be furtherly editable by the user, a commercial at
3840 (that will be removed) can be placed last in the expansion, from which
3841 leading and trailing whitespace will finally be removed.
3842 Reverse solidus cannot be used as the last character of expansion.
3845 Contexts define when a binding applies, i.e., a binding will not be seen
3846 unless the context for which it is defined for is currently active.
3847 This is not true for the shared binding
3849 which is the foundation for all other bindings and as such always
3850 applies, its bindings, however, only apply secondarily.
3851 The available contexts are the shared
3855 context which is used in all not otherwise documented situations, and
3857 which applies to compose mode only.
3861 which form the binding are specified as a comma-separated list of
3862 byte-sequences, where each list entry corresponds to one key(press).
3863 A list entry may, indicated by a leading colon character
3865 also refer to the name of a terminal capability; several dozen names
3866 will be compiled in and may be specified either by their
3868 or, if existing, by their
3870 name, regardless of the actually used \*(OPal terminal control library.
3871 It is possible to use any capability, as long as the name is resolvable
3872 by the \*(OPal control library or was defined via the internal variable
3874 Input sequences are not case-normalized, so that an exact match is
3875 required to update or remove a binding.
3878 .Bd -literal -offset indent
3879 ? bind base $'\eE',d mle-snarf-word-fwd # Esc(ape)
3880 ? bind base $'\eE',$'\ec?' mle-snarf-word-bwd # Esc, Delete
3881 ? bind default $'\ecA',:khome,w 'echo An editable binding@'
3882 ? bind default a,b,c rm -irf / @ # Another editable binding
3883 ? bind default :kf1 File %
3884 ? bind compose :kf1 ~e
3888 Note that the entire comma-separated list is first parsed (over) as a
3889 shell-token with whitespace as the field separator, before being parsed
3890 and expanded for real with comma as the field separator, therefore
3891 whitespace needs to be properly quoted, see
3892 .Sx "Shell-style argument quoting" .
3893 Using Unicode reverse solidus escape sequences renders a binding
3894 defunctional if the locale does not support Unicode (see
3895 .Sx "Character sets" ) ,
3896 and using terminal capabilities does so if no (corresponding) terminal
3897 control support is (currently) available.
3900 The following terminal capability names are built-in and can be used in
3902 or (if available) the two-letter
3905 See the respective manual for a list of capabilities.
3908 can be used to show all the capabilities of
3910 or the given terminal type;
3913 flag will also show supported (non-standard) extensions.
3916 .Bl -tag -compact -width kcuuf_or_kcuuf
3917 .It Cd kbs Ns \0or Cd kb
3919 .It Cd kdch1 Ns \0or Cd kD
3921 .It Cd kDC Ns \0or Cd *4
3922 \(em shifted variant.
3923 .It Cd kel Ns \0or Cd kE
3924 Clear to end of line.
3925 .It Cd kext Ns \0or Cd @9
3927 .It Cd kich1 Ns \0or Cd kI
3929 .It Cd kIC Ns \0or Cd #3
3930 \(em shifted variant.
3931 .It Cd khome Ns \0or Cd kh
3933 .It Cd kHOM Ns \0or Cd #2
3934 \(em shifted variant.
3935 .It Cd kend Ns \0or Cd @7
3937 .It Cd knp Ns \0or Cd kN
3939 .It Cd kpp Ns \0or Cd kP
3941 .It Cd kcub1 Ns \0or Cd kl
3942 Left cursor (with more modifiers: see below).
3943 .It Cd kLFT Ns \0or Cd #4
3944 \(em shifted variant.
3945 .It Cd kcuf1 Ns \0or Cd kr
3946 Right cursor (ditto).
3947 .It Cd kRIT Ns \0or Cd %i
3948 \(em shifted variant.
3949 .It Cd kcud1 Ns \0or Cd kd
3950 Down cursor (ditto).
3952 \(em shifted variant (only terminfo).
3953 .It Cd kcuu1 Ns \0or Cd ku
3956 \(em shifted variant (only terminfo).
3957 .It Cd kf0 Ns \0or Cd k0
3959 Add one for each function key up to
3964 .It Cd kf10 Ns \0or Cd k;
3966 .It Cd kf11 Ns \0or Cd F1
3968 Add one for each function key up to
3976 Some terminals support key-modifier combination extensions, e.g.,
3978 For example, the delete key,
3980 in its shifted variant, the name is mutated to
3982 then a number is appended for the states
3994 .Ql Shift+Alt+Control
3996 The same for the left cursor key,
3998 .Cd KLFT , KLFT3 , KLFT4 , KLFT5 , KLFT6 , KLFT7 , KLFT8 .
4001 It is advisable to use an initial escape or other control character (e.g.,
4003 for bindings which describe user key combinations (as opposed to purely
4004 terminal capability based ones), in order to avoid ambiguities whether
4005 input belongs to key sequences or not; it also reduces search time.
4008 may help shall keys and sequences be falsely recognized.
4013 \*(NQ Calls the given macro, which must have been created via
4018 Parameters given to macros are implicitly local to the macro's scope, and
4019 may be accessed via special (positional) parameters, e.g.,
4024 The positional parameters may be removed by
4026 ing them off the stack (exceeding the supported number of arguments
4028 .Va ^ERR Ns -OVERFLOW ) ,
4029 and are otherwise controllable via
4034 .Sx "INTERNAL VARIABLES"
4035 can be reverted before the current level regains control by setting
4037 for called macro(s) (or in them, of course).
4038 Macro execution can be terminated at any time by calling
4042 Calling macros recursively will at some time excess the stack size
4043 limit, causing a hard program abortion; if recursively calling a macro
4044 is the last command of the current macro, consider to use the command
4046 which will first release all resources of the current macro before
4047 replacing the current macro with the called one.
4048 Numeric and string operations can be performed via
4052 may be helpful to recreate argument lists.
4054 .Bd -literal -offset indent
4056 echo Parameter 1 of ${#} is ${1}, all: ${*} / ${@}
4059 call exmac Hello macro exmac!
4067 if the given macro has been created via
4069 but doesn't fail nor warn if the macro doesn't exist.
4073 (ch) Change the working directory to
4075 or the given argument.
4081 \*(OP Only applicable to S/MIME signed messages.
4082 Takes a message list and a filename and saves the certificates
4083 contained within the message signatures to the named file in both
4084 human-readable and PEM format.
4085 The certificates can later be used to send encrypted messages to the
4086 respective message senders by setting
4087 .Va smime-encrypt-USER@HOST
4092 .It Ic charsetalias , uncharsetalias
4093 \*(NQ Manage (character set conversion) character set alias mappings,
4094 as documented in the section
4095 .Sx "Character sets" .
4096 Character set aliases are expanded recursively, but no expansion is
4097 performed on values of the user-settable variables, e.g.,
4099 These are effectively no-operations if character set conversion
4100 is not available (i.e., no
4104 Without arguments the list of all currently defined aliases is shown,
4105 with one argument the expansion of the given alias.
4106 Otherwise all given arguments are treated as pairs of character sets and
4107 their desired target alias name, creating new or changing already
4108 existing aliases, as necessary.
4110 The latter deletes all aliases given as arguments, the special argument
4112 will remove all aliases.
4116 (ch) Change the working directory to
4118 or the given argument.
4124 .It Ic collapse , uncollapse
4125 Only applicable to threaded mode.
4126 Takes a message list and makes all replies to these messages invisible
4127 in header summaries, except for
4131 Also when a message with collapsed replies is displayed,
4132 all of these are automatically uncollapsed.
4133 The latter command undoes collapsing.
4138 .It Ic colour , uncolour
4139 \*(OP\*(NQ Manage colour mappings of and for a
4140 .Sx "Coloured display" .
4141 The type of colour is given as the (case-insensitive) first argument,
4142 which must be one of
4144 for 256-colour terminals,
4149 for the standard 8-colour ANSI / ISO 6429 color palette and
4153 for monochrome terminals.
4154 Monochrome terminals cannot deal with colours, but only (some) font
4158 Without further arguments the list of all currently defined mappings
4159 for the given colour type is shown (as a special case giving
4163 will show the mappings of all types).
4164 Otherwise the second argument defines the mappable slot, and the third
4165 argument a (comma-separated list of) colour and font attribute
4166 specification(s), and the optional fourth argument can be used to
4167 specify a precondition: if conditioned mappings exist they are tested in
4168 (creation) order unless a (case-insensitive) match has been found, and
4169 the default mapping (if any has been established) will only be chosen as
4171 The types of precondition available depend on the mappable slot (see
4172 .Sx "Coloured display"
4173 for some examples), the following of which exist:
4176 Mappings prefixed with
4178 are used for the \*(OPal built-in Mailx-Line-Editor (MLE, see
4179 .Sx "On terminal control and line editor" )
4180 and do not support preconditions.
4182 .Bl -tag -compact -width view-partinfo
4184 This mapping is used for the position indicator that is visible when
4185 a line cannot be fully displayed on the screen.
4192 Mappings prefixed with
4194 are used in header summaries, and they all understand the preconditions
4196 (the current message) and
4198 for elder messages (only honoured in conjunction with
4199 .Va datefield-markout-older ) .
4201 .Bl -tag -compact -width view-partinfo
4203 This mapping is used for the
4205 that can be created with the
4209 formats of the variable
4212 For the complete header summary line except the
4214 and the thread structure.
4216 For the thread structure which can be created with the
4218 format of the variable
4223 Mappings prefixed with
4225 are used when displaying messages.
4227 .Bl -tag -compact -width view-partinfo
4229 This mapping is used for so-called
4231 lines, which are MBOX file format specific header lines.
4234 A comma-separated list of headers to which the mapping applies may be
4235 given as a precondition; if the \*(OPal regular expression support is
4236 available then if any of the
4238 (extended) regular expression characters is seen the precondition will
4239 be evaluated as (an extended) one.
4241 For the introductional message info line.
4242 .It Ar view-partinfo
4243 For MIME part info lines.
4247 The following (case-insensitive) colour definitions and font attributes
4248 are understood, multiple of which can be specified in a comma-separated
4258 It is possible (and often applicable) to specify multiple font
4259 attributes for a single mapping.
4262 foreground colour attribute:
4272 To specify a 256-color mode a decimal number colour specification in
4273 the range 0 to 255, inclusive, is supported, and interpreted as follows:
4275 .Bl -tag -compact -width "999 - 999"
4277 the standard ISO 6429 colors, as above.
4279 high intensity variants of the standard colors.
4281 216 colors in tuples of 6.
4283 grayscale from black to white in 24 steps.
4285 .Bd -literal -offset indent
4287 fg() { printf "\e033[38;5;${1}m($1)"; }
4288 bg() { printf "\e033[48;5;${1}m($1)"; }
4290 while [ $i -lt 256 ]; do fg $i; i=$(($i + 1)); done
4291 printf "\e033[0m\en"
4293 while [ $i -lt 256 ]; do bg $i; i=$(($i + 1)); done
4294 printf "\e033[0m\en"
4298 background colour attribute (see
4300 for possible values).
4306 will remove for the given colour type (the special type
4308 selects all) the given mapping; if the optional precondition argument is
4309 given only the exact tuple of mapping and precondition is removed.
4312 will remove all mappings (no precondition allowed), thus
4314 will remove all established mappings.
4319 .It Ic commandalias , uncommandalias
4320 \*(NQ Define or list, and remove, respectively, command aliases.
4321 An (command)alias can be used everywhere a normal command can be used,
4322 but always takes precedence: any arguments that are given to the command
4323 alias are joined onto the alias expansion, and the resulting string
4324 forms the command line that is, in effect, executed.
4325 The latter command removes all given aliases, the special name
4327 will remove all existing aliases.
4328 When used without arguments the former shows a list of all currently
4329 known aliases, with one argument only the expansion of the given one.
4331 With two or more arguments a command alias is defined or updated: the
4332 first argument is the name under which the remaining command line should
4333 be accessible, the content of which can be just about anything.
4334 An alias may itself expand to another alias, but to avoid expansion loops
4335 further expansion will be prevented if an alias refers to itself or if
4336 an expansion depth limit is reached.
4337 Explicit expansion prevention is available via reverse solidus
4340 .Sx "Command modifiers" .
4341 .Bd -literal -offset indent
4343 \*(uA: `commandalias': no such alias: xx
4344 ? commandalias xx echo hello,
4346 commandalias xx 'echo hello,'
4355 (C) Copy messages to files whose names are derived from the author of
4356 the respective message and do not mark them as being saved;
4357 otherwise identical to
4362 (c) Copy messages to the named file and do not mark them as being saved;
4363 otherwise identical to
4368 Show the name of the current working directory, as reported by
4373 .Sx "Command modifiers" ) .
4374 The return status is tracked via
4379 \*(OP For unencrypted messages this command is identical to
4381 Encrypted messages are first decrypted, if possible, and then copied.
4385 \*(OP For unencrypted messages this command is identical to
4387 Encrypted messages are first decrypted, if possible, and then copied.
4391 .It Ic define , undefine
4392 Without arguments the current list of macros, including their content,
4393 is shown, otherwise a macro is defined, replacing an existing macro of
4395 A macro definition is a sequence of commands in the following form:
4396 .Bd -literal -offset indent
4405 A defined macro can be invoked explicitly by using the
4410 commands, or implicitly if a macro hook is triggered, e.g., a
4412 It is possible to localize adjustments, like creation, deletion and
4414 .Sx "INTERNAL VARIABLES" ,
4417 command; the scope which is localized depends on how (i.e.,
4419 normal macro, folder hook, hook,
4421 switch) the macro is invoked.
4422 Execution of a macro body can be stopped from within by calling
4426 ed macro, given positional parameters can be
4428 ed, or become completely replaced, removed etc. via
4431 The latter command deletes the given macro, the special name
4433 will discard all existing macros.
4434 Creation and deletion of (a) macro(s) can be performed from within
4439 .It Ic delete , undelete
4440 (d, u) Marks the given message list as being or not being
4442 respectively; if no argument has been specified then the usual search
4443 for a visible message is performed, as documented for
4444 .Sx "Message list arguments" ,
4445 showing only the next input prompt if the search fails.
4446 Deleted messages will neither be saved in the
4448 .Sx "secondary mailbox"
4450 nor will they be available for most other commands.
4453 variable is set, the new
4455 or the last message restored, respectively, is automatically
4465 Superseded by the multiplexer
4471 Delete the given messages and automatically
4475 if one exists, regardless of the setting of
4482 up or down by one message when given
4486 argument, respectively.
4490 .It Ic draft , undraft
4491 Take message lists and mark each given message as being draft, or not
4492 being draft, respectively, as documented in the section
4493 .Sx "Message states" .
4497 \*(NQ (ec) Echoes arguments to standard output and writes a trailing
4498 newline, whereas the otherwise identical
4501 .Sx "Shell-style argument quoting"
4503 .Sx "Filename transformations"
4504 are applied to the expanded arguments.
4510 except that is echoes to standard error.
4513 In interactive sessions the \*(OPal message ring queue for
4515 will be used instead, if available.
4521 but does not write a trailing newline.
4527 but does not write a trailing newline.
4531 (e) Point the text editor (as defined in
4533 at each message from the given list in turn.
4534 Modified contents are discarded unless the
4536 variable is set, and are not used unless the mailbox can be written to
4537 and the editor returns a successful exit status.
4542 .Ic if Ns \0/\: Ic elif Ns \0/\: Ic else Ns \0/\: Ic endif
4543 conditional \(em if the condition of a preceding
4545 was false, check the following condition and execute the following block
4546 if it evaluates true.
4551 .Ic if Ns \0/\: Ic elif Ns \0/\: Ic else Ns \0/\: Ic endif
4552 conditional \(em if none of the conditions of the preceding
4556 commands was true, the
4562 (en) Marks the end of an
4563 .Ic if Ns \0/\: Ic elif Ns \0/\: Ic else Ns \0/\: Ic endif
4564 conditional execution block.
4569 \*(NQ \*(UA has a strict notion about which variables are
4570 .Sx "INTERNAL VARIABLES"
4571 and which are managed in the program
4573 Since some of the latter are a vivid part of \*(UAs functioning,
4574 however, they are transparently integrated into the normal handling of
4575 internal variables via
4579 To integrate other environment variables of choice into this
4580 transparent handling, and also to export internal variables into the
4581 process environment where they normally are not, a
4583 needs to become established with this command, as in, e.g.,
4586 .Dl environ link PERL5LIB TZ
4589 Afterwards changing such variables with
4591 will cause automatic updates of the program environment, and therefore
4592 be inherited by newly created child processes.
4593 Sufficient system support provided (it was in BSD as early as 1987, and
4594 is standardized since Y2K) removing such variables with
4596 will remove them also from the program environment, but in any way
4597 the knowledge they ever have been
4600 Note that this implies that
4602 may cause loss of such links.
4607 will remove an existing link, but leaves the variables as such intact.
4608 Additionally the subcommands
4612 are provided, which work exactly the same as the documented commands
4616 but (additionally un)link the variable(s) with the program environment
4617 and thus immediately export them to, or remove them from (if possible),
4618 respectively, the program environment.
4623 \*(OP Since \*(UA uses the console as a user interface it can happen
4624 that messages scroll by too fast to become recognized.
4625 An error message ring queue is available which stores duplicates of any
4626 error message and notifies the user in interactive sessions whenever
4627 a new error has occurred.
4628 The queue is finite: if its maximum size is reached any new message
4629 replaces the eldest.
4632 can be used to manage this message queue: if given
4634 or no argument the queue will be displayed and cleared,
4636 will only clear all messages from the queue.
4640 \*(NQ Construct a command by concatenating the arguments, separated with
4641 a single space character, and then evaluate the result.
4642 This command passes through the exit status
4646 of the evaluated command; also see
4648 .Bd -literal -offset indent
4659 call yyy '\ecall xxx' "b\e$'\et'u ' "
4667 (ex or x) Exit from \*(UA without changing the active mailbox and skip
4668 any saving of messages in the
4670 .Sx "secondary mailbox"
4672 as well as a possibly tracked line editor
4674 The optional status number argument will be passed through to
4676 \*(ID For now it can happen that the given status will be overwritten,
4677 later this will only occur if a later error needs to be reported onto an
4678 otherwise success indicating status.
4684 but open the mailbox read-only.
4689 (fi) The file command switches to a new mailbox.
4690 Without arguments it shows status information of the current mailbox.
4691 If an argument is given, it will write out changes (such as deletions)
4692 the user has made, open a new mailbox, update the internal variables
4693 .Va mailbox-resolved
4695 .Va mailbox-display ,
4696 and optionally display a summary of
4703 .Sx "Filename transformations"
4704 will be applied to the
4708 prefixes are, i.e., URL syntax is understood, e.g.,
4709 .Ql maildir:///tmp/mdirbox :
4710 if a protocol prefix is used the mailbox type is fixated and neither
4711 the auto-detection (read on) nor the
4714 \*(OPally URLs can also be used to access network resources, and it is
4715 possible to proxy all network traffic over a SOCKS5 server given via
4719 .Dl \*(IN protocol://[user[:password]@]host[:port][/path]
4720 .Dl \*(OU protocol://[user@]host[:port][/path]
4723 \*(OPally supported network protocols are
4727 (POP3 with SSL/TLS encrypted transport),
4733 part is valid only for IMAP; there it defaults to
4735 Network URLs require a special encoding as documented in the section
4736 .Sx "On URL syntax and credential lookup" .
4739 If the resulting file protocol (MBOX database)
4741 is located on a local filesystem then the list of all registered
4743 s is traversed in order to see whether a transparent intermediate
4744 conversion step is necessary to handle the given mailbox, in which case
4745 \*(UA will use the found hook to load and save data into and from
4746 a temporary file, respectively.
4747 Changing hooks will not affect already opened mailboxes.
4748 For example, the following creates hooks for the
4750 compression tool and a combined compressed and encrypted format:
4752 .Bd -literal -offset indent
4754 gzip 'gzip -dc' 'gzip -c' \e
4755 zst.pgp 'gpg -d | zstd -dc' 'zstd -19 -zc | gpg -e'
4759 MBOX database files are generally locked during file operations in order
4760 to avoid inconsistencies due to concurrent modifications.
4761 \*(OPal Mailbox files which \*(UA treats as the system
4766 .Sx "primary system mailbox" Ns
4767 es in general will also be protected by so-called dotlock files, the
4768 traditional way of mail spool file locking: for any file
4772 will be created for the duration of the synchronization \(em
4773 as necessary a privilege-separated dotlock child process will be used
4774 to accommodate for necessary privilege adjustments in order to create
4775 the dotlock file in the same directory
4776 and with the same user and group identities as the file of interest.
4779 \*(UA by default uses tolerant POSIX rules when reading MBOX database
4780 files, but it will detect invalid message boundaries in this mode and
4781 complain (even more with
4783 if any is seen: in this case
4785 can be used to create a valid MBOX database from the invalid input.
4788 If no protocol has been fixated, and
4790 refers to a directory with the subdirectories
4795 then it is treated as a folder in
4798 The maildir format stores each message in its own file, and has been
4799 designed so that file locking is not necessary when reading or writing
4803 \*(ID If no protocol has been fixated and no existing file has
4804 been found, the variable
4806 controls the format of mailboxes yet to be created.
4811 .It Ic filetype , unfiletype
4812 \*(NQ Define or list, and remove, respectively, file handler hooks,
4813 which provide (shell) commands that enable \*(UA to load and save MBOX
4814 files from and to files with the registered file extensions;
4815 it will use an intermediate temporary file to store the plain data.
4816 The latter command removes the hooks for all given extensions,
4818 will remove all existing handlers.
4820 When used without arguments the former shows a list of all currently
4821 defined file hooks, with one argument the expansion of the given alias.
4822 Otherwise three arguments are expected, the first specifying the file
4823 extension for which the hook is meant, and the second and third defining
4824 the load- and save commands, respectively, to deal with the file type,
4825 both of which must read from standard input and write to standard
4827 Changing hooks will not affect already opened mailboxes (\*(ID except below).
4828 \*(ID For now too much work is done, and files are oftened read in twice
4829 where once would be sufficient: this can cause problems if a filetype is
4830 changed while such a file is opened; this was already so with the
4831 built-in support of .gz etc. in Heirloom, and will vanish in v15.
4832 \*(ID For now all handler strings are passed to the
4833 .Ev SHELL for evaluation purposes; in the future a
4835 prefix to load and save commands may mean to bypass this shell instance:
4836 placing a leading space will avoid any possible misinterpretations.
4837 .Bd -literal -offset indent
4838 ? filetype bz2 'bzip2 -dc' 'bzip2 -zc' \e
4839 gz 'gzip -dc' 'gzip -c' xz 'xz -dc' 'xz -zc' \e
4840 zst 'zstd -dc' 'zstd -19 -zc' \e
4841 zst.pgp 'gpg -d | zstd -dc' 'zstd -19 -zc | gpg -e'
4842 ? set record=+sent.zst.pgp
4847 .It Ic flag , unflag
4848 Take message lists and mark the messages as being flagged, or not being
4849 flagged, respectively, for urgent/special attention.
4851 .Sx "Message states" .
4860 With no arguments, list the names of the folders in the folder directory.
4861 With an existing folder as an argument,
4862 lists the names of folders below the named folder.
4868 but saves the message in a file named after the local part of the first
4869 recipient's address (instead of in
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 responds to all recipients regardless of the
4889 .It Ic followupsender
4892 but responds to the sender only regardless of the
4900 but saves the message in a file named after the local part of the
4901 recipient's address (instead of in
4906 Takes a message and the address of a recipient
4907 and forwards the message to him.
4908 The text of the original message is included in the new one,
4909 with the value of the
4910 .Va forward-inject-head
4911 variable preceding it.
4912 To filter the included header fields to the desired subset use the
4914 slot of the white- and blacklisting command
4916 Only the first part of a multipart message is included unless
4917 .Va forward-as-attachment ,
4918 and recipient addresses will be stripped from comments, names etc.
4919 unless the internal variable
4923 This may generate the errors
4924 .Va ^ERR Ns -DESTADDRREQ
4925 if no receiver has been specified,
4927 if some addressees where rejected by
4930 if no applicable messages have been given,
4932 if multiple messages have been specified,
4934 if an I/O error occurs,
4936 if a necessary character set conversion fails, and
4942 (f) Takes a list of message specifications and displays a summary of
4943 their message headers, exactly as via
4945 An alias of this command is
4948 .Sx "Specifying messages" .
4959 \*(OB Superseded by the multiplexer
4963 \*(OB Superseded by the multiplexer
4966 .It Ic ghost , unghost
4969 .Ic uncommandalias .
4973 .It Ic headerpick , unheaderpick
4974 \*(NQ Multiplexer command to manage white- and blacklisting
4975 selections of header fields for a variety of applications.
4976 Without arguments the set of contexts that have settings is displayed.
4977 When given arguments, the first argument is the context to which the
4978 command applies, one of (case-insensitive)
4980 for display purposes (via, e.g.,
4983 for selecting which headers shall be stored persistently when
4989 ing messages (note that MIME related etc. header fields should not be
4990 ignored in order to not destroy usability of the message in this case),
4992 for stripping down messages when
4994 ing message (has no effect if
4995 .Va forward-as-attachment
4998 for defining user-defined set of fields for the command
5001 The current settings of the given context are displayed if it is the
5003 A second argument denotes the type of restriction that is to be chosen,
5004 it may be (a case-insensitive prefix of)
5008 for white- and blacklisting purposes, respectively.
5009 Establishing a whitelist suppresses inspection of the corresponding
5012 If no further argument is given the current settings of the given type
5013 will be displayed, otherwise the remaining arguments specify header
5014 fields, which \*(OPally may be given as regular expressions, to be added
5016 The special wildcard field (asterisk,
5018 will establish a (fast) shorthand setting which covers all fields.
5020 The latter command always takes three or more arguments and can be used
5021 to remove selections, i.e., from the given context, the given type of
5022 list, all the given headers will be removed, the special argument
5024 will remove all headers.
5028 (h) Show the current group of headers, the size of which depends on
5031 and the style of which can be adjusted with the variable
5033 If a message-specification is given the group of headers containing the
5034 first message therein is shown and the message at the top of the screen
5047 (this mode also supports a more
5051 the list of history entries;
5054 argument selects and evaluates the respective history entry,
5055 which will become the new history top; a negative number is used as an
5056 offset to the current command, e.g.,
5058 will select the last command, the history top.
5059 The default mode if no arguments are given is
5062 .Sx "On terminal control and line editor"
5063 for more on this topic.
5069 Takes a message list and marks each message therein to be saved in the
5074 .Sx "secondary mailbox"
5076 Does not override the
5079 \*(UA deviates from the POSIX standard with this command, because a
5081 command issued after
5083 will display the following message, not the current one.
5088 (i) Part of the nestable
5089 .Ic if Ns \0/\: Ic elif Ns \0/\: Ic else Ns \0/\: Ic endif
5090 conditional execution construct \(em if the given condition is true then
5091 the encapsulated block is executed.
5092 The POSIX standards supports the (case-insensitive) conditions
5097 end, all remaining conditions are non-portable extensions.
5098 \*(ID These commands do not yet use
5099 .Sx "Shell-style argument quoting"
5100 and therefore do not know about input tokens, so that syntax
5101 elements have to be surrounded by whitespace; in v15 \*(UA will inspect
5102 all conditions bracket group wise and consider the tokens, representing
5103 values and operators, therein, which also means that variables will
5104 already have been expanded at that time (just like in the shell).
5106 .Bd -literal -offset indent
5115 The (case-insensitive) condition
5117 erminal will evaluate to true if the standard input is a terminal, i.e.,
5118 in interactive sessions.
5119 Another condition can be any boolean value (see the section
5120 .Sx "INTERNAL VARIABLES"
5121 for textual boolean representations) to mark an enwrapped block as
5124 .Dq always execute .
5125 (It shall be remarked that a faulty condition skips all branches until
5130 .Sx "Shell-style argument quoting"
5131 will be used, and this command will simply interpret expanded tokens.)
5132 It is possible to check
5133 .Sx "INTERNAL VARIABLES"
5136 variables for existence or compare their expansion against a user given
5137 value or another variable by using the
5139 .Pf ( Dq variable next )
5140 conditional trigger character;
5141 a variable on the right hand side may be signalled using the same
5143 Variable names may be enclosed in a pair of matching braces.
5144 When this mode has been triggered, several operators are available:
5147 Integer operators treat the arguments on the left and right hand side of
5148 the operator as integral numbers and compare them arithmetically.
5149 It is an error if any of the operands is not a valid integer, an empty
5150 argument (which implies it had been quoted) is treated as if it were 0.
5151 Available operators are
5155 (less than or equal to),
5161 (greater than or equal to), and
5166 String data operators compare the left and right hand side according to
5167 their textual content.
5168 Unset variables are treated as the empty string.
5169 The behaviour of string operators can be adjusted by prefixing the
5170 operator with the modifier trigger commercial at
5172 followed by none to multiple modifiers: for now supported is
5174 which turns the comparison into a case-insensitive one: this is
5175 implied if no modifier follows the trigger.
5178 Available string operators are
5182 (less than or equal to),
5188 (greater than or equal to),
5192 (is substring of) and
5194 (is not substring of).
5195 By default these operators work on bytes and (therefore) do not take
5196 into account character set specifics.
5197 If the case-insensitivity modifier has been used, case is ignored
5198 according to the rules of the US-ASCII encoding, i.e., bytes are
5202 When the \*(OPal regular expression support is available, the additional
5208 They treat the right hand side as an extended regular expression that is
5209 matched according to the active locale (see
5210 .Sx "Character sets" ) ,
5211 i.e., character sets should be honoured correctly.
5214 Conditions can be joined via AND-OR lists (where the AND operator is
5216 and the OR operator is
5218 which have equal precedence and will be evaluated with left
5219 associativity, thus using the same syntax that is known for the
5221 It is also possible to form groups of conditions and lists by enclosing
5222 them in pairs of brackets
5223 .Ql [\ \&.\&.\&.\ ] ,
5224 which may be interlocked within each other, and also be joined via
5228 The results of individual conditions and entire groups may be modified
5229 via unary operators: the unary operator
5231 will reverse the result.
5233 .Bd -literal -offset indent
5234 # (This not in v15, there [ -n "$debug"]!)
5238 if [ "$ttycharset" == UTF-8 ] || [ "$ttycharset" @i== UTF8 ]
5239 echo *ttycharset* is UTF-8, the former case-sensitive!
5242 if [ "${t1}" == "${t2}" ]
5243 echo These two variables are equal
5245 if [ "$features" =% +regex ] && [ "$TERM" @i=~ "^xterm\&.*" ]
5246 echo ..in an X terminal
5248 if [ [ true ] && [ [ "${debug}" != '' ] || \e
5249 [ "$verbose" != '' ] ] ]
5252 if true && [ "$debug" != '' ] || [ "${verbose}" != '' ]
5253 echo Left associativity, as is known from the shell
5262 Superseded by the multiplexer
5267 Shows the names of all available commands, alphabetically sorted.
5268 If given any non-whitespace argument the list will be shown in the order
5269 in which command prefixes are searched.
5270 \*(OP In conjunction with a set variable
5272 additional information will be provided for each command: the argument
5273 type will be indicated, the documentation string will be shown,
5274 and the set of command flags will show up:
5276 .Bl -tag -compact -width ".It Ql BaNg"
5277 .It Ql "vput modifier"
5278 command supports the command modifier
5280 .It Ql "errno in *!*"
5281 the error number is tracked in
5284 commands needs an active mailbox, a
5286 .It Ql "ok: batch or interactive"
5287 command may only be used in interactive or
5290 .It Ql "ok: send mode"
5291 command can be used in send mode.
5292 .It Ql "not ok: compose mode"
5293 command is not available when in compose mode.
5294 .It Ql "not ok: during startup"
5295 command cannot be used during program startup, e.g., while loading
5296 .Sx "Resource files" .
5297 .It Ql "ok: in subprocess"
5298 command is allowed to be used when running in a subprocess instance,
5299 e.g., from within a macro that is called via
5300 .Va on-compose-splice .
5306 This command can be used to localize changes to (linked)
5309 .Sx "INTERNAL VARIABLES" ,
5310 meaning that their state will be reverted to the former one once the
5313 It can only be used inside of macro definition blocks introduced by
5317 The covered scope of an
5319 is left once a different account is activated, and some macros, notably
5320 .Va folder-hook Ns s ,
5321 use their own specific notion of covered scope, here it will be extended
5322 until the folder is left again.
5325 This setting stacks up: i.e., if
5327 enables change localization and calls
5329 which explicitly resets localization, then any value changes within
5331 will still be reverted when the scope of
5334 (Caveats: if in this example
5336 changes to a different
5338 which sets some variables that are already covered by localizations,
5339 their scope will be extended, and in fact leaving the
5341 will (thus) restore settings in (likely) global scope which actually
5342 were defined in a local, macro private context!)
5345 This command takes one or two arguments, the optional first one
5346 specifies an attribute that may be one of
5348 which refers to the current scope and is thus the default,
5350 which causes any macro that is being
5352 ed to be started with localization enabled by default, as well as
5354 which (if enabled) disallows any called macro to turn off localization:
5355 like this it can be ensured that once the current scope regains control,
5356 any changes made in deeper levels have been reverted.
5357 The latter two are mutually exclusive.
5358 The (second) argument is interpreted as a boolean (string, see
5359 .Sx "INTERNAL VARIABLES" )
5360 and states whether the given attribute shall be turned on or off.
5362 .Bd -literal -offset indent
5363 define temporary_settings {
5364 set possibly_global_option1
5369 set possibly_global_option2
5376 Reply to messages that come in via known
5379 .Pf ( Ic mlsubscribe )
5380 mailing lists, or pretend to do so (see
5381 .Sx "Mailing lists" ) :
5384 functionality this will actively resort and even remove message
5385 recipients in order to generate a message that is supposed to be sent to
5387 For example it will also implicitly generate a
5388 .Ql Mail-Followup-To:
5389 header if that seems useful, regardless of the setting of the variable
5391 For more documentation please refer to
5392 .Sx "On sending mail, and non-interactive mode" .
5394 This may generate the errors
5395 .Va ^ERR Ns -DESTADDRREQ
5396 if no receiver has been specified,
5398 if some addressees where rejected by
5401 if no applicable messages have been given,
5403 if an I/O error occurs,
5405 if a necessary character set conversion fails, and
5408 Any error stops processing of further messages.
5414 but saves the message in a file named after the local part of the first
5415 recipient's address (instead of in
5420 (m) Takes a (list of) recipient address(es) as (an) argument(s),
5421 or asks on standard input if none were given;
5422 then collects the remaining mail content and sends it out.
5423 For more documentation please refer to
5424 .Sx "On sending mail, and non-interactive mode" .
5426 This may generate the errors
5427 .Va ^ERR Ns -DESTADDRREQ
5428 if no receiver has been specified,
5430 if some addressees where rejected by
5433 if no applicable messages have been given,
5435 if multiple messages have been specified,
5437 if an I/O error occurs,
5439 if a necessary character set conversion fails, and
5445 (mb) The given message list is to be sent to the
5447 .Sx "secondary mailbox"
5449 when \*(UA is quit; this is the default action unless the variable
5452 \*(ID This command can only be used in a
5454 .Sx "primary system mailbox" .
5458 .It Ic mimetype , unmimetype
5459 Without arguments the content of the MIME type cache will displayed;
5460 a more verbose listing will be produced if either of
5465 When given arguments they will be joined, interpreted as shown in
5466 .Sx "The mime.types files"
5468 .Sx "HTML mail and MIME attachments" ) ,
5469 and the resulting entry will be added (prepended) to the cache.
5470 In any event MIME type sources are loaded first as necessary \(en
5471 .Va mimetypes-load-control
5472 can be used to fine-tune which sources are actually loaded.
5474 The latter command deletes all specifications of the given MIME type, thus
5475 .Ql ? unmimetype text/plain
5476 will remove all registered specifications for the MIME type
5480 will discard all existing MIME types, just as will
5482 but which also reenables cache initialization via
5483 .Va mimetypes-load-control .
5487 .It Ic mlist , unmlist
5488 The latter command removes all given mailing-lists, the special name
5490 can be used to remove all registered lists.
5491 The former will list all currently defined mailing lists (and their
5492 attributes, if any) when used without arguments; a more verbose listing
5493 will be produced if either of
5498 Otherwise all given arguments will be added and henceforth be recognized
5500 If the \*(OPal regular expression support is available then mailing
5501 lists may also be specified as (extended) regular expressions (see
5507 \*(ID Only available in interactive mode, this command allows to display
5508 MIME parts which require external MIME handler programs to run which do
5509 not integrate in \*(UAs normal
5512 .Sx "HTML mail and MIME attachments" ) .
5513 (\*(ID No syntax to directly address parts, this restriction may vanish.)
5514 The user will be asked for each non-text part of the given message in
5515 turn whether the registered handler shall be used to display the part.
5519 .It Ic mlsubscribe , unmlsubscribe
5520 The latter command removes the subscription attribute from all given
5521 mailing-lists, the special name
5523 can be used to do so for any registered list.
5524 The former will list all currently defined mailing lists which have
5525 a subscription attribute when used without arguments; a more verbose
5526 listing will be produced if either of
5531 Otherwise this attribute will be set for all given mailing lists,
5532 newly creating them as necessary (as via
5541 but moves the messages to a file named after the local part of the
5542 sender address of the first message (instead of in
5549 but marks the messages for deletion if they were transferred
5556 but also displays header fields which would not pass the
5558 selection, and all MIME parts.
5566 on the given messages, even in non-interactive mode and as long as the
5567 standard output is a terminal.
5573 \*(OP When used without arguments or if
5575 has been given the content of the
5577 cache is shown, loading it first as necessary.
5580 then the cache will only be initialized and
5582 will remove its contents.
5583 Note that \*(UA will try to load the file only once, use
5584 .Ql Ic \&\&netrc Ns \:\0\:clear
5585 to unlock further attempts.
5590 .Sx "On URL syntax and credential lookup" ;
5592 .Sx "The .netrc file"
5593 documents the file format in detail.
5597 Checks for new mail in the current folder without committing any changes
5599 If new mail is present, a message is shown.
5603 the headers of each new message are also shown.
5604 This command is not available for all mailbox types.
5612 Goes to the next message in sequence and types it.
5613 With an argument list, types the next matching message.
5627 If the current folder is accessed via a network connection, a
5629 command is sent, otherwise no operation is performed.
5635 but also displays header fields which would not pass the
5637 selection, and all MIME parts.
5645 on the given messages, even in non-interactive mode and as long as the
5646 standard output is a terminal.
5654 but also pipes header fields which would not pass the
5656 selection, and all parts of MIME
5657 .Ql multipart/alternative
5662 (pi) Takes a message list and a shell command
5663 and pipes the messages through the command.
5664 Without an argument the current message is piped through the command
5671 every message is followed by a formfeed character.
5692 (q) Terminates the session, saving all undeleted, unsaved messages in
5695 .Sx "secondary mailbox"
5697 preserving all messages marked with
5701 or never referenced in the system
5703 and removing all other messages from the
5705 .Sx "primary system mailbox" .
5706 If new mail has arrived during the session,
5708 .Dq You have new mail
5710 If given while editing a mailbox file with the command line option
5712 then the edit file is rewritten.
5713 A return to the shell is effected,
5714 unless the rewrite of edit file fails,
5715 in which case the user can escape with the exit command.
5716 The optional status number argument will be passed through to
5718 \*(ID For now it can happen that the given status will be overwritten,
5719 later this will only occur if a later error needs to be reported onto an
5720 otherwise success indicating status.
5724 \*(NQ Read a line from standard input, or the channel set active via
5726 and assign the data, which will be splitted as indicated by
5728 to the given variables.
5729 The variable names are checked by the same rules as documented for
5731 and the same error codes will be seen in
5735 indicates the number of bytes read, it will be
5737 with the error number
5741 in case of I/O errors, or
5744 If there are more fields than variables, assigns successive fields to the
5745 last given variable.
5746 If there are less fields than variables, assigns the empty string to the
5748 .Bd -literal -offset indent
5751 ? echo "<$a> <$b> <$c>"
5753 ? wysh set ifs=:; read a b c;unset ifs
5754 hey2.0,:"'you ",:world!:mars.:
5755 ? echo $?/$^ERRNAME / <$a><$b><$c>
5756 0/NONE / <hey2.0,><"'you ",><world!:mars.:><><>
5761 \*(NQ Manages input channels for
5763 to be used to avoid complicated or impracticable code, like calling
5765 from within a macro in non-interactive mode.
5766 Without arguments, or when the first argument is
5768 a listing of all known channels is printed.
5769 Channels can otherwise be
5771 d, and existing channels can be
5775 d by giving the string used for creation.
5777 The channel name is expected to be a file descriptor number, or,
5778 if parsing the numeric fails, an input file name that undergoes
5779 .Sx "Filename transformations" .
5780 E.g. (this example requires a modern shell):
5781 .Bd -literal -offset indent
5782 $ LC_ALL=C printf 'echon "hey, "\enread a\enyou\enecho $a' |\e
5785 $ LC_ALL=C printf 'echon "hey, "\enread a\enecho $a' |\e
5786 LC_ALL=C 6<<< 'you' \*(uA -R#X'readctl create 6'
5800 Removes the named files or directories.
5801 If a name refer to a mailbox, e.g., a Maildir mailbox, then a mailbox
5802 type specific removal will be performed, deleting the complete mailbox.
5803 The user is asked for confirmation in interactive mode.
5807 Takes the name of an existing folder
5808 and the name for the new folder
5809 and renames the first to the second one.
5810 Both folders must be of the same type.
5814 (R) Replies to only the sender of each message of the given message
5815 list, by using the first message as the template to quote, for the
5819 will exchange this command with
5821 Unless the internal variable
5823 is set the recipient address will be stripped from comments, names etc.
5825 headers will be inspected if
5829 This may generate the errors
5830 .Va ^ERR Ns -DESTADDRREQ
5831 if no receiver has been specified,
5833 if some addressees where rejected by
5836 if no applicable messages have been given,
5838 if an I/O error occurs,
5840 if a necessary character set conversion fails, and
5846 (r) Take a message and group-responds to it by addressing the sender
5847 and all recipients, subject to
5851 .Va followup-to-honour ,
5854 .Va recipients-in-cc
5855 influence response behaviour.
5856 Unless the internal variable
5858 is set recipient addresses will be stripped from comments, names etc.
5868 offers special support for replying to mailing lists.
5869 For more documentation please refer to
5870 .Sx "On sending mail, and non-interactive mode" .
5872 This may generate the errors
5873 .Va ^ERR Ns -DESTADDRREQ
5874 if no receiver has been specified,
5876 if some addressees where rejected by
5879 if no applicable messages have been given,
5881 if an I/O error occurs,
5883 if a necessary character set conversion fails, and
5886 Any error stops processing of further messages.
5892 but initiates a group-reply regardless of the value of
5899 but responds to the sender only regardless of the value of
5906 but does not add any header lines.
5907 This is not a way to hide the sender's identity,
5908 but useful for sending a message again to the same recipients.
5912 Takes a list of messages and a user name
5913 and sends each message to the named user.
5915 and related header fields are prepended to the new copy of the message.
5918 is only performed if
5922 This may generate the errors
5923 .Va ^ERR Ns -DESTADDRREQ
5924 if no receiver has been specified,
5926 if some addressees where rejected by
5929 if no applicable messages have been given,
5931 if an I/O error occurs,
5933 if a necessary character set conversion fails, and
5936 Any error stops processing of further messages.
5954 .It Ic respondsender
5960 (ret) Superseded by the multiplexer
5965 Only available inside the scope of a
5969 this will stop evaluation of any further macro content, and return
5970 execution control to the caller.
5971 The two optional parameters must be specified as positive decimal
5972 numbers and default to the value 0:
5973 the first argument specifies the signed 32-bit return value (stored in
5975 \*(ID and later extended to signed 64-bit),
5976 the second the signed 32-bit error number (stored in
5980 a non-0 exit status may cause the program to exit.
5986 but saves the messages in a file named after the local part of the
5987 sender of the first message instead of (in
5989 and) taking a filename argument; the variable
5991 is inspected to decide on the actual storage location.
5995 (s) Takes a message list and a filename and appends each message in turn
5996 to the end of the file.
5997 If no filename is given, the
5999 .Sx "secondary mailbox"
6002 The filename in quotes, followed by the generated character count
6003 is echoed on the user's terminal.
6006 .Sx "primary system mailbox"
6007 the messages are marked for deletion.
6008 .Sx "Filename transformations"
6012 \*(OB Superseded by the multiplexer
6016 \*(OB Superseded by the multiplexer
6020 \*(OB Superseded by the multiplexer
6025 Takes a message specification (list) and displays a header summary of
6026 all matching messages, as via
6028 This command is an alias of
6031 .Sx "Specifying messages" .
6035 Takes a message list and marks all messages as having been read.
6041 (se, \*(NQ uns) The latter command will delete all given variables,
6042 the former, when used without arguments, will show all variables which
6043 are currently known to \*(UA.
6044 A more verbose listing will be produced if
6050 Remarks: the list mode will not automatically link-in known
6052 variables, but only explicit addressing will, e.g., via
6054 using a variable in an
6056 condition or a string passed to
6060 ting, as well as some program-internal use cases.
6063 Otherwise the given variables (and arguments) are set or adjusted.
6064 Arguments are of the form
6066 (no space before or after
6070 if there is no value, i.e., a boolean variable.
6071 \*(ID In conjunction with the
6074 .Sx "Shell-style argument quoting"
6075 can be used to quote arguments as necessary.
6076 \*(ID Otherwise quotation marks may be placed around any part of the
6077 assignment statement to quote blanks or tabs.
6080 .Dl ? wysh set indentprefix=' -> '
6083 If an argument begins with
6087 the effect is the same as invoking the
6089 command with the remaining part of the variable
6090 .Pf ( Ql unset save ) .
6095 that is known to map to an environment variable will automatically cause
6096 updates in the program environment (unsetting a variable in the
6097 environment requires corresponding system support) \(em use the command
6099 for further environmental control.
6104 .Sx "INTERNAL VARIABLES"
6111 Apply shell quoting rules to the given raw-data arguments.
6115 .Sx "Command modifiers" ) .
6116 The first argument specifies the operation:
6120 cause shell quoting to be applied to the remains of the line, and
6121 expanded away thereof, respectively.
6122 If the former is prefixed with a plus-sign, the quoted result will not
6123 be roundtrip enabled, and thus can be decoded only in the very same
6124 environment that was used to perform the encode; also see
6125 .Cd mle-quote-rndtrip .
6126 If the coding operation fails the error number
6129 .Va ^ERR Ns -CANCELED ,
6130 and the unmodified input is used as the result; the error number may
6131 change again due to output or result storage errors.
6135 \*(NQ (sh) Invokes an interactive version of the shell,
6136 and returns its exit status.
6140 .It Ic shortcut , unshortcut
6141 Without arguments the list of all currently defined shortcuts is
6142 shown, with one argument the expansion of the given shortcut.
6143 Otherwise all given arguments are treated as pairs of shortcuts and
6144 their expansions, creating new or changing already existing shortcuts,
6146 The latter command will remove all given shortcuts, the special name
6148 will remove all registered shortcuts.
6152 \*(NQ Shift the positional parameter stack (starting at
6154 by the given number (which must be a positive decimal),
6155 or 1 if no argument has been given.
6156 It is an error if the value exceeds the number of positional parameters.
6157 If the given number is 0, no action is performed, successfully.
6158 The stack as such can be managed via
6160 Note this command will fail in
6162 and hook macros unless the positional parameter stack has been
6163 explicitly created in the current context via
6170 but performs neither MIME decoding nor decryption, so that the raw
6171 message text is shown.
6175 (si) Shows the size in characters of each message of the given
6180 \*(NQ Sleep for the specified number of seconds (and optionally
6181 milliseconds), by default interruptably.
6182 If a third argument is given the sleep will be uninterruptible,
6183 otherwise the error number
6187 if the sleep has been interrupted.
6188 The command will fail and the error number will be
6189 .Va ^ERR Ns -OVERFLOW
6190 if the given duration(s) overflow the time datatype, and
6192 if the given durations are no valid integers.
6197 .It Ic sort , unsort
6198 The latter command disables sorted or threaded mode, returns to normal
6199 message order and, if the
6202 displays a header summary.
6203 The former command shows the current sorting criterion when used without
6204 an argument, but creates a sorted representation of the current folder
6205 otherwise, and changes the
6207 command and the addressing modes such that they refer to messages in
6209 Message numbers are the same as in regular mode.
6213 a header summary in the new order is also displayed.
6214 Automatic folder sorting can be enabled by setting the
6216 variable, as in, e.g.,
6217 .Ql set autosort=thread .
6218 Possible sorting criterions are:
6221 .Bl -tag -compact -width "subject"
6223 Sort the messages by their
6225 field, that is by the time they were sent.
6227 Sort messages by the value of their
6229 field, that is by the address of the sender.
6232 variable is set, the sender's real name (if any) is used.
6234 Sort the messages by their size.
6236 \*(OP Sort the message by their spam score, as has been classified by
6239 Sort the messages by their message status.
6241 Sort the messages by their subject.
6243 Create a threaded display.
6245 Sort messages by the value of their
6247 field, that is by the address of the recipient.
6250 variable is set, the recipient's real name (if any) is used.
6256 \*(NQ (so) The source command reads commands from the given file.
6257 .Sx "Filename transformations"
6259 If the given expanded argument ends with a vertical bar
6261 then the argument will instead be interpreted as a shell command and
6262 \*(UA will read the output generated by it.
6263 Interpretation of commands read is stopped when an error is encountered.
6266 cannot be used from within macros that execute as
6267 .Va folder-hook Ns s
6270 i.e., it can only be called from macros that were
6275 \*(NQ The difference to
6277 (beside not supporting pipe syntax aka shell command input) is that
6278 this command will not generate an error nor warn if the given file
6279 argument cannot be opened successfully.
6283 \*(OP Takes a list of messages and clears their
6289 \*(OP Takes a list of messages and causes the
6291 to forget it has ever used them to train its Bayesian filter.
6292 Unless otherwise noted the
6294 flag of the message is inspected to chose whether a message shall be
6302 \*(OP Takes a list of messages and informs the Bayesian filter of the
6306 This also clears the
6308 flag of the messages in question.
6312 \*(OP Takes a list of messages and rates them using the configured
6313 .Va spam-interface ,
6314 without modifying the messages, but setting their
6316 flag as appropriate; because the spam rating headers are lost the rate
6317 will be forgotten once the mailbox is left.
6318 Refer to the manual section
6320 for the complete picture of spam handling in \*(UA.
6324 \*(OP Takes a list of messages and sets their
6330 \*(OP Takes a list of messages and informs the Bayesian filter of the
6336 flag of the messages in question.
6352 slot for white- and blacklisting header fields.
6356 (to) Takes a message list and types out the first
6358 lines of each message on the users' terminal.
6359 Unless a special selection has been established for the
6363 command, the only header fields that are displayed are
6374 It is possible to apply compression to what is displayed by setting
6376 Messages are decrypted and converted to the terminal character set
6381 (tou) Takes a message list and marks the messages for saving in the
6383 .Sx "secondary mailbox"
6385 \*(UA deviates from the POSIX standard with this command,
6388 command will display the following message instead of the current one.
6394 but also displays header fields which would not pass the
6396 selection, and all visualizable parts of MIME
6397 .Ql multipart/alternative
6402 (t) Takes a message list and types out each message on the users terminal.
6403 The display of message headers is selectable via
6405 For MIME multipart messages, all parts with a content type of
6407 all parts which have a registered MIME type handler (see
6408 .Sx "HTML mail and MIME attachments" )
6409 which produces plain text output, and all
6411 parts are shown, others are hidden except for their headers.
6412 Messages are decrypted and converted to the terminal character set
6416 can be used to display parts which are not displayable as plain text.
6459 \*(OB Superseded by the multiplexer
6463 \*(OB Superseded by the multiplexer
6468 Superseded by the multiplexer
6479 .It Ic unmlsubscribe
6490 Takes a message list and marks each message as not having been read.
6494 Superseded by the multiplexer
6498 \*(OB Superseded by the multiplexer
6502 \*(OB Superseded by the multiplexer
6524 Perform URL percent codec operations on the raw-data argument, rather
6525 according to RFC 3986.
6529 .Sx "Command modifiers" ) ,
6530 and manages the error number
6532 This is a character set agnostic and thus locale dependent operation,
6533 and it may decode bytes which are invalid in the current
6535 \*(ID This command does not know about URLs beside that.
6537 The first argument specifies the operation:
6541 perform plain URL percent en- and decoding, respectively.
6545 perform a slightly modified operation which should be better for
6546 pathnames: it does not allow a tilde
6548 and will neither accept hyphen-minus
6552 as an initial character.
6553 The remains of the line form the URL data which is to be converted.
6554 If the coding operation fails the error number
6557 .Va ^ERR Ns -CANCELED ,
6558 and the unmodified input is used as the result; the error number may
6559 change again due to output or result storage errors.
6563 \*(NQ Edit the values of or create the given variable(s) in the
6565 Boolean variables cannot be edited, and variables can also not be
6571 \*(NQ This command produces the same output as the listing mode of
6575 ity adjustments, but only for the given variables.
6579 \*(OP Takes a message list and verifies each message.
6580 If a message is not a S/MIME signed message,
6581 verification will fail for it.
6582 The verification process checks if the message was signed using a valid
6584 if the message sender's email address matches one of those contained
6585 within the certificate,
6586 and if the message content has been altered.
6599 \*(NQ Evaluate arguments according to a given operator.
6600 This is a multiplexer command which can be used to perform signed 64-bit
6601 numeric calculations as well as byte string and string operations.
6602 It uses polish notation, i.e., the operator is the first argument and
6603 defines the number and type, and the meaning of the remaining arguments.
6604 An empty argument is replaced with a 0 if a number is expected.
6608 .Sx "Command modifiers" ) .
6611 The result that is shown in case of errors is always
6613 for usage errors and numeric operations, and the empty string for byte
6614 string and string operations;
6615 if the latter two fail to provide result data for
6617 errors, e.g., when a search operation failed, they also set the
6620 .Va ^ERR Ns -NODATA .
6621 Except when otherwise noted numeric arguments are parsed as signed 64-bit
6622 numbers, and errors will be reported in the error number
6624 as the numeric error
6625 .Va ^ERR Ns -RANGE .
6628 Numeric operations work on one or two signed 64-bit integers.
6629 One integer is expected by assignment (equals sign
6631 which does nothing but parsing the argument, thus detecting validity and
6632 possible overflow conditions, and unary not (tilde
6634 which creates the bitwise complement.
6635 Two integers are used by addition (plus sign
6637 subtraction (hyphen-minus
6639 multiplication (asterisk
6643 and modulo (percent sign
6645 as well as for the bitwise operators logical or (vertical bar
6648 bitwise and (ampersand
6651 bitwise xor (circumflex
6653 the bitwise signed left- and right shifts
6656 as well as for the unsigned right shift
6660 All numeric operators can be suffixed with a commercial at
6664 this will turn the operation into a saturated one, which means that
6665 overflow errors and division and modulo by zero are no longer reported
6666 via the exit status, but the result will linger at the minimum or
6667 maximum possible value, instead of overflowing (or trapping).
6668 This is true also for the argument parse step.
6669 For the bitwise shifts, the saturated maximum is 63.
6670 Any catched overflow will be reported via the error number
6673 .Va ^ERR Ns -OVERFLOW .
6676 Character set agnostic string functions have no notion of locale
6677 settings and character sets.
6680 which performs the usual
6681 .Sx "Filename transformations"
6682 on its argument, and
6684 which generates a random string of the given length, or of
6686 bytes (a constant from
6688 if the value 0 is given; the random string will be base64url encoded
6689 according to RFC 4648, and thus be usable as a (portable) filename.
6692 Byte string operations work on 8-bit bytes and have no notion of locale
6693 settings and character sets, effectively assuming ASCII data.
6694 Operations that take one argument are
6696 which queries the length of the given argument, and
6698 which calculates the Chris Torek hash of the given argument.
6701 Byte string operations with two or more arguments are
6703 which byte-searches in the first for the second argument, and shows the
6704 resulting 0-based offset shall it have been found,
6706 which is identical to
6708 but works case-insensitively according to the rules of the ASCII
6711 will show a substring of its first argument:
6712 the second argument is the 0-based starting offset, the optional third
6713 argument can be used to specify the length of the desired substring,
6714 by default the entire string is used;
6715 this operation tries to work around faulty arguments (set
6717 for error logs), but reports them via the error number
6720 .Va ^ERR Ns -OVERFLOW .
6723 String operations work, sufficient support provided, according to the
6724 active user's locale encoding and character set (see
6725 .Sx "Character sets" ) .
6726 There is the one argument operation
6728 which (one-way) converts the argument to something safely printable on
6734 is a string operation that will try to match the first argument with the
6735 regular expression given as the second argument, as does
6737 but which is case-insensitive.
6738 If the optional third argument has been given then instead of showing
6739 the match offset a replacement operation is performed:
6740 the third argument is treated as if specified via dollar-single-quote
6742 .Sx "Shell-style argument quoting" ) ,
6743 and any occurrence of a positional parameter, e.g.,
6745 is replaced by the corresponding match group of the regular expression.
6747 .Bd -literal -offset indent
6748 ? vexpr -@ +1 -9223372036854775808
6749 ? vput vexpr res ir bananarama (.*)NanA(.*) '\e${1}au\e$2'
6756 \*(NQ Manage the positional parameter stack (see
6760 If the first argument is
6762 then the positional parameter stack of the current context, or the
6763 global one, if there is none, is cleared.
6766 then the remaining arguments will be used to (re)create the stack,
6767 if the parameter stack size limit is excessed an
6768 .Va ^ERR Ns -OVERFLOW
6772 If the first argument is
6774 a round-trip capable representation of the stack contents is created,
6775 with each quoted parameter separated from each other with the first
6778 and followed by the first character of
6780 if that is not empty and not identical to the first.
6781 If that results in no separation at all a
6787 .Sx "Command modifiers" ) .
6788 I.e., the subcommands
6792 can be used (in conjunction with
6794 to (re)create an argument stack from and to a single variable losslessly.
6796 .Bd -literal -offset indent
6797 ? vpospar set hey, "'you ", world!
6798 ? echo $#: <${1}><${2}><${3}>
6799 ? vput vpospar x quote
6801 ? echo $#: <${1}><${2}><${3}>
6802 ? eval vpospar set ${x}
6803 ? echo $#: <${1}><${2}><${3}>
6809 (v) Takes a message list and invokes the display editor on each message.
6810 Modified contents are discarded unless the
6812 variable is set, and are not used unless the mailbox can be written to
6813 and the editor returns a successful exit status.
6817 (w) For conventional messages the body without all headers is written.
6818 The original message is never marked for deletion in the originating
6820 The output is decrypted and converted to its native format as necessary.
6821 If the output file exists, the text is appended.
6822 If a message is in MIME multipart format its first part is written to
6823 the specified file as for conventional messages, handling of the remains
6824 depends on the execution mode.
6825 No special handling of compressed files is performed.
6827 In interactive mode the user is consecutively asked for the filenames of
6828 the processed parts.
6829 For convience saving of each part may be skipped by giving an empty
6830 value, the same result as writing it to
6832 Shell piping the part content by specifying a leading vertical bar
6834 character for the filename is supported.
6835 Other user input undergoes the usual
6836 .Sx "Filename transformations" ,
6837 and contents of the destination file are overwritten if the file
6840 \*(ID In non-interactive mode any part which does not specify a filename
6841 is ignored, and suspicious parts of filenames of the remaining parts are
6842 URL percent encoded (as via
6844 to prevent injection of malicious character sequences, resulting in
6845 a filename that will be written into the current directory.
6846 Existing files will not be overwritten, instead the part number or
6847 a dot are appended after a number sign
6849 to the name until file creation succeeds (or fails due to other
6854 \*(NQ The sole difference to
6856 is that the new macro is executed in place of the current one, which
6857 will not regain control: all resources of the current macro will be
6859 This implies that any setting covered by
6861 will be forgotten and covered variables will become cleaned up.
6862 If this command is not used from within a
6864 ed macro it will silently be (a more expensive variant of)
6874 \*(NQ \*(UA presents message headers in
6876 fuls as described under the
6879 Without arguments this command scrolls to the next window of messages,
6880 likewise if the argument is
6884 scrolls to the last,
6886 scrolls to the first, and
6891 A number argument prefixed by
6895 indicates that the window is calculated in relation to the current
6896 position, and a number without a prefix specifies an absolute position.
6902 but scrolls to the next or previous window that contains at least one
6913 .\" .Sh COMMAND ESCAPES {{{
6914 .Sh "COMMAND ESCAPES"
6916 Here is a summary of the command escapes available in compose mode,
6917 which are used to perform special functions when composing messages.
6918 Command escapes are only recognized at the beginning of lines, and
6919 consist of a trigger (escape) and a command character.
6920 The actual escape character can be set via the internal variable
6922 it defaults to the tilde
6924 Otherwise ignored whitespace characters following the escape character
6925 will prevent a possible addition of the command line to the \*(OPal
6929 Unless otherwise noted all compose mode command escapes ensure proper
6930 updates of the variables which represent the error number
6936 is set they will, unless stated otherwise, error out message compose
6937 mode if an operation fails.
6938 It is however possible to place the character hyphen-minus
6940 after (possible whitespace following) the escape character, which has an
6941 effect equivalent to the command modifier
6943 If the \*(OPal key bindings are available it is possible to create
6945 ings specifically for the compose mode.
6948 .Bl -tag -width ".It Ic BaNg"
6951 Insert the string of text in the message prefaced by a single
6953 (If the escape character has been changed,
6954 that character must be doubled instead.)
6957 .It Ic ~! Ar command
6958 Execute the indicated shell
6960 which follows, replacing unescaped exclamation marks with the previously
6961 executed command if the internal variable
6963 is set, then return to the message.
6967 Same effect as typing the end-of-file character.
6970 .It Ic ~: Ar \*(UA-command Ns \0or Ic ~_ Ar \*(UA-command
6971 Execute the given \*(UA command.
6972 Not all commands, however, are allowed.
6976 Write a summary of command escapes.
6979 .It Ic ~< Ar filename
6984 .It Ic ~<! Ar command
6986 is executed using the shell.
6987 Its standard output is inserted into the message.
6990 .It Ic ~@ Op Ar filename...
6991 Append or edit the list of attachments.
6992 Does not manage the error number
6998 instead if this is a concern).
7001 arguments is expected as shell tokens (see
7002 .Sx "Shell-style argument quoting" ;
7003 token-separating commas are ignored, too), to be
7004 interpreted as documented for the command line option
7006 with the message number exception as below.
7010 arguments the attachment list is edited, entry by entry;
7011 if a filename is left empty, that attachment is deleted from the list;
7012 once the end of the list is reached either new attachments may be
7013 entered or the session can be quit by committing an empty
7017 For all mode, if a given filename solely consists of the number sign
7019 followed by a valid message number of the currently active mailbox, then
7020 the given message is attached as a
7023 As the shell comment character the number sign must be quoted.
7027 Inserts the string contained in the
7030 .Ql Ic ~i Ns \0Sign ) .
7031 \*(OB The escape sequences tabulator
7035 are understood (use the
7039 ting the variable(s) instead).
7043 Inserts the string contained in the
7046 .Ql Ic ~i Ns \0sign ) .
7047 \*(OB The escape sequences tabulator
7051 are understood (use the
7055 ting the variable(s) instead).
7058 .It Ic ~b Ar name ...
7059 Add the given names to the list of blind carbon copy recipients.
7062 .It Ic ~c Ar name ...
7063 Add the given names to the list of carbon copy recipients.
7067 Read the file specified by the
7069 variable into the message.
7073 Invoke the text editor on the message collected so far.
7074 After the editing session is finished,
7075 the user may continue appending text to the message.
7078 .It Ic ~F Ar messages
7079 Read the named messages into the message being sent, including all
7080 message headers and MIME parts.
7081 If no messages are specified, read in the current message, the
7085 .It Ic ~f Ar messages
7086 Read the named messages into the message being sent.
7087 If no messages are specified, read in the current message, the
7089 Strips down the list of header fields according to the
7091 white- and blacklist selection of
7093 For MIME multipart messages,
7094 only the first displayable part is included.
7098 Edit the message header fields
7103 by typing each one in turn and allowing the user to edit the field.
7104 The default values for these fields originate from the
7112 Edit the message header fields
7118 by typing each one in turn and allowing the user to edit the field.
7121 .It Ic ~I Ar variable
7122 Insert the value of the specified variable into the message.
7123 The message remains unaltered if the variable is unset or empty.
7124 \*(OB The escape sequences tabulator
7128 are understood (use the
7132 ting the variable(s) instead).
7135 .It Ic ~i Ar variable
7138 but adds a newline character at the end of a successful insertion.
7141 .It Ic ~M Ar messages
7142 Read the named messages into the message being sent,
7145 If no messages are specified, read the current message, the
7149 .It Ic ~m Ar messages
7150 Read the named messages into the message being sent,
7153 If no messages are specified, read the current message, the
7155 Strips down the list of header fields according to the
7157 white- and blacklist selection of
7159 For MIME multipart messages,
7160 only the first displayable part is included.
7164 Display the message collected so far,
7165 prefaced by the message header fields
7166 and followed by the attachment list, if any.
7170 Abort the message being sent,
7171 copying it to the file specified by the
7178 .It Ic ~R Ar filename
7181 but indent each line that has been read by
7185 .It Ic ~r Ar filename Op Ar HERE-delimiter
7186 Read the named file, object to the usual
7187 .Sx "Filename transformations" ,
7188 into the message; if (the expanded)
7192 then standard input is used, e.g., for pasting purposes.
7193 Only in this latter mode
7195 may be given: if it is data will be read in until the given
7197 is seen on a line by itself, and encountering EOF is an error; the
7199 is a required argument in non-interactive mode; if it is single-quote
7200 quoted then the pasted content will not be expanded, \*(ID otherwise
7201 a future version of \*(UA may perform shell-style expansion on the content.
7205 Cause the named string to become the current subject field.
7206 Newline (NL) and carriage-return (CR) bytes are invalid and will be
7207 normalized to space (SP) characters.
7210 .It Ic ~t Ar name ...
7211 Add the given name(s) to the direct recipient list.
7214 .It Ic ~U Ar messages
7215 Read in the given / current message(s) excluding all headers, indented by
7219 .It Ic ~u Ar messages
7220 Read in the given / current message(s), excluding all headers.
7224 Invoke an alternate editor (defined by the
7226 environment variable) on the message collected so far.
7227 Usually, the alternate editor will be a screen editor.
7228 After the editor is quit,
7229 the user may resume appending text to the end of the message.
7232 .It Ic ~w Ar filename
7233 Write the message onto the named file, which is object to the usual
7234 .Sx "Filename transformations" .
7236 the message is appended to it.
7242 except that the message is not saved at all.
7245 .It Ic ~| Ar command
7246 Pipe the message through the specified filter command.
7247 If the command gives no output or terminates abnormally,
7248 retain the original text of the message.
7251 is often used as a rejustifying filter.
7255 .It Ic ~^ Ar cmd Op Ar subcmd Op Ar arg3 Op Ar arg4
7256 Low-level command meant for scripted message access, i.e., for
7257 .Va on-compose-splice
7259 .Va on-compose-splice-shell .
7260 The used protocol is likely subject to changes, and therefore the
7261 mentioned hooks receive the used protocol version as an initial line.
7262 In general the first field of a response line represents a status code
7263 which specifies whether a command was successful or not, whether result
7264 data is to be expected, and if, the format of the result data.
7265 Does not manage the error number
7269 because errors are reported via the protocol
7270 (hard errors like I/O failures cannot be handled).
7271 This command has read-only access to several virtual pseudo headers in
7272 the \*(UA private namespace, which may not exist (except for the first):
7276 .Bl -tag -compact -width ".It Va BaNg"
7277 .It Ql Mailx-Command:
7278 The name of the command that generates the message, one of
7286 .It Ql Mailx-Raw-To:
7287 .It Ql Mailx-Raw-Cc:
7288 .It Ql Mailx-Raw-Bcc:
7289 Represent the frozen initial state of these headers before any
7290 transformation (e.g.,
7293 .Va recipients-in-cc
7296 .It Ql Mailx-Orig-From:
7297 .It Ql Mailx-Orig-To:
7298 .It Ql Mailx-Orig-Cc:
7299 .It Ql Mailx-Orig-Bcc:
7300 The values of said headers of the original message which has been
7302 .Ic reply , forward , resend .
7306 The status codes are:
7310 .Bl -tag -compact -width ".It Ql 210"
7312 Status ok; the remains of the line are the result.
7315 Status ok; the rest of the line is optionally used for more status.
7316 What follows are lines of result addresses, terminated by an empty line.
7317 The address lines consist of two fields, the first of which is the
7318 plain address, e.g.,
7320 separated by a single ASCII SP space from the second which contains the
7321 unstripped address, even if that is identical to the first field, e.g.,
7322 .Ql (Lovely) Bob <bob@exam.ple> .
7323 All the input, including the empty line, must be consumed before further
7324 commands can be issued.
7327 Status ok; the rest of the line is optionally used for more status.
7328 What follows are lines of furtherly unspecified string content,
7329 terminated by an empty line.
7330 All the input, including the empty line, must be consumed before further
7331 commands can be issued.
7334 Syntax error; invalid command.
7337 Syntax error in parameters or arguments.
7340 Error: an argument fails verification.
7341 For example an invalid address has been specified, or an attempt was
7342 made to modify anything in \*(UA's own namespace.
7345 Error: an otherwise valid argument is rendered invalid due to context.
7346 For example, a second address is added to a header which may consist of
7347 a single address only.
7352 If a command indicates failure then the message will have remained
7354 Most commands can fail with
7356 if required arguments are missing (false command usage).
7357 The following (case-insensitive) commands are supported:
7360 .Bl -hang -width ".It Cm header"
7362 This command allows listing, inspection, and editing of message headers.
7363 Header name case is not normalized, and case-insensitive comparison
7364 should be used when matching names.
7365 The second argument specifies the subcommand to apply, one of:
7367 .Bl -hang -width ".It Cm remove"
7369 Without a third argument a list of all yet existing headers is given via
7371 this command is the default command of
7373 if no second argument has been given.
7374 A third argument restricts output to the given header only, which may
7377 if no such field is defined.
7380 Shows the content of the header given as the third argument.
7381 Dependent on the header type this may respond with
7385 any failure results in
7389 This will remove all instances of the header given as the third
7394 if no such header can be found, and
7396 on \*(UA namespace violations.
7399 This will remove from the header given as the third argument the
7400 instance at the list position (counting from one!) given with the fourth
7405 if the list position argument is not a number or on \*(UA namespace
7408 if no such header instance exists.
7411 Create a new or an additional instance of the header given in the third
7412 argument, with the header body content as given in the fourth argument
7413 (the remains of the line).
7416 if the third argument specifies a free-form header field name that is
7417 invalid, or if body content extraction fails to succeed,
7419 if any extracted address does not pass syntax and/or security checks or
7420 on \*(UA namespace violations, and
7422 to indicate prevention of excessing a single-instance header \(em note that
7424 can be appended to (a space separator will be added automatically first).
7427 is returned upon success, followed by the name of the header and the list
7428 position of the newly inserted instance.
7429 The list position is always 1 for single-instance header fields.
7430 All free-form header fields are managed in a single list.
7435 This command allows listing, removal and addition of message attachments.
7436 The second argument specifies the subcommand to apply, one of:
7438 .Bl -hang -width ".It Cm remove"
7440 List all attachments via
7444 if no attachments exist.
7445 This command is the default command of
7447 if no second argument has been given.
7450 This will remove the attachment given as the third argument, and report
7454 if no such attachment can be found.
7455 If there exists any path component in the given argument, then an exact
7456 match of the path which has been used to create the attachment is used
7457 directly, but if only the basename of that path matches then all
7458 attachments are traversed to find an exact match first, and the removal
7459 occurs afterwards; if multiple basenames match, a
7462 Message attachments are treated as absolute pathnames.
7464 If no path component exists in the given argument, then all attachments
7465 will be searched for
7467 parameter matches as well as for matches of the basename of the path
7468 which has been used when the attachment has been created; multiple
7473 This will interpret the third argument as a number and remove the
7474 attachment at that list position (counting from one!), reporting
7478 if the argument is not a number or
7480 if no such attachment exists.
7483 Adds the attachment given as the third argument, specified exactly as
7484 documented for the command line option
7486 and supporting the message number extension as documented for
7490 upon success, with the index of the new attachment following,
7492 if the given file cannot be opened,
7494 if an on-the-fly performed character set conversion fails, otherwise
7496 is reported; this is also reported if character set conversion is
7497 requested but not available.
7500 This uses the same search mechanism as described for
7502 and prints any known attributes of the first found attachment via
7506 if no such attachment can be found.
7507 The attributes are written as lines of keyword and value tuples, the
7508 keyword being separated from the rest of the line with an ASCII SP space
7512 This uses the same search mechanism as described for
7514 and is otherwise identical to
7517 .It Cm attribute-set
7518 This uses the same search mechanism as described for
7520 and will assign the attribute given as the fourth argument, which is
7521 expected to be a value tuple of keyword and other data, separated by
7522 a ASCII SP space or TAB tabulator character.
7523 If the value part is empty, then the given attribute is removed, or
7524 reset to a default value if existence of the attribute is crucial.
7528 upon success, with the index of the found attachment following,
7530 for message attachments or if the given keyword is invalid, and
7532 if no such attachment can be found.
7533 The following keywords may be used (case-insensitively):
7535 .Bl -hang -compact -width ".It Ql filename"
7537 Sets the filename of the MIME part, i.e., the name that is used for
7538 display and when (suggesting a name for) saving (purposes).
7539 .It Ql content-description
7540 Associate some descriptive information to the attachment's content, used
7541 in favour of the plain filename by some MUAs.
7543 May be used for uniquely identifying MIME entities in several contexts;
7544 this expects a special reference address format as defined in RFC 2045
7547 upon address content verification failure.
7549 Defines the media type/subtype of the part, which is managed
7550 automatically, but can be overwritten.
7551 .It Ql content-disposition
7552 Automatically set to the string
7556 .It Cm attribute-set-at
7557 This uses the same search mechanism as described for
7559 and is otherwise identical to
7570 .\" .Sh INTERNAL VARIABLES {{{
7571 .Sh "INTERNAL VARIABLES"
7573 Internal \*(UA variables are controlled via the
7577 commands; prefixing a variable name with the string
7581 has the same effect as using
7587 Creation or editing of variables can be performed in the
7592 will give more insight on the given variable(s), and
7594 when called without arguments, will show a listing of all variables.
7595 Both commands support a more
7598 Some well-known variables will also become inherited from the
7601 implicitly, others can be imported explicitly with the command
7603 and henceforth share said properties.
7606 Two different kinds of internal variables exist.
7607 There are boolean variables, which can only be in one of the two states
7611 and value variables with a(n optional) string value.
7612 For the latter proper quoting is necessary upon assignment time, the
7613 introduction of the section
7615 documents the supported quoting rules.
7617 .Bd -literal -offset indent
7618 ? wysh set one=val\e 1 two="val 2" \e
7619 three='val "3"' four=$'val \e'4\e''; \e
7620 varshow one two three four; \e
7621 unset one two three four
7625 Dependent upon the actual option the string values will be interpreted
7626 as numbers, colour names, normal text etc., but there also exists
7627 a special kind of string value, the
7628 .Dq boolean string ,
7629 which must either be a decimal integer (in which case
7633 and any other value is true) or any of the (case-insensitive) strings
7639 for a false boolean and
7645 for a true boolean; a special kind of boolean string is the
7647 which is a boolean string that can optionally be prefixed with the
7648 (case-insensitive) term
7652 which causes prompting of the user in interactive mode, with the given
7653 boolean as the default value.
7655 .\" .Ss "Initial settings" {{{
7656 .\" (Keep in SYNC: ./nail.h:okeys, ./nail.rc, ./nail.1:"Initial settings")
7657 .Ss "Initial settings"
7659 The standard POSIX 2008/Cor 2-2016 mandates the following initial
7665 .Pf no Va autoprint ,
7679 .Pf no Va ignoreeof ,
7681 .Pf no Va keepsave ,
7683 .Pf no Va outfolder ,
7691 .Pf no Va sendwait ,
7700 Notes: \*(UA does not support the
7702 variable \(en use command line options or
7704 to pass options through to a
7706 And the default global
7708 file, which is loaded unless the
7710 (with according argument) or
7712 command line options have been used, or the
7713 .Ev MAILX_NO_SYSTEM_RC
7714 environment variable is set (see
7715 .Sx "Resource files" )
7716 bends those initial settings a bit, e.g., it sets the variables
7721 to name a few, establishes a default
7723 selection etc., and should thus be taken into account.
7726 .\" .Ss "Variables" {{{
7729 .Bl -tag -width ".It Va BaNg"
7733 \*(RO The exit status of the last command, or the
7738 This status has a meaning in the state machine: in conjunction with
7740 any non-0 exit status will cause a program exit, and in
7742 mode any error while loading (any of the) resource files will have the
7746 .Sx "Command modifiers" ,
7747 can be used to instruct the state machine to ignore errors.
7751 \*(RO The current error number
7752 .Pf ( Xr errno 3 ) ,
7753 which is set after an error occurred; it is also available via
7755 and the error name and documentation string can be queried via
7759 \*(ID This machinery is new and the error number is only really usable
7760 if a command explicitly states that it manages the variable
7762 for others errno will be used in case of errors, or
7764 if that is 0: it thus may or may not reflect the real error.
7765 The error number may be set with the command
7771 \*(RO This is a multiplexer variable which performs dynamic expansion of
7772 the requested state or condition, of which there are:
7775 .Bl -tag -compact -width ".It Va BaNg"
7779 .It Va ^ERR , ^ERRDOC , ^ERRNAME
7780 The number, documentation, and name of the current
7782 respectively, which is usually set after an error occurred.
7783 \*(ID This machinery is new and is usually reliable only if a command
7784 explicitly states that it manages the variable
7786 which is effectively identical to
7788 Each of those variables can be suffixed with a hyphen minus followed by
7789 a name or number, in which case the expansion refers to the given error.
7790 Note this is a direct mapping of (a subset of) the system error values:
7791 .Bd -literal -offset indent
7793 eval echo \e$1: \e$^ERR-$1: \e$^ERRNAME-$1: \e$^ERRDOC-$1
7794 vput vexpr i + "$1" 1
7806 \*(RO Expands all positional parameters (see
7808 separated by a space character.
7809 \*(ID The special semantics of the equally named special parameter of the
7811 are not yet supported.
7815 \*(RO Expands all positional parameters (see
7817 separated by a space character.
7818 If placed in double quotation marks, each positional parameter is
7819 properly quoted to expand to a single parameter again.
7823 \*(RO Expands to the number of positional parameters, i.e., the size of
7824 the positional parameter stack in decimal.
7828 \*(RO Inside the scope of a
7832 ed macro this expands to the name of the calling macro, or to the empty
7833 string if the macro is running from top-level.
7834 For the \*(OPal regular expression search and replace operator of
7836 this expands to the entire matching expression.
7837 It represents the program name in global context.
7841 \*(RO Access of the positional parameter stack.
7842 All further parameters can be accessed with this syntax, too, e.g.,
7845 etc.; positional parameters can be shifted off the stack by calling
7847 The parameter stack contains, e.g., the arguments of a
7851 d macro, the matching groups of the \*(OPal regular expression search
7852 and replace expression of
7854 and can be explicitly created or overwritten with the command
7859 \*(RO Is set to the active
7863 .It Va add-file-recipients
7864 \*(BO When file or pipe recipients have been specified,
7865 mention them in the corresponding address fields of the message instead
7866 of silently stripping them from their recipient list.
7867 By default such addressees are not mentioned.
7871 \*(BO Causes only the local part to be evaluated
7872 when comparing addresses.
7876 \*(BO Causes messages saved in the
7878 .Sx "secondary mailbox"
7880 to be appended to the end rather than prepended.
7881 This should always be set.
7885 \*(BO Causes \*(UA to prompt for the subject of each message sent.
7886 If the user responds with simply a newline,
7887 no subject field will be sent.
7891 \*(BO Causes the prompts for
7895 lists to appear after the message has been edited.
7899 \*(BO If set, \*(UA asks for files to attach at the end of each message,
7900 shall the list be found empty at that time.
7901 An empty line finalizes the list.
7905 \*(BO Causes the user to be prompted for carbon copy recipients
7906 (at the end of each message if
7910 are set) shall the list be found empty (at that time).
7911 An empty line finalizes the list.
7915 \*(BO Causes the user to be prompted for blind carbon copy
7916 recipients (at the end of each message if
7920 are set) shall the list be found empty (at that time).
7921 An empty line finalizes the list.
7925 \*(BO\*(OP Causes the user to be prompted if the message is to be
7926 signed at the end of each message.
7929 variable is ignored when this variable is set.
7933 \*(BO Alternative name for
7938 A sequence of characters to display in the
7942 as shown in the display of
7944 each for one type of messages (see
7945 .Sx "Message states" ) ,
7946 with the default being
7949 .Ql NU\ \ *HMFAT+\-$~
7952 variable is set, in the following order:
7954 .Bl -tag -compact -width ".It Ql _"
7976 start of a collapsed thread.
7978 an uncollapsed thread (TODO ignored for now).
7982 classified as possible spam.
7988 Specifies a list of recipients to which a blind carbon copy of each
7989 outgoing message will be sent automatically.
7993 Specifies a list of recipients to which a carbon copy of each outgoing
7994 message will be sent automatically.
7998 \*(BO Causes threads to be collapsed automatically when threaded mode
8005 \*(BO Enable automatic
8007 ing of a(n existing)
8013 commands, e.g., the message that becomes the new
8015 is shown automatically, as via
8022 Causes sorted mode (see the
8024 command) to be entered automatically with the value of this variable as
8025 sorting method when a folder is opened, e.g.,
8026 .Ql set autosort=thread .
8030 \*(BO Enables the substitution of all not (reverse-solidus) escaped
8033 characters by the contents of the last executed command for the
8035 shell escape command and
8037 one of the compose mode
8038 .Sx "COMMAND ESCAPES" .
8039 If this variable is not set no reverse solidus stripping is performed.
8043 \*(OP Terminals generate multi-byte sequences for certain forms of
8044 input, for example for function and other special keys.
8045 Some terminals however do not write these multi-byte sequences as
8046 a whole, but byte-by-byte, and the latter is what \*(UA actually reads.
8047 This variable specifies the timeout in milliseconds that the MLE (see
8048 .Sx "On terminal control and line editor" )
8049 waits for more bytes to arrive unless it considers a sequence
8055 \*(BO Sets some cosmetical features to traditional BSD style;
8056 has the same affect as setting
8058 and all other variables prefixed with
8060 it also changes the behaviour of
8062 (which does not exist in BSD).
8066 \*(BO Changes the letters shown in the first column of a header
8067 summary to traditional BSD style.
8071 \*(BO Changes the display of columns in a header summary to traditional
8076 \*(BO Changes some informational messages to traditional BSD style.
8082 field to appear immediately after the
8084 field in message headers and with the
8086 .Sx "COMMAND ESCAPES" .
8090 .It Va build-os , build-osenv
8091 \*(RO The operating system \*(UA has been build for, usually taken from
8097 respectively, the former being lowercased.
8101 The value that should appear in the
8105 MIME header fields when no character set conversion of the message data
8107 This defaults to US-ASCII, and the chosen character set should be
8108 US-ASCII compatible.
8112 \*(OP The default 8-bit character set that is used as an implicit last
8113 member of the variable
8115 This defaults to UTF-8 if character set conversion capabilities are
8116 available, and to ISO-8859-1 otherwise, in which case the only supported
8119 and this variable is effectively ignored.
8120 Refer to the section
8121 .Sx "Character sets"
8122 for the complete picture of character set conversion in \*(UA.
8125 .It Va charset-unknown-8bit
8126 \*(OP RFC 1428 specifies conditions when internet mail gateways shall
8128 the content of a mail message by using a character set with the name
8130 Because of the unclassified nature of this character set \*(UA will not
8131 be capable to convert this character set to any other character set.
8132 If this variable is set any message part which uses the character set
8134 is assumed to really be in the character set given in the value,
8135 otherwise the (final) value of
8137 is used for this purpose.
8139 This variable will also be taken into account if a MIME type (see
8140 .Sx "The mime.types files" )
8141 of a MIME message part that uses the
8143 character set is forcefully treated as text.
8147 The default value for the
8152 .It Va colour-disable
8153 \*(BO\*(OP Forcefully disable usage of colours.
8154 Also see the section
8155 .Sx "Coloured display" .
8159 \*(BO\*(OP Whether colour shall be used for output that is paged through
8161 Note that pagers may need special command line options, e.g.,
8169 in order to support colours.
8170 Often doing manual adjustments is unnecessary since \*(UA may perform
8171 adjustments dependent on the value of the environment variable
8173 (see there for more).
8177 .It Va contact-mail , contact-web
8178 \*(RO Addresses for contact per email and web, respectively, e.g., for
8179 bug reports, suggestions, or help regarding \*(UA.
8180 The former can be used directly:
8181 .Ql ? eval mail $contact-mail .
8185 In a(n interactive) terminal session, then if this valued variable is
8186 set it will be used as a threshold to determine how many lines the given
8187 output has to span before it will be displayed via the configured
8191 can be forced by setting this to the value
8193 setting it without a value will deduce the current height of the
8194 terminal screen to compute the treshold (see
8199 \*(ID At the moment this uses the count of lines of the message in wire
8200 format, which, dependent on the
8202 of the message, is unrelated to the number of display lines.
8203 (The software is old and historically the relation was a given thing.)
8207 Define a set of custom headers to be injected into newly composed or
8208 forwarded messages; it is also possible to create custom headers in
8211 which can be automated by setting one of the hooks
8212 .Va on-compose-splice
8214 .Va on-compose-splice-shell .
8215 The value is interpreted as a comma-separated list of custom headers to
8216 be injected, to include commas in the header bodies escape them with
8218 \*(ID Overwriting of automatically managed headers is neither supported
8221 .Dl ? set customhdr='Hdr1: Body1-1\e, Body1-2, Hdr2: Body2'
8225 Controls the appearance of the
8227 date and time format specification of the
8229 variable, that is used, for example, when viewing the summary of
8231 If unset, then the local receiving date is used and displayed
8232 unformatted, otherwise the message sending
8234 It is possible to assign a
8236 format string and control formatting, but embedding newlines via the
8238 format is not supported, and will result in display errors.
8240 .Ql %Y-%m-%d %H:%M ,
8242 .Va datefield-markout-older .
8245 .It Va datefield-markout-older
8246 Only used in conjunction with
8248 Can be used to create a visible distinction of messages dated more than
8249 a day in the future, or older than six months, a concept comparable to the
8251 option of the POSIX utility
8253 If set to the empty string, then the plain month, day and year of the
8255 will be displayed, but a
8257 format string to control formatting can be assigned.
8263 \*(BO Enables debug messages and obsoletion warnings, disables the
8264 actual delivery of messages and also implies
8270 .It Va disposition-notification-send
8272 .Ql Disposition-Notification-To:
8273 header (RFC 3798) with the message.
8277 .\" TODO .It Va disposition-notification-send-HOST
8279 .\".Va disposition-notification-send
8280 .\" for SMTP accounts on a specific host.
8281 .\" TODO .It Va disposition-notification-send-USER@HOST
8283 .\".Va disposition-notification-send
8284 .\"for a specific account.
8288 \*(BO When dot is set, a period
8290 on a line by itself during message input in (interactive or batch
8292 compose mode will be treated as end-of-message (in addition to the
8293 normal end-of-file condition).
8294 This behaviour is implied in
8300 .It Va dotlock-ignore-error
8301 \*(BO\*(OP Synchronization of mailboxes which \*(UA treats as
8303 .Sx "primary system mailbox" Ns
8304 es (see, e.g., the notes on
8305 .Sx "Filename transformations" ,
8306 as well as the documentation of
8308 will be protected with so-called dotlock files\(emthe traditional mail
8309 spool file locking method\(emin addition to system file locking.
8310 Because \*(UA ships with a privilege-separated dotlock creation program
8311 that should always be able to create such a dotlock file there is no
8312 good reason to ignore dotlock file creation errors, and thus these are
8313 fatal unless this variable is set.
8317 \*(BO If this variable is set then the editor is started automatically
8318 when a message is composed in interactive mode, as if the
8320 .Sx "COMMAND ESCAPES"
8324 variable is implied for this automatically spawned editor session.
8328 \*(BO When a message is edited while being composed,
8329 its header is included in the editable text.
8333 \*(BO When entering interactive mode \*(UA normally writes
8334 .Dq \&No mail for user
8335 and exits immediately if a mailbox is empty or does not exist.
8336 If this variable is set \*(UA starts even with an empty or non-existent
8337 mailbox (the latter behaviour furtherly depends upon
8343 \*(BO Let each command with a non-0 exit status, including every
8347 s a non-0 status, cause a program exit unless prefixed by
8350 .Sx "Command modifiers" ) .
8352 .Sx "COMMAND ESCAPES" ,
8353 but which use a different modifier for ignoring the error.
8354 Please refer to the variable
8356 for more on this topic.
8360 The first character of this value defines the escape character for
8361 .Sx "COMMAND ESCAPES"
8363 The default value is the character tilde
8365 If set to the empty string, command escapes are disabled.
8369 If not set then file and command pipeline targets are not allowed,
8370 and any such address will be filtered out, giving a warning message.
8371 If set without a value then all possible recipient address
8372 specifications will be accepted \(en see the section
8373 .Sx "On sending mail, and non-interactive mode"
8375 To accept them, but only in interactive mode, or when tilde commands
8376 were enabled explicitly by using one of the command line options
8380 set this to the (case-insensitive) value
8382 (it actually acts like
8383 .Ql restrict,-all,+name,+addr ,
8384 so that care for ordering issues must be taken) .
8386 In fact the value is interpreted as a comma-separated list of values.
8389 then the existence of disallowed specifications is treated as a hard
8390 send error instead of only filtering them out.
8391 The remaining values specify whether a specific type of recipient
8392 address specification is allowed (optionally indicated by a plus sign
8394 prefix) or disallowed (prefixed with a hyphen-minus
8398 addresses all possible address specifications,
8402 command pipeline targets,
8404 plain user names and (MTA) aliases and
8407 These kind of values are interpreted in the given order, so that
8408 .Ql restrict,\:fail,\:+file,\:-all,\:+addr
8409 will cause hard errors for any non-network address recipient address
8410 unless \*(UA is in interactive mode or has been started with the
8414 command line option; in the latter case(s) any address may be used, then.
8416 Historically invalid network addressees are silently stripped off.
8417 To change this so that any encountered invalid email address causes
8418 a hard error it must be ensured that
8420 is an entry in the above list.
8421 Setting this automatically enables network addressees
8422 (it actually acts like
8423 .Ql failinvaddr,+addr ,
8424 so that care for ordering issues must be taken) .
8428 Unless this variable is set additional
8430 (Mail-Transfer-Agent)
8431 arguments from the command line, as can be given after a
8433 separator, are ignored due to safety reasons.
8434 However, if set to the special (case-insensitive) value
8436 then the presence of additional MTA arguments is treated as a hard
8437 error that causes \*(UA to exit with failure status.
8438 A lesser strict variant is the otherwise identical
8440 which does accept such arguments in interactive mode, or if tilde
8441 commands were enabled explicitly by using one of the command line options
8448 \*(RO String giving a list of features \*(UA, preceded with a plus sign
8450 if the feature is available, and a hyphen-minus
8453 The output of the command
8455 will include this information in a more pleasant output.
8459 \*(BO This setting reverses the meanings of a set of reply commands,
8460 turning the lowercase variants, which by default address all recipients
8461 included in the header of a message
8462 .Pf ( Ic reply , respond , followup )
8463 into the uppercase variants, which by default address the sender only
8464 .Pf ( Ic Reply , Respond , Followup )
8467 .Ic replysender , respondsender , followupsender
8469 .Ic replyall , respondall , followupall
8470 are not affected by the current setting of
8475 The default path under which mailboxes are to be saved:
8476 filenames that begin with the plus sign
8478 will have the plus sign replaced with the value of this variable if set,
8479 otherwise the plus sign will remain unchanged when doing
8480 .Sx "Filename transformations" ;
8483 for more on this topic.
8484 The value supports a subset of transformations itself, and if the
8485 non-empty value does not start with a solidus
8489 will be prefixed automatically.
8490 Once the actual value is evaluated first, the internal variable
8492 will be updated for caching purposes.
8496 This variable can be set to the name of a
8498 macro which will be called whenever a
8501 The macro will also be invoked when new mail arrives,
8502 but message lists for commands executed from the macro
8503 only include newly arrived messages then.
8505 are activated by default in a folder hook, causing the covered settings
8506 to be reverted once the folder is left again.
8509 .It Va folder-hook-FOLDER
8514 Unlike other folder specifications, the fully expanded name of a folder,
8515 without metacharacters, is used to avoid ambiguities.
8516 However, if the mailbox resides under
8520 specification is tried in addition, e.g., if
8524 (and thus relative to the user's home directory) then
8525 .Pa /home/usr1/mail/sent
8527 .Ql folder-hook-/home/usr1/mail/sent
8528 first, but then followed by
8529 .Ql folder-hook-+sent .
8532 .It Va folder-resolved
8533 \*(RO Set to the fully resolved path of
8535 once that evaluation has occurred; rather internal.
8539 \*(BO Controls whether a
8540 .Ql Mail-Followup-To:
8541 header is generated when sending messages to known mailing lists.
8543 .Va followup-to-honour
8545 .Ic mlist , mlsubscribe , reply
8550 .It Va followup-to-honour
8552 .Ql Mail-Followup-To:
8553 header is honoured when group-replying to a message via
8557 This is a quadoption; if set without a value it defaults to
8567 .It Va forward-as-attachment
8568 \*(BO Original messages are normally sent as inline text with the
8571 and only the first part of a multipart message is included.
8572 With this setting enabled messages are sent as unmodified MIME
8574 attachments with all of their parts included.
8577 .It Va forward-inject-head
8578 The string to put before the text of a message with the
8580 command instead of the default
8581 .Dq -------- Original Message -------- .
8582 No heading is put if it is set to the empty string.
8583 This variable is ignored if the
8584 .Va forward-as-attachment
8589 The address (or a list of addresses) to put into the
8591 field of the message header, quoting RFC 5322:
8592 the author(s) of the message, that is, the mailbox(es) of the person(s)
8593 or system(s) responsible for the writing of the message.
8596 ing to messages these addresses are handled as if they were in the
8600 If the machine's hostname is not valid at the Internet (for example at
8601 a dialup machine) then either this variable or
8603 (\*(IN and with a defined SMTP protocol in
8606 adds even more fine-tuning capabilities),
8610 contains more than one address,
8613 variable is required (according to the standard RFC 5322).
8615 If a file-based MTA is used, then
8617 (or, if that contains multiple addresses,
8619 can nonetheless be enforced to appear as the envelope sender address at
8620 the MTA protocol level (the RFC 5321 reverse-path), either by using the
8622 command line option (with an empty argument; see there for the complete
8623 picture on this topic), or by setting the internal variable
8624 .Va r-option-implicit .
8628 \*(BO When replying to or forwarding a message \*(UA normally removes
8629 the comment and name parts of email addresses.
8630 If this variable is set such stripping is not performed,
8631 and comments, names etc. are retained.
8634 \*(OB Predecessor of
8635 .Va forward-inject-head .
8639 \*(BO Causes the header summary to be written at startup and after
8640 commands that affect the number of messages or the order of messages in
8645 mode a header summary will also be displayed on folder changes.
8646 The command line option
8654 A format string to use for the summary of
8656 similar to the ones used for
8659 Format specifiers in the given string start with a percent sign
8661 and may be followed by an optional decimal number indicating the field
8662 width \(em if that is negative, the field is to be left-aligned.
8663 Valid format specifiers are:
8666 .Bl -tag -compact -width ".It Ql _%%_"
8668 A plain percent sign.
8671 a space character but for the current message
8673 for which it expands to
8677 a space character but for the current message
8679 for which it expands to
8682 \*(OP The spam score of the message, as has been classified via the
8685 Shows only a replacement character if there is no spam support.
8687 Message attribute character (status flag); the actual content can be
8691 The date found in the
8693 header of the message when
8695 is set (the default), otherwise the date when the message was received.
8696 Formatting can be controlled by assigning a
8701 The indenting level in threaded mode.
8703 The address of the message sender.
8705 The message thread tree structure.
8706 (Note that this format does not support a field width.)
8708 The number of lines of the message, if available.
8712 The number of octets (bytes) in the message, if available.
8714 Message subject (if any).
8716 Message subject (if any) in double quotes.
8718 Message recipient flags: is the addressee of the message a known or
8719 subscribed mailing list \(en see
8724 The position in threaded/sorted order.
8728 .Ql %>\&%a\&%m\ %-18f\ %16d\ %4l/%\-5o\ %i%-s ,
8730 .Ql %>\&%a\&%m\ %20-f\ \ %16d\ %3l/%\-5o\ %i%-S
8741 .It Va headline-bidi
8742 Bidirectional text requires special treatment when displaying headers,
8743 because numbers (in dates or for file sizes etc.) will not affect the
8744 current text direction, in effect resulting in ugly line layouts when
8745 arabic or other right-to-left text is to be displayed.
8746 On the other hand only a minority of terminals is capable to correctly
8747 handle direction changes, so that user interaction is necessary for
8749 Note that extended host system support is required nonetheless, e.g.,
8750 detection of the terminal character set is one precondition;
8751 and this feature only works in an Unicode (i.e., UTF-8) locale.
8753 In general setting this variable will cause \*(UA to encapsulate text
8754 fields that may occur when displaying
8756 (and some other fields, like dynamic expansions in
8758 with special Unicode control sequences;
8759 it is possible to fine-tune the terminal support level by assigning
8761 no value (or any value other than
8766 will make \*(UA assume that the terminal is capable to properly deal
8767 with Unicode version 6.3, in which case text is embedded in a pair of
8768 U+2068 (FIRST STRONG ISOLATE) and U+2069 (POP DIRECTIONAL ISOLATE)
8770 In addition no space on the line is reserved for these characters.
8772 Weaker support is chosen by using the value
8774 (Unicode 6.3, but reserve the room of two spaces for writing the control
8775 sequences onto the line).
8780 select Unicode 1.1 support (U+200E, LEFT-TO-RIGHT MARK); the latter
8781 again reserves room for two spaces in addition.
8785 \*(OP If a line editor is available then this can be set to
8786 name the (expandable) path of the location of a permanent history file.
8791 .It Va history-gabby
8792 \*(BO\*(OP Add more entries to the history as is normally done.
8795 .It Va history-gabby-persist
8796 \*(BO\*(OP \*(UA's own MLE will not save the additional
8798 entries in persistent storage unless this variable is set.
8799 On the other hand it will not loose the knowledge of whether
8800 a persistent entry was gabby or not.
8806 \*(OP Setting this variable imposes a limit on the number of concurrent
8808 If set to the value 0 then no further history entries will be added, and
8809 loading and incorporation of the
8811 upon program startup can also be suppressed by doing this.
8812 Runtime changes will not be reflected, but will affect the number of
8813 entries saved to permanent storage.
8817 \*(BO This setting controls whether messages are held in the system
8819 and it is set by default.
8823 Use this string as hostname when expanding local addresses instead of
8824 the value obtained from
8828 It is used, e.g., in
8832 fields, as well as when generating
8834 MIME part related unique ID fields.
8835 Setting it to the empty string will cause the normal hostname to be
8836 used, but nonetheless enables creation of said ID fields.
8837 \*(IN in conjunction with the built-in SMTP
8840 also influences the results:
8841 one should produce some test messages with the desired combination of
8850 \*(BO\*(OP Can be used to turn off the automatic conversion of domain
8851 names according to the rules of IDNA (internationalized domain names
8853 Since the IDNA code assumes that domain names are specified with the
8855 character set, an UTF-8 locale charset is required to represent all
8856 possible international domain names (before conversion, that is).
8860 The input field separator that is used (\*(ID by some functions) to
8861 determine where to split input data.
8863 .Bl -tag -compact -width ".It MMM"
8865 Unsetting is treated as assigning the default value,
8868 If set to the empty value, no field splitting will be performed.
8870 If set to a non-empty value, all whitespace characters are extracted
8871 and assigned to the variable
8875 .Bl -tag -compact -width ".It MMM"
8878 will be ignored at the beginning and end of input.
8879 Diverging from POSIX shells default whitespace is removed in addition,
8880 which is owed to the entirely different line content extraction rules.
8882 Each occurrence of a character of
8884 will cause field-splitting, any adjacent
8886 characters will be skipped.
8891 \*(RO Automatically deduced from the whitespace characters in
8896 \*(BO Ignore interrupt signals from the terminal while entering
8897 messages; instead echo them as
8899 characters and discard the current line.
8903 \*(BO Ignore end-of-file conditions
8904 .Pf ( Ql control-D )
8905 in compose mode on message input and in interactive command input.
8906 If set an interactive command input session can only be left by
8907 explicitly using one of the commands
8911 and message input in compose mode can only be terminated by entering
8914 on a line by itself or by using the
8916 .Sx "COMMAND ESCAPES" ;
8917 Setting this implies the behaviour that
8925 If this is set to a non-empty string it will specify the users
8927 .Sx "primary system mailbox" ,
8930 and the system-dependent default, and (thus) be used to replace
8933 .Sx "Filename transformations" ;
8936 for more on this topic.
8937 The value supports a subset of transformations itself.
8945 .Sx "COMMAND ESCAPES"
8948 option for indenting messages,
8949 in place of the normal tabulator character
8951 which is the default.
8952 Be sure to quote the value if it contains spaces or tabs.
8956 \*(BO If set, an empty
8958 .Sx "primary system mailbox"
8959 file is not removed.
8960 Note that, in conjunction with
8962 any empty file will be removed unless this variable is set.
8963 This may improve the interoperability with other mail user agents
8964 when using a common folder directory, and prevents malicious users
8965 from creating fake mailboxes in a world-writable spool directory.
8966 \*(ID Only local regular (MBOX) files are covered, Maildir or other
8967 mailbox types will never be removed, even if empty.
8970 .It Va keep-content-length
8971 \*(BO When (editing messages and) writing MBOX mailbox files \*(UA can
8976 header fields that some MUAs generate by setting this variable.
8977 Since \*(UA does neither use nor update these non-standardized header
8978 fields (which in itself shows one of their conceptual problems),
8979 stripping them should increase interoperability in between MUAs that
8980 work with with same mailbox files.
8981 Note that, if this is not set but
8982 .Va writebackedited ,
8983 as below, is, a possibly performed automatic stripping of these header
8984 fields already marks the message as being modified.
8985 \*(ID At some future time \*(UA will be capable to rewrite and apply an
8987 to modified messages, and then those fields will be stripped silently.
8991 \*(BO When a message is saved it is usually discarded from the
8992 originating folder when \*(UA is quit.
8993 This setting causes all saved message to be retained.
8996 .It Va line-editor-disable
8997 \*(BO Turn off any enhanced line editing capabilities (see
8998 .Sx "On terminal control and line editor"
9002 .It Va line-editor-no-defaults
9003 \*(BO\*(OP Do not establish any default key binding.
9007 Error log message prefix string
9008 .Pf ( Ql "\*(uA: " ) .
9011 .It Va mailbox-display
9012 \*(RO The name of the current mailbox
9014 possibly abbreviated for display purposes.
9017 .It Va mailbox-resolved
9018 \*(RO The fully resolved path of the current mailbox.
9021 .It Va mailx-extra-rc
9022 An additional startup file that is loaded as the last of the
9023 .Sx "Resource files" .
9024 Use this file for commands that are not understood by other POSIX
9026 implementations, i.e., mostly anything which is not covered by
9027 .Sx "Initial settings" .
9031 \*(BO When a message is replied to and this variable is set,
9032 it is marked as having been
9035 .Sx "Message states" .
9039 \*(BO When opening MBOX mailbox databases \*(UA by default uses tolerant
9040 POSIX rules for detecting message boundaries (so-called
9042 lines) due to compatibility reasons, instead of the stricter rules that
9043 have been standardized in RFC 4155.
9044 This behaviour can be switched to the stricter RFC 4155 rules by
9045 setting this variable.
9046 (This is never necessary for any message newly generated by \*(UA,
9047 it only applies to messages generated by buggy or malicious MUAs, or may
9048 occur in old MBOX databases: \*(UA itself will choose a proper
9050 to avoid false interpretation of
9052 content lines in the MBOX database.)
9054 This may temporarily be handy when \*(UA complains about invalid
9056 lines when opening a MBOX: in this case setting this variable and
9057 re-opening the mailbox in question may correct the result.
9058 If so, copying the entire mailbox to some other file, as in
9059 .Ql copy * SOME-FILE ,
9060 will perform proper, all-compatible
9062 quoting for all detected messages, resulting in a valid MBOX mailbox.
9063 Finally the variable can be unset again:
9064 .Bd -literal -offset indent
9066 localopts yes; wysh set mbox-rfc4155;\e
9067 wysh File "${1}"; eval copy * "${2}"
9069 call mboxfix /tmp/bad.mbox /tmp/good.mbox
9074 \*(BO Internal development variable.
9077 .It Va message-id-disable
9078 \*(BO By setting this variable the generation of
9080 can be completely suppressed, effectively leaving this task up to the
9082 (Mail-Transfer-Agent) or the SMTP server.
9083 (According to RFC 5321 a SMTP server is not required to add this
9084 field by itself, so it should be ensured that it accepts messages without
9086 This variable also affects automatic generation of
9091 .It Va message-inject-head
9092 A string to put at the beginning of each new message.
9093 The escape sequences tabulator
9100 .It Va message-inject-tail
9101 A string to put at the end of each new message.
9102 The escape sequences tabulator
9110 \*(BO Usually, when an
9112 expansion contains the sender, the sender is removed from the expansion.
9113 Setting this option suppresses these removals.
9118 option to be passed through to the
9120 (Mail-Transfer-Agent); though most of the modern MTAs no longer document
9121 this flag, no MTA is known which does not support it (for historical
9125 .It Va mime-allow-text-controls
9126 \*(BO When sending messages, each part of the message is MIME-inspected
9127 in order to classify the
9130 .Ql Content-Transfer-Encoding:
9133 that is required to send this part over mail transport, i.e.,
9134 a computation rather similar to what the
9136 command produces when used with the
9140 This classification however treats text files which are encoded in
9141 UTF-16 (seen for HTML files) and similar character sets as binary
9142 octet-streams, forcefully changing any
9147 .Ql application/octet-stream :
9148 If that actually happens a yet unset charset MIME parameter is set to
9150 effectively making it impossible for the receiving MUA to automatically
9151 interpret the contents of the part.
9153 If this variable is set, and the data was unambiguously identified as
9154 text data at first glance (by a
9158 file extension), then the original
9160 will not be overwritten.
9163 .It Va mime-alternative-favour-rich
9164 \*(BO If this variable is set then rich MIME alternative parts (e.g.,
9165 HTML) will be preferred in favour of included plain text versions when
9166 displaying messages, provided that a handler exists which produces
9167 output that can be (re)integrated into \*(UA's normal visual display.
9168 (E.g., at the time of this writing some newsletters ship their full
9169 content only in the rich HTML part, whereas the plain text part only
9170 contains topic subjects.)
9173 .It Va mime-counter-evidence
9176 field is used to decide how to handle MIME parts.
9177 Some MUAs, however, do not use
9178 .Sx "The mime.types files"
9180 .Sx "HTML mail and MIME attachments" )
9181 or a similar mechanism to correctly classify content, but specify an
9182 unspecific MIME type
9183 .Pf ( Ql application/octet-stream )
9184 even for plain text attachments.
9185 If this variable is set then \*(UA will try to re-classify such MIME
9186 message parts, if possible, for example via a possibly existing
9187 attachment filename.
9188 A non-empty value may also be given, in which case a number is expected,
9189 actually a carrier of bits.
9190 Creating the bit-carrying number is a simple addition:
9191 .Bd -literal -offset indent
9192 ? !echo Value should be set to $((2 + 4 + 8))
9193 Value should be set to 14
9196 .Bl -bullet -compact
9198 If bit two is set (2) then the detected
9200 will be carried along with the message and be used for deciding which
9201 MIME handler is to be used, for example;
9202 when displaying such a MIME part the part-info will indicate the
9203 overridden content-type by showing a plus sign
9206 If bit three is set (4) then the counter-evidence is always produced
9207 and a positive result will be used as the MIME type, even forcefully
9208 overriding the parts given MIME type.
9210 If bit four is set (8) then as a last resort the actual content of
9211 .Ql application/octet-stream
9212 parts will be inspected, so that data which looks like plain text can be
9217 .It Va mime-encoding
9219 .Ql Content-Transfer-Encoding
9220 to use in outgoing text messages and message parts, where applicable.
9221 (7-bit clean text messages are sent as-is, without a transfer encoding.)
9224 .Bl -tag -compact -width ".It Ql _%%_"
9227 8-bit transport effectively causes the raw data be passed through
9228 unchanged, but may cause problems when transferring mail messages over
9229 channels that are not ESMTP (RFC 1869) compliant.
9230 Also, several input data constructs are not allowed by the
9231 specifications and may cause a different transfer-encoding to be used.
9232 .It Ql quoted-printable
9234 Quoted-printable encoding is 7-bit clean and has the property that ASCII
9235 characters are passed through unchanged, so that an english message can
9236 be read as-is; it is also acceptible for other single-byte locales that
9237 share many characters with ASCII, like, e.g., ISO-8859-1.
9238 The encoding will cause a large overhead for messages in other character
9239 sets: e.g., it will require up to twelve (12) bytes to encode a single
9240 UTF-8 character of four (4) bytes.
9242 .Pf (Or\0 Ql b64 . )
9243 The default encoding, it is 7-bit clean and will always be used for
9245 This encoding has a constant input:output ratio of 3:4, regardless of
9246 the character set of the input data it will encode three bytes of input
9247 to four bytes of output.
9248 This transfer-encoding is not human readable without performing
9253 .It Va mimetypes-load-control
9254 Can be used to control which of
9255 .Sx "The mime.types files"
9256 are loaded: if the letter
9258 is part of the option value, then the user's personal
9260 file will be loaded (if it exists); likewise the letter
9262 controls loading of the system wide
9263 .Pa /etc/mime.types ;
9264 directives found in the user file take precedence, letter matching is
9266 If this variable is not set \*(UA will try to load both files.
9267 Incorporation of the \*(UA-built-in MIME types cannot be suppressed,
9268 but they will be matched last (the order can be listed via
9271 More sources can be specified by using a different syntax: if the
9272 value string contains an equals sign
9274 then it is instead parsed as a comma-separated list of the described
9277 pairs; the given filenames will be expanded and loaded, and their
9278 content may use the extended syntax that is described in the section
9279 .Sx "The mime.types files" .
9280 Directives found in such files always take precedence (are prepended to
9281 the MIME type cache).
9286 To choose an alternate Mail-Transfer-Agent, set this option to either
9287 the full pathname of an executable (optionally prefixed with a
9289 protocol indicator), or \*(OPally a SMTP protocol URL, e.g., \*(IN
9291 .Dl smtps?://[user[:password]@]server[:port]
9294 .Ql [smtp://]server[:port] . )
9295 The default has been chosen at compile time.
9296 All supported data transfers are executed in child processes, which
9297 run asynchronously and without supervision unless either the
9302 If such a child receives a TERM signal, it will abort and
9309 For a file-based MTA it may be necessary to set
9311 in in order to choose the right target of a modern
9314 It will be passed command line arguments from several possible sources:
9317 if set, from the command line if given and the variable
9320 Argument processing of the MTA will be terminated with a
9325 The otherwise occurring implicit usage of the following MTA command
9326 line arguments can be disabled by setting the boolean variable
9327 .Va mta-no-default-arguments
9328 (which will also disable passing
9332 (for not treating a line with only a dot
9334 character as the end of input),
9342 variable is set); in conjunction with the
9344 command line option \*(UA will also (not) pass
9350 \*(OPally \*(UA can send mail over SMTP network connections to a single
9351 defined SMTP smart host by specifying a SMTP URL as the value (see
9352 .Sx "On URL syntax and credential lookup" ) .
9353 Note that with some mail providers it may be necessary to set the
9355 variable in order to use a specific combination of
9360 \*(UA also supports forwarding of all network traffic over a specified
9362 The following SMTP variants may be used:
9366 The plain SMTP protocol (RFC 5321) that normally lives on the
9367 server port 25 and requires setting the
9368 .Va smtp-use-starttls
9369 variable to enter a SSL/TLS encrypted session state.
9370 Assign a value like \*(IN
9371 .Ql smtp://[user[:password]@]server[:port]
9373 .Ql smtp://server[:port] )
9374 to choose this protocol.
9376 The so-called SMTPS which is supposed to live on server port 465
9377 and is automatically SSL/TLS secured.
9378 Unfortunately it never became a standardized protocol and may thus not
9379 be supported by your hosts network service database
9380 \(en in fact the port number has already been reassigned to other
9383 SMTPS is nonetheless a commonly offered protocol and thus can be
9384 chosen by assigning a value like \*(IN
9385 .Ql smtps://[user[:password]@]server[:port]
9387 .Ql smtps://server[:port] ) ;
9388 due to the mentioned problems it is usually necessary to explicitly
9393 Finally there is the SUBMISSION protocol (RFC 6409), which usually
9394 lives on server port 587 and is practically identically to the SMTP
9395 protocol from \*(UA's point of view beside that; it requires setting the
9396 .Va smtp-use-starttls
9397 variable to enter a SSL/TLS secured session state.
9398 Assign a value like \*(IN
9399 .Ql submission://[user[:password]@]server[:port]
9401 .Ql submission://server[:port] ) .
9406 .It Va mta-arguments
9407 Arguments to pass through to a file-based
9409 can be given via this variable, which is parsed according to
9410 .Sx "Shell-style argument quoting"
9411 into an array of arguments, and which will be joined onto MTA options
9412 from other sources, and then passed individually to the MTA:
9413 .Ql ? wysh set mta-arguments='-t -X \&"/tmp/my log\&"' .
9416 .It Va mta-no-default-arguments
9417 \*(BO Unless this variable is set \*(UA will pass some well known
9418 standard command line options to a file-based
9420 (Mail-Transfer-Agent), see there for more.
9424 Many systems use a so-called
9426 environment to ensure compatibility with
9428 This works by inspecting the name that was used to invoke the mail
9430 If this variable is set then the mailwrapper (the program that is
9431 actually executed when calling the file-based
9433 will treat its contents as that name.
9436 .It Va netrc-lookup-USER@HOST , netrc-lookup-HOST , netrc-lookup
9437 \*(BO\*(IN\*(OP Used to control usage of the users
9439 file for lookup of account credentials, as documented in the section
9440 .Sx "On URL syntax and credential lookup"
9444 .Sx "The .netrc file"
9445 documents the file format.
9457 then \*(UA will read the output of a shell pipe instead of the users
9459 file if this variable is set (to the desired shell command).
9460 This can be used to, e.g., store
9463 .Ql ? set netrc-pipe='gpg -qd ~/.netrc.pgp' .
9467 If this variable has the value
9469 newly created local folders will be in Maildir instead of MBOX format.
9473 Checks for new mail in the current folder each time the prompt is shown.
9474 A Maildir folder must be re-scanned to determine if new mail has arrived.
9475 If this variable is set to the special value
9477 then a Maildir folder will not be rescanned completely, but only
9478 timestamp changes are detected.
9482 \*(BO Causes the filename given in the
9485 and the sender-based filenames for the
9489 commands to be interpreted relative to the directory given in the
9491 variable rather than to the current directory,
9492 unless it is set to an absolute pathname.
9495 .It Va on-compose-cleanup
9496 Macro hook which will be called after the message has been sent (or not,
9497 in case of failures), as the very last step before unrolling compose mode
9499 This hook is run even in case of fatal errors, and it is advisable to
9500 perform only absolutely necessary actions, like cleaning up
9503 For compose mode hooks that may affect the message content please see
9504 .Va on-compose-enter , on-compose-leave , on-compose-splice .
9505 \*(ID This hook exists only because
9506 .Ic alias , alternates , commandalias , shortcut ,
9507 to name a few, are currently not covered by
9509 or a similar mechanism: any changes applied in compose mode will
9510 continue to be in effect thereafter.
9514 .It Va on-compose-enter , on-compose-leave
9515 Macro hooks which will be called before compose mode is entered,
9516 and after composing has been finished (but before the
9518 is injected, etc.), respectively.
9520 are enabled for these hooks, causing any setting to be forgotten after
9521 the message has been sent;
9522 .Va on-compose-cleanup
9523 can be used to perform any other necessary cleanup.
9524 The following (read-only) variables will be set temporarily during
9525 execution of the macros to represent the according message headers, or
9526 the empty string for non-existent; they correspond to accoding virtual
9527 temporary message headers that can be accessed via
9530 .Sx "COMMAND ESCAPES" :
9532 .Bl -tag -compact -width ".It Va mailx_subject"
9533 .It Va mailx-command
9534 The command that generates the message.
9535 .It Va mailx-subject
9541 .It Va mailx-to , mailx-cc , mailx-bcc
9542 The list of receiver addresses as a space-separated list.
9543 .It Va mailx-raw-to , mailx-raw-cc , mailx-raw-bcc
9544 The list of receiver addresses before any mangling (due to, e.g.,
9547 .Va recipients-in-cc )
9548 as a space-separated list.
9549 .It Va mailx-orig-from
9550 When replying, forwarding or resending, this will be set to the
9552 of the given message.
9553 .It Va mailx-orig-to , mailx-orig-cc , mailx-orig-bcc
9554 When replying, forwarding or resending, this will be set to the
9555 receivers of the given message.
9561 .It Va on-compose-splice , on-compose-splice-shell
9562 These hooks run once the normal compose mode is finished, but before the
9563 .Va on-compose-leave
9564 macro hook is called, the
9567 Both hooks will be executed in a subprocess, with their input and output
9568 connected to \*(UA such that they can act as if they would be an
9570 The difference in between them is that the latter is a
9572 command, whereas the former is a normal \*(UA macro, but which is
9573 restricted to a small set of commands (the
9577 will indicate said capability).
9579 are enabled for these hooks (in the parent process), causing any setting
9580 to be forgotten after the message has been sent;
9581 .Va on-compose-cleanup
9582 can be used to perform other cleanup as necessary.
9585 During execution of these hooks \*(UA will temporarily forget whether it
9586 has been started in interactive mode, (a restricted set of)
9587 .Sx "COMMAND ESCAPES"
9588 will always be available, and for guaranteed reproducibilities sake
9592 will be set to their defaults.
9593 The compose mode command
9595 has been especially designed for scriptability (via these hooks).
9596 The first line the hook will read on its standard input is the protocol
9597 version of said command escape, currently
9599 backward incompatible protocol changes have to be expected.
9602 Care must be taken to avoid deadlocks and other false control flow:
9603 if both involved processes wait for more input to happen at the
9604 same time, or one does not expect more input but the other is stuck
9605 waiting for consumption of its output, etc.
9606 There is no automatic synchronization of the hook: it will not be
9607 stopped automatically just because it, e.g., emits
9609 The hooks will however receive a termination signal if the parent enters
9611 \*(ID Protection against and interaction with signals is not yet given;
9612 it is likely that in the future these scripts will be placed in an
9613 isolated session, which is signalled in its entirety as necessary.
9615 .Bd -literal -offset indent
9616 wysh set on-compose-splice-shell=$'\e
9618 printf "hello $version! Headers: ";\e
9619 echo \e'~^header list\e';\e
9620 read status result;\e
9621 echo "status=$status result=$result";\e
9624 set on-compose-splice=ocsm
9627 echo Splice protocol version is $ver
9628 echo '~^h l'; read hl; vput vexpr es substring "${hl}" 0 1
9630 echoerr 'Cannot read header list'; echo '~x'; xit
9632 if [ "$hl" @i!% ' cc' ]
9633 echo '~^h i cc Diet is your <mirr.or>'; read es;\e
9634 vput vexpr es substring "${es}" 0 1
9636 echoerr 'Cannot insert Cc: header'; echo '~x'
9644 .It Va on-resend-cleanup
9646 .Va on-compose-cleanup ,
9647 but is only triggered by
9651 .It Va on-resend-enter
9653 .Va on-compose-enter ,
9654 but is only triggered by
9659 \*(BO If set, each message feed through the command given for
9661 is followed by a formfeed character
9665 .It Va password-USER@HOST , password-HOST , password
9666 \*(IN Variable chain that sets a password, which is used in case none has
9667 been given in the protocol and account-specific URL;
9668 as a last resort \*(UA will ask for a password on the user's terminal if
9669 the authentication method requires a password.
9670 Specifying passwords in a startup file is generally a security risk;
9671 the file should be readable by the invoking user only.
9673 .It Va password-USER@HOST
9674 \*(OU (see the chain above for \*(IN)
9675 Set the password for
9679 If no such variable is defined for a host,
9680 the user will be asked for a password on standard input.
9681 Specifying passwords in a startup file is generally a security risk;
9682 the file should be readable by the invoking user only.
9686 \*(BO Send messages to the
9688 command without performing MIME and character set conversions.
9692 .It Va pipe-TYPE/SUBTYPE
9693 When a MIME message part of type
9695 (case-insensitive) is displayed or quoted,
9696 its text is filtered through the value of this variable interpreted as
9698 Note that only parts which can be displayed inline as plain text (see
9700 are displayed unless otherwise noted, other MIME parts will only be
9701 considered by and for the command
9705 The special value commercial at
9707 forces interpretation of the message part as plain text, e.g.,
9708 .Ql set pipe-application/xml=@
9709 will henceforth display XML
9711 (The same could also be achieved by adding a MIME type marker with the
9714 And \*(OPally MIME type handlers may be defined via
9715 .Sx "The Mailcap files"
9716 \(em these directives,
9718 has already been used, should be referred to for further documentation.
9723 can in fact be used as a trigger character to adjust usage and behaviour
9724 of a following shell command specification more thoroughly by appending
9725 more special characters which refer to further mailcap directives, e.g.,
9726 the following hypothetical command specification could be used:
9728 .Bd -literal -offset indent
9729 ? set pipe-X/Y='@!++=@vim ${MAILX_FILENAME_TEMPORARY}'
9733 .Bl -tag -compact -width ".It Ql __"
9735 The command produces plain text to be integrated in \*(UAs output:
9739 If set the handler will not be invoked when a message is to be quoted,
9740 but only when it will be displayed:
9741 .Cd x-mailx-noquote .
9744 Run the command asynchronously, i.e., without blocking \*(UA:
9748 The command must be run on an interactive terminal, \*(UA will
9749 temporarily release the terminal to it:
9753 Request creation of a zero-sized temporary file, the absolute pathname
9754 of which will be made accessible via the environment variable
9755 .Ev MAILX_FILENAME_TEMPORARY :
9756 .Cd x-mailx-tmpfile .
9757 If given twice then the file will be unlinked automatically by \*(UA
9758 when the command loop is entered again at latest:
9759 .Cd x-mailx-tmpfile-unlink .
9762 Normally the MIME part content is passed to the handler via standard
9763 input; if this flag is set then the data will instead be written into
9764 .Ev MAILX_FILENAME_TEMPORARY
9765 .Pf ( Cd x-mailx-tmpfile-fill ) ,
9766 the creation of which is implied; note however that in order to cause
9767 deletion of the temporary file you still have to use two plus signs
9772 To avoid ambiguities with normal shell command content you can use
9773 another commercial at to forcefully terminate interpretation of
9774 remaining characters.
9775 (Any character not in this list will have the same effect.)
9779 Some information about the MIME part to be displayed is embedded into
9780 the environment of the shell command:
9783 .Bl -tag -compact -width ".It Ev _AIL__ILENAME__ENERATED"
9785 .It Ev MAILX_CONTENT
9786 The MIME content-type of the part, if known, the empty string otherwise.
9789 .It Ev MAILX_CONTENT_EVIDENCE
9791 .Va mime-counter-evidence
9792 includes the carry-around-bit (2), then this will be set to the detected
9793 MIME content-type; not only then identical to
9794 .Ev \&\&MAILX_CONTENT
9798 .It Ev MAILX_FILENAME
9799 The filename, if any is set, the empty string otherwise.
9802 .It Ev MAILX_FILENAME_GENERATED
9806 .It Ev MAILX_FILENAME_TEMPORARY
9807 If temporary file creation has been requested through the command prefix
9808 this variable will be set and contain the absolute pathname of the
9814 .It Va pipe-EXTENSION
9815 This is identical to
9816 .Va pipe-TYPE/SUBTYPE
9819 (normalized to lowercase using character mappings of the ASCII charset)
9820 names a file extension, e.g.,
9822 Handlers registered using this method take precedence.
9825 .It Va pop3-auth-USER@HOST , pop3-auth-HOST , pop3-auth
9826 \*(OP\*(IN Variable chain that sets the POP3 authentication method.
9827 The only possible value as of now is
9829 which is thus the default.
9832 .Mx Va pop3-bulk-load
9833 .It Va pop3-bulk-load-USER@HOST , pop3-bulk-load-HOST , pop3-bulk-load
9834 \*(BO\*(OP When accessing a POP3 server \*(UA loads the headers of
9835 the messages, and only requests the message bodies on user request.
9836 For the POP3 protocol this means that the message headers will be
9838 If this variable is set then \*(UA will download only complete messages
9839 from the given POP3 server(s) instead.
9841 .Mx Va pop3-keepalive
9842 .It Va pop3-keepalive-USER@HOST , pop3-keepalive-HOST , pop3-keepalive
9843 \*(OP POP3 servers close the connection after a period of inactivity;
9844 the standard requires this to be at least 10 minutes,
9845 but practical experience may vary.
9846 Setting this variable to a numeric value greater than
9850 command to be sent each value seconds if no other operation is performed.
9853 .It Va pop3-no-apop-USER@HOST , pop3-no-apop-HOST , pop3-no-apop
9854 \*(BO\*(OP Unless this variable is set the
9856 authentication method will be used when connecting to a POP3 server that
9860 is that the password is not sent in clear text over the wire and that
9861 only a single packet is sent for the user/password tuple.
9863 .Va pop3-no-apop-HOST
9866 .Mx Va pop3-use-starttls
9867 .It Va pop3-use-starttls-USER@HOST , pop3-use-starttls-HOST , pop3-use-starttls
9868 \*(BO\*(OP Causes \*(UA to issue a
9870 command to make an unencrypted POP3 session SSL/TLS encrypted.
9871 This functionality is not supported by all servers,
9872 and is not used if the session is already encrypted by the POP3S method.
9874 .Va pop3-use-starttls-HOST
9880 \*(BO This flag enables POSIX mode, which changes behaviour of \*(UA
9881 where that deviates from standardized behaviour.
9882 It will be set implicitly before the
9883 .Sx "Resource files"
9884 are loaded if the environment variable
9886 is set, and adjusting any of those two will be reflected by the other
9888 The following behaviour is covered and enforced by this mechanism:
9891 .Bl -bullet -compact
9893 In non-interactive mode, any error encountered while loading resource
9894 files during program startup will cause a program exit, whereas in
9895 interactive mode such errors will stop loading of the currently loaded
9896 (stack of) file(s, i.e., recursively).
9897 These exits can be circumvented on a per-command base by using
9900 .Sx "Command modifiers" ,
9901 for each command which shall be allowed to fail.
9905 will replace the list of alternate addresses instead of appending to it.
9908 Upon changing the active
9912 will be displayed even if
9919 implies the behaviour described by
9925 is extended to cover any empty mailbox, not only empty
9927 .Sx "primary system mailbox" Ns
9928 es: they will be removed when they are left in empty state otherwise.
9933 .It Va print-alternatives
9934 \*(BO When a MIME message part of type
9935 .Ql multipart/alternative
9936 is displayed and it contains a subpart of type
9938 other parts are normally discarded.
9939 Setting this variable causes all subparts to be displayed,
9940 just as if the surrounding part was of type
9941 .Ql multipart/mixed .
9945 The string used as a prompt in interactive mode.
9946 Whenever the variable is evaluated the value is expanded as via
9947 dollar-single-quote expansion (see
9948 .Sx "Shell-style argument quoting" ) .
9949 This (post-assignment, i.e., second) expansion can be used to embed
9950 status information, for example
9955 .Va mailbox-display .
9957 In order to embed characters which should not be counted when
9958 calculating the visual width of the resulting string, enclose the
9959 characters of interest in a pair of reverse solidus escaped brackets:
9961 a slot for coloured prompts is also available with the \*(OPal command
9963 Prompting may be prevented by setting this to the null string
9965 .Ql set noprompt ) .
9969 This string is used for secondary prompts, but is otherwise identical to
9976 \*(BO Suppresses the printing of the version when first invoked.
9980 If set, \*(UA starts a replying message with the original message
9981 prefixed by the value of the variable
9983 Normally, a heading consisting of
9984 .Dq Fromheaderfield wrote:
9985 is put before the quotation.
9990 variable, this heading is omitted.
9993 is assigned, only the headers selected by the
9996 selection are put above the message body,
9999 acts like an automatic
10001 .Sx "COMMAND ESCAPES"
10005 is assigned, all headers are put above the message body and all MIME
10006 parts are included, making
10008 act like an automatic
10011 .Va quote-as-attachment .
10014 .It Va quote-as-attachment
10015 \*(BO Add the original message in its entirety as a
10017 MIME attachment when replying to a message.
10018 Note this works regardless of the setting of
10023 \*(OP Can be set in addition to
10025 Setting this turns on a more fancy quotation algorithm in that leading
10026 quotation characters are compressed and overlong lines are folded.
10028 can be set to either one or two (space separated) numeric values,
10029 which are interpreted as the maximum (goal) and the minimum line length,
10030 respectively, in a spirit rather equal to the
10032 program, but line-, not paragraph-based.
10033 If not set explicitly the minimum will reflect the goal algorithmically.
10034 The goal cannot be smaller than the length of
10036 plus some additional pad.
10037 Necessary adjustments take place silently.
10040 .It Va r-option-implicit
10041 \*(BO Setting this option evaluates the contents of
10043 (or, if that contains multiple addresses,
10045 and passes the results onto the used (file-based) MTA as described for the
10047 option (empty argument case).
10050 .It Va recipients-in-cc
10057 are by default merged into the new
10059 If this variable is set, only the original
10063 the rest is merged into
10068 Unless this variable is defined, no copies of outgoing mail will be saved.
10069 If defined it gives the pathname, subject to the usual
10070 .Sx "Filename transformations" ,
10071 of a folder where all new, replied-to or forwarded messages are saved:
10072 when saving to this folder fails the message is not sent, but instead
10076 The standard defines that relative (fully expanded) paths are to be
10077 interpreted relative to the current directory
10079 to force interpretation relative to
10082 needs to be set in addition.
10085 .It Va record-files
10086 \*(BO If this variable is set the meaning of
10088 will be extended to cover messages which target only file and pipe
10091 These address types will not appear in recipient lists unless
10092 .Va add-file-recipients
10096 .It Va record-resent
10097 \*(BO If this variable is set the meaning of
10099 will be extended to also cover the
10106 .It Va reply-in-same-charset
10107 \*(BO If this variable is set \*(UA first tries to use the same
10108 character set of the original message for replies.
10109 If this fails, the mechanism described in
10110 .Sx "Character sets"
10111 is evaluated as usual.
10114 .It Va reply-strings
10115 Can be set to a comma-separated list of (case-insensitive according to
10116 ASCII rules) strings which shall be recognized in addition to the
10117 built-in strings as
10119 reply message indicators \(en built-in are
10121 which is mandated by RFC 5322, as well as the german
10126 which often has been seen in the wild;
10127 I.e., the separating colon has to be specified explicitly.
10131 A list of addresses to put into the
10133 field of the message header.
10134 Members of this list are handled as if they were in the
10143 .It Va reply-to-honour
10146 header is honoured when replying to a message via
10150 This is a quadoption; if set without a value it defaults to
10154 .It Va rfc822-body-from_
10155 \*(BO This variable can be used to force displaying a so-called
10157 line for messages that are embedded into an envelope mail via the
10159 MIME mechanism, for more visual convenience.
10163 \*(BO Enable saving of (partial) messages in
10165 upon interrupt or delivery error.
10169 The number of lines that represents a
10178 line display and scrolling via
10180 If this variable is not set \*(UA falls back to a calculation based upon
10181 the detected terminal window size and the baud rate: the faster the
10182 terminal, the more will be shown.
10183 Overall screen dimensions and pager usage is influenced by the
10184 environment variables
10192 .It Va searchheaders
10193 \*(BO Expand message-list specifiers in the form
10195 to all messages containing the substring
10197 in the header field
10199 The string search is case insensitive.
10202 .It Va sendcharsets
10203 \*(OP A comma-separated list of character set names that can be used in
10204 outgoing internet mail.
10205 The value of the variable
10207 is automatically appended to this list of character sets.
10208 If no character set conversion capabilities are compiled into \*(UA then
10209 the only supported charset is
10212 .Va sendcharsets-else-ttycharset
10213 and refer to the section
10214 .Sx "Character sets"
10215 for the complete picture of character set conversion in \*(UA.
10218 .It Va sendcharsets-else-ttycharset
10219 \*(BO\*(OP If this variable is set, but
10221 is not, then \*(UA acts as if
10223 had been set to the value of the variable
10225 In effect this combination passes through the message data in the
10226 character set of the current locale encoding:
10227 therefore mail message text will be (assumed to be) in ISO-8859-1
10228 encoding when send from within a ISO-8859-1 locale, and in UTF-8
10229 encoding when send from within an UTF-8 locale.
10233 never comes into play as
10235 is implicitly assumed to be 8-bit and capable to represent all files the
10236 user may specify (as is the case when no character set conversion
10237 support is available in \*(UA and the only supported character set is
10239 .Sx "Character sets" ) .
10240 This might be a problem for scripts which use the suggested
10242 setting, since in this case the character set is US-ASCII by definition,
10243 so that it is better to also override
10249 An address that is put into the
10251 field of outgoing messages, quoting RFC 5322: the mailbox of the agent
10252 responsible for the actual transmission of the message.
10253 This field should normally not be used unless the
10255 field contains more than one address, on which case it is required.
10258 address is handled as if it were in the
10262 .Va r-option-implicit .
10265 \*(OB Predecessor of
10268 .It Va sendmail-arguments
10269 \*(OB Predecessor of
10270 .Va mta-arguments .
10272 .It Va sendmail-no-default-arguments
10273 \*(OB\*(BO Predecessor of
10274 .Va mta-no-default-arguments .
10276 .It Va sendmail-progname
10277 \*(OB Predecessor of
10282 \*(BO When sending a message wait until the
10284 (including the built-in SMTP one) exits before accepting further commands.
10286 with this variable set errors reported by the MTA will be recognizable!
10287 If the MTA returns a non-zero exit status,
10288 the exit status of \*(UA will also be non-zero.
10292 \*(BO This setting causes \*(UA to start at the last message
10293 instead of the first one when opening a mail folder.
10297 \*(BO Causes \*(UA to use the sender's real name instead of the plain
10298 address in the header field summary and in message specifications.
10302 \*(BO Causes the recipient of the message to be shown in the header
10303 summary if the message was sent by the user.
10307 The string to expand
10310 .Sx "COMMAND ESCAPES" ) .
10314 The string to expand
10317 .Sx "COMMAND ESCAPES" ) .
10321 Must correspond to the name of a readable file if set.
10322 The file's content is then appended to each singlepart message
10323 and to the first part of each multipart message.
10324 Be warned that there is no possibility to edit the signature for an
10325 individual message.
10328 .It Va skipemptybody
10329 \*(BO If an outgoing message does not contain any text in its first or
10330 only message part, do not send it but discard it silently (see also the
10331 command line option
10336 .It Va smime-ca-dir , smime-ca-file
10337 \*(OP Specify the location of trusted CA certificates in PEM (Privacy
10338 Enhanced Mail) format as a directory and a file, respectively, for the
10339 purpose of verification of S/MIME signed messages.
10340 It is possible to set both, the file will be loaded immediately, the
10341 directory will be searched whenever no match has yet been found.
10342 The set of CA certificates which are built into the SSL/TLS library can
10343 be explicitly turned off by setting
10344 .Va smime-ca-no-defaults ,
10345 and further fine-tuning is possible via
10346 .Va smime-ca-flags .
10349 .It Va smime-ca-flags
10350 \*(OP Can be used to fine-tune behaviour of the X509 CA certificate
10351 storage, and the certificate verification that is used.
10352 The actual values and their meanings are documented for
10356 .It Va smime-ca-no-defaults
10357 \*(BO\*(OP Do not load the default CA locations that are built into the
10358 used to SSL/TLS library to verify S/MIME signed messages.
10360 .Mx Va smime-cipher
10361 .It Va smime-cipher-USER@HOST , smime-cipher
10362 \*(OP Specifies the cipher to use when generating S/MIME encrypted
10363 messages (for the specified account).
10364 RFC 5751 mandates a default of
10367 Possible values are (case-insensitive and) in decreasing cipher strength:
10375 (DES EDE3 CBC, 168 bits; default if
10377 is not available) and
10379 (DES CBC, 56 bits).
10381 The actually available cipher algorithms depend on the cryptographic
10382 library that \*(UA uses.
10383 \*(OP Support for more cipher algorithms may be available through
10384 dynamic loading via, e.g.,
10385 .Xr EVP_get_cipherbyname 3
10386 (OpenSSL) if \*(UA has been compiled to support this.
10389 .It Va smime-crl-dir
10390 \*(OP Specifies a directory that contains files with CRLs in PEM format
10391 to use when verifying S/MIME messages.
10394 .It Va smime-crl-file
10395 \*(OP Specifies a file that contains a CRL in PEM format to use when
10396 verifying S/MIME messages.
10399 .It Va smime-encrypt-USER@HOST
10400 \*(OP If this variable is set, messages send to the given receiver are
10401 encrypted before sending.
10402 The value of the variable must be set to the name of a file that
10403 contains a certificate in PEM format.
10405 If a message is sent to multiple recipients,
10406 each of them for whom a corresponding variable is set will receive an
10407 individually encrypted message;
10408 other recipients will continue to receive the message in plain text
10410 .Va smime-force-encryption
10412 It is recommended to sign encrypted messages, i.e., to also set the
10417 .It Va smime-force-encryption
10418 \*(BO\*(OP Causes \*(UA to refuse sending unencrypted messages.
10422 \*(BO\*(OP S/MIME sign outgoing messages with the user's private key
10423 and include the user's certificate as a MIME attachment.
10424 Signing a message enables a recipient to verify that the sender used
10425 a valid certificate,
10426 that the email addresses in the certificate match those in the message
10427 header and that the message content has not been altered.
10428 It does not change the message text,
10429 and people will be able to read the message as usual.
10431 .Va smime-sign-cert , smime-sign-include-certs
10433 .Va smime-sign-message-digest .
10435 .Mx Va smime-sign-cert
10436 .It Va smime-sign-cert-USER@HOST , smime-sign-cert
10437 \*(OP Points to a file in PEM format.
10438 For the purpose of signing and decryption this file needs to contain the
10439 user's private key, followed by his certificate.
10441 For message signing
10443 is always derived from the value of
10445 (or, if that contains multiple addresses,
10447 For the purpose of encryption the recipient's public encryption key
10448 (certificate) is expected; the command
10450 can be used to save certificates of signed messages (the section
10451 .Sx "Signed and encrypted messages with S/MIME"
10452 gives some details).
10453 This mode of operation is usually driven by the specialized form.
10455 When decrypting messages the account is derived from the recipient
10460 of the message, which are searched for addresses for which such
10462 \*(UA always uses the first address that matches,
10463 so if the same message is sent to more than one of the user's addresses
10464 using different encryption keys, decryption might fail.
10466 For signing and decryption purposes it is possible to use encrypted
10467 keys, and the pseudo-host(s)
10468 .Ql USER@HOST.smime-cert-key
10469 for the private key
10471 .Ql USER@HOST.smime-cert-cert
10472 for the certificate stored in the same file)
10473 will be used for performing any necessary password lookup,
10474 therefore the lookup can be automatized via the mechanisms described in
10475 .Sx "On URL syntax and credential lookup" .
10476 For example, the hypothetical address
10478 could be driven with a private key / certificate pair path defined in
10479 .Va \&\&smime-sign-cert-bob@exam.ple ,
10480 and needed passwords would then be looked up via the pseudo hosts
10481 .Ql bob@exam.ple.smime-cert-key
10483 .Ql bob@exam.ple.smime-cert-cert ) .
10484 To include intermediate certificates, use
10485 .Va smime-sign-include-certs .
10487 .Mx Va smime-sign-include-certs
10488 .It Va smime-sign-include-certs-USER@HOST , smime-sign-include-certs
10489 \*(OP If used, this is supposed to a consist of a comma-separated list
10490 of files, each of which containing a single certificate in PEM format to
10491 be included in the S/MIME message in addition to the
10492 .Va smime-sign-cert
10494 This can be used to include intermediate certificates of the certificate
10495 authority, in order to allow the receiver's S/MIME implementation to
10496 perform a verification of the entire certificate chain, starting from
10497 a local root certificate, over the intermediate certificates, down to the
10498 .Va smime-sign-cert .
10499 Even though top level certificates may also be included in the chain,
10500 they won't be used for the verification on the receiver's side.
10502 For the purpose of the mechanisms involved here,
10504 refers to the content of the internal variable
10506 (or, if that contains multiple addresses,
10509 .Ql USER@HOST.smime-include-certs
10510 will be used for performing password lookups for these certificates,
10511 shall they have been given one, therefore the lookup can be automatized
10512 via the mechanisms described in
10513 .Sx "On URL syntax and credential lookup" .
10515 .Mx Va smime-sign-message-digest
10516 .It Va smime-sign-message-digest-USER@HOST , smime-sign-message-digest
10517 \*(OP Specifies the message digest to use when signing S/MIME messages.
10518 RFC 5751 mandates a default of
10520 Possible values are (case-insensitive and) in decreasing cipher strength:
10528 The actually available message digest algorithms depend on the
10529 cryptographic library that \*(UA uses.
10530 \*(OP Support for more message digest algorithms may be available
10531 through dynamic loading via, e.g.,
10532 .Xr EVP_get_digestbyname 3
10533 (OpenSSL) if \*(UA has been compiled to support this.
10534 Remember that for this
10536 refers to the variable
10538 (or, if that contains multiple addresses,
10542 \*(OB\*(OP To use the built-in SMTP transport, specify a SMTP URL in
10544 \*(ID For compatibility reasons a set
10546 is used in preference of
10550 .It Va smtp-auth-USER@HOST , smtp-auth-HOST , smtp-auth
10551 \*(OP Variable chain that controls the SMTP
10553 authentication method, possible values are
10559 as well as the \*(OPal methods
10565 method does not need any user credentials,
10567 requires a user name and all other methods require a user name and
10575 .Va smtp-auth-password
10577 .Va smtp-auth-user ) .
10582 .Va smtp-auth-USER@HOST :
10583 may override dependent on sender address in the variable
10586 .It Va smtp-auth-password
10587 \*(OP\*(OU Sets the global fallback password for SMTP authentication.
10588 If the authentication method requires a password, but neither
10589 .Va smtp-auth-password
10591 .Va smtp-auth-password-USER@HOST
10593 \*(UA will ask for a password on the user's terminal.
10595 .It Va smtp-auth-password-USER@HOST
10597 .Va smtp-auth-password
10598 for specific values of sender addresses, dependent upon the variable
10601 .It Va smtp-auth-user
10602 \*(OP\*(OU Sets the global fallback user name for SMTP authentication.
10603 If the authentication method requires a user name, but neither
10606 .Va smtp-auth-user-USER@HOST
10608 \*(UA will ask for a user name on the user's terminal.
10610 .It Va smtp-auth-user-USER@HOST
10613 for specific values of sender addresses, dependent upon the variable
10617 .It Va smtp-hostname
10618 \*(OP\*(IN Normally \*(UA uses the variable
10620 to derive the necessary
10622 information in order to issue a
10629 can be used to use the
10631 from the SMTP account
10638 from the content of this variable (or, if that is the empty string,
10640 or the local hostname as a last resort).
10641 This often allows using an address that is itself valid but hosted by
10642 a provider other than which (in
10644 is about to send the message.
10645 Setting this variable also influences generated
10651 .Mx Va smtp-use-starttls
10652 .It Va smtp-use-starttls-USER@HOST , smtp-use-starttls-HOST , smtp-use-starttls
10653 \*(BO\*(OP Causes \*(UA to issue a
10655 command to make an SMTP
10657 session SSL/TLS encrypted, i.e., to enable transport layer security.
10660 .It Va socks-proxy-USER@HOST , socks-proxy-HOST , socks-proxy
10661 \*(OP If this is set to the hostname (SOCKS URL) of a SOCKS5 server then
10662 \*(UA will proxy all of its network activities through it.
10663 This can be used to proxy SMTP, POP3 etc. network traffic through the
10664 Tor anonymizer, for example.
10665 The following would create a local SOCKS proxy on port 10000 that
10666 forwards to the machine
10668 and from which the network traffic is actually instantiated:
10669 .Bd -literal -offset indent
10670 # Create local proxy server in terminal 1 forwarding to HOST
10671 $ ssh -D 10000 USER@HOST
10672 # Then, start a client that uses it in terminal 2
10673 $ \*(uA -Ssocks-proxy-USER@HOST=localhost:10000
10677 .It Va spam-interface
10678 \*(OP In order to use any of the spam-related commands (like, e.g.,
10680 the desired spam interface must be defined by setting this variable.
10681 Please refer to the manual section
10682 .Sx "Handling spam"
10683 for the complete picture of spam handling in \*(UA.
10684 All or none of the following interfaces may be available:
10686 .Bl -tag -width ".It Ql _ilte_"
10692 .Pf ( Lk http://spamassassin.apache.org SpamAssassin )
10694 Different to the generic filter interface \*(UA will automatically add
10695 the correct arguments for a given command and has the necessary
10696 knowledge to parse the program's output.
10697 A default value for
10699 will have been compiled into the \*(UA binary if
10703 during compilation.
10704 Shall it be necessary to define a specific connection type (rather than
10705 using a configuration file for that), the variable
10706 .Va spamc-arguments
10707 can be used as in, e.g.,
10708 .Ql -d server.example.com -p 783 .
10709 It is also possible to specify a per-user configuration via
10711 Note that this interface does not inspect the
10713 flag of a message for the command
10717 generic spam filter support via freely configurable hooks.
10718 This interface is meant for programs like
10720 and requires according behaviour in respect to the hooks' exit
10721 status for at least the command
10724 meaning a message is spam,
10728 for unsure and any other return value indicating a hard error);
10729 since the hooks can include shell code snippets diverting behaviour
10730 can be intercepted as necessary.
10732 .Va spamfilter-ham , spamfilter-noham , spamfilter-nospam , \
10735 .Va spamfilter-spam ;
10737 .Sx "Handling spam"
10738 contains examples for some programs.
10739 The process environment of the hooks will have the variable
10740 .Ev MAILX_FILENAME_GENERATED
10742 Note that spam score support for
10744 is not supported unless the \*(OPtional regular expression support is
10746 .Va spamfilter-rate-scanscore
10752 .It Va spam-maxsize
10753 \*(OP Messages that exceed this size will not be passed through to the
10755 .Va spam-interface .
10756 If unset or 0, the default of 420000 bytes is used.
10759 .It Va spamc-command
10760 \*(OP The path to the
10764 .Va spam-interface .
10765 Note that the path is not expanded, but used
10767 A fallback path will have been compiled into the \*(UA binary if the
10768 executable had been found during compilation.
10771 .It Va spamc-arguments
10772 \*(OP Even though \*(UA deals with most arguments for the
10775 automatically, it may at least sometimes be desirable to specify
10776 connection-related ones via this variable, e.g.,
10777 .Ql -d server.example.com -p 783 .
10781 \*(OP Specify a username for per-user configuration files for the
10783 .Va spam-interface .
10784 If this is set to the empty string then \*(UA will use the name of the
10793 .It Va spamfilter-ham , spamfilter-noham , \
10794 spamfilter-nospam , spamfilter-rate , spamfilter-spam
10795 \*(OP Command and argument hooks for the
10797 .Va spam-interface .
10799 .Sx "Handling spam"
10800 contains examples for some programs.
10803 .It Va spamfilter-rate-scanscore
10804 \*(OP Because of the generic nature of the
10807 spam scores are not supported for it by default, but if the \*(OPnal
10808 regular expression support is available then setting this variable can
10809 be used to overcome this restriction.
10810 It is interpreted as follows: first a number (digits) is parsed that
10811 must be followed by a semicolon
10813 and an extended regular expression.
10814 Then the latter is used to parse the first output line of the
10815 .Va spamfilter-rate
10816 hook, and, in case the evaluation is successful, the group that has been
10817 specified via the number is interpreted as a floating point scan score.
10821 .It Va ssl-ca-dir , ssl-ca-file
10822 \*(OP Specify the location of trusted CA certificates in PEM (Privacy
10823 Enhanced Mail) format as a directory and a file, respectively, for the
10824 purpose of verification of SSL/TLS server certificates.
10825 It is possible to set both, the file will be loaded immediately, the
10826 directory will be searched whenever no match has yet been found.
10827 The set of CA certificates which are built into the SSL/TLS library can
10828 be explicitly turned off by setting
10829 .Va ssl-ca-no-defaults ,
10830 and further fine-tuning is possible via
10833 .Xr SSL_CTX_load_verify_locations 3
10834 for more information.
10835 \*(UA will try to use the TLS/SNI (ServerNameIndication) extension when
10836 establishing TLS connections to servers identified with hostnames.
10840 .It Va ssl-ca-flags
10841 \*(OP Can be used to fine-tune behaviour of the X509 CA certificate
10842 storage, and the certificate verification that is used (also see
10844 The value is expected to consist of a comma-separated list of
10845 configuration directives, with any intervening whitespace being ignored.
10846 The directives directly map to flags that can be passed to
10847 .Xr X509_STORE_set_flags 3 ,
10848 which are usually defined in a file
10849 .Pa openssl/x509_vfy.h ,
10850 and the availability of which depends on the used SSL/TLS library
10851 version: a directive without mapping is ignored (error log subject to
10853 Directives currently understood (case-insensitively) include:
10856 .Bl -tag -compact -width ".It Cd BaNg"
10857 .It Cd no-alt-chains
10858 If the initial chain is not trusted, do not attempt to build an
10860 Setting this flag will make OpenSSL certificate verification match that
10861 of older OpenSSL versions, before automatic building and checking of
10862 alternative chains has been implemented; also see
10863 .Cd trusted-first .
10864 .It Cd no-check-time
10865 Do not check certificate/CRL validity against current time.
10866 .It Cd partial-chain
10867 By default partial, incomplete chains which cannot be verified up to the
10868 chain top, a self-signed root certificate, will not verify.
10869 With this flag set, a chain succeeds to verify if at least one signing
10870 certificate of the chain is in any of the configured trusted stores of
10872 The OpenSSL manual page
10873 .Xr SSL_CTX_load_verify_locations 3
10874 gives some advise how to manage your own trusted store of CA certificates.
10876 Disable workarounds for broken certificates.
10877 .It Cd trusted-first
10878 Try building a chain using issuers in the trusted store first to avoid
10879 problems with server-sent legacy intermediate certificates.
10880 Newer versions of OpenSSL support alternative chain checking and enable
10881 it by default, resulting in the same behaviour; also see
10882 .Cd no-alt-chains .
10887 .It Va ssl-ca-no-defaults
10888 \*(BO\*(OP Do not load the default CA locations that are built into the
10889 used to SSL/TLS library to verify SSL/TLS server certificates.
10892 .It Va ssl-cert-USER@HOST , ssl-cert-HOST , ssl-cert
10893 \*(OP Variable chain that sets the filename for a SSL/TLS client
10894 certificate required by some servers.
10895 This is a direct interface to the
10899 function of the OpenSSL library, if available.
10901 .Mx Va ssl-cipher-list
10902 .It Va ssl-cipher-list-USER@HOST , ssl-cipher-list-HOST , ssl-cipher-list
10903 \*(OP Specifies a list of ciphers for SSL/TLS connections.
10904 This is a direct interface to the
10908 function of the OpenSSL library, if available; see
10911 .Xr SSL_CTX_set_cipher_list 3
10912 for more information.
10913 By default \*(UA does not set a list of ciphers, in effect using a
10915 specific cipher (protocol standards ship with a list of acceptable
10916 ciphers), possibly cramped to what the actually used SSL/TLS library
10917 supports \(en the manual section
10918 .Sx "An example configuration"
10919 also contains a SSL/TLS use case.
10922 .It Va ssl-config-file
10923 \*(OP If this variable is set \*(UA will call
10924 .Xr CONF_modules_load_file 3
10925 to allow OpenSSL to be configured according to the host system wide
10927 If a non-empty value is given then this will be used to specify the
10928 configuration file to be used instead of the global OpenSSL default;
10929 note that in this case it is an error if the file cannot be loaded.
10930 The application name will always be passed as
10934 .It Va ssl-curves-USER@HOST , ssl-curves-HOST , ssl-curves
10935 \*(OP Specifies a list of supported curves for SSL/TLS connections.
10936 This is a direct interface to the
10940 function of the OpenSSL library, if available; see
10941 .Xr SSL_CTX_set1_curves_list 3
10942 for more information.
10943 By default \*(UA does not set a list of curves.
10947 .It Va ssl-crl-dir , ssl-crl-file
10948 \*(OP Specify a directory / a file, respectively that contains a CRL in
10949 PEM format to use when verifying SSL/TLS server certificates.
10952 .It Va ssl-key-USER@HOST , ssl-key-HOST , ssl-key
10953 \*(OP Variable chain that sets the filename for the private key of
10954 a SSL/TLS client certificate.
10955 If unset, the name of the certificate file is used.
10956 The file is expected to be in PEM format.
10957 This is a direct interface to the
10961 function of the OpenSSL library, if available.
10963 .It Va ssl-method-USER@HOST , ssl-method-HOST , ssl-method
10964 \*(OB\*(OP Please use the newer and more flexible
10966 instead: if both values are set,
10968 will take precedence!
10969 Can be set to the following values, the actually used
10971 specification to which it is mapped is shown in parenthesis:
10973 .Pf ( Ql -ALL, TLSv1.2 ) ,
10975 .Pf ( Ql -ALL, TLSv1.1 ) ,
10977 .Pf ( Ql -ALL, TLSv1 )
10980 .Pf ( Ql -ALL, SSLv3 ) ;
10985 and thus includes the SSLv3 protocol.
10986 Note that SSLv2 is no longer supported at all.
10988 .Mx Va ssl-protocol
10989 .It Va ssl-protocol-USER@HOST , ssl-protocol-HOST , ssl-protocol
10990 \*(OP Specify the used SSL/TLS protocol.
10991 This is a direct interface to the
10995 function of the OpenSSL library, if available;
10996 otherwise an \*(UA internal parser is used which understands the
10997 following subset of (case-insensitive) command strings:
11003 as well as the special value
11005 Multiple specifications may be given via a comma-separated list which
11006 ignores any whitespace.
11009 plus sign prefix will enable a protocol, a
11011 hyphen-minus prefix will disable it, so that
11013 will enable only the TLSv1.2 protocol.
11015 It depends upon the used TLS/SSL library which protocols are actually
11016 supported and which protocols are used if
11018 is not set, but note that SSLv2 is no longer supported at all and
11020 Especially for older protocols explicitly securing
11021 .Va ssl-cipher-list
11022 may be worthwile, see
11023 .Sx "An example configuration" .
11026 .It Va ssl-rand-egd
11027 \*(OP Gives the pathname to an entropy daemon socket, see
11029 Not all SSL/TLS libraries support this.
11032 .It Va ssl-rand-file
11033 \*(OP Gives the filename to a file with random entropy data, see
11034 .Xr RAND_load_file 3 .
11035 If this variable is not set, or set to the empty string, or if the
11036 .Sx "Filename transformations"
11038 .Xr RAND_file_name 3
11039 will be used to create the filename if, and only if,
11041 documents that the SSL PRNG is not yet sufficiently seeded.
11042 If \*(UA successfully seeded the SSL PRNG then it will update the file
11043 .Pf ( Xr RAND_write_file 3 ) .
11044 This variable is only used if
11046 is not set (or not supported by the SSL/TLS library).
11049 .It Va ssl-verify-USER@HOST , ssl-verify-HOST , ssl-verify
11050 \*(OP Variable chain that sets the action to be performed if an error
11051 occurs during SSL/TLS server certificate validation against the
11052 specified or default trust stores
11055 or the SSL/TLS library built-in defaults (unless usage disallowed via
11056 .Va ssl-ca-no-defaults ) ,
11057 and as fine-tuned via
11059 Valid (case-insensitive) values are
11061 (fail and close connection immediately),
11063 (ask whether to continue on standard input),
11065 (show a warning and continue),
11067 (do not perform validation).
11073 If only set without an assigned value, then this setting inhibits the
11079 header fields that include obvious references to \*(UA.
11080 There are two pitfalls associated with this:
11081 First, the message id of outgoing messages is not known anymore.
11082 Second, an expert may still use the remaining information in the header
11083 to track down the originating mail user agent.
11084 If set to the value
11090 suppression does not occur.
11095 (\*(OP) This specifies a comma-separated list of
11100 .Sx "On terminal control and line editor" ,
11101 escape commas with reverse solidus) to be used to overwrite or define
11104 this variable will only be queried once at program startup and can
11105 thus only be specified in resource files or on the command line.
11108 String capabilities form
11110 pairs and are expected unless noted otherwise.
11111 Numerics have to be notated as
11113 where the number is expected in normal decimal notation.
11114 Finally, booleans do not have any value but indicate a true or false
11115 state simply by being defined or not; this indeed means that \*(UA
11116 does not support undefining an existing boolean.
11117 String capability values will undergo some expansions before use:
11118 for one notations like
11121 .Ql control-LETTER ,
11122 and for clarification purposes
11124 can be used to specify
11126 (the control notation
11128 could lead to misreadings when a left bracket follows, which it does for
11129 the standard CSI sequence);
11130 finally three letter octal sequences, as in
11133 To specify that a terminal supports 256-colours, and to define sequences
11134 that home the cursor and produce an audible bell, one might write:
11136 .Bd -literal -offset indent
11137 ? set termcap='Co#256,home=\eE[H,bel=^G'
11141 The following terminal capabilities are or may be meaningful for the
11142 operation of the built-in line editor or \*(UA in general:
11145 .Bl -tag -compact -width ".It Cd yay"
11147 .It Cd colors Ns \0or Cd Co
11149 numeric capability specifying the maximum number of colours.
11150 Note that \*(UA does not actually care about the terminal beside that,
11151 but always emits ANSI / ISO 6429 escape sequences.
11154 .It Cd rmcup Ns \0or Cd te Ns \0/ Cd smcup Ns \0or Cd ti
11157 .Cd enter_ca_mode ,
11158 respectively: exit and enter the alternative screen ca-mode,
11159 effectively turning \*(UA into a fullscreen application.
11160 This must be enabled explicitly by setting
11161 .Va termcap-ca-mode .
11163 .It Cd smkx Ns \0or Cd ks Ns \0/ Cd rmkx Ns \0or Cd ke
11167 respectively: enable and disable the keypad.
11168 This is always enabled if available, because it seems even keyboards
11169 without keypads generate other key codes for, e.g., cursor keys in that
11170 case, and only if enabled we see the codes that we are interested in.
11172 .It Cd ed Ns \0or Cd cd
11176 .It Cd clear Ns \0or Cd cl
11178 clear the screen and home cursor.
11179 (Will be simulated via
11184 .It Cd home Ns \0or Cd ho
11189 .It Cd el Ns \0or Cd ce
11191 clear to the end of line.
11192 (Will be simulated via
11194 plus repetitions of space characters.)
11196 .It Cd hpa Ns \0or Cd ch
11197 .Cd column_address :
11198 move the cursor (to the given column parameter) in the current row.
11199 (Will be simulated via
11205 .Cd carriage_return :
11206 move to the first column in the current row.
11207 The default built-in fallback is
11210 .It Cd cub1 Ns \0or Cd le
11212 move the cursor left one space (non-destructively).
11213 The default built-in fallback is
11216 .It Cd cuf1 Ns \0or Cd nd
11218 move the cursor right one space (non-destructively).
11219 The default built-in fallback is
11221 which is used by most terminals.
11229 Many more capabilities which describe key-sequences are documented for
11234 .It Va termcap-ca-mode
11235 \*(OP Allow usage of the
11239 terminal capabilities, effectively turning \*(UA into a fullscreen
11240 application, as documented for
11243 this variable will only be queried once at program startup and can
11244 thus only be specified in resource files or on the command line.
11247 .It Va termcap-disable
11248 \*(OP Disable any interaction with a terminal control library.
11249 If set only some generic fallback built-ins and possibly the content of
11251 describe the terminal to \*(UA.
11253 this variable will only be queried once at program startup and can
11254 thus only be specified in resource files or on the command line.
11258 If defined, gives the number of lines of a message to be displayed
11261 if unset, the first five lines are printed, if set to 0 the variable
11264 If the value is negative then its absolute value will be used for
11265 unsigned right shifting (see
11273 \*(BO If set then the
11275 command series will strip adjacent empty lines and quotations.
11279 The character set of the terminal \*(UA operates on,
11280 and the one and only supported character set that \*(UA can use if no
11281 character set conversion capabilities have been compiled into it,
11282 in which case it defaults to ISO-8859-1 unless it can deduce a value
11283 from the locale specified in the
11285 environment variable (if supported, see there for more).
11286 It defaults to UTF-8 if conversion is available.
11287 Refer to the section
11288 .Sx "Character sets"
11289 for the complete picture about character sets.
11292 .It Va typescript-mode
11293 \*(BO A special multiplex variable that disables all variables and
11294 settings which result in behaviour that interferes with running \*(UA in
11297 .Va colour-disable ,
11298 .Va line-editor-disable
11299 and (before startup completed only)
11300 .Va termcap-disable .
11301 Unsetting it does not restore the former state of the covered settings.
11305 For a safety-by-default policy \*(UA sets its process
11309 but this variable can be used to override that:
11310 set it to an empty value to do not change the (current) setting (on
11311 startup), otherwise the process file mode creation mask is updated to
11313 Child processes inherit the process file mode creation mask.
11316 .It Va user-HOST , user
11317 \*(IN Variable chain that sets a global fallback user name, which is
11318 used in case none has been given in the protocol and account-specific
11320 This variable defaults to the name of the user who runs \*(UA.
11324 \*(BO Setting this enables upward compatibility with \*(UA
11325 version 15.0 in respect to which configuration options are available and
11326 how they are handled.
11327 This manual uses \*(IN and \*(OU to refer to the new and the old way of
11328 doing things, respectively.
11332 \*(BO This setting, also controllable via the command line option
11334 causes \*(UA to be more verbose, e.g., it will display obsoletion
11335 warnings and SSL/TLS certificate chains.
11336 Even though marked \*(BO this option may be set twice in order to
11337 increase the level of verbosity even more, in which case even details of
11338 the actual message delivery and protocol conversations are shown.
11341 is sufficient to disable verbosity as such.
11348 .It Va version , version-date , version-major , version-minor , version-update
11349 \*(RO \*(UA version information: the first variable contains a string
11350 containing the complete version identification, the latter three contain
11351 only digits: the major, minor and update version numbers.
11352 The date is in ISO 8601 notation.
11353 The output of the command
11355 will include this information.
11358 .It Va writebackedited
11359 If this variable is set messages modified using the
11363 commands are written back to the current folder when it is quit;
11364 it is only honoured for writable folders in MBOX format, though.
11365 Note that the editor will be pointed to the raw message content in that
11366 case, i.e., neither MIME decoding nor decryption will have been
11367 performed, and proper RFC 4155
11369 quoting of newly added or edited content is also left as an excercise to
11372 .\" }}} (Variables)
11374 .\" }}} (INTERNAL VARIABLES)
11377 .\" .Sh ENVIRONMENT {{{
11381 .Dq environment variable
11382 should be considered an indication that these variables are either
11383 standardized as vivid parts of process environments, or that they are
11384 commonly found in there.
11385 The process environment is inherited from the
11387 once \*(UA is started, and unless otherwise explicitly noted handling of
11388 the following variables transparently integrates into that of the
11389 .Sx "INTERNAL VARIABLES"
11390 from \*(UA's point of view.
11391 This means that, e.g., they can be managed via
11395 causing automatic program environment updates (to be inherited by
11396 newly created child processes).
11399 In order to transparently integrate other environment variables equally
11400 they need to be imported (linked) with the command
11402 This command can also be used to set and unset non-integrated
11403 environment variables from scratch, sufficient system support provided.
11404 The following example, applicable to a POSIX shell, sets the
11406 environment variable for \*(UA only, and beforehand exports the
11408 in order to affect any further processing in the running shell:
11410 .Bd -literal -offset indent
11411 $ EDITOR="vim -u ${HOME}/.vimrc"
11413 $ COLUMNS=80 \*(uA -R
11416 .Bl -tag -width ".It Ev BaNg"
11419 The user's preferred width in column positions for the terminal screen
11421 Queried and used once on program startup, actively managed for child
11422 processes and the MLE (see
11423 .Sx "On terminal control and line editor" )
11424 in interactive mode thereafter.
11425 Ignored in non-interactive mode, which always uses 80 columns, unless in
11431 The name of the (mailbox)
11433 to use for saving aborted messages if
11435 is set; this defaults to
11442 is set no output will be generated, otherwise the contents of the file
11447 Pathname of the text editor to use in the
11451 .Sx "COMMAND ESCAPES" .
11452 A default editor is used if this value is not defined.
11456 The user's home directory.
11457 This variable is only used when it resides in the process environment.
11458 The calling user's home directory will be used instead if this directory
11459 does not exist, is not accessible or cannot be read.
11460 (No test for being writable is performed to allow usage by
11461 non-privileged users within read-only jails, but dependent on the
11462 variable settings this directory is a default write target, e.g. for
11470 .It Ev LC_ALL , LC_CTYPE , LANG
11471 \*(OP The (names in lookup order of the)
11475 which indicates the used
11476 .Sx "Character sets" .
11477 Runtime changes trigger automatic updates of the entire locale system,
11478 updating and overwriting also a
11484 The user's preferred number of lines on a page or the vertical screen
11485 or window size in lines.
11486 Queried and used once on program startup, actively managed for child
11487 processes in interactive mode thereafter.
11488 Ignored in non-interactive mode, which always uses 24 lines, unless in
11494 Pathname of the directory lister to use in the
11496 command when operating on local mailboxes.
11499 (path search through
11504 Upon startup \*(UA will actively ensure that this variable refers to the
11505 name of the user who runs \*(UA, in order to be able to pass a verified
11506 name to any newly created child process.
11510 Is used as the users
11512 .Sx "primary system mailbox"
11516 This is assumed to be an absolute pathname.
11520 \*(OP Overrides the default path search for
11521 .Sx "The Mailcap files" ,
11522 which is defined in the standard RFC 1524 as
11523 .Ql ~/.mailcap:\:/etc/mailcap:\:/usr/etc/mailcap:\:/usr/local/etc/mailcap .
11524 .\" TODO we should have a mailcaps-default virtual RDONLY option!
11525 (\*(UA makes it a configuration option, however.)
11526 Note this is not a search path, but a path search.
11530 Is used as a startup file instead of
11533 When \*(UA scripts are invoked on behalf of other users,
11534 either this variable should be set to
11538 command line option should be used in order to avoid side-effects from
11539 reading their configuration files.
11540 This variable is only used when it resides in the process environment.
11543 .It Ev MAILX_NO_SYSTEM_RC
11544 If this variable is set then reading of
11546 at startup is inhibited, i.e., the same effect is achieved as if \*(UA
11547 had been started up with the option
11549 (and according argument) or
11551 This variable is only used when it resides in the process environment.
11555 The name of the users
11557 .Sx "secondary mailbox"
11559 A logical subset of the special
11560 .Sx "Filename transformations"
11566 Traditionally this MBOX is used as the file to save messages from the
11568 .Sx "primary system mailbox"
11569 that have been read.
11571 .Sx "Message states" .
11575 \*(IN\*(OP This variable overrides the default location of the user's
11581 Pathname of the program to use for backing the command
11585 variable enforces usage of a pager for output.
11586 The default paginator is
11588 (path search through
11591 \*(UA inspects the contents of this variable: if its contains the string
11593 then a non-existing environment variable
11600 dependent on whether terminal control support is available and whether
11601 that supports full (alternative) screen mode or not (also see
11602 .Sx "On terminal control and line editor" ) .
11606 will optionally be set to
11613 A colon-separated list of directories that is searched by the shell when
11614 looking for commands, e.g.,
11615 .Ql /bin:/usr/bin:/usr/local/bin .
11618 .It Ev POSIXLY_CORRECT
11619 This variable is automatically looked for upon startup, see
11625 The shell to use for the commands
11630 .Sx "COMMAND ESCAPES"
11631 and when starting subprocesses.
11632 A default shell is used if this environment variable is not defined.
11635 .It Ev SOURCE_DATE_EPOCH
11636 This specifies a time in seconds since the Unix epoch (1970-01-01) to be
11637 used in place of the current time.
11638 This variable is looked up upon program startup, and its existence will
11639 switch \*(UA to a completely reproducible mode which causes
11640 deterministic random numbers, a special fixed (non-existent?)
11642 and more to be used and set.
11643 It is to be used during development or by software packagers.
11644 \*(ID Currently an invalid setting is only ignored, rather than causing
11645 a program abortion.
11647 .Dl $ SOURCE_DATE_EPOCH=`date +%s` \*(uA
11651 \*(OP The terminal type for which output is to be prepared.
11652 For extended colour and font control please refer to
11653 .Sx "Coloured display" ,
11654 and for terminal management in general to
11655 .Sx "On terminal control and line editor" .
11659 Used as directory for temporary files instead of
11661 if set, existent, accessible as well as read- and writable.
11662 This variable is only used when it resides in the process environment,
11663 but \*(UA will ensure at startup that this environment variable is
11664 updated to contain a usable temporary directory.
11670 (see there), but this variable is not standardized, should therefore not
11671 be used, and is only corrected if already set.
11675 Pathname of the text editor to use in the
11679 .Sx "COMMAND ESCAPES" .
11689 .Bl -tag -width ".It Pa BaNg"
11691 File giving initial commands, one of the
11692 .Sx "Resource files" .
11695 System wide initialization file, one of the
11696 .Sx "Resource files" .
11700 \*(OP Personal MIME type handler definition file, see
11701 .Sx "The Mailcap files" .
11702 This location is part of the RFC 1524 standard search path, which is
11703 a configuration option and can be overridden via
11707 .It Pa /etc/mailcap
11708 \*(OP System wide MIME type handler definition file, see
11709 .Sx "The Mailcap files" .
11710 This location is part of the RFC 1524 standard search path, which is
11711 a configuration option and can be overridden via
11715 The default value for
11717 The actually used path is a configuration option.
11720 .It Pa ~/.mime.types
11721 Personal MIME types, see
11722 .Sx "The mime.types files" .
11723 The actually used path is a configuration option.
11726 .It Pa /etc/mime.types
11727 System wide MIME types, see
11728 .Sx "The mime.types files" .
11729 The actually used path is a configuration option.
11733 \*(IN\*(OP The default location of the users
11735 file \(en the section
11736 .Sx "The .netrc file"
11737 documents the file format.
11738 The actually used path is a configuration option and can be overridden via
11745 The actually used path is a compile-time constant.
11749 .\" .Ss "Resource files" {{{
11750 .Ss "Resource files"
11752 Upon startup \*(UA reads in several resource files:
11754 .Bl -tag -width ".It Pa BaNg"
11757 System wide initialization file.
11758 Reading of this file can be suppressed, either by using the
11760 (and according argument) or
11762 command line options, or by setting the
11765 .Ev MAILX_NO_SYSTEM_RC .
11769 File giving initial commands.
11770 A different file can be chosen by setting the
11774 Reading of this file can be suppressed with the
11776 command line option.
11778 .It Va mailx-extra-rc
11779 Defines a startup file to be read after all other resource files.
11780 It can be used to specify settings that are not understood by other
11782 implementations, for example.
11783 This variable is only honoured when defined in a resource file, e.g.,
11785 .Sx "INTERNAL VARIABLES" .
11789 The content of these files is interpreted as follows:
11792 .Bl -bullet -compact
11794 The whitespace characters space, tabulator and newline,
11795 as well as those defined by the variable
11797 are removed from the beginning and end of input lines.
11799 Empty lines are ignored.
11801 Any other line is interpreted as a command.
11802 It may be spread over multiple input lines if the newline character is
11804 by placing a reverse solidus character
11806 as the last character of the line; whereas any leading whitespace of
11807 follow lines is ignored, trailing whitespace before a escaped newline
11808 remains in the input.
11810 If the line (content) starts with the number sign
11812 then it is a comment-command and also ignored.
11813 (The comment-command is a real command, which does nothing, and
11814 therefore the usual follow lines mechanism applies!)
11818 Unless \*(UA is about to enter interactive mode syntax errors that occur
11819 while loading these files are treated as errors and cause program exit.
11820 More files with syntactically equal content can be
11822 The following, saved in a file, would be an examplary content:
11824 .Bd -literal -offset indent
11825 # This line is a comment command. And y\e
11826 es, it is really continued here.
11833 .\" .Ss "The mime.types files" {{{
11834 .Ss "The mime.types files"
11837 .Sx "HTML mail and MIME attachments"
11838 \*(UA needs to learn about MIME (Multipurpose Internet Mail Extensions)
11839 media types in order to classify message and attachment content.
11840 One source for them are
11842 files, the loading of which can be controlled by setting the variable
11843 .Va mimetypes-load-control .
11844 Another is the command
11846 which also offers access to \*(UAs MIME type cache.
11848 files have the following syntax:
11850 .Bd -literal -offset indent
11851 type/subtype extension [extension ...]
11852 # E.g., text/html html htm
11858 define the MIME media type, as standardized in RFC 2046:
11860 is used to declare the general type of data, while the
11862 specifies a specific format for that type of data.
11863 One or multiple filename
11865 s, separated by whitespace, can be bound to the media type format.
11866 Comments may be introduced anywhere on a line with a number sign
11868 causing the remaining line to be discarded.
11870 \*(UA also supports an extended, non-portable syntax in especially
11871 crafted files, which can be loaded via the alternative value syntax of
11872 .Va mimetypes-load-control ,
11873 and prepends an optional
11877 .Dl [type-marker ]type/subtype extension [extension ...]
11880 The following type markers are supported:
11883 .Bl -tag -compact -width ".It Ar _n_u"
11885 Treat message parts with this content as plain text.
11890 Treat message parts with this content as HTML tagsoup.
11891 If the \*(OPal HTML-tagsoup-to-text converter is not available treat
11892 the content as plain text instead.
11896 but instead of falling back to plain text require an explicit content
11897 handler to be defined.
11902 for sending messages:
11904 .Va mime-allow-text-controls ,
11905 .Va mimetypes-load-control .
11906 For reading etc. messages:
11907 .Sx "HTML mail and MIME attachments" ,
11908 .Sx "The Mailcap files" ,
11910 .Va mime-counter-evidence ,
11911 .Va mimetypes-load-control ,
11912 .Va pipe-TYPE/SUBTYPE ,
11913 .Va pipe-EXTENSION .
11916 .\" .Ss "The Mailcap files" {{{
11917 .Ss "The Mailcap files"
11919 .\" TODO MAILCAP DISABLED
11920 .Sy This feature is not available in v14.9.0, sorry!
11922 .Dq User Agent Configuration Mechanism
11923 which \*(UA \*(OPally supports (see
11924 .Sx "HTML mail and MIME attachments" ) .
11925 It defines a file format to be used to inform mail user agent programs
11926 about the locally-installed facilities for handling various data
11927 formats, i.e., about commands and how they can be used to display, edit
11928 et cetera MIME part contents, as well as a default path search that
11929 includes multiple possible locations of
11933 environment variable that can be used to overwrite that (repeating here
11934 that it is not a search path, but instead a path search specification).
11935 Any existing files will be loaded in sequence, appending any content to
11936 the list of MIME type handler directives.
11940 files consist of a set of newline separated entries.
11941 Comment lines start with a number sign
11943 (in the first column!) and are ignored.
11944 Empty lines are also ignored.
11945 All other lines form individual entries that must adhere to the syntax
11947 To extend a single entry (not comment) its line can be continued on
11948 follow lines if newline characters are
11950 by preceding them with the reverse solidus character
11952 The standard does not specify how leading whitespace of follow lines
11953 is to be treated, therefore \*(UA retains it.
11957 entries consist of a number of semicolon
11959 separated fields, and the reverse solidus
11961 character can be used to escape any following character including
11962 semicolon and itself.
11963 The first two fields are mandatory and must occur in the specified
11964 order, the remaining fields are optional and may appear in any order.
11965 Leading and trailing whitespace of content is ignored (removed).
11968 The first field defines the MIME
11970 the entry is about to handle (case-insensitively, and no reverse solidus
11971 escaping is possible in this field).
11972 If the subtype is specified as an asterisk
11974 the entry is meant to match all subtypes of the named type, e.g.,
11976 would match any audio type.
11977 The second field defines the shell command which shall be used to
11979 MIME parts of the given type; it is implicitly called the
11986 shell commands message (MIME part) data is passed via standard input
11987 unless the given shell command includes one or more instances of the
11990 in which case these instances will be replaced with a temporary filename
11991 and the data will have been stored in the file that is being pointed to.
11994 shell commands data is assumed to be generated on standard output unless
11995 the given command includes (one ore multiple)
11997 In any case any given
11999 format is replaced with a(n already) properly quoted filename.
12000 Note that when a command makes use of a temporary file via
12002 then \*(UA will remove it again, as if the
12003 .Cd x-mailx-tmpfile ,
12004 .Cd x-mailx-tmpfile-fill
12006 .Cd x-mailx-tmpfile-unlink
12007 flags had been set; see below for more.
12010 The optional fields either define a shell command or an attribute (flag)
12011 value, the latter being a single word and the former being a keyword
12012 naming the field followed by an equals sign
12014 succeeded by a shell command, and as usual for any
12016 content any whitespace surrounding the equals sign will be removed, too.
12017 Optional fields include the following:
12020 .Bl -tag -width ".It Cd BaNg"
12022 A program that can be used to compose a new body or body part in the
12024 (Currently unused.)
12026 .It Cd composetyped
12029 field, but is to be used when the composing program needs to specify the
12031 header field to be applied to the composed data.
12032 (Currently unused.)
12035 A program that can be used to edit a body or body part in the given
12037 (Currently unused.)
12040 A program that can be used to print a message or body part in the given
12042 (Currently unused.)
12045 Specifies a program to be run to test some condition, e.g., the machine
12046 architecture, or the window system in use, to determine whether or not
12047 this mailcap entry applies.
12048 If the test fails, a subsequent mailcap entry should be sought; also see
12049 .Cd x-mailx-test-once .
12052 .It Cd needsterminal
12053 This flag field indicates that the given shell command must be run on
12054 an interactive terminal.
12055 \*(UA will temporarily release the terminal to the given command in
12056 interactive mode, in non-interactive mode this entry will be entirely
12057 ignored; this flag implies
12058 .Cd x-mailx-noquote .
12061 .It Cd copiousoutput
12062 A flag field which indicates that the output of the
12064 command will be an extended stream of textual output that can be
12065 (re)integrated into \*(UA's normal visual display.
12066 It is mutually exclusive with
12067 .Cd needsterminal .
12069 .It Cd textualnewlines
12070 A flag field which indicates that this type of data is line-oriented and
12071 that, if encoded in
12073 all newlines should be converted to canonical form (CRLF) before
12074 encoding, and will be in that form after decoding.
12075 (Currently unused.)
12077 .It Cd nametemplate
12078 This field gives a filename format, in which
12080 will be replaced by a random string, the joined combination of which
12081 will be used as the filename denoted by
12082 .Ev MAILX_FILENAME_TEMPORARY .
12083 One could specify that a GIF file being passed to an image viewer should
12084 have a name ending in
12087 .Ql nametemplate=%s.gif .
12088 Note that \*(UA ignores the name template unless that solely specifies
12089 a filename suffix that consists of (ASCII) alphabetic and numeric
12090 characters, the underscore and dot only.
12093 Names a file, in X11 bitmap (xbm) format, which points to an appropriate
12094 icon to be used to visually denote the presence of this kind of data.
12095 This field is not used by \*(UA.
12098 A textual description that describes this type of data.
12101 .It Cd x-mailx-even-if-not-interactive
12102 An extension flag test field \(em by default handlers without
12104 are entirely ignored in non-interactive mode, but if this flag is set
12105 then their use will be considered.
12106 It is an error if this flag is set for commands that use the flag
12107 .Cd needsterminal .
12110 .It Cd x-mailx-noquote
12111 An extension flag field that indicates that even a
12114 command shall not be used to generate message quotes
12115 (as it would be by default).
12118 .It Cd x-mailx-async
12119 Extension flag field that denotes that the given
12121 command shall be executed asynchronously, without blocking \*(UA.
12122 Cannot be used in conjunction with
12123 .Cd needsterminal .
12126 .It Cd x-mailx-test-once
12127 Extension flag which denotes whether the given
12129 command shall be evaluated once only and the (boolean) result be cached.
12130 This is handy if some global unchanging condition is to be queried, like
12131 .Dq running under the X Window System .
12134 .It Cd x-mailx-tmpfile
12135 Extension flag field that requests creation of a zero-sized temporary
12136 file, the name of which is to be placed in the environment variable
12137 .Ev MAILX_FILENAME_TEMPORARY .
12138 It is an error to use this flag with commands that include a
12143 .It Cd x-mailx-tmpfile-fill
12144 Normally the MIME part content is passed to the handler via standard
12145 input; if this flag is set then the data will instead be written into
12147 .Cd x-mailx-tmpfile .
12148 In order to cause deletion of the temporary file you will have to set
12149 .Cd x-mailx-tmpfile-unlink
12151 It is an error to use this flag with commands that include a
12156 .It Cd x-mailx-tmpfile-unlink
12157 Extension flag field that requests that the temporary file shall be
12158 deleted automatically when the command loop is entered again at latest.
12159 (Do not use this for asynchronous handlers.)
12160 It is an error to use this flag with commands that include a
12162 format, or in conjunction with
12163 .Cd x-mailx-async ,
12164 or without also setting
12165 .Cd x-mailx-tmpfile
12167 .Cd x-mailx-tmpfile-fill .
12170 .It Cd x-mailx-tmpfile-keep
12173 implies the three tmpfile related flags above, but if you want, e.g.,
12175 and deal with the temporary file yourself, you can add in this flag to
12177 .Cd x-mailx-tmpfile-unlink .
12182 The standard includes the possibility to define any number of additional
12183 entry fields, prefixed by
12185 Flag fields apply to the entire
12187 entry \(em in some unusual cases, this may not be desirable, but
12188 differentiation can be accomplished via separate entries, taking
12189 advantage of the fact that subsequent entries are searched if an earlier
12190 one does not provide enough information.
12193 command needs to specify the
12197 command shall not, the following will help out the latter (with enabled
12201 level \*(UA will show information about handler evaluation):
12203 .Bd -literal -offset indent
12204 application/postscript; ps-to-terminal %s; needsterminal
12205 application/postscript; ps-to-terminal %s; compose=idraw %s
12209 In fields any occurrence of the format string
12211 will be replaced by the
12214 Named parameters from the
12216 field may be placed in the command execution line using
12218 followed by the parameter name and a closing
12221 The entire parameter should appear as a single command line argument,
12222 regardless of embedded spaces; thus:
12224 .Bd -literal -offset indent
12226 Content-type: multipart/mixed; boundary=42
12229 multipart/*; /usr/local/bin/showmulti \e
12230 %t %{boundary} ; composetyped = /usr/local/bin/makemulti
12232 # Executed shell command
12233 /usr/local/bin/showmulti multipart/mixed 42
12237 .\" TODO v15: Mailcap: %n,%F
12238 Note that \*(UA does not support handlers for multipart MIME parts as
12239 shown in this example (as of today).
12240 \*(UA does not support the additional formats
12244 An example file, also showing how to properly deal with the expansion of
12246 which includes any quotes that are necessary to make it a valid shell
12247 argument by itself and thus will cause undesired behaviour when placed
12248 in additional user-provided quotes:
12250 .Bd -literal -offset indent
12252 text/richtext; richtext %s; copiousoutput
12254 text/x-perl; perl -cWT %s
12256 application/pdf; \e
12258 trap "rm -f ${infile}" EXIT\e; \e
12259 trap "exit 75" INT QUIT TERM\e; \e
12261 x-mailx-async; x-mailx-tmpfile-keep
12263 application/*; echo "This is \e"%t\e" but \e
12264 is 50 \e% Greek to me" \e; < %s head -c 1024 | cat -vET; \e
12265 copiousoutput; x-mailx-noquote
12270 .Sx "HTML mail and MIME attachments" ,
12271 .Sx "The mime.types files" ,
12274 .Va mime-counter-evidence ,
12275 .Va pipe-TYPE/SUBTYPE ,
12276 .Va pipe-EXTENSION .
12279 .\" .Ss "The .netrc file" {{{
12280 .Ss "The .netrc file"
12284 file contains user credentials for machine accounts.
12285 The default location in the user's
12287 directory may be overridden by the
12289 environment variable.
12290 The file consists of space, tabulator or newline separated tokens.
12291 \*(UA implements a parser that supports a superset of the original BSD
12292 syntax, but users should nonetheless be aware of portability glitches
12293 of that file format, shall their
12295 be usable across multiple programs and platforms:
12298 .Bl -bullet -compact
12300 BSD does not support single, but only double quotation marks, e.g.,
12301 .Ql password="pass with spaces" .
12303 BSD (only?) supports escaping of single characters via a reverse solidus
12304 (e.g., a space can be escaped via
12306 in- as well as outside of a quoted string.
12308 BSD does not require a final quotation mark of the last user input token.
12310 The original BSD (Berknet) parser also supported a format which allowed
12311 tokens to be separated with commas \(en whereas at least Hewlett-Packard
12312 still seems to support this syntax, \*(UA does not!
12314 As a non-portable extension some widely-used programs support
12315 shell-style comments: if an input line starts, after any amount of
12316 whitespace, with a number sign
12318 then the rest of the line is ignored.
12320 Whereas other programs may require that the
12322 file is accessible by only the user if it contains a
12324 token for any other
12328 \*(UA will always require these strict permissions.
12332 Of the following list of supported tokens \*(UA only uses (and caches)
12337 At runtime the command
12339 can be used to control \*(UA's
12343 .Bl -tag -width ".It Cd BaNg"
12344 .It Cd machine Ar name
12345 The hostname of the entries' machine, lowercase-normalized by \*(UA
12347 Any further file content, until either end-of-file or the occurrence
12352 first-class token is bound (only related) to the machine
12355 As an extension that should not be the cause of any worries
12356 \*(UA supports a single wildcard prefix for
12358 .Bd -literal -offset indent
12359 machine *.example.com login USER password PASS
12360 machine pop3.example.com login USER password PASS
12361 machine smtp.example.com login USER password PASS
12367 .Ql pop3.example.com ,
12371 .Ql local.smtp.example.com .
12372 Note that in the example neither
12373 .Ql pop3.example.com
12375 .Ql smtp.example.com
12376 will be matched by the wildcard, since the exact matches take
12377 precedence (it is however faster to specify it the other way around).
12380 This is the same as
12382 except that it is a fallback entry that is used shall none of the
12383 specified machines match; only one default token may be specified,
12384 and it must be the last first-class token.
12386 .It Cd login Ar name
12387 The user name on the remote machine.
12389 .It Cd password Ar string
12390 The user's password on the remote machine.
12392 .It Cd account Ar string
12393 Supply an additional account password.
12394 This is merely for FTP purposes.
12396 .It Cd macdef Ar name
12398 A macro is defined with the specified
12400 it is formed from all lines beginning with the next line and continuing
12401 until a blank line is (consecutive newline characters are) encountered.
12404 entries cannot be utilized by multiple machines, too, but must be
12405 defined following the
12407 they are intended to be used with.)
12410 exists, it is automatically run as the last step of the login process.
12411 This is merely for FTP purposes.
12418 .\" .Sh EXAMPLES {{{
12421 .\" .Ss "An example configuration" {{{
12422 .Ss "An example configuration"
12424 .Bd -literal -offset indent
12425 # This example assumes v15.0 compatibility mode
12428 # Request strict transport security checks!
12429 set ssl-verify=strict
12431 # Where are the up-to-date SSL certificates?
12432 # (Since we manage up-to-date ones explicitly, do not use any,
12433 # possibly outdated, default certificates shipped with OpenSSL)
12434 #set ssl-ca-dir=/etc/ssl/certs
12435 set ssl-ca-file=/etc/ssl/certs/ca-certificates.crt
12436 set ssl-ca-no-defaults
12437 #set ssl-ca-flags=partial-chain
12438 wysh set smime-ca-file="${ssl-ca-file}" \e
12439 smime-ca-no-defaults #smime-ca-flags="${ssl-ca-flags}"
12441 # Do not use protocols older than TLS v1.2.
12442 # Change this only when the remote server does not support it:
12443 # maybe use ssl-protocol-HOST (or -USER@HOST) syntax to define
12444 # such explicit exceptions, then, e.g.
12445 # set ssl-protocol-exam.ple='-ALL,+TLSv1.1'
12446 set ssl-protocol='-ALL,+TLSv1.2'
12448 # Explicitly define the list of ciphers, which may improve security,
12449 # especially with protocols older than TLS v1.2. See ciphers(1).
12450 # Including "@STRENGTH" will sort the final list by algorithm strength.
12451 # In reality it is possibly best to only use ssl-cipher-list-HOST
12452 # (or -USER@HOST), as necessary, again..
12453 set ssl-cipher-list=TLSv1.2:!aNULL:!eNULL:@STRENGTH
12455 # - TLSv1.2:!aNULL:!eNULL:\e
12456 # ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:\e
12457 # DHE-RSA-AES256-SHA:@STRENGTH
12458 # -ALL:!aNULL:!eNULL:!MEDIUM:!LOW:!MD5:!RC4:!EXPORT:@STRENGTH
12459 # Especially with TLSv1.3 curves selection may be desired:
12460 #set ssl-curves=P-521:P-384:P-256
12462 # Essential setting: select allowed character sets
12463 set sendcharsets=utf-8,iso-8859-1
12465 # A very kind option: when replying to a message, first try to
12466 # use the same encoding that the original poster used herself!
12467 set reply-in-same-charset
12469 # When replying, do not merge From: and To: of the original message
12470 # into To:. Instead old From: -> new To:, old To: -> merge Cc:.
12471 set recipients-in-cc
12473 # When sending messages, wait until the Mail-Transfer-Agent finishs.
12474 # Only like this you will be able to see errors reported through the
12475 # exit status of the MTA (including the built-in SMTP one)!
12478 # Only use built-in MIME types, no mime.types(5) files
12479 set mimetypes-load-control
12481 # Default directory where we act in (relative to $HOME)
12483 # A leading "+" (often) means: under *folder*
12484 # *record* is used to save copies of sent messages
12485 set MBOX=+mbox.mbox DEAD=+dead.txt \e
12486 record=+sent.mbox record-files record-resent
12488 # Make "file mymbox" and "file myrec" go to..
12489 shortcut mymbox %:+mbox.mbox myrec +sent.mbox
12491 # Not really optional, e.g., for S/MIME
12492 set from='Your Name <address@exam.ple>'
12494 # It may be necessary to set hostname and/or smtp-hostname
12495 # if the "SERVER" of mta and "domain" of from do not match.
12496 # The `urlencode' command can be used to encode USER and PASS
12497 set mta=(smtps?|submission)://[USER[:PASS]@]SERVER[:PORT] \e
12498 smtp-auth=login/plain... \e
12501 # Never refuse to start into interactive mode, and more
12503 colour-pager crt= \e
12504 followup-to followup-to-honour=ask-yes \e
12505 history-file=+.\*(uAhist history-size=-1 history-gabby \e
12506 mime-counter-evidence=0xE \e
12507 prompt='?\e$?!\e$!/\e$^ERRNAME[\e$account#\e$mailbox-display]? ' \e
12508 reply-to-honour=ask-yes \e
12511 # Only include the selected header fields when typing messages
12512 headerpick type retain from_ date from to cc subject \e
12513 message-id mail-followup-to reply-to
12514 # ...when forwarding messages
12515 headerpick forward retain subject date from to cc
12516 # ...when saving message, etc.
12517 #headerpick save ignore ^Original-.*$ ^X-.*$
12519 # Some mailing lists
12520 mlist '@xyz-editor\e.xyz$' '@xyzf\e.xyz$'
12521 mlsubscribe '^xfans@xfans\e.xyz$'
12523 # Handle a few file extensions (to store MBOX databases)
12524 filetype bz2 'bzip2 -dc' 'bzip2 -zc' \e
12525 gz 'gzip -dc' 'gzip -c' xz 'xz -dc' 'xz -zc' \e
12526 zst 'zstd -dc' 'zstd -19 -zc' \e
12527 zst.pgp 'gpg -d | zstd -dc' 'zstd -19 -zc | gpg -e'
12529 # A real life example of a very huge free mail provider
12530 # Instead of directly placing content inside `account',
12531 # we `define' a macro: like that we can switch "accounts"
12532 # from within *on-compose-splice*, for example!
12534 set folder=~/spool/XooglX inbox=+syste.mbox sent=+sent
12535 set from='Your Name <address@examp.ple>'
12536 set mta=smtp://USER:PASS@smtp.gmXil.com smtp-use-starttls
12542 # Here is a pretty large one which does not allow sending mails
12543 # if there is a domain name mismatch on the SMTP protocol level,
12544 # which would bite us if the value of from does not match, e.g.,
12545 # for people who have a sXXXXeforge project and want to speak
12546 # with the mailing list under their project account (in from),
12547 # still sending the message through their normal mail provider
12549 set folder=~/spool/XandeX inbox=+syste.mbox sent=+sent
12550 set from='Your Name <address@exam.ple>'
12551 set mta=smtps://USER:PASS@smtp.yaXXex.ru:465 \e
12552 hostname=yaXXex.com smtp-hostname=
12558 # Create some new commands so that, e.g., `ls /tmp' will..
12559 commandalias lls '!ls ${LS_COLOR_FLAG} -aFlrS'
12560 commandalias llS '!ls ${LS_COLOR_FLAG} -aFlS'
12562 # We do not support gpg(1) directly yet. But simple --clearsign'd
12563 # message parts can be dealt with as follows:
12566 wysh set pipe-text/plain=$'@*#++=@\e
12567 < "${MAILX_FILENAME_TEMPORARY}" awk \e
12568 -v TMPFILE="${MAILX_FILENAME_TEMPORARY}" \e'\e
12570 /^-----BEGIN PGP SIGNED MESSAGE-----/,/^$/ {\e
12573 print "--- GPG --verify ---";\e
12574 system("gpg --verify " TMPFILE " 2>&1");\e
12575 print "--- GPG --verify ---";\e
12579 /^-----BEGIN PGP SIGNATURE-----/,\e
12580 /^-----END PGP SIGNATURE-----/{\e
12587 commandalias V '\e'call V
12591 When storing passwords in
12593 appropriate permissions should be set on this file with
12594 .Ql $ chmod 0600 \*(ur .
12597 is available user credentials can be stored in the central
12599 file instead; e.g., here is a different version of the example account
12600 that sets up SMTP and POP3:
12602 .Bd -literal -offset indent
12604 set folder=~/spool/XandeX inbox=+syste.mbox sent=+sent
12605 set from='Your Name <address@exam.ple>'
12607 # Load an encrypted ~/.netrc by uncommenting the next line
12608 #set netrc-pipe='gpg -qd ~/.netrc.pgp'
12610 set mta=smtps://smtp.yXXXXx.ru:465 \e
12611 smtp-hostname= hostname=yXXXXx.com
12612 set pop3-keepalive=240 pop3-no-apop-pop.yXXXXx.ru
12613 commandalias xp fi pop3s://pop.yXXXXx.ru
12625 .Bd -literal -offset indent
12626 machine *.yXXXXx.ru login USER password PASS
12630 This configuration should now work just fine:
12633 .Dl $ echo text | \*(uA -dvv -AXandeX -s Subject user@exam.ple
12636 .\" .Ss "S/MIME step by step" {{{
12637 .Ss "S/MIME step by step"
12639 \*(OP The first thing you need for participating in S/MIME message
12640 exchange is your personal certificate, including a private key.
12641 The certificate contains public information, in particular your name and
12642 your email address(es), and the public key that is used by others to
12643 encrypt messages for you,
12644 and to verify signed messages they supposedly received from you.
12645 The certificate is included in each signed message you send.
12646 The private key must be kept secret.
12647 It is used to decrypt messages that were previously encrypted with your
12648 public key, and to sign messages.
12651 For personal use it is recommended that you get a S/MIME certificate
12652 from one of the major CAs on the Internet using your WWW browser.
12653 Many CAs offer such certificates for free.
12655 .Lk https://www.CAcert.org
12656 which issues client and server certificates to members of their
12657 community for free; their root certificate
12658 .Pf ( Lk https://\:www.cacert.org/\:certs/\:root.crt )
12659 is often not in the default set of trusted CA root certificates, though,
12660 which means you will have to download their root certificate separately
12661 and ensure it is part of our S/MIME certificate validation chain by
12664 or as a vivid member of the
12665 .Va smime-ca-file .
12666 But let us take a step-by-step tour on how to setup S/MIME with
12667 a certificate from CAcert.org despite this situation!
12670 First of all you will have to become a member of the CAcert.org
12671 community, simply by registrating yourself via the web interface.
12672 Once you are, create and verify all email addresses you want to be able
12673 to create signed and encrypted messages for/with using the corresponding
12674 entries of the web interface.
12675 Now ready to create S/MIME certificates, so let us create a new
12676 .Dq client certificate ,
12677 ensure to include all email addresses that should be covered by the
12678 certificate in the following web form, and also to use your name as the
12682 Create a private key and a certificate request on your local computer
12683 (please see the manual pages of the used commands for more in-depth
12684 knowledge on what the used arguments etc. do):
12687 .Dl $ openssl req -nodes -newkey rsa:4096 -keyout key.pem -out creq.pem
12690 Afterwards copy-and-paste the content of
12692 into the certificate-request (CSR) field of the web form on the
12693 CAcert.org website (you may need to unfold some
12694 .Dq advanced options
12695 to see the corresponding text field).
12696 This last step will ensure that your private key (which never left your
12697 box) and the certificate belong together (through the public key that
12698 will find its way into the certificate via the certificate-request).
12699 You are now ready and can create your CAcert certified certificate.
12700 Download and store or copy-and-paste it as
12705 In order to use your new S/MIME setup a combined private key/public key
12706 (certificate) file has to be created:
12709 .Dl $ cat key.pem pub.crt > ME@HERE.com.paired
12712 This is the file \*(UA will work with.
12713 If you have created your private key with a passphrase then \*(UA will
12714 ask you for it whenever a message is signed or decrypted.
12715 Set the following variables to henceforth use S/MIME (setting
12717 is of interest for verification only):
12719 .Bd -literal -offset indent
12720 ? set smime-ca-file=ALL-TRUSTED-ROOT-CERTS-HERE \e
12721 smime-sign-cert=ME@HERE.com.paired \e
12722 smime-sign-message-digest=SHA256 \e
12728 .\" .Ss "Using CRLs with S/MIME or SSL/TLS" {{{
12729 .Ss "Using CRLs with S/MIME or SSL/TLS"
12731 \*(OP Certification authorities (CAs) issue certificate revocation
12732 lists (CRLs) on a regular basis.
12733 These lists contain the serial numbers of certificates that have been
12734 declared invalid after they have been issued.
12735 Such usually happens because the private key for the certificate has
12737 because the owner of the certificate has left the organization that is
12738 mentioned in the certificate, etc.
12739 To seriously use S/MIME or SSL/TLS verification,
12740 an up-to-date CRL is required for each trusted CA.
12741 There is otherwise no method to distinguish between valid and
12742 invalidated certificates.
12743 \*(UA currently offers no mechanism to fetch CRLs, nor to access them on
12744 the Internet, so they have to be retrieved by some external mechanism.
12747 \*(UA accepts CRLs in PEM format only;
12748 CRLs in DER format must be converted, like, e.\|g.:
12751 .Dl $ openssl crl \-inform DER \-in crl.der \-out crl.pem
12754 To tell \*(UA about the CRLs, a directory that contains all CRL files
12755 (and no other files) must be created.
12760 variables, respectively, must then be set to point to that directory.
12761 After that, \*(UA requires a CRL to be present for each CA that is used
12762 to verify a certificate.
12771 In general it is a good idea to turn on
12777 twice) if something does not work well.
12778 Very often a diagnostic message can be produced that leads to the
12779 problems' solution.
12781 .\" .Ss "\*(UA shortly hangs on startup" {{{
12782 .Ss "\*(UA shortly hangs on startup"
12784 This can have two reasons, one is the necessity to wait for a file lock
12785 and cannot be helped, the other being that \*(UA calls the function
12787 in order to query the nodename of the box (sometimes the real one is
12788 needed instead of the one represented by the internal variable
12790 One may have varying success by ensuring that the real hostname and
12794 or, more generally, that the name service is properly setup \(en
12797 return the expected value?
12798 Does this local hostname have a domain suffix?
12799 RFC 6762 standardized the link-local top-level domain
12801 try again after adding an (additional) entry with this extension.
12804 .\" .Ss "I cannot login to Google mail aka GMail" {{{
12805 .Ss "I cannot login to Google mail aka GMail"
12807 Since 2014 some free service providers classify programs as
12809 unless they use a special authentification method (OAuth 2.0) which
12810 was not standardized for non-HTTP protocol authentication token query
12811 until August 2015 (RFC 7628).
12814 Different to Kerberos / GSSAPI, which is developed since the mid of the
12815 1980s, where a user can easily create a local authentication ticket for
12816 her- and himself with the locally installed
12818 program, that protocol has no such local part but instead requires
12819 a world-wide-web query to create or fetch a token; since there is no
12820 local cache this query would have to be performed whenever \*(UA is
12821 invoked (in interactive sessions situation may differ).
12824 \*(UA does not support OAuth.
12825 Because of this it is necessary to declare \*(UA a
12826 .Dq less secure app
12827 (on the providers account web page) in order to read and send mail.
12828 However, it also seems possible to take the following steps instead:
12833 give the provider the number of a mobile phone,
12836 .Dq 2-Step Verification ,
12838 create an application specific password (16 characters), and
12840 use that special password instead of the real Google account password in
12841 \*(UA (for more on that see the section
12842 .Sx "On URL syntax and credential lookup" ) .
12846 .\" .Ss "Not \(dqdefunctional\(dq, but the editor key does not work" {{{
12847 .Ss "Not \(dqdefunctional\(dq, but the editor key does not work"
12849 It can happen that the terminal library (see
12850 .Sx "On terminal control and line editor",
12853 reports different codes than the terminal really sends, in which case
12854 \*(UA will tell that a key binding is functional, but will not be able to
12855 recognize it because the received data does not match anything expected.
12856 Especially without the \*(OPal terminal capability library support one
12857 reason for this may be that the (possibly even non-existing) keypad
12858 is not turned on and the resulting layout reports the keypad control
12859 codes for the normal keyboard keys.
12864 ings will show the byte sequences that are expected.
12867 To overcome the situation, use, e.g., the program
12869 in conjunction with the command line option
12871 if available, to see the byte sequences which are actually produced
12872 by keypresses, and use the variable
12874 to make \*(UA aware of them.
12875 E.g., the terminal this is typed on produces some false sequences, here
12876 an example showing the shifted home key:
12878 .Bd -literal -offset indent
12881 # 1B 5B=[ 31=1 3B=; 32=2 48=H
12886 ? \*(uA -v -Stermcap='kHOM=\eE[H'
12896 .\" .Sh "IMAP CLIENT" {{{
12899 \*(OPally there is IMAP client support available.
12900 This part of the program is obsolete and will vanish in v15 with the
12901 large MIME and I/O layer rewrite, because it uses old-style blocking I/O
12902 and makes excessive use of signal based long code jumps.
12903 Support can hopefully be readded later based on a new-style I/O, with
12904 SysV signal handling.
12905 In fact the IMAP support had already been removed from the codebase, but
12906 was reinstantiated on user demand: in effect the IMAP code is at the
12907 level of \*(UA v14.8.16 (with
12909 being the sole exception), and should be treated with some care.
12916 protocol prefixes, and an IMAP-based
12919 IMAP URLs (paths) undergo inspections and possible transformations
12920 before use (and the command
12922 can be used to manually apply them to any given argument).
12923 Hierarchy delimiters are normalized, a step which is configurable via the
12925 variable chain, but defaults to the first seen delimiter otherwise.
12926 \*(UA supports internationalised IMAP names, and en- and decodes the
12927 names from and to the
12929 as necessary and possible.
12930 If a mailbox name is expanded (see
12931 .Sx "Filename transformations" )
12932 to an IMAP mailbox, all names that begin with `+' then refer to IMAP
12933 mailboxes below the
12935 target box, while folder names prefixed by `@' refer to folders below
12936 the hierarchy base.
12939 Note: some IMAP servers do not accept the creation of mailboxes in
12940 the hierarchy base, but require that they are created as subfolders of
12941 `INBOX' \(en with such servers a folder name of the form
12943 .Dl imaps://mylogin@imap.myisp.example/INBOX.
12945 should be used (the last character is the server's hierarchy
12947 The following IMAP-specific commands exist:
12950 .Bl -tag -width ".It Ic BaNg"
12953 Only applicable to cached IMAP mailboxes;
12954 takes a message list and reads the specified messages into the IMAP
12959 If operating in disconnected mode on an IMAP mailbox,
12960 switch to online mode and connect to the mail server while retaining
12961 the mailbox status.
12962 See the description of the
12964 variable for more information.
12968 If operating in online mode on an IMAP mailbox,
12969 switch to disconnected mode while retaining the mailbox status.
12970 See the description of the
12973 A list of messages may optionally be given as argument;
12974 the respective messages are then read into the cache before the
12975 connection is closed, thus
12977 makes the entire mailbox available for disconnected use.
12981 Sends command strings directly to the current IMAP server.
12982 \*(UA operates always in IMAP `selected state' on the current mailbox;
12983 commands that change this will produce undesirable results and should be
12985 Useful IMAP commands are:
12986 .Bl -tag -offset indent -width ".Ic getquotearoot"
12988 Takes the name of an IMAP mailbox as an argument and creates it.
12990 (RFC 2087) Takes the name of an IMAP mailbox as an argument
12991 and prints the quotas that apply to the mailbox.
12992 Not all IMAP servers support this command.
12994 (RFC 2342) Takes no arguments and prints the Personal Namespaces,
12995 the Other User's Namespaces and the Shared Namespaces.
12996 Each namespace type is printed in parentheses;
12997 if there are multiple namespaces of the same type,
12998 inner parentheses separate them.
12999 For each namespace a prefix and a hierarchy separator is listed.
13000 Not all IMAP servers support this command.
13005 Perform IMAP path transformations.
13009 .Sx "Command modifiers" ) ,
13010 and manages the error number
13012 The first argument specifies the operation:
13014 normalizes hierarchy delimiters (see
13016 and converts the strings from the locale
13018 to the internationalized variant used by IMAP,
13020 performs the reverse operation.
13025 The following IMAP-specific internal variables exist:
13028 .Bl -tag -width ".It Va BaNg"
13030 .It Va disconnected
13031 \*(BO When an IMAP mailbox is selected and this variable is set,
13032 no connection to the server is initiated.
13033 Instead, data is obtained from the local cache (see
13036 Mailboxes that are not present in the cache
13037 and messages that have not yet entirely been fetched from the server
13039 to fetch all messages in a mailbox at once,
13041 .No ` Ns Li copy * /dev/null Ns '
13042 can be used while still in connected mode.
13043 Changes that are made to IMAP mailboxes in disconnected mode are queued
13044 and committed later when a connection to that server is made.
13045 This procedure is not completely reliable since it cannot be guaranteed
13046 that the IMAP unique identifiers (UIDs) on the server still match the
13047 ones in the cache at that time.
13050 when this problem occurs.
13052 .It Va disconnected-USER@HOST
13053 The specified account is handled as described for the
13056 but other accounts are not affected.
13059 .It Va imap-auth-USER@HOST , imap-auth
13060 Sets the IMAP authentication method.
13061 Valid values are `login' for the usual password-based authentication
13063 `cram-md5', which is a password-based authentication that does not send
13064 the password over the network in clear text,
13065 and `gssapi' for GSS-API based authentication.
13069 Enables caching of IMAP mailboxes.
13070 The value of this variable must point to a directory that is either
13071 existent or can be created by \*(UA.
13072 All contents of the cache can be deleted by \*(UA at any time;
13073 it is not safe to make assumptions about them.
13076 .It Va imap-delim-USER@HOST , imap-delim-HOST , imap-delim
13077 The hierarchy separator used by the IMAP server.
13078 Whenever an IMAP path is specified it will undergo normalization.
13079 One of the normalization steps is the squeezing and adjustment of
13080 hierarchy separators.
13081 If this variable is set, any occurrence of any character of the given
13082 value that exists in the path will be replaced by the first member of
13083 the value; an empty value will cause the default to be used, it is
13085 If not set, we will reuse the first hierarchy separator character that
13086 is discovered in a user-given mailbox name.
13088 .Mx Va imap-keepalive
13089 .It Va imap-keepalive-USER@HOST , imap-keepalive-HOST , imap-keepalive
13090 IMAP servers may close the connection after a period of
13091 inactivity; the standard requires this to be at least 30 minutes,
13092 but practical experience may vary.
13093 Setting this variable to a numeric `value' greater than 0 causes
13094 a `NOOP' command to be sent each `value' seconds if no other operation
13098 .It Va imap-list-depth
13099 When retrieving the list of folders on an IMAP server, the
13101 command stops after it has reached a certain depth to avoid possible
13103 The value of this variable sets the maximum depth allowed.
13105 If the folder separator on the current IMAP server is a slash `/',
13106 this variable has no effect and the
13108 command does not descend to subfolders.
13110 .Mx Va imap-use-starttls
13111 .It Va imap-use-starttls-USER@HOST , imap-use-starttls-HOST , imap-use-starttls
13112 Causes \*(UA to issue a `STARTTLS' command to make an unencrypted
13113 IMAP session SSL/TLS encrypted.
13114 This functionality is not supported by all servers,
13115 and is not used if the session is already encrypted by the IMAPS method.
13121 .\" .Sh "SEE ALSO" {{{
13131 .Xr spamassassin 1 ,
13140 .Xr mailwrapper 8 ,
13146 .\" .Sh HISTORY {{{
13149 M. Douglas McIlroy writes in his article
13150 .Dq A Research UNIX Reader: Annotated Excerpts \
13151 from the Programmer's Manual, 1971-1986
13154 command already appeared in First Edition
13158 .Bd -ragged -offset indent
13159 Electronic mail was there from the start.
13160 Never satisfied with its exact behavior, everybody touched it at one
13161 time or another: to assure the safety of simultaneous access, to improve
13162 privacy, to survive crashes, to exploit uucp, to screen out foreign
13163 freeloaders, or whatever.
13164 Not until v7 did the interface change (Thompson).
13165 Later, as mail became global in its reach, Dave Presotto took charge and
13166 brought order to communications with a grab-bag of external networks
13172 Mail was written in 1978 by Kurt Shoens and developed as part of the
13175 distribution until 1995.
13176 Mail has then seen further development in open source
13178 variants, noticeably by Christos Zoulas in
13180 Based upon this Nail, later Heirloom Mailx, was developed by Gunnar
13181 Ritter in the years 2000 until 2008.
13182 Since 2012 S-nail is maintained by Steffen (Daode) Nurpmeso.
13183 This man page is derived from
13184 .Dq The Mail Reference Manual
13185 that was originally written by Kurt Shoens.
13192 .An "Kurt Shoens" ,
13193 .An "Edward Wang" ,
13194 .An "Keith Bostic" ,
13195 .An "Christos Zoulas" ,
13196 .An "Gunnar Ritter" ,
13197 .An "Steffen Nurpmeso" .
13204 provide contact addresses:
13206 .\" v15-compat: drop eval as `mail' will expand variable?
13207 .Dl ? echo $contact-web; eval mail $contact-mail
13210 .\" .Sh CAVEATS {{{
13213 \*(ID Interrupting an operation via
13217 from anywhere else but a command prompt is very problematic and likely
13218 to leave the program in an undefined state: many library functions
13219 cannot deal with the
13221 that this software (still) performs; even though efforts have been taken
13222 to address this, no sooner but in v15 it will have been worked out:
13223 interruptions have not been disabled in order to allow forceful breakage
13224 of hanging network connections, for example (all this is unrelated to
13228 The SMTP and POP3 protocol support of \*(UA is very basic.
13229 Also, if it fails to contact its upstream SMTP server, it will not make
13230 further attempts to transfer the message at a later time (setting
13235 If this is a concern, it might be better to set up a local SMTP server
13236 that is capable of message queuing.
13243 After deleting some message of a POP3 mailbox the header summary falsely
13244 claims that there are no messages to display, one needs to perform
13245 a scroll or dot movement to restore proper state.
13247 In threaded display a power user may encounter crashes very
13248 occasionally (this is may and very).
13252 in the source repository lists future directions.