Bump S-nail v14.9.0-pre2, 2016-10-31
[s-mailx.git] / nail.1
blob7644c70d082315effc5e49cac608818b3a7187ed
1 .\"@ nail.1 - S-nail(1) reference manual.
2 .\"
3 .\" Copyright (c) 2000-2008 Gunnar Ritter, Freiburg i. Br., Germany.
4 .\" Copyright (c) 2012 - 2016 Steffen (Daode) Nurpmeso <steffen@sdaoden.eu>.
5 .\"
6 .\" Copyright (c) 1980, 1990, 1993
7 .\"      The Regents of the University of California.  All rights reserved.
8 .\"
9 .\" Redistribution and use in source and binary forms, with or without
10 .\" modification, are permitted provided that the following conditions
11 .\" are met:
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.
20 .\"
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
31 .\" SUCH DAMAGE.
32 .\"
33 .\"--MKREL-START--
34 .\"@ S-nail(1): v14.9.0-pre2 / 2016-10-31
35 .Dd Oct 31, 2016
36 .ds VV \\%v14.9.0-pre2
37 .\"--MKREL-END--
38 .\"--MKMAN-START--
39 .ds UU \\%S-NAIL
40 .ds UA \\%S-nail
41 .ds uA \\%s-nail
42 .ds UR \\%s-nail.rc
43 .\"--MKMAN-END--
44 .\" --BEGINSTRIP--
45 .\"
46 .\" If not ~/.mailrc, it breaks POSIX compatibility.  And adjust main.c.
47 .ds ur \\%~/.mailrc
48 .ds OB [Obsolete]
49 .ds OP [Option]
50 .ds IN [v15-compat]
51 .ds OU [no v15-compat]
52 .ds ID [v15 behaviour may differ]
53 .ds NQ [Only new quoting rules]
54 .ds BO (Boolean)
55 .ds RO (Read-only)
57 .Dt "\*(UU" 1
58 .Os
59 .Mx -enable
62 .Sh NAME
63 .Nm \*(UA \%[\*(VV]
64 .Nd send and receive Internet mail
67 .\" .Sh SYNOPSIS {{{
68 .Sh SYNOPSIS
70 .\" Keep in SYNC: ./nail.1:"SYNOPSIS, main()
71 .Nm \*(uA
72 .Fl h | Fl Fl help
73 .Nm \*(uA
74 .Bk -words
75 .Op Fl BdEFintv~
76 .Op Fl \&: Ar spec
77 .Op Fl A Ar account
78 .Op Fl a Ar attachment
79 .Op Fl b Ar bcc-addr
80 .Op Fl c Ar cc-addr
81 .Op Fl M Ar type | Fl m Ar file | Fl q Ar file | Fl t
82 .Op Fl r Ar from-addr
83 .Op Fl S Ar var Ns Op Ns = Ns Ar value
84 .Op Fl s Ar subject
85 .Op Fl X Ar cmd
86 .Op Fl \&.
87 .Ar to-addr ...
88 .Op Fl Fl \~ Ns Ar mta-option ...
89 .Ek
90 .Nm \*(uA
91 .Bk -words
92 .Op Fl BdEeHiNnRv~
93 .Op Fl \&: Ar spec
94 .Op Fl A Ar account
95 .Op Fl L Ar spec-list
96 .Op Fl r Ar from-addr
97 .Op Fl S Ar var Ns Op Ns = Ns Ar value
98 .Op Fl u Ar user
99 .Op Fl X Ar cmd
100 .Op Fl Fl \~ Ns Ar mta-option ...
102 .Nm \*(uA
103 .Bk -words
104 .Op Fl BdEeHiNnRv~#
105 .Op Fl \&: Ar spec
106 .Op Fl A Ar account
107 .Fl f
108 .Op Fl L Ar spec-list
109 .Op Fl r Ar from-addr
110 .Op Fl S Ar var Ns Op Ns = Ns Ar value
111 .Op Fl X Ar cmd
112 .Op Ar file
113 .Op Fl Fl \~ Ns Ar mta-option ...
115 .\" }}}
118 .Mx -toc -tree html pdf ps xhtml
121 .\" .Sh DESCRIPTION {{{
122 .Sh DESCRIPTION
124 .Bd -filled -compact -offset indent
125 .Sy Compatibility note:
126 S-nail (\*(UA) will wrap up into \%S-mailx in v15.0 (circa 2018).
127 Backward incompatibility has to be expected \(en
128 .Sx COMMANDS
129 will use
130 .Xr \&\&sh 1 Ns
131 -style argument quoting rules, for example.
132 New and old behaviour is flagged \*(IN and \*(OU, and setting
133 .Va v15-compat ,
134 one of the many
135 .Sx "INTERNAL VARIABLES" ,
136 will choose new behaviour when applicable.
137 \*(OB flags what will vanish, and enabling
138 .Fl d
140 .Fl v
141 enables obsoletion warnings.
145 \*(UA is a mail processing system with a command syntax reminiscent of
146 .Xr ed 1
147 with lines replaced by messages.
148 It is intended to provide the functionality of the POSIX
149 .Xr mailx 1
150 command, but is MIME capable and optionally offers extensions for
151 line editing, S/MIME, SMTP and POP3 among others.
153 .\" .Ss "Options" {{{
154 .Ss "Options"
156 .Bl -tag -width ".Fl _ Ar _ddr"
158 .It Fl \&: Ar spec
159 Explicitly control which of the
160 .Sx "Resource files"
161 shall be loaded: if the letter
162 .Ql s
163 is (case-insensitively) part of the
164 .Ar spec
165 then the system wide
166 .Pa \*(UR
167 is loaded, likewise the letter
168 .Ql u
169 controls loading of the user's personal
170 .Pa \*(ur
171 file, whereas the letters
172 .Ql -
174 .Ql /
175 explicitly forbid loading of any resource files.
176 This option should be used by scripts: to avoid environmental noise they
177 should
178 .Dq detach
179 from any configuration files and create a script-local environment,
180 explicitly setting any of the desired
181 .Sx "INTERNAL VARIABLES"
183 .Fl S .
184 This option overrides
185 .Fl n .
188 .It Fl A Ar account
189 Executes an
190 .Ic account
191 command for the given user email
192 .Ar account
193 after program startup is complete.
194 Being a special incarnation of
195 .Ic define Ns d
196 macros for the purpose of bundling longer-lived settings, activating
197 such an email account also switches to the accounts system
198 .Va inbox ,
199 for example.
202 .It Fl a Ar file
203 Attach the given file to the message.
204 The same filename conventions as described in the section
205 .Sx COMMANDS
206 apply: shell word expansion is restricted to the tilde
207 .Ql ~ .
208 Shall
209 .Ar file
210 not be accessible but contain a
211 .Ql =
212 character, then anything after the
213 .Ql =
214 is assumed to specify the input character set and anything before
215 .Ql =
216 the filename: this is the only option to specify the input character set
217 (and don't perform any character set conversion) for text attachments
218 from the command line, not using the
219 .Ic ~@
220 tilde escape command.
223 .It Fl B
224 Make standard input and standard output line-buffered.
227 .It Fl b Ar addr
228 Send a blind carbon copy to
229 .Ar addr Ns
230 ess.
231 May be used multiple times.
232 Also see the section
233 .Sx "On sending mail, and non-interactive mode" .
236 .It Fl c Ar addr
237 Send carbon copies to the given receiver.
238 May be used multiple times.
241 .It Fl d
242 .Ic set
243 the internal variable
244 .Va debug
245 which enables debug messages and disables message delivery,
246 among others; effectively turns almost any operation into a dry-run.
249 .It Fl E
250 .Ic set
251 .Va skipemptybody
252 and thus discard messages with an empty message part body.
253 This is useful for sending messages from scripts.
256 .It Fl e
257 Just check if mail is present (in the specified or system
258 .Va inbox ) :
259 if yes, return an exit status of zero, a non-zero value otherwise.
260 To restrict the set of mails to consider in this evaluation a message
261 specification can be added with the option
262 .Fl L .
265 .It Fl F
266 Save the message to send in a file named after the local part of the
267 first recipient's address (instead of in
268 .Va record Ns ).
271 .It Fl f
272 Read in the contents of the user's
273 .Ev MBOX
274 (or the specified file) for processing;
275 when \*(UA is quit, it writes undeleted messages back to this file
276 (but be aware of the
277 .Va hold
278 option).
279 Some special conventions are recognized for the optional
280 .Ar file
281 argument which are documented for the
282 .Ic file
283 command below.
284 Note that
285 .Ar file
286 is not a argument to the flag
287 .Fl \&\&f ,
288 but is instead taken from the command line after option processing has
289 been completed.
290 In order to use a
291 .Ar file
292 that starts with a hyphen, prefix it with a (relative) path, as in
293 .Ql ./-hyphenbox.mbox .
296 .It Fl H
297 Display a summary of the
298 .Ic headers
299 of all messages in the specified mailbox or system
300 .Va inbox
301 and exit.
302 A configurable summary view is available via the
303 .Fl L
304 option.
307 .It Fl h
308 Show a short usage summary.
309 Because of widespread use a
310 .Fl Fl help
311 argument will have the same effect.
314 .It Fl i
315 .Ic set
316 .Va ignore
317 to ignore tty interrupt signals.
320 .It Fl L Ar spec-list
321 Display a summary of all
322 .Ic headers
323 of only those messages in the specified mailbox or the system
324 .Va inbox
325 that match the given
326 .Ar spec-list ,
327 then exit.
328 See the section
329 .Sx "Specifying messages"
330 for the format of
331 .Ar spec-list .
332 If the
333 .Fl e
334 (\*(OB or
335 .Fl H )
336 option has been given in addition no header summary is produced,
337 but \*(UA will instead indicate via its exit status whether
338 .Ar spec-list
339 matched any messages
340 .Pf ( Ql 0 )
341 or not
342 .Pf ( Ql 1 ) ;
343 note that any verbose output is suppressed in this mode and must instead
344 be enabled explicitly (e.g., by using the option
345 .Fl v ) .
348 .It Fl M Ar type
349 Special send mode that will flag standard input with the MIME
350 .Ql Content-Type:
351 set to the given
352 .Ar type
353 and use it as the main message body.
354 \*(ID Using this option will bypass processing of
355 .Va message-inject-head ,
356 .Va signature
358 .Va message-inject-tail .
359 Also see
360 .Fl q , m , t .
363 .It Fl m Ar file
364 Special send mode that will MIME classify the specified
365 .Ar file
366 and use it as the main message body.
367 \*(ID Using this option will bypass processing of
368 .Va message-inject-head ,
369 .Va signature
371 .Va message-inject-tail .
372 Also see
373 .Fl q , M , t .
376 .It Fl N
377 .Pf Un Ic set
378 .Va header
379 and thus inhibit initial display of message headers when reading mail or
380 editing a mail folder.
383 .It Fl n
384 Standard flag that inhibits reading the system wide
385 .Pa \*(UR
386 upon startup.
387 The option
388 .Fl \&:
389 allows more control over the startup sequence; also see
390 .Sx "Resource files" .
393 .It Fl q Ar file
394 Special send mode that will initialize the message body with the
395 contents of the specified
396 .Ar file ,
397 which may be standard input
398 .Ql -
399 only in non-interactive context.
400 Also see
401 .Fl M , m , t .
404 .It Fl R
405 Any folder opened will be in read-only mode.
408 .It Fl r Ar from-addr
410 .Ar from-addr
411 is a valid address then it specifies the envelope sender address to be
412 passed to a file-based
413 .Va mta
414 (Mail-Transfer-Agent) as
415 .Ql -f Ar address
416 when a message is send.
417 Shall
418 .Ar from-addr
419 include a user name, then the address components will be separated and
420 the name part will be passed to file-based
421 .Va mta
422 individually via
423 .Ql -F Ar name .
424 The given
425 .Ar from-addr
426 will also be assigned to the
427 .Va from
428 variable (as via
429 .Ql -Sfrom=from-addr ) ,
430 therefore affecting possible SMTP
431 .Va mta
432 data transfer; note this assignment does not cause value fixation.
434 If instead an empty string is passed as
435 .Ar from-addr
436 then the content of the variable
437 .Va from
438 will be evaluated and used for this purpose whenever the
439 .Va mta
440 is contacted.
441 Note that \*(UA by default, without
442 .Fl \&\&r
443 that is, neither passes
444 .Fl \&\&f
446 .Fl \&\&F
447 flags to a file-based MTA by itself.
450 .It Fl S Ar var Ns Op = Ns value
451 .Ic set
452 the internal
453 .Ar var Ns
454 iable and, in case of a non-boolean variable which has a value, assign
455 .Ar value
456 to it.
457 Even though
458 .Sx "INTERNAL VARIABLES"
459 .Ic \&\&set
461 .Fl S
462 may be overwritten from within resource files,
463 the command line setting will be reestablished after all resource files
464 have been loaded.
467 .It Fl s Ar subject
468 Specify the subject of the to-be-sent message.
471 .It Fl t
472 The message given (on standard input) is expected to contain, separated
473 from the message body by an empty line, a message header with
474 .Ql To: ,
475 .Ql Cc: ,
477 .Ql Bcc:
478 fields giving its recipients, which will be added to any recipients
479 specified on the command line.
480 If a message subject is specified via
481 .Ql Subject:
482 then it'll be used in favour of one given on the command line.
484 Also understood are
485 .Ql Reply-To:
486 (possibly overriding
487 .Va replyto ) ,
488 .Ql Sender:
489 .Pf ( Va sender ) ,
490 .Ql From:
491 .Pf ( Va from
492 and / or option
493 .Fl r ) .
494 .Ql Message-ID: ,
495 .Ql In-Reply-To: ,
496 .Ql References:
498 .Ql Mail-Followup-To: ,
499 by default created automatically dependent on message context, will
500 be used if specified (a special address massage will however still occur
501 for the latter).
502 Any other (even custom) header field is passed through entirely
503 unchanged, and in conjunction with the option
504 .Fl ~
505 it is even possible to embed
506 .Sx TILDE ESCAPES .
507 Also see
508 .Fl M , m , q .
511 .It Fl u Ar user
512 Initially read the primary system mailbox of
513 .Ar user ,
514 appropriate privileges presumed; effectively identical to
515 .Ql -f %user .
518 .It Fl V
519 Show \*(UA's
520 .Va version
521 and exit.
522 The command
523 .Ic version
524 will also show the list of
525 .Va features :
526 .Ql $ \*(uA -Xversion -Xx .
529 .It Fl v
530 .Ic set Ns
531 ting the internal variable
532 .Va verbose
533 enables display of some informational context messages.
534 Using it twice increases the level of verbosity.
537 .It Fl X Ar cmd
538 Add the given (or multiple for a multiline argument)
539 .Ar cmd
540 to the list of commands to be executed (as a unit, just as via
541 .Ic source )
542 before normal operation starts.
543 Correlates with
544 .Fl #
546 .Va batch-exit-on-error ;
547 the only possibility to execute commands in non-interactive mode when
548 reading startup files is actively prohibited.
551 .It Fl ~
552 Enable
553 .Sx TILDE ESCAPES
554 even if not in interactive mode.
555 This can be used to, e.g., automatically format the composed message
556 text before sending the message:
557 .Bd -literal -offset indent
558 $ ( echo 'line    one. Word.     Word2.'; \e
559     echo '~| /usr/bin/fmt -tuw66' ) |\e
560   LC_ALL=C \*(uA -:/ -Sttycharset=UTF-8 -d~ bob@exam.ple
564 .It Fl #
565 Enables batch mode.
566 In batch mode the full set of commands is available, just like in
567 interactive mode, and diverse variable settings and internal states are
568 adjusted for batch necessities, e.g., it
569 .Ic set Ns
571 .Va emptystart ,
572 .Pf no Va header ,
573 .Va quiet ,
574 .Va sendwait ,
575 .Va typescript-mode
576 as well as
577 .Ev MAIL ,
578 .Ev MBOX
580 .Va inbox
581 (the latter three to
582 .Pa /dev/null ) ;
583 processing of
584 .Sx "TILDE ESCAPES"
585 is enabled in compose mode.
586 The following prepares an email message in a batched dry run:
587 .Bd -literal -offset indent
588 $ LC_ALL=C printf 'm bob\en~s ubject\enText\en~.\enx\en' | \e
589   LC_ALL=C \*(uA -:/ -d# -X'alias bob bob@exam.ple'
593 .It Fl \&.
594 This flag forces termination of option processing in order to prevent
595 .Dq option injection
596 (attacks).
597 It also forcefully puts \*(UA into send mode, see
598 .Sx "On sending mail, and non-interactive mode" .
602 In the above list of supported command line options,
603 .Fl d , E , i , N
605 .Fl v
606 are implemented by means of
607 .Ic set Ns
608 ting the respective option, as via
609 .Fl S .
610 .Bk -words
611 .Op Ar mta-option ...
613 arguments that are given at the end of the command line after a
614 .Ql --
615 separator will be passed through to a file-based
616 .Va mta
617 (Mail-Transfer-Agent) and persist for an entire (interactive) session
618 \(en if the setting of
619 .Va expandargv
620 allows their recognition; no such constraints apply to the variable
621 .Va mta-arguments .
622 .\" }}}
624 .\" .Ss "A starter" {{{
625 .Ss "A starter"
627 \*(UA is a direct descendant of
629 Mail, a successor of the Research
631 mail which
632 .Dq was there from the start
633 according to
634 .Sx HISTORY .
637 Mail reference manual begins with the following words:
639 .Bd -ragged -offset indent
640 Mail provides a simple and friendly environment for sending and
641 receiving mail.
642 It divides incoming mail into its constituent messages and allows the
643 user to deal with them in any order.
644 In addition, it provides a set of
645 .Xr ed 1 Ns
646 -like commands for manipulating messages and sending mail.
647 Mail offers the user simple editing capabilities to ease the composition
648 of outgoing messages, as well as providing the ability to define and
649 send to names which address groups of users.
653 \*(UA is thus the user side of the
655 mail system, whereas the system side (Mail-Transfer-Agent, MTA) was
656 traditionally taken by
657 .Xr sendmail 8 ,
658 and most MTAs provide a binary of this name for compatibility purposes.
659 If the \*(OPal SMTP
660 .Va mta
661 is included in the
662 .Va features
663 of \*(UA then the system side is not a mandatory precondition for mail
664 delivery.
667 Because \*(UA strives for compliance with POSIX
668 .Xr mailx 1
669 it is likely that some configuration settings have to be adjusted before
670 using it is a smooth experience.
671 The default global
672 .Pa \*(UR
673 resource file bends those standard imposed settings of the
674 .Sx "INTERNAL VARIABLES"
675 a bit towards more user friendliness and safety, however, e.g., it
676 .Ic set Ns s
677 .Va hold
679 .Va keepsave
680 in order to suppress the automatic moving of messages to
681 .Ev MBOX
682 that would otherwise occur (see
683 .Sx "Message states" )
685 .Va keep
686 to not remove empty files in order not to mangle file permissions when
687 files eventually get recreated (\*(UA actively manages the file mode
688 creation mask via
689 .Va umask
690 upon program startup).
691 It also enables
692 .Va sendwait
693 in order to synchronize \*(UA with the exit status report of the used
694 .Va mta
695 when sending mails.
696 The section
697 .Sx EXAMPLES
698 contains some more complete configuration examples.
699 .\" }}}
701 .\" .Ss "On sending mail, and non-interactive mode" {{{
702 .Ss "On sending mail, and non-interactive mode"
704 To send a message to one or more people, using a local or a builtin
705 .Va mta
706 (Mail-Transfer-Agent) transport to actually deliver the generated mail
707 message, \*(UA can be invoked with arguments which are the names of
708 people to whom the mail will be sent, and the command line options
709 .Fl b
711 .Fl c
712 can be used to add (blind) carbon copy receivers:
714 .Bd -literal -offset indent
715 $ \*(uA -s ubject -a ttach.txt bill@exam.ple
716 # But... try it in an isolated dry-run mode first
717 $ LC_ALL=C \*(uA -:/ -d -vv -Ssendwait \e
718    -b bcc@exam.ple -c cc@exam.ple -. \e
719    '(Lovely) Bob <bob@exam.ple>' eric@exam.ple
720 # With SMTP
721 $ LC_ALL=C \*(uA -:/ -d -vv -Sv15-compat -Ssendwait \e
722     -S 'mta=smtps://mylogin@exam.ple:465' -Ssmtp-auth=login \e
723     -S 'from=scriptreply@exam.ple' \e
724     -a /etc/mail.rc \e
725     -. eric@exam.ple
729 If standard input is a terminal rather than the message to be sent,
730 the user is expected to type in the message contents.
731 In this compose mode \*(UA treats lines beginning with the character
732 .Ql ~
733 special \(en these are so-called
734 .Sx "TILDE ESCAPES"
735 which can be used to read in files, process shell commands, add and edit
736 attachments and more; e.g., the tilde escape
737 .Ql Ic ~e
738 will start the text editor to revise the message in it's current state,
739 .Ql Ic ~h
740 allows editing of the most important message headers and
741 .Ql Ic ~?
742 gives an overview of available tilde escapes.
743 Typing
744 .Ql control-D
745 .Pf ( Ql ^D )
746 at the beginning of an empty line leaves compose mode and causes the
747 message to be sent, whereas typing
748 .Ql control-C
749 .Pf ( Ql ^C )
750 twice will abort the current letter (saving its contents in the file
751 denoted by
752 .Ev DEAD
753 unless
754 .Pf no Va save
755 is set).
756 Messages are sent asynchronously, without supervision, unless the variable
757 .Va sendwait
758 is set, therefore send errors are not recognizable until then.
761 A number of
762 .Sx ENVIRONMENT
764 .Sx "INTERNAL VARIABLES"
765 can be used to alter default behavior; e.g.,
766 .Ic set Ns
767 ting (also via
768 .Fl S )
769 .Va editalong
770 will automatically startup a text editor when compose mode is entered,
771 .Va askcc
772 will cause the user to be prompted actively for carbon-copy recipients
773 and the
774 .Va dot
775 option will allow leaving compose mode by writing a line consisting
776 solely of a dot
777 .Pf ( Ql \&. ) .
778 .Va on-compose-enter
780 .Va on-compose-leave
781 hook macros may be set to automatically adjust some settings dependent
782 on receiver, sender or subject contexts.
785 Especially for using public mail provider accounts with the SMTP
786 .Va mta
787 it is often necessary to set
788 .Va from ,
789 and saving a copy of sent messages in a
790 .Va record
791 may be desirable \(en as for most mailbox file targets some special
792 syntax conventions are recognized (see the
793 .Ic file
794 command for more on that).
795 Defining user email
796 .Ic account Ns s
797 for the purpose of arranging a complete environment of settings that can
798 be switched to with a single command or command line option may be
799 useful (the section
800 .Sx EXAMPLES
801 contains example configurations for sending messages via some of the
802 well-known public mail providers and also gives a compact overview on
803 how to setup a secure SSL/TLS environment).
804 Performing some
805 .Fl d
807 .Va debug
808 sandbox dry-run tests first will prove correctness.
811 The section
812 .Sx "On URL syntax and credential lookup"
813 will spread light on the different ways of how to specify user email
814 account credentials, the
815 .Ql USER@HOST
816 variable chains, and accessing protocol-specific resources,
817 the section
818 .Sx "Character sets"
819 goes into the details of character encoding and how to use them for
820 representing messages and MIME part contents by specifying them in
821 .Va sendcharsets ,
822 and reading the section
823 .Sx "The mime.types files"
824 should help to understand how the MIME-type of outgoing attachments are
825 classified, and what can be done for fine-tuning.
828 Message recipients (as specified on the command line or defined in
829 .Ql To: ,
830 .Ql Cc:
832 .Ql Bcc: )
833 may not only be email addressees but can also be names of mailboxes and
834 even complete shell command pipe specifications.
835 If the variable
836 .Va expandaddr
837 is not set then only network addresses (see
838 .Xr mailaddr 7
839 for a description of mail addresses) and plain user names (including MTA
840 aliases) may be used, other types will be filtered out, giving a warning
841 message.
843 .\" When changing any of the following adjust any RECIPIENTADDRSPEC;
844 .\" grep the latter for the complete picture
846 If the variable
847 .Va expandaddr
848 is set then extended recipient addresses will optionally be accepted:
849 Any name which starts with a vertical bar
850 .Ql |
851 character specifies a command pipe \(en the command string following the
852 .Ql |
853 is executed and the message is sent to its standard input;
854 Likewise, any name that starts with the character solidus
855 .Ql /
856 or the character sequence dot solidus
857 .Ql ./
858 is treated as a file, regardless of the remaining content.
859 Any other name which contains an at sign
860 .Ql @
861 character is treated as a network address;
862 Any other name which starts with a plus sign
863 .Ql +
864 character specifies a mailbox name;
865 Any other name which contains a solidus
866 .Ql /
867 character but no exclamation mark
868 .Ql \&!
869 or percent sign
870 .Ql %
871 character before also specifies a mailbox name;
872 What remains is treated as a network address.
874 .Bd -literal -offset indent
875 $ echo bla | \*(uA -Sexpandaddr -s test ./mbox.mbox
876 $ echo bla | \*(uA -Sexpandaddr -s test '|cat >> ./mbox.mbox'
877 $ echo safe | LC_ALL=C \e
878     \*(uA -:/ -Sv15-compat -Ssendwait -Snosave \e
879       -Sexpandaddr=fail,-all,+addr -s test \e
880       -. bob@exam.ple
884 It is possible to create personal distribution lists via the
885 .Ic alias
886 command, so that, for instance, the user can send mail to
887 .Ql cohorts
888 and have it go to a group of people.
889 These aliases have nothing in common with the system wide aliases that
890 may be used by the MTA, which are subject to the
891 .Ql name
892 constraint of
893 .Va expandaddr
894 and are often tracked in a file
895 .Pa /etc/aliases
896 (and documented in
897 .Xr aliases 5
899 .Xr sendmail 1 ) .
900 Personal aliases will be expanded by \*(UA before the message is sent,
901 and are thus a convenient alternative to specifying each addressee by
902 itself:
905 .Dl alias cohorts bill jkf mark kridle@ucbcory ~/mail/cohorts.mbox
908 To avoid environmental noise scripts should
909 .Dq detach
910 \*(UA from any configuration files and create a script-local
911 environment, ideally with the command line options
912 .Fl \&:
913 to disable any configuration file in conjunction with repetitions of
914 .Fl S
915 to specify variables:
917 .Bd -literal -offset indent
918 $ env LC_ALL=C \*(uA -:/ \e
919     -Sv15-compat -Ssendwait -Snosave -Sttycharset=utf-8 \e
920     -Sexpandaddr=fail,-all,+addr \e
921     -S 'mta=smtps://mylogin@exam.ple:465' -Ssmtp-auth=login \e
922     -S 'from=scriptreply@exam.ple' \e
923     -s 'subject' -a attachment_file \e
924     -. "Recipient 1 <rec1@exam.ple>" rec2@exam.ple \e
925     < content_file
929 As shown, scripts can
930 .Dq fake
931 a locale environment, the above specifies the all-compatible 7-bit clean
932 .Ev LC_ALL
933 .Dq C ,
934 but will nonetheless take and send UTF-8 in the message text by using
935 .Va ttycharset .
936 In interactive mode, which is introduced in the next section, messages
937 can be sent by calling the
938 .Ic mail
939 command with a list of recipient addresses \(em the semantics are
940 completely identical to non-interactive message sending:
942 .Bd -literal -offset indent
943 $ \*(uA -d -Squiet -Semptystart
944 "/var/spool/mail/user": 0 messages
945 ? mail "Recipient 1 <rec1@exam.ple>", rec2@exam.ple
946 ? # Will do the right thing (tm)
947 ? m rec1@exam.ple rec2@exam.ple
949 .\" }}}
951 .\" .Ss "On reading mail, and interactive mode" {{{
952 .Ss "On reading mail, and interactive mode"
954 When invoked without addressees \*(UA enters interactive mode in which
955 mails may be read.
956 When used like that the user's system
957 .Va inbox
958 (see the command
959 .Ic file
960 for an in-depth description of the different mailbox types that exist)
961 is read in and a one line header of each message therein is displayed.
962 The visual style of this summary of
963 .Ic headers
964 can be adjusted through the variable
965 .Va headline
966 and the possible sorting criterion via
967 .Va autosort .
968 Scrolling through
969 .Va screen Ns
970 fuls of
971 .Ic headers
972 can be performed with the command
973 .Ic z .
974 If the initially opened mailbox is empty \*(UA will instead exit
975 immediately (after displaying a message) unless the variable
976 .Va emptystart
977 is set.
980 At the
981 .Va prompt
982 the command
983 .Ic list
984 will give a listing of all available commands and
985 .Ic help
986 will give a summary of some common ones.
987 If the \*(OPal documentation strings are available one can type
988 .Ql help X
989 .Pf "(or " Ql ?X )
990 and see the actual expansion of
991 .Ql X
992 and what it's purpose is, i.e., commands can be abbreviated
993 (note that POSIX defines some abbreviations, so that the alphabetical
994 order of commands doesn't necessarily relate to the abbreviations; it is
995 possible to define overwrites with the
996 .Ic ghost
997 command, however).
998 These commands can also produce a more
999 .Va verbose
1000 output.
1003 Messages are given numbers (starting at 1) which uniquely identify
1004 messages; the current message \(en the
1005 .Dq dot
1006 \(en will either be the first new message, or the first unread message,
1007 or the first message of the mailbox; the option
1008 .Va showlast
1009 will instead cause usage of the last message for this purpose.
1010 The command
1011 .Ic headers
1012 will display a
1013 .Va screen Ns
1014 ful of header summaries containing the
1015 .Dq dot ,
1016 whereas
1017 .Ic from
1018 will display only the summaries of the given messages, defaulting to the
1019 .Dq dot .
1022 Message content can be displayed on the users' terminal with the
1023 .Ic type
1024 command (shortcut
1025 .Ql t ) .
1026 If instead the command
1027 .Ic top
1028 is used, only the first
1029 .Va toplines
1030 of a message will be shown.
1031 By default the current message
1032 .Pf ( Dq dot )
1033 is displayed, but like with many other commands it is possible to give
1034 a fancy message specification (see
1035 .Sx "Specifying messages" ) ,
1036 e.g.,
1037 .Ql t:u
1038 will display all unread messages,
1039 .Ql t.
1040 will display the
1041 .Dq dot ,
1042 .Ql t 1 5
1043 will type the messages 1 and 5,
1044 .Ql t 1-5
1045 will type the messages 1 through 5, and
1046 .Ql t-
1048 .Ql t+
1049 will display the last and the next message, respectively.
1050 The command
1051 .Ic search
1052 (a more substantial alias of the standard command
1053 .Ic from )
1054 will display a header summary of the given message specification list
1055 instead of their content, e.g., the following will search for subjects:
1058 .Dl from "'@Some subject to search for'"
1061 In the default setup all header fields of a message will be
1062 .Ic type Ns
1063 d, but this can be changed: either by blacklisting a list of fields via
1064 .Ic ignore ,
1065 or by whitelisting only a given list with the
1066 .Ic retain
1067 command, e.g.,
1068 .Ql Ic \:retain Ns \0from_ date from to cc subject .
1069 In order to display all header fields of a message regardless of
1070 currently active ignore or retain lists, use the commands
1071 .Ic Type
1073 .Ic Top .
1074 The variable
1075 .Va crt
1076 controls whether and when \*(UA will use the configured
1077 .Ev PAGER
1078 for display instead of directly writing to the user terminal
1079 .Va screen
1080 (generally speaking).
1081 Note that historically the global
1082 .Pa \*(UR
1083 not only adjusts the list of displayed headers, but also sets
1084 .Va crt .
1087 Dependent upon the configuration a line editor (see the section
1088 .Sx "On terminal control and line editor" )
1089 aims at making user experience with the many
1090 .Sx COMMANDS
1091 a bit nicer.
1092 When reading the system
1093 .Va inbox
1094 or when
1095 .Fl f
1097 .Ic file )
1098 specified a mailbox explicitly prefixed with the special
1099 .Ql %:
1100 modifier (propagating the mailbox to a primary one) then messages which
1101 have been read will be moved to a secondary mailbox, the user's
1102 .Ev MBOX
1103 file, automatically when the mailbox is left, either by changing the
1104 active mailbox or by quitting \*(UA (also see
1105 .Sx "Message states" )
1106 \(en this automatic moving from a system or primary to the secondary
1107 mailbox is not performed when the variable
1108 .Va hold
1109 is set.
1112 After examining a message the user can also
1113 .Ic delete Ql d
1114 the message,
1115 .Ic reply Ql r
1116 to the sender and all recipients or
1117 .Ic Reply Ql R
1118 exclusively to the sender(s).
1119 Messages can also be
1120 .Ic forward Ns
1121 ed (shorter alias is
1122 .Ic fwd Ns ).
1123 Note that when replying to or forwarding a message recipient addresses
1124 will be stripped from comments and names unless the option
1125 .Va fullnames
1126 is set.
1127 Deletion causes \*(UA to forget about the message;
1128 This is not irreversible, though, one can
1129 .Ic undelete Ql u
1130 the message by giving its number,
1131 or the \*(UA session can be ended by giving the
1132 .Ic exit Ql x
1133 command.
1136 To end a mail processing session one may either issue
1137 .Ic quit Ql q
1138 to cause a full program exit, which possibly includes
1139 automatic moving of read messages to
1140 .Ev MBOX
1141 as well as updating the \*(OPal line editor
1142 .Va history-file ,
1143 or use the command
1144 .Ic exit Ql x
1145 instead in order to prevent any of these actions.
1146 .\" }}}
1148 .\" .Ss "HTML mail and MIME attachments" {{{
1149 .Ss "HTML mail and MIME attachments"
1151 Messages which are HTML-only get more and more common and of course many
1152 messages come bundled with a bouquet of MIME attachments.
1153 Whereas \*(UA \*(OPally supports a simple HTML-to-text converter to deal
1154 with HTML messages (see
1155 .Sx "The mime.types files" ) ,
1156 it normally can't deal with any of these itself, but instead programs
1157 need to become registered to deal with specific MIME types or file
1158 extensions.
1159 These programs may either prepare plain text versions of their input
1160 in order to enable \*(UA to display the content on the terminal,
1161 or display the content themselves, for example in a graphical window.
1164 To install an external handler program for a specific MIME type set an
1165 according
1166 .Va pipe-TYPE/SUBTYPE
1167 variable; to instead define a handler for a specific file extension set
1168 the respective
1169 .Va pipe-EXTENSION
1170 variable \(en these handlers take precedence.
1171 \*(OPally \*(UA supports mail user agent configuration as defined in
1172 RFC 1524; this mechanism, documented in the section
1173 .Sx "The Mailcap files" ,
1174 will be queried for display or quote handlers if none of the former two
1175 .\" TODO v15-compat "will be" -> "is"
1176 did; it will be the sole source for handlers of other purpose.
1177 A last source for handlers may be the MIME type definition itself, if
1178 the \*(UA specific type-marker extension was used when defining the type
1179 with the command
1180 .Ic mimetype .
1181 (Many of the builtin MIME types do so by default.)
1184 The variable
1185 .Va mime-counter-evidence
1186 can be set to improve dealing with faulty MIME part declarations as are
1187 often seen in real-life messages.
1188 E.g., to display a HTML message inline (that is, converted to a more
1189 fancy plain text representation than the builtin converter is capable to
1190 produce) with either of the text-mode browsers
1191 .Xr lynx 1
1193 .Xr elinks 1 ,
1194 teach \*(UA about MathML documents and make it display them as plain
1195 text, and to open PDF attachments in an external PDF viewer,
1196 asynchronously and with some other magic attached:
1198 .Bd -literal -offset indent
1199 if $features !@ +filter-html-tagsoup
1200   #set pipe-text/html='elinks -force-html -dump 1'
1201   set pipe-text/html='lynx -stdin -dump -force_html'
1202   # Display HTML as plain text instead
1203   #set pipe-text/html=@
1204 endif
1205 mimetype '@ application/mathml+xml mathml'
1206 wysh set pipe-application/pdf='@&=@ \e
1207   trap "rm -f \e"${NAIL_FILENAME_TEMPORARY}\e"" EXIT;\e
1208   trap "trap \e"\e" INT QUIT TERM; exit 1" INT QUIT TERM;\e
1209   mupdf "${NAIL_FILENAME_TEMPORARY}"'
1213 Note: special care must be taken when using such commands as mail
1214 viruses may be distributed by this method: if messages of type
1215 .Ql application/x-sh
1216 or files with the extension
1217 .Ql .sh
1218 were blindly filtered through the shell, for example, a message sender
1219 could easily execute arbitrary code on the system \*(UA is running on.
1220 For more on MIME, also in respect to sending of messages, see the
1221 sections
1222 .Sx "The mime.types files" ,
1223 .Sx "The Mailcap files"
1224 and the command
1225 .Ic mimetype .
1226 .\" }}}
1228 .\" .Ss "Mailing lists" {{{
1229 .Ss "Mailing lists"
1231 \*(UA offers some support to ease handling of mailing lists.
1232 The command
1233 .Ic mlist
1234 promotes all given arguments to known mailing lists, and
1235 .Ic mlsubscribe
1236 sets their subscription attribute, creating them first as necessary.
1237 (On the other hand
1238 .Ic unmlsubscribe
1239 doesn't
1240 .Ic unmlist
1241 automatically, but only resets the subscription attribute.)
1242 Using the commands without arguments will show (a subset of) all
1243 currently defined mailing lists.
1245 .Va headline
1246 format
1247 .Ql \&%T
1248 can be used to mark out messages with configured list addresses
1249 in the header display.
1252 \*(OPally mailing lists may also be specified as (extended) regular
1253 expressions, which allows matching of many addresses with a single
1254 expression.
1255 However, all fully qualified list addresses are matched via a fast
1256 dictionary, whereas expressions are placed in (a) list(s) which is
1257 (are) matched sequentially.
1259 .Bd -literal -offset indent
1260 set followup-to followup-to-honour=ask-yes reply-to-honour=ask-yes
1261 wysh mlist a1@b1.c1 a2@b2.c2 '.*@lists\e.c3$'
1262 mlsubscribe a4@b4.c4 exact@lists.c3
1266 The variable
1267 .Va followup-to-honour
1268 will ensure that a
1269 .Ql Mail-\:Followup-\:To:
1270 header is honoured when the message is being replied to (via
1271 .Ic reply
1273 .Ic Lreply )
1275 .Va followup-to
1276 controls whether this header is created when sending mails; it will be
1277 created automatically for a couple of reasons, too, like when the
1278 special
1279 .Dq mailing list specific
1280 respond command
1281 .Ic Lreply
1282 is used, when
1283 .Ic reply
1284 is used to respond to a message with its
1285 .Ql Mail-Followup-To:
1286 being honoured etc.
1289 A difference in between the handling of known and subscribed lists is
1290 that the address of the sender is usually not part of a generated
1291 .Ql Mail-Followup-To:
1292 when addressing the latter, whereas it is for the former kind of lists.
1293 Usually because there are exceptions: say, if multiple lists are
1294 addressed and not all of them are subscribed lists.
1296 For convenience \*(UA will, temporarily, automatically add a list
1297 address that is presented in the
1298 .Ql List-To:
1299 header of a message that is being responded to to the list of known
1300 mailing lists.
1301 Shall that header have existed \*(UA will instead, dependent on the
1302 variable
1303 .Va reply-to-honour ,
1304 use an also set
1305 .Ql Reply-To:
1306 for this purpose in order to accept a list administrators' wish that
1307 is supposed to have been manifested like that (but only if it provides
1308 a single address which resides on the same domain as what is stated in
1309 .Ql List-To: ) .
1310 .\" }}}
1312 .\" .Ss "Resource files" {{{
1313 .Ss "Resource files"
1315 Upon startup \*(UA reads in several resource files:
1317 .Bl -tag -width ".It Pa _AIL_EXTRA_R_"
1319 .It Pa \*(UR
1320 System wide initialization file.
1321 Reading of this file can be suppressed, either by using the
1322 .Fl \&:
1324 .Fl n
1325 command line options, or by setting the
1326 .Sx ENVIRONMENT
1327 variable
1328 .Ev NAIL_NO_SYSTEM_RC .
1331 .It Pa \*(ur
1332 File giving initial commands.
1333 A different file can be chosen by setting the
1334 .Sx ENVIRONMENT
1335 variable
1336 .Ev MAILRC .
1337 Reading of this file can be suppressed with the
1338 .Fl \&:
1339 command line option.
1341 .It Va NAIL_EXTRA_RC
1342 Can be used to define an optional startup file to be read after all
1343 other resource files.
1344 It can be used to specify settings that are not understood by other
1345 .Xr mailx 1
1346 implementations, for example.
1347 This variable is only honoured when defined in a resource file, e.g.,
1348 it is one of the
1349 .Sx "INTERNAL VARIABLES" .
1353 The content of these files is interpreted as follows:
1356 .Bl -bullet -compact
1358 A lines' leading whitespace is removed.
1360 Empty lines are ignored.
1362 Any other line is interpreted as a command.
1363 It may be spread over multiple input lines if the newline character is
1364 .Dq escaped
1365 by placing a reverse solidus character
1366 .Ql \e
1367 as the last character of the line; whereas any leading whitespace of
1368 follow lines is ignored, trailing whitespace before a escaped newline
1369 remains in the input.
1371 If the line (content) starts with the number sign
1372 .Ql #
1373 then it is a comment-command \(en a real command! \(en and also ignored.
1374 This command is the only form of comment that is understood.
1378 Unless \*(UA is about to enter interactive mode syntax errors that occur
1379 while loading these files are treated as errors and cause program exit.
1380 More files with syntactically equal content can be
1381 .Ic source Ns ed .
1382 The following, saved in a file, would be an examplary content:
1384 .Bd -literal -offset indent
1385  # This line is a comment command.  And y\e
1386     es, it is really continued here.
1387 set debug \e
1388     verbose
1389     set editheaders
1391 .\" }}}
1393 .\" .Ss "Character sets" {{{
1394 .Ss "Character sets"
1396 \*(OP \*(UA detects the character set of the terminal by using
1397 mechanisms that are controlled by the
1398 .Ev LC_CTYPE
1399 locale setting
1400 (the manual for
1401 .Xr setlocale 3
1402 should give an overview); the \*(UA internal variable
1403 .Va ttycharset
1404 will be set to the detected terminal character set accordingly
1405 and will thus show up in the output of the commands
1406 .Ic set
1408 .Ic varshow .
1411 However, a user supplied
1412 .Va ttycharset
1413 value is not overwritten by this detection mechanism: this
1414 .Dq feature
1415 must be used if the detection doesn't work properly,
1416 and it may be used to adjust the name of the locale character set.
1417 E.g., on BSD systems one may use a locale with the character set
1418 ISO8859-1, which is not a valid name for this character set; to be on
1419 the safe side, one may set
1420 .Va ttycharset
1421 to the correct name, which is ISO-8859-1.
1424 Note that changing the value doesn't mean much beside that,
1425 since several aspects of the real character set are implied by the
1426 locale environment of the system,
1427 and that stays unaffected by the content of an overwritten
1428 .Va ttycharset
1429 variable.
1430 (This is mostly an issue when interactively using \*(UA, though.
1431 It is actually possible to send mail in a completely
1432 .Dq faked
1433 locale environment, an option that \*(UA's test-suite uses excessively.)
1436 If no character set conversion capabilities have been compiled into
1437 \*(UA
1438 .Pf ( Va features
1439 doesn't include the term
1440 .Ql +iconv ) ,
1441 then
1442 .Va ttycharset
1443 will be the only supported character set,
1444 it is simply assumed that it can be used to exchange 8-bit messages,
1445 and the rest of this section does not apply;
1446 it may however still be necessary to explicitly set it if automatic
1447 detection fails, since in that case it defaults to the mentioned
1448 .\" (Keep in SYNC: ./nail.1:"Character sets", ./nail.h:CHARSET_*!)
1449 ISO-8859-1.
1452 When reading messages, their text is converted into
1453 .Va ttycharset
1454 as necessary in order to display them on the users terminal.
1455 Unprintable characters and invalid byte sequences are detected
1456 and replaced by proper substitution characters (unless the variable
1457 .Va print-all-chars
1458 was set once \*(UA was started).
1459 Also see
1460 .Va charset-unknown-8bit
1461 to deal with another hairy aspect of message interpretation.
1464 When sending messages all their parts and attachments are classified.
1465 Whereas no character set conversion is performed on those parts which
1466 appear to be binary data,
1467 the character set being used must be declared within the MIME header of
1468 an outgoing text part if it contains characters that do not conform to
1469 the set of characters that are allowed by the email standards.
1470 Permissible values for character sets can be declared using the
1471 .Va sendcharsets
1472 variable, and
1473 .Va charset-8bit ,
1474 which defines a catch-all last-resort fallback character set that is
1475 implicitly appended to the list of character-sets in
1476 .Va sendcharsets .
1479 When replying to a message and the variable
1480 .Va reply-in-same-charset
1481 is set then the character set of the message being replied to is tried
1482 first.
1483 And it is also possible to make \*(UA work even more closely related to
1484 the current locale setting automatically by using the variable
1485 .Va sendcharsets-else-ttycharset ,
1486 please see there for more information.
1489 All the specified character sets are tried in order unless the
1490 conversion of the part or attachment succeeds.
1491 If none of the tried (8-bit) character sets is capable to represent the
1492 content of the part or attachment,
1493 then the message will not be sent and its text will optionally be
1494 .Va save Ns d
1496 .Ev DEAD .
1497 In general, if the message
1498 .Dq Cannot convert from a to b
1499 appears, either some characters are not appropriate for the currently
1500 selected (terminal) character set,
1501 or the needed conversion is not supported by the system.
1502 In the first case, it is necessary to set an appropriate
1503 .Ev LC_CTYPE
1504 locale and/or the variable
1505 .Va ttycharset .
1508 The best results are usually achieved when \*(UA is run in a UTF-8
1509 locale on a UTF-8 capable terminal, in which case the full Unicode
1510 spectrum of characters is available.
1511 In this setup characters from various countries can be displayed,
1512 while it is still possible to use more simple character sets for sending
1513 to retain maximum compatibility with older mail clients.
1516 On the other hand the POSIX standard defines a locale-independent 7-bit
1517 .Dq portable character set
1518 that should be used when overall portability is an issue, the even more
1519 restricted subset named
1520 .Dq portable filename character set
1521 consisting of A-Z, a-z, 0-9, period
1522 .Ql \&. ,
1523 underscore
1524 .Ql _
1526 .Ql -
1527 hyphen.
1528 .\" }}}
1530 .\" .Ss "Message states" {{{
1531 .Ss "Message states"
1533 \*(UA differentiates in between several different message states;
1534 the current state will be reflected in header summary displays if
1535 .Va headline
1536 is configured to do so (via the internal variable
1537 .Va attrlist ) ,
1538 and messages can also be selected and be acted upon depending on their
1539 state (see
1540 .Sx "Specifying messages" ) .
1541 When operating on the system
1542 .Va inbox
1543 or in primary mailboxes opened with the special prefix
1544 .Ql %:
1545 (see
1546 .Ic file )
1547 special actions, like the automatic moving of messages to the secondary
1548 .Ev MBOX
1549 mailbox may be applied when the mailbox is left (also implicitly via
1550 a successful exit of \*(UA, but not if the special command
1551 .Ic exit
1552 is used) \(en however, because this may be irritating to users which
1553 are used to
1554 .Dq more modern
1555 mail-user-agents, the default global
1556 .Pa \*(UR
1557 sets the internal
1558 .Va hold
1560 .Va keepsave
1561 variables in order to suppress this behaviour.
1563 .Bl -tag -width ".It Ql _reserved"
1564 .It Ql new
1565 Message has neither been viewed nor moved to any other state.
1566 Such messages are retained even in the primary system mailbox.
1568 .It Ql unread
1569 Message has neither been viewed nor moved to any other state, but the
1570 message was present already when the mailbox has been opened last:
1571 Such messages are retained even in the primary system mailbox.
1573 .It Ql read
1574 The message has been processed by one of the following commands:
1575 .Ic ~f ,
1576 .Ic ~m ,
1577 .Ic ~F ,
1578 .Ic ~M ,
1579 .Ic copy ,
1580 .Ic mbox ,
1581 .Ic next ,
1582 .Ic pipe  ,
1583 .Ic Print ,
1584 .Ic print ,
1585 .Ic top ,
1586 .Ic Type ,
1587 .Ic type ,
1588 .Ic undelete .
1590 .Ic delete ,
1591 .Ic dp ,
1593 .Ic dt
1594 commands may also cause the next message to be marked as read, depending
1595 on the value of the
1596 .Va autoprint
1597 variable.
1598 Except when the
1599 .Ic exit
1600 command is used, messages that are in the primary system mailbox or in
1601 mailboxes which were opened with the special
1602 .Ql %:
1603 prefix and are in
1604 .Ql read
1605 state when the mailbox is left will be saved in
1606 .Ev MBOX
1607 unless the option
1608 .Va hold
1609 it set.
1611 .It Ql deleted
1612 The message has been processed by one of the following commands:
1613 .Ic delete ,
1614 .Ic dp ,
1615 .Ic dt .
1616 Only
1617 .Ic undelete
1618 can be used to access such messages.
1620 .It Ql preserved
1621 The message has been processed by a
1622 .Ic preserve
1623 command and it will be retained in its current location.
1625 .It Ql saved
1626 The message has been processed by one of the following commands:
1627 .Ic save
1629 .Ic write .
1630 Unless when the
1631 .Ic exit
1632 command is used, messages that are in the primary system mailbox or in
1633 mailboxes which were opened with the special
1634 .Ql %:
1635 prefix and are in
1636 .Ql saved
1637 state when the mailbox is left will be deleted; they will be saved in
1638 .Ev MBOX
1639 when the option
1640 .Va keepsave
1641 is set.
1643 .\" }}}
1645 .\" .Ss "Specifying messages" {{{
1646 .Ss "Specifying messages"
1648 Commands such as
1649 .Ic from ,
1650 .Ic type
1652 .Ic delete
1653 can be given a list of message numbers as arguments to apply to a number
1654 of messages at once.
1655 Thus
1656 .Ql delete 1 2
1657 deletes messages 1 and 2,
1658 whereas
1659 .Ql delete 1-5
1660 will delete the messages 1 through 5.
1661 In sorted or threaded mode (see the
1662 .Ic sort
1663 command),
1664 .Ql delete 1-5
1665 will delete the messages that are located between (and including)
1666 messages 1 through 5 in the sorted/threaded order, as shown in the
1667 .Ic headers
1668 summary.
1669 The following special message names exist:
1672 .Bl -tag -width ".It Ar _n_u"
1673 .It Ar \&.
1674 The current message, the so-called
1675 .Dq dot .
1677 .It Ar \&;
1678 The message that was previously the current message.
1680 .It Ar \&,
1681 The parent message of the current message,
1682 that is the message with the Message-ID given in the
1683 .Ql In-Reply-To:
1684 field or the last entry of the
1685 .Ql References:
1686 field of the current message.
1688 .It Ar -
1689 The next previous undeleted message,
1690 or the next previous deleted message for the
1691 .Ic undelete
1692 command.
1693 In sorted/threaded mode,
1694 the next previous such message in the sorted/threaded order.
1696 .It Ar +
1697 The next undeleted message,
1698 or the next deleted message for the
1699 .Ic undelete
1700 command.
1701 In sorted/threaded mode,
1702 the next such message in the sorted/threaded order.
1704 .It Ar ^
1705 The first undeleted message,
1706 or the first deleted message for the
1707 .Ic undelete
1708 command.
1709 In sorted/threaded mode,
1710 the first such message in the sorted/threaded order.
1712 .It Ar $
1713 The last message.
1714 In sorted/threaded mode,
1715 the last message in the sorted/threaded order.
1717 .It Ar & Ns Ar x
1718 In threaded mode,
1719 selects the message addressed with
1720 .Ar x ,
1721 where
1722 .Ar x
1723 is any other message specification,
1724 and all messages from the thread that begins at it.
1725 Otherwise it is identical to
1726 .Ar x .
1728 .Ar x
1729 is omitted,
1730 the thread beginning with the current message is selected.
1732 .It Ar *
1733 All messages.
1734 .It Ar `
1735 All messages that were included in the message list for the previous
1736 command.
1738 .It Ar x-y
1739 An inclusive range of message numbers.
1740 Selectors that may also be used as endpoints include any of
1741 .Ar .;-+^$ .
1743 .It Ar address
1744 A case-insensitive
1745 .Dq any substring matches
1746 search against the
1747 .Ql From:
1748 header, which will match addresses (too) even if
1749 .Va showname
1750 is set (and POSIX says
1751 .Dq any address as shown in a header summary shall be matchable in this form ) ;
1752 However, if the
1753 .Va allnet
1754 variable is set, only the local part of the address is evaluated
1755 for the comparison, not ignoring case, and the setting of
1756 .Va showname
1757 is completely ignored.
1758 For finer control and match boundaries use the
1759 .Ql @
1760 search expression.
1762 .It Ar / Ns Ar string
1763 All messages that contain
1764 .Ar string
1765 in the subject field (case ignored).
1766 See also the
1767 .Va searchheaders
1768 variable.
1770 .Ar string
1771 is empty,
1772 the string from the previous specification of that type is used again.
1774 .It Xo Op Ar @ Ns Ar name-list Ns
1775 .Ar @ Ns Ar expr
1777 All messages that contain the given case-insensitive search
1778 .Ar expr Ns
1779 ession; if the \*(OPal regular expression (see
1780 .Xr re_format 7 )
1781 support is available
1782 .Ar expr
1783 will be interpreted as (an extended) one if any of the
1784 .Dq magical
1785 (extended) regular expression characters is seen.
1786 If the optional
1787 .Ar @ Ns Ar name-list
1788 part is missing, the search is restricted to the subject field body,
1789 but otherwise
1790 .Ar name-list
1791 specifies a comma-separated list of header fields to search, as in
1793 .Dl '@to,from,cc@Someone i ought to know'
1795 In order to search for a string that includes a
1796 .Ql @
1797 (commercial at) character the
1798 .Ar name-list
1799 is effectively non-optional, but may be given as the empty string.
1800 Some special header fields may be abbreviated:
1801 .Ql f ,
1802 .Ql t ,
1803 .Ql c ,
1804 .Ql b
1806 .Ql s
1807 will match
1808 .Ql From ,
1809 .Ql To ,
1810 .Ql Cc ,
1811 .Ql Bcc
1813 .Ql Subject ,
1814 respectively and case-insensitively.
1815 The special names
1816 .Ql header
1818 .Ql <
1819 can be used to search in (all of) the header(s) of the message, and the
1820 special names
1821 .Ql body
1823 .Ql >
1825 .Ql text
1827 .Ql =
1828 can be used to perform full text searches \(en whereas the former
1829 searches only the body, the latter also searches the message header.
1831 This message specification performs full text comparison, but even with
1832 regular expression support it is almost impossible to write a search
1833 expression that savely matches only a specific address domain.
1834 To request that the content of the header is treated as a list of
1835 addresses, and to strip those down to the plain email address which the
1836 search expression is to be matched against, prefix the header name
1837 (abbreviation) with a tilde
1838 .Ql ~ :
1840 .Dl @~f@@a\e.safe\e.domain\e.match$
1842 .It Ar :c
1843 All messages of state
1844 .Ql c ,
1845 where
1846 .Ql c
1847 is one or multiple of the following colon modifiers:
1849 .Bl -tag -compact -width ".It Ar :M"
1850 .It Ar n
1851 .Ql new
1852 messages.
1853 .It Ar o
1854 Old messages (any not in state
1855 .Ql read
1857 .Ql new ) .
1858 .It Ar u
1859 .Ql unread
1860 messages.
1861 .It Ar d
1862 .Ql deleted
1863 messages (for the
1864 .Ic undelete
1866 .Ic from
1867 commands only).
1868 .It Ar r
1869 .Ql read
1870 messages.
1871 .It Ar f
1872 .Ic flag Ns
1873 ged messages.
1874 .It Ar a
1875 Answered messages
1876 (cf. the
1877 .Va markanswered
1878 variable).
1879 .It Ar t
1880 Messages marked as draft.
1881 .It Ar s
1882 \*(OP Messages classified as spam.
1883 .It Ar S
1884 \*(OP Messages with unsure spam classification.
1890 \*(OP IMAP-style SEARCH expressions may also be used.
1891 This addressing mode is available with all types of folders;
1892 \*(UA will perform the search locally as necessary.
1893 Strings must be enclosed by double quotes
1894 .Ql \&"
1895 in their entirety if they contain white space or parentheses;
1896 within the quotes, only reverse solidus
1897 .Ql \e
1898 is recognized as an escape character.
1899 All string searches are case-insensitive.
1900 When the description indicates that the
1901 .Dq envelope
1902 representation of an address field is used,
1903 this means that the search string is checked against both a list
1904 constructed as
1906 .Bd -literal -offset indent
1907 (\*qname\*q \*qsource\*q \*qlocal-part\*q \*qdomain-part\*q)
1911 for each address,
1912 and the addresses without real names from the respective header field.
1913 These search expressions can be nested using parentheses, see below for
1914 examples.
1917 .Bl -tag -compact -width ".It Ar _n_u"
1918 .It Ar ( criterion )
1919 All messages that satisfy the given
1920 .Ar criterion .
1921 .It Ar ( criterion1 criterion2 ... criterionN )
1922 All messages that satisfy all of the given criteria.
1924 .It Ar ( or criterion1 criterion2 )
1925 All messages that satisfy either
1926 .Ar criterion1
1928 .Ar criterion2 ,
1929 or both.
1930 To connect more than two criteria using
1931 .Ql or
1932 specifications have to be nested using additional parentheses,
1933 as with
1934 .Ql (or a (or b c)) ,
1935 since
1936 .Ql (or a b c)
1937 really means
1938 .Ql ((a or b) and c) .
1939 For a simple
1940 .Ql or
1941 operation of independent criteria on the lowest nesting level,
1942 it is possible to achieve similar effects by using three separate
1943 criteria, as with
1944 .Ql (a) (b) (c) .
1946 .It Ar ( not criterion )
1947 All messages that do not satisfy
1948 .Ar criterion .
1949 .It Ar ( bcc \*q Ns Ar string Ns Ar \*q )
1950 All messages that contain
1951 .Ar string
1952 in the envelope representation of the
1953 .Ql Bcc:
1954 field.
1955 .It Ar ( cc \*q Ns Ar string Ns Ar \*q )
1956 All messages that contain
1957 .Ar string
1958 in the envelope representation of the
1959 .Ql Cc:
1960 field.
1961 .It Ar ( from \*q Ns Ar string Ns Ar \*q )
1962 All messages that contain
1963 .Ar string
1964 in the envelope representation of the
1965 .Ql From:
1966 field.
1967 .It Ar ( subject \*q Ns Ar string Ns Ar \*q )
1968 All messages that contain
1969 .Ar string
1970 in the
1971 .Ql Subject:
1972 field.
1973 .It Ar ( to \*q Ns Ar string Ns Ar \*q )
1974 All messages that contain
1975 .Ar string
1976 in the envelope representation of the
1977 .Ql To:
1978 field.
1979 .It Ar ( header name \*q Ns Ar string Ns Ar \*q )
1980 All messages that contain
1981 .Ar string
1982 in the specified
1983 .Ql Name:
1984 field.
1985 .It Ar ( body \*q Ns Ar string Ns Ar \*q )
1986 All messages that contain
1987 .Ar string
1988 in their body.
1989 .It Ar ( text \*q Ns Ar string Ns Ar \*q )
1990 All messages that contain
1991 .Ar string
1992 in their header or body.
1993 .It Ar ( larger size )
1994 All messages that are larger than
1995 .Ar size
1996 (in bytes).
1997 .It Ar ( smaller size )
1998 All messages that are smaller than
1999 .Ar size
2000 (in bytes).
2002 .It Ar ( before date )
2003 All messages that were received before
2004 .Ar date ,
2005 which must be in the form
2006 .Ql d[d]-mon-yyyy ,
2007 where
2008 .Ql d
2009 denotes the day of the month as one or two digits,
2010 .Ql mon
2011 is the name of the month \(en one of
2012 .Ql Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec ,
2014 .Ql yyyy
2015 is the year as four digits, e.g.,
2016 .Ql 28-Dec-2012 .
2018 .It Ar ( on date )
2019 All messages that were received on the specified date.
2020 .It Ar ( since date )
2021 All messages that were received since the specified date.
2022 .It Ar ( sentbefore date )
2023 All messages that were sent on the specified date.
2024 .It Ar ( senton date )
2025 All messages that were sent on the specified date.
2026 .It Ar ( sentsince date )
2027 All messages that were sent since the specified date.
2028 .It Ar ()
2029 The same criterion as for the previous search.
2030 This specification cannot be used as part of another criterion.
2031 If the previous command line contained more than one independent
2032 criterion then the last of those criteria is used.
2034 .\" }}}
2036 .\" .Ss "On URL syntax and credential lookup" {{{
2037 .Ss "On URL syntax and credential lookup"
2039 \*(IN For accessing protocol-specific resources usage of Uniform
2040 Resource Locators (URL, RFC 1738) has become omnipresent.
2041 \*(UA expects and understands URLs in the following form;
2042 parts in brackets
2043 .Ql []
2044 denote optional parts, optional either because there also exist other
2045 ways to define the information in question or because support of the
2046 part is protocol-specific (e.g.,
2047 .Ql /path
2048 is used by the IMAP protocol but not by POP3);
2049 If any of
2050 .Ql USER
2052 .Ql PASSWORD
2053 are specified they must be given in URL percent encoded form (RFC 3986;
2054 the commands
2055 .Ic urlcodec
2056 may be helpful):
2059 .Dl PROTOCOL://[USER[:PASSWORD]@]server[:port][/path]
2062 Note that these \*(UA URLs most often don't conform to any real
2063 standard, but instead represent a normalized variant of RFC 1738 \(en
2064 they are not used in data exchange but only meant as a compact,
2065 easy-to-use way of defining and representing information in
2066 a well-known notation.
2069 Many internal variables of \*(UA exist in multiple versions, called
2070 variable chains for the rest of this document: the plain
2071 .Ql variable
2072 as well as
2073 .Ql variable-HOST
2075 .Ql variable-USER@HOST .
2076 Here
2077 .Ql HOST
2078 indeed means
2079 .Ql server:port
2080 if a
2081 .Ql port
2082 had been specified in the respective URL, otherwise it refers to the plain
2083 .Ql server .
2084 Also,
2085 .Ql USER
2086 isn't truly the
2087 .Ql USER
2088 that had been found when doing the user chain lookup as is described
2089 below, i.e., this
2090 .Ql USER
2091 will never be in URL percent encoded form, whether it came from an URL
2092 or not; i.e., variable chain name extensions of
2093 .Sx "INTERNAL VARIABLES"
2094 must not be URL percent encoded.
2097 For example, whether an hypothetical URL
2098 .Ql smtp://hey%3Ayou@our.house
2099 had been given that includes a user, or whether the URL was
2100 .Ql smtp://our.house
2101 and the user had been found differently, to lookup the variable chain
2102 .Va smtp-use-starttls
2103 \*(UA first looks for whether
2104 .Ql smtp-\:use-\:starttls-\:hey:you@our.house
2105 is defined, then whether
2106 .Ql smtp-\:use-\:starttls-\:our.house
2107 exists before finally ending up looking at the plain variable itself.
2110 \*(UA obeys the following logic scheme when dealing with the
2111 necessary credential information of an account:
2113 .Bl -bullet
2115 If no
2116 .Ql USER
2117 has been given in the URL the variables
2118 .Va user-HOST
2120 .Va user
2121 are looked up; if no such variable(s) can be found then \*(UA will,
2122 when enforced by the \*(OPal variables
2123 .Va netrc-lookup-HOST
2125 .Va netrc-lookup ,
2126 search the users
2127 .Pa .netrc
2128 file for a
2129 .Ql HOST
2130 specific entry which provides a
2131 .Ql login
2132 name: this lookup will only succeed if unambiguous (one possible matching
2133 entry for
2134 .Ql HOST ) .
2135 It is possible to load encrypted
2136 .Pa .netrc
2137 files via
2138 .Va netrc-pipe .
2140 If there is still no
2141 .Ql USER
2142 then \*(UA will fall back to the user who is supposed to run \*(UA,
2143 the identity of which has been fixated during \*(UA startup and is
2144 known to be a valid user on the current host.
2147 Authentication: unless otherwise noted this will lookup the
2148 .Va PROTOCOL-auth-USER@HOST , PROTOCOL-auth-HOST , PROTOCOL-auth
2149 variable chain, falling back to a protocol-specific default should this
2150 have no success.
2153 If no
2154 .Ql PASSWORD
2155 has been given in the URL, then if the
2156 .Ql USER
2157 has been found through the \*(OPal
2158 .Va netrc-lookup
2159 that may have already provided the password, too.
2160 Otherwise the variable chain
2161 .Va password-USER@HOST , password-HOST , password
2162 is looked up and used if existent.
2164 Afterwards the complete \*(OPal variable chain
2165 .Va netrc-lookup-USER@HOST , netrc-lookup-HOST , netrc-lookup
2166 is looked up.
2167 If set, the
2168 .Pa .netrc
2169 cache is searched for a password only (multiple user accounts for
2170 a single machine may exist as well as a fallback entry without user
2171 but with a password).
2173 If at that point there is still no password available, but the
2174 (protocols') chosen authentication type requires a password, then in
2175 interactive mode the user will be prompted on the terminal.
2179 .Sy Note:
2180 S/MIME verification works relative to the values found in the
2181 .Ql From:
2183 .Ql Sender: )
2184 header field(s), which means that the values of
2185 .Va smime-sign , smime-sign-cert , smime-sign-include-certs
2187 .Va smime-sign-message-digest
2188 will not be looked up using the
2189 .Ql USER
2191 .Ql HOST
2192 chains from above but instead use the corresponding values from the
2193 message that is being worked on.
2194 In unusual cases multiple and different
2195 .Ql USER
2197 .Ql HOST
2198 combinations may therefore be involved \(en on the other hand those
2199 unusual cases become possible.
2200 The usual case is as short as:
2203 .Dl set mta=smtp://USER:PASS@HOST smtp-use-starttls \e
2204 .Dl \ \ \ \ smime-sign smime-sign-cert=+smime.pair
2207 The section
2208 .Sx EXAMPLES
2209 contains complete example configurations.
2210 .\" }}}
2212 .\" .Ss "On terminal control and line editor" {{{
2213 .Ss "On terminal control and line editor"
2215 \*(OP Terminal control will be realized through one of the standard
2217 libraries, either the
2218 .Lb libtermcap ,
2219 or, alternatively, the
2220 .Lb libterminfo ,
2221 both of which will be initialized to work with the environment variable
2222 .Ev TERM .
2223 Terminal control will enhance or enable interactive usage aspects, e.g.,
2224 .Sx "Coloured display" ,
2225 and extend behaviour of the Mailx-Line-Editor (MLE), which may learn the
2226 byte-sequences of keys like the cursor and function keys, and which will
2227 automatically enter the so-called
2228 .Dq ca-mode
2229 alternative screen shall the terminal support it.
2230 The internal variable
2231 .Va termcap
2232 can be used to overwrite settings or to learn (correct(ed)) keycodes.
2233 Actual interaction with the chosen library can be disabled completely by
2234 setting the internal variable
2235 .Va termcap-disable ;
2236 .Va termcap
2237 will be queried regardless, even if the \*(OPal support for the
2238 libraries has not been enabled at configuration time.
2241 \*(OP The builtin \*(UA Mailx-Line-Editor (MLE) should work in all
2242 environments which comply to the ISO C standard
2243 .St -isoC-amd1 ,
2244 and will support wide glyphs if possible (the necessary functionality
2245 had been removed from ISO C, but was included in
2246 .St -xpg4 ) .
2247 Prevent usage of a line editor in interactive mode by setting the
2248 internal variable
2249 .Va line-editor-disable .
2250 Especially if the \*(OPal terminal control support is missing setting
2251 entries in the internal variable
2252 .Va termcap
2253 will help shall the MLE misbehave, see there for more.
2254 The MLE can support a little bit of
2255 .Ic colour .
2258 \*(OP If the
2259 .Ic history
2260 feature is available then input from line editor prompts will be saved
2261 in a history list that can be searched in and be expanded from.
2262 Such saving can be prevented by prefixing input with any amount of
2263 whitespace.
2264 Aspects of history, like allowed content and maximum size, as well as
2265 whether history shall be saved persistently, can be configured with the
2266 internal variables
2267 .Va history-file ,
2268 .Va history-gabby ,
2269 .Va history-gabby-persist
2271 .Va history-size .
2274 The MLE supports a set of editing and control commands.
2275 By default (as) many (as possible) of these will be assigned to a set of
2276 single-letter control codes, which should work on any terminal (and can
2277 be generated by holding the
2278 .Dq control
2279 key while pressing the key of desire, e.g.,
2280 .Ql control-D ) .
2281 If the \*(OPal
2282 .Ic bind
2283 command is available then the MLE commands can also be accessed freely
2284 by assigning the command name, which is shown in parenthesis in the list
2285 below, to any desired key-sequence, and the MLE will instead and also use
2286 .Ic bind
2287 to establish its builtin key bindings
2288 (more of them if the \*(OPal terminal control is available),
2289 an action which can then be suppressed completely by setting
2290 .Va line-editor-no-defaults .
2291 The following uses the
2292 .Xr sh 1 Ns
2293 ell-style quote notation that is documented in the introduction of
2294 .Sx COMMANDS ;
2295 combinations not mentioned either cause job control signals or don't
2296 generate a (unique) keycode:
2300 .Bl -tag -compact -width "Ql _M"
2301 .It Ql \ecA
2302 Go to the start of the line
2303 .Pf ( Cd mle-go-home ) .
2305 .It Ql \ecB
2306 Move the cursor backward one character
2307 .Pf ( Cd mle-go-bwd ) .
2309 .It Ql \ecD
2310 Forward delete the character under the cursor;
2311 quits \*(UA if used on the empty line unless the
2312 .Va ignoreeof
2313 option is set
2314 .Pf ( Cd mle-del-fwd ) .
2316 .It Ql \ecE
2317 Go to the end of the line
2318 .Pf ( Cd mle-go-end ) .
2320 .It Ql \ecF
2321 Move the cursor forward one character
2322 .Pf ( Cd mle-go-fwd ) .
2324 .It Ql \ecG
2325 Cancel current operation, full reset.
2326 If there is an active history search or tabulator expansion then this
2327 command will first reset that, reverting to the former line content;
2328 thus a second reset is needed for a full reset in this case
2329 .Pf ( Cd mle-reset ) .
2331 .It Ql \ecH
2332 Backspace: backward delete one character
2333 .Pf ( Cd mle-del-bwd ) .
2335 .It Ql \ecI
2336 \*(NQ
2337 Horizontal tabulator:
2338 try to expand the word before the cursor, also supporting \*(UA
2339 .Ic file
2340 expansions
2341 .Pf ( Cd mle-complete ) .
2342 This is affected by
2343 .Cd mle-quote-rndtrip .
2345 .It Ql \ecJ
2346 Newline:
2347 commit the current line
2348 .Pf ( Cd mle-commit ) .
2350 .It Ql \ecK
2351 Cut all characters from the cursor to the end of the line
2352 .Pf ( Cd mle-snarf-end ) .
2354 .It Ql \ecL
2355 Repaint the line
2356 .Pf ( Cd mle-repaint ) .
2358 .It Ql \ecN
2359 \*(OP Go to the next history entry
2360 .Pf ( Cd mle-hist-fwd ) .
2362 .It Ql \ecO
2363 Invokes the command
2364 .Ql Ic dt .
2366 .It Ql \ecP
2367 \*(OP Go to the previous history entry
2368 .Pf ( Cd mle-hist-bwd ) .
2370 .It Ql \ecQ
2371 Toggle roundtrip mode shell quotes, where produced,
2372 on and off
2373 .Pf ( Cd mle-quote-rndtrip ) .
2374 This setting is temporary, and will be forgotten once the command line
2375 is committed.
2377 .It Ql \ecR
2378 \*(OP Complete the current line from (the remaining) older history entries
2379 .Pf ( Cd mle-hist-srch-bwd ) .
2381 .It Ql \ecS
2382 \*(OP Complete the current line from (the remaining) newer history entries
2383 .Pf ( Cd mle-hist-srch-fwd ) .
2385 .It Ql \ecT
2386 Paste the snarf buffer
2387 .Pf ( Cd mle-paste ) .
2389 .It Ql \ecU
2390 The same as
2391 .Ql \ecA
2392 followed by
2393 .Ql \ecK
2394 .Pf ( Cd mle-snarf-line ) .
2396 .It Ql \ecV
2397 Prompts for a Unicode character (its hexadecimal number) to be inserted
2398 .Pf ( Cd mle-prompt-char ) .
2399 Note this command needs to be assigned to a single-letter control code
2400 in order to become recognized and executed during input of
2401 a key-sequence (only four single-letter control codes can be used for
2402 that shortcut purpose); this control code is special-treated and can't
2403 be part of any other sequence, because any occurrence will perform the
2404 .Cd mle-prompt-char
2405 function immediately.
2407 .It Ql \ecW
2408 Cut the characters from the one preceding the cursor to the preceding
2409 word boundary
2410 .Pf ( Cd mle-snarf-word-bwd ) .
2412 .It Ql \ecX
2413 Move the cursor forward one word boundary
2414 .Pf ( Cd mle-go-word-fwd ) .
2416 .It Ql \ecY
2417 Move the cursor backward one word boundary
2418 .Pf ( Cd mle-go-word-bwd ) .
2420 .It Ql \ec[
2421 Escape: reset a possibly used multibyte character input state machine
2422 and \*(OPally a lingering, incomplete key binding
2423 .Pf ( Cd mle-cancel ) .
2424 This command needs to be assigned to a single-letter control code in
2425 order to become recognized and executed during input of a key-sequence
2426 (only four single-letter control codes can be used for that shortcut
2427 purpose).
2428 This control code may also be part of a multi-byte sequence, but if
2429 a sequence is active and the very control code is currently also an
2430 expected input, then it will first be consumed by the active sequence.
2432 .It Ql \ec\e
2433 Invokes the command
2434 .Ql Ic z Ns + .
2436 .It Ql \ec]
2437 Invokes the command
2438 .Ql Ic z Ns $ .
2440 .It Ql \ec^
2441 Invokes the command
2442 .Ql Ic z Ns 0 .
2444 .It Ql \ec_
2445 Cut the characters from the one after the cursor to the succeeding word
2446 boundary
2447 .Pf ( Cd mle-snarf-word-fwd ) .
2449 .It Ql \ec?
2450 Backspace:
2451 .Cd mle-del-bwd .
2453 .It \(en
2454 .Cd mle-fullreset :
2455 in difference to
2456 .Cd mle-reset
2457 this will immediately reset a possibly active search etc.
2459 .It \(en
2460 .Cd mle-bell :
2461 ring the audible bell.
2463 .\" }}}
2465 .\" .Ss "Coloured display" {{{
2466 .Ss "Coloured display"
2468 \*(OP \*(UA can be configured to support a coloured display and font
2469 attributes by emitting ANSI / ISO 6429 SGR (select graphic rendition)
2470 escape sequences.
2471 Usage of colours and font attributes solely depends upon the
2472 capability of the detected terminal type that is defined by the
2473 environment variable
2474 .Ev TERM
2475 and which can be fine-tuned by the user via the internal variable
2476 .Va termcap .
2479 On top of what \*(UA knows about the terminal the boolean variable
2480 .Va colour-pager
2481 defines whether the actually applicable colour and font attribute
2482 sequences should also be generated when output is going to be paged
2483 through the external program defined by the environment variable
2484 .Ev PAGER
2485 (also see
2486 .Va crt Ns
2488 This is not enabled by default because different pager programs need
2489 different command line switches or other configuration in order to
2490 support those sequences.
2491 \*(UA however knows about some widely used pagers and in a clean
2492 environment it is often enough to simply set
2493 .Va colour-pager ;
2494 please refer to that variable for more on this topic.
2497 If the variable
2498 .Va colour-disable
2499 is set then any active usage of colour and font attribute sequences
2500 is suppressed, but without affecting possibly established
2501 .Ic colour
2502 mappings.
2505 To define and control colours and font attributes a single multiplexer
2506 command family exists:
2507 .Ic colour
2508 shows or defines colour mappings for the given colour type (e.g.,
2509 monochrome) and
2510 .Ic uncolour
2511 can be used to remove mappings of a given colour type.
2512 Since colours are only available in interactive mode, it may make
2513 sense to conditionalize the colour setup by encapsulating it with
2514 .Ic if :
2516 .Bd -literal -offset indent
2517 if terminal && $features =@ +colour
2518   colour iso  view-msginfo  ft=bold,fg=green
2519   colour iso  view-header   ft=bold,fg=red   "from,subject"
2520   colour iso  view-header   fg=red
2522   uncolour iso view-header  from,subject
2523   colour iso  view-header   ft=bold,fg=magenta,bg=cyan
2524   colour 256  view-header   ft=bold,fg=208,bg=230 subject,from
2525   colour mono view-header   ft=bold
2526   colour mono view-header   ft=bold,ft=reverse subject,from
2527 endif
2529 .\" }}}
2530 .\" }}} (DESCRIPTION)
2533 .\" .Sh COMMANDS {{{
2534 .Sh COMMANDS
2536 Each command is typed on a line by itself,
2537 and may take arguments following the command word.
2538 Command names may be abbreviated, in which case the first command that
2539 matches the given prefix will be used.
2540 The command
2541 .Ic list
2542 can be used to show the list of all commands, either alphabetically
2543 sorted or in prefix search order (these don't match, also because the
2544 POSIX standard prescribes a set of abbreviations).
2545 \*(OPally the command
2546 .Ic help
2548 .Ic \&? ) ,
2549 when given an argument, will show a documentation string for the
2550 command matching the expanded argument, as in
2551 .Ql ?t ,
2552 which should be a shorthand of
2553 .Ql ?type .
2554 Both commands support a more
2555 .Va verbose
2556 listing mode which includes the argument type of the command.
2559 For commands which take message lists as arguments, the next message
2560 forward that satisfies the command's requirements will be used shall no
2561 explicit message list have been specified.
2562 If there are no messages forward of the current message,
2563 the search proceeds backwards,
2564 and if there are no good messages at all,
2565 \*(UA shows an error message and aborts the command.
2566 \*(ID Non-message-list arguments can be quoted using the following methods:
2569 .Bl -bullet -compact -offset indent
2571 An argument can be enclosed between paired double-quotes
2572 .Ql """argument"""
2574 single-quotes
2575 .Ql 'argument' ;
2576 any white space, shell word expansion, or reverse solidus characters
2577 (except as described next) within the quotes are treated literally as
2578 part of the argument.
2579 A double-quote will be treated literally within single-quotes and vice
2580 versa.
2581 Inside such a quoted string the actually used quote character can be
2582 used nonetheless by escaping it with a reverse solidus
2583 .Ql \e ,
2584 as in
2585 .Ql """y\e""ou""" .
2588 An argument that is not enclosed in quotes, as above, can usually still
2589 contain space characters if those spaces are reverse solidus escaped, as in
2590 .Ql you\e are .
2593 A reverse solidus outside of the enclosing quotes is discarded
2594 and the following character is treated literally as part of the argument.
2599 Some commands which don't take message-list arguments can also be
2600 prefixed with the special keyword
2601 .Ic \&\&wysh
2602 to choose \*(INible argument quoting rules, and some new commands only
2603 support the new rules (without that keyword) and are flagged \*(NQ.
2604 In the future \*(UA will (mostly) use
2605 .Xr sh 1
2606 compatible argument parsing:
2607 Non-message-list arguments can be quoted using the following shell-style
2608 mechanisms: the escape character, single-quotes, double-quotes and
2609 dollar-single-quotes; any unquoted number sign
2610 .Ql #
2611 that parses as a new token starts a comment that ends argument processing.
2612 The overall granularity of error reporting and diagnostics, also
2613 regarding function arguments and their content, will improve.
2617 .Bl -bullet -compact -offset indent
2619 The literal value of any character can be preserved by preceding it
2620 with the escape character reverse solidus
2621 .Ql \e .
2622 An unquoted dollar
2623 .Ql $
2624 will cause variable expansion of the given name: \*(UA
2625 .Sx "INTERNAL VARIABLES"
2626 as well as
2627 .Sx ENVIRONMENT
2628 (shell) variables can be accessed through this mechanism, brace
2629 enclosing the name is supported.
2632 Arguments which are enclosed in
2633 .Ql 'single-\:quotes'
2634 retain their literal value.
2635 A single-quote cannot occur within single-quotes.
2638 The literal value of all characters enclosed in
2639 .Ql \(dqdouble-\:quotes\(dq
2640 is retained, with the exception of dollar
2641 .Ql $ ,
2642 which will cause variable expansion, as above, backquote (grave accent)
2643 .Ql ` ,
2644 (which not yet means anything special), reverse solidus
2645 .Ql \e ,
2646 which will escape any of the characters dollar
2647 .Ql $
2648 (to prevent variable expansion), backquote (grave accent)
2649 .Ql ` ,
2650 double-quote
2651 .Ql \(dq
2652 (to prevent ending the quote) and reverse solidus
2653 .Ql \e
2654 (to prevent escaping, i.e., to embed a reverse solidus character as-is),
2655 but has no special meaning otherwise.
2658 Arguments enclosed in
2659 .Ql $'dollar-\:single-\:quotes'
2660 extend normal single quotes in that reverse solidus escape sequences are
2661 expanded as follows:
2663 .Bl -tag -compact -width "Ql \eNNN"
2664 .It Ql \ea
2665 alerts (bell).
2666 .It Ql \eb
2667 emits a backspace.
2668 .It Ql \eE
2669 an escape character.
2670 .It Ql \ee
2671 an escape character.
2672 .It Ql \ef
2673 form feed.
2674 .It Ql \en
2675 new line.
2676 .It Ql \er
2677 carriage return.
2678 .It Ql \et
2679 horizontal tab.
2680 .It Ql \ev
2681 vertical tab.
2682 .It Ql \e\e
2683 emits a reverse solidus character.
2684 .It Ql \e'
2685 single quote.
2686 .It Ql \e"
2687 double quote (escaping is optional).
2688 .It Ql \eNNN
2689 eight-bit byte with the octal value
2690 .Ql NNN
2691 (one to three octal digits), optionally prefixed by an additional
2692 .Ql 0 .
2693 A 0 byte will suppress further output for the quoted argument.
2694 .It Ql \exHH
2695 eight-bit byte with the hexadecimal value
2696 .Ql HH
2697 (one or two hexadecimal characters).
2698 A 0 byte will suppress further output for the quoted argument.
2699 .It Ql \eUHHHHHHHH
2700 the Unicode / ISO-10646 character with the hexadecimal codepoint value
2701 .Ql HHHHHHHH
2702 (one to eight hexadecimal digits) \(em note that Unicode defines the
2703 maximum codepoint to be ever supported as
2704 .Ql 0x10FFFF
2705 (in planes of
2706 .Ql 0xFFFF
2707 characters each).
2708 This escape is only supported in locales which support Unicode (see
2709 .Sx "Character sets" ) ,
2710 in other cases the sequence will remain unexpanded unless the given code
2711 point is ASCII compatible or can be represented in the current locale.
2712 The character NUL will suppress further output for the quoted argument.
2713 .It Ql \euHHHH
2714 Identical to
2715 .Ql \eUHHHHHHHH
2716 except it takes only one to four hexadecimal digits.
2717 .It Ql \ecX
2718 A mechanism that allows usage of the non-printable (ASCII and
2719 compatible) control codes 0 to 31: to create the printable
2720 representation of a control code the numeric value 64 is added, and the
2721 resulting ASCII character set code point is then printed, e.g., BEL is
2722 .Ql 7 + 64 = 71 = G .
2723 Whereas historically circumflex notation has often been used for
2724 visualization purposes of control codes, e.g.,
2725 .Ql ^G ,
2726 the reverse solidus notation has been standardized:
2727 .Ql \ecG .
2728 Some control codes also have standardized (ISO 10646, ISO C) alias
2729 representations, as shown above (e.g.,
2730 .Ql \ea ,
2731 .Ql \en ,
2732 .Ql \et ) :
2733 whenever such an alias exists \*(UA will use it for display purposes.
2734 The control code NUL
2735 .Pf ( Ql \ec@ )
2736 ends argument processing without producing further output.
2737 .It Ql \e$NAME
2738 Non-standard extension: expand the given variable name, as above.
2739 Brace enclosing the name is supported.
2740 .It Ql \e`{command}
2741 Not yet supported, just to raise awareness: Non-standard extension.
2747 .Sy Compatibility notes:
2748 \*(ID Note these are new mechanisms which are not supported by all
2749 commands.
2750 Round-tripping (feeding in things shown in list modes again) are not yet
2751 stable or possible at all.
2752 On new-style command lines it is wise to quote semicolon
2753 .Ql \&;
2754 and vertical bar
2755 .Ql |
2756 characters in order to ensure upward compatibility: the author would
2757 like to see things like
2758 .Ql ? echo $'trouble\etahead' | cat >> in_the_shell.txt
2760 .Ql ? top 2 5 10; type 3 22
2761 become possible.
2762 Before \*(UA will switch entirely to shell-style argument parsing there
2763 will be a transition phase where using
2764 .Ic \&\&wysh
2765 will emit obsoletion warnings.
2767 .Bd -literal -offset indent
2768 echo 'Quotes '${HOME}' and 'tokens" differ!"# no comment
2769 echo Quotes ${HOME} and tokens differ! # comment
2770 echo Don"'"t you worry$'\ex21' The sun shines on us. $'\eu263A'
2774 In any event an unquoted reverse solidus at the end of a command line is
2775 discarded and the next line continues the command.
2776 \*(ID Note that line continuation is handled before the above parsing is
2777 applied, i.e., the parsers documented above will see merged lines.
2778 Filenames, where expected, are subsequently subjected to the following
2779 transformations, in sequence:
2782 .Bl -bullet -compact -offset indent
2784 If the filename begins with an unquoted plus sign, and the
2785 .Va folder
2786 variable is defined,
2787 the plus sign will be replaced by the value of the
2788 .Va folder
2789 variable followed by a solidus.
2790 If the
2791 .Va folder
2792 variable is unset or is set to null, the filename will be unchanged.
2795 Meta expansions are applied to the filename: a leading tilde
2796 .Ql ~
2797 character will be replaced by the expansion of
2798 .Ev HOME ,
2799 except when followed by a valid user name, in which case the home
2800 directory of the given user is used instead.
2801 Any occurrence of
2802 .Ql $VARIABLE
2804 .Ql ${VARIABLE} )
2805 will be replaced by the expansion of the variable, if possible; \*(UA
2806 .Sx "INTERNAL VARIABLES"
2807 as well as
2808 .Sx ENVIRONMENT
2809 (shell) variables can be accessed through this mechanism, and the usual
2810 escape mechanism has to be applied to prevent interpretation.
2811 If the fully expanded filename results in multiple pathnames and the
2812 command is expecting only one file, an error results.
2814 In interactive context, in order to allow simple value acceptance (via
2815 .Dq ENTER ) ,
2816 arguments will usually be displayed in a properly quoted form, e.g., a file
2817 .Ql diet\e is \ecurd.txt
2818 may be displayed as
2819 .Ql 'diet\e is \ecurd.txt' .
2823 The following commands are available:
2825 .Bl -tag -width ".Ic _ccount"
2827 .It Ic \&!
2828 Executes the
2829 .Ev SHELL
2830 (see
2831 .Xr sh 1 Ns
2832 ) command which follows.
2835 .It Ic #
2836 The comment-command causes the entire line to be ignored.
2837 .Sy Note:
2838 this really is a normal command which' purpose is to discard its
2839 arguments, not a
2840 .Dq comment-start
2841 indicating special character, which means that, e.g., trailing comments
2842 on a line are not possible.
2845 .It Ic +
2846 Goes to the next message in sequence and types it
2847 (like
2848 .Dq ENTER ) .
2851 .It Ic -
2852 Display the preceding message, or the n'th previous message if given
2853 a numeric argument n.
2856 .It Ic =
2857 Show the current message number (the
2858 .Dq dot ) .
2861 .It Ic \&?
2862 Show a brief summary of commands.
2863 A more
2864 .Va verbose
2865 output is available.
2866 \*(OP Given an argument a synopsis for the command in question is
2867 shown instead; commands can be abbreviated in general and this command
2868 can be used to see the full expansion of an abbreviation including the
2869 synopsis, try, e.g.,
2870 .Ql ?h ,
2871 .Ql ?hel
2873 .Ql ?help
2874 and see how the output changes.
2877 .It Ic \&|
2878 A synonym for the
2879 .Ic pipe
2880 command.
2883 .It Ic ~
2884 Interprets the remainder of the word as a macro name and passes it
2885 through to the
2886 .Ic call
2887 command; e.g.,
2888 .Ql ~ Ns Ar mymacro
2889 is a shorter synonym for
2890 .Ql call Ar mymacro .
2893 .It Ic account
2894 (ac) Creates, selects or lists (an) account(s).
2895 Accounts are special incarnations of
2896 .Ic define Ns d
2897 macros and group commands and variable settings which together usually
2898 arrange the environment for the purpose of creating an email account.
2899 Different to normal macros settings which are covered by
2900 .Ic localopts
2901 \(en here by default enabled! \(en will not be reverted before the
2902 .Ic account
2903 is changed again.
2904 The special account
2905 .Ql null
2906 (case-insensitive) always exists, and all but it can be deleted via
2907 .Ic unaccount .
2909 Without arguments a listing of all defined accounts is shown.
2910 With one argument the given account is activated: the system
2911 .Va inbox
2912 of that account will be activated (as via
2913 .Ic file ) ,
2914 and a possibly installed
2915 .Va folder-hook
2916 will be run.
2917 The two argument form is identical to defining a macro as via
2918 .Ic define :
2919 .Bd -literal -offset indent
2920 account myisp {
2921   set folder=~/mail inbox=+syste.mbox record=+sent.mbox
2922   set from='myname@myisp.example (My Name)'
2923   set mta=smtp://mylogin@smtp.myisp.example
2928 .It Ic alias
2929 (a) With no arguments, shows all currently-defined aliases.
2930 With one argument, shows that alias.
2931 With more than one argument,
2932 creates a new alias or appends to an existing one.
2933 .Ic unalias
2934 can be used to delete aliases.
2937 .It Ic alternates
2938 (alt) Manage a list of alternate addresses / names of the active user,
2939 members of which will be removed from recipient lists when replying to
2940 messages (and the
2941 .Va metoo
2942 variable is not set).
2943 If arguments are given the set of alternate names is replaced by them,
2944 without arguments the current set is displayed.
2947 .It Ic answered
2948 Takes a message list and marks each message as having been answered.
2949 This mark has no technical meaning in the mail system;
2950 it just causes messages to be marked in the header summary,
2951 and makes them specially addressable.
2955 .It Ic bind
2956 \*(OP\*(NQ The bind command extends the MLE (see
2957 .Sx "On terminal control and line editor" )
2958 with freely configurable key bindings.
2959 With one argument all bindings for the given context are shown,
2960 specifying an asterisk
2961 .Ql *
2962 will show the bindings of all contexts; a more verbose listing will be
2963 produced if either of
2964 .Va debug
2966 .Va verbose
2967 are set.
2968 With two or more arguments a binding is (re)established:
2969 the first argument is the context to which the binding shall apply,
2970 the second argument is a comma-separated list of the
2971 .Dq keys
2972 which form the binding, and any remaining arguments form the expansion.
2973 To indicate that a binding shall not be auto-committed, but that the
2974 expansion shall instead be furtherly editable by the user, an at-sign
2975 .Ql @
2976 (that will be removed) can be placed last in the expansion, from which
2977 leading and trailing whitespace will finally be removed.
2980 Contexts define when a binding applies, i.e., a binding won't be seen
2981 unless the context for which it is defined for is currently active.
2982 This is not true for the binding
2983 .Ql base ,
2984 which always applies, but which will be searched secondarily to a more
2985 specialized context and may thus have some or all of its key bindings
2986 transparently replaced by equal bindings of more specialized contexts.
2987 The available contexts are
2988 .Ql base ,
2989 which always applies, and
2990 .Ql compose ,
2991 which applies to compose-mode.
2994 .Dq Keys
2995 which form the binding are specified as a comma-separated list of
2996 byte-sequences, where each list entry corresponds to one key(press).
2997 \*(OPally a list entry may, indicated by a leading colon character
2998 .Ql \&: ,
2999 also refer to the name of a terminal capability;
3000 several dozen names will be compiled into \*(UA and may be specified
3001 either by their
3002 .Xr terminfo 5 ,
3003 or, if existing, by their
3004 .Xr termcap 5
3005 name, regardless of the actually used terminal control library.
3006 It is however possible to use any capability, as long as the name is
3007 resolvable by the control library or defined in the internal variable
3008 .Va termcap .
3009 Input sequences are not case-normalized, so that an exact match is
3010 required to update or remove a binding.
3011 Examples:
3013 .Bd -literal -offset indent
3014 bind base $'\eE',d mle-snarf-word-fwd # Esc(ape)
3015 bind base $'\eE',$'\ec?' mle-snarf-word-bwd # Esc, Delete
3016 bind compose :kf1 ~e
3017 bind base $'\ecA',:khome,w 'echo An editable binding@'
3018 bind base a,b,c rm -rf / @  # Another editable binding
3022 Note that the entire comma-separated list is first parsed (over) as a
3023 shell-token with whitespace as the field separator, before being parsed
3024 and expanded for real with comma as the field separator, therefore
3025 whitespace needs to be properly quoted:
3026 shell-style quoting is documented in the introduction of
3027 .Sx COMMANDS .
3028 Using Unicode reverse solidus escape sequences renders a binding
3029 defunctional if the locale doesn't support Unicode (see
3030 .Sx "Character sets" ) ,
3031 and using terminal capabilities does so if no terminal control support
3032 is (currently) available.
3035 The following terminal capability names are builtin and can be used in
3036 .Xr terminfo 5
3037 or (if available) the two-letter
3038 .Xr termcap 5
3039 notation regardless of the actually used library.
3040 See the respective manual for a list of capabilities.
3041 The program
3042 .Xr infocmp 1
3043 can be used to show all the capabilities of
3044 .Ev TERM
3045 or the given terminal type;
3046 using the
3047 .Fl \&\&x
3048 flag will also show supported (non-standard) extensions.
3051 .Bl -tag -compact -width kcuuf_or_kcuuf
3052 .It Cd kbs Ns \0or Cd kb
3053 Backspace.
3054 .It Cd kdch1 Ns \0or Cd kD
3055 Delete character.
3056 .It Cd kDC Ns \0or Cd *4
3057 \(em shifted variant.
3058 .It Cd kel Ns \0or Cd kE
3059 Clear to end of line.
3060 .It Cd kext Ns \0or Cd @9
3061 Exit.
3062 .It Cd kich1 Ns \0or Cd kI
3063 Insert character.
3064 .It Cd kIC Ns \0or Cd #3
3065 \(em shifted variant.
3066 .It Cd khome Ns \0or Cd kh
3067 Home.
3068 .It Cd kHOM Ns \0or Cd #2
3069 \(em shifted variant.
3070 .It Cd kend Ns \0or Cd @7
3071 End.
3072 .It Cd knp Ns \0or Cd kN
3073 Next page.
3074 .It Cd kpp Ns \0or Cd kP
3075 Previous page.
3076 .It Cd kcub1 Ns \0or Cd kl
3077 Left cursor (with more modifiers: see below).
3078 .It Cd kLFT Ns \0or Cd #4
3079 \(em shifted variant.
3080 .It Cd kcuf1 Ns \0or Cd kr
3081 Right cursor (ditto).
3082 .It Cd kRIT Ns \0or Cd %i
3083 \(em shifted variant.
3084 .It Cd kcud1 Ns \0or Cd kd
3085 Down cursor (ditto).
3086 .It Cd kDN
3087 \(em shifted variant (only terminfo).
3088 .It Cd kcuu1 Ns \0or Cd ku
3089 Up cursor (ditto).
3090 .It Cd kUP
3091 \(em shifted variant (only terminfo).
3092 .It Cd kf0 Ns \0or Cd k0
3093 Function key 0.
3094 Add one for each function key up to
3095 .Cd kf9
3097 .Cd k9 ,
3098 respectively.
3099 .It Cd kf10 Ns \0or Cd k;
3100 Function key 10.
3101 .It Cd kf11 Ns \0or Cd F1
3102 Function key 11.
3103 Add one for each function key up to
3104 .Cd kf19
3106 .Cd F9 ,
3107 respectively.
3111 Some terminals support key-modifier combination extensions, e.g.,
3112 .Ql Alt+Shift+xy .
3113 For example, the delete key,
3114 .Cd kdch1 :
3115 in its shifted variant, the name is mutated to
3116 .Cd  kDC ,
3117 then a number is appended for the states
3118 .Ql Alt
3119 .Pf ( Cd kDC3 ) ,
3120 .Ql Shift+Alt
3121 .Pf ( Cd kDC4 ) ,
3122 .Ql Control
3123 .Pf ( Cd kDC5 ) ,
3124 .Ql Shift+Control
3125 .Pf ( Cd kDC6 ) ,
3126 .Ql Alt+Control
3127 .Pf ( Cd kDC7 ) ,
3128 finally
3129 .Ql Shift+Alt+Control
3130 .Pf ( Cd kDC8 ) .
3131 The same for the left cursor key,
3132 .Cd kcub1 :
3133 .Cd KLFT , KLFT3 , KLFT4 , KLFT5 , KLFT6 , KLFT7 , KLFT8 .
3136 Key bindings can be removed with the command
3137 .Ic unbind .
3138 It is advisable to use an initial escape or other control character (e.g.,
3139 .Ql \ecA )
3140 for bindings which describe user key combinations (as opposed to purely
3141 terminal capability based ones), in order to avoid ambiguities whether
3142 input belongs to key sequences or not; it also reduces search time.
3143 Adjusting
3144 .Va bind-timeout
3145 may help shall keys and sequences be falsely recognized.
3149 .It Ic call
3150 Calls a macro that has been created via
3151 .Ic define .
3154 .It Ic cd
3155 (ch) Change the working directory to
3156 .Ev HOME
3157 or the given argument.
3158 Synonym for
3159 .Ic chdir .
3162 .It Ic certsave
3163 \*(OP Only applicable to S/MIME signed messages.
3164 Takes a message list and a file name and saves the certificates
3165 contained within the message signatures to the named file in both
3166 human-readable and PEM format.
3167 The certificates can later be used to send encrypted messages to the
3168 respective message senders by setting
3169 .Va smime-encrypt-USER@HOST
3170 variables.
3173 .It Ic chdir
3174 (ch) Change the working directory to
3175 .Ev HOME
3176 or the given argument.
3177 Synonym for
3178 .Ic cd .
3181 .It Ic collapse
3182 Only applicable to threaded mode.
3183 Takes a message list and makes all replies to these messages invisible
3184 in header summaries, unless they are in state
3185 .Ql new .
3189 .It Ic colour
3190 \*(OP\*(NQ Manage colour mappings for the type of colour given as the
3191 (case-insensitive) first argument, which must be one of
3192 .Ql 256
3193 for 256-colour terminals,
3194 .Ql 8 ,
3195 .Ql ansi
3197 .Ql iso
3198 for the standard 8-colour ANSI / ISO 6429 color palette and
3199 .Ql 1
3201 .Ql mono
3202 for monochrome terminals.
3203 Monochrome terminals cannot deal with colours, but only (some) font
3204 attributes.
3207 Without further arguments the list of all currently defined mappings
3208 for the given colour type is shown (as a special case giving
3209 .Ql all
3211 .Ql *
3212 will iterate over all types in order).
3213 Otherwise the second argument defines the mappable slot, the third
3214 argument a (comma-separated list of) colour and font attribute
3215 specification(s), and the optional fourth argument can be used to
3216 specify a precondition: if conditioned mappings exist they are tested in
3217 (creation) order unless a (case-insensitive) match has been found, and
3218 the default mapping (if any has been established) will only be chosen as
3219 a last resort.
3220 The types of precondition available depend on the mappable slot, the
3221 following of which exist:
3224 Mappings prefixed with
3225 .Ql mle-
3226 are used for the \*(OPal builtin Mailx-Line-Editor (MLE, see
3227 .Sx "On terminal control and line editor" )
3228 and don't support preconditions.
3230 .Bl -tag -compact -width view-partinfo
3231 .It Cd mle-position
3232 This mapping is used for the position indicator that is visible when
3233 a line cannot be fully displayed on the screen.
3234 .It Cd mle-prompt
3235 Used for the
3236 .Va prompt .
3240 Mappings prefixed with
3241 .Ql sum-
3242 are used in header summaries, and they all understand the preconditions
3243 .Ql dot
3244 (the current message) and
3245 .Ql older
3246 for elder messages (only honoured in conjunction with
3247 .Va datefield-markout-older ) .
3249 .Bl -tag -compact -width view-partinfo
3250 .It Cd sum-dotmark
3251 This mapping is used for the
3252 .Dq dotmark
3253 that can be created with the
3254 .Ql %>
3256 .Ql %<
3257 formats of the variable
3258 .Va headline .
3259 .It Cd sum-header
3260 For the complete header summary line except the
3261 .Dq dotmark
3262 and the thread structure.
3263 .It Cd sum-thread
3264 For the thread structure which can be created with the
3265 .Ql %i
3266 format of the variable
3267 .Va headline .
3271 Mappings prefixed with
3272 .Ql view-
3273 are used when displaying messages.
3275 .Bl -tag -compact -width view-partinfo
3276 .It Cd view-from_
3277 This mapping is used for so-called
3278 .Ql From_
3279 lines, which are MBOX file format specific header lines.
3280 .It Cd view-header
3281 For header lines.
3282 A comma-separated list of headers to which the mapping applies may be
3283 given as a precondition; if the \*(OPal regular expression support is
3284 available then if any of the
3285 .Dq magical
3286 (extended) regular expression characters is seen the precondition will
3287 be evaluated as (an extended) one.
3288 .It Cd view-msginfo
3289 For the introductional message info line.
3290 .It Cd view-partinfo
3291 For MIME part info lines.
3295 The following (case-insensitive) colour definitions and font attributes
3296 are understood, multiple of which can be specified in a comma-separated
3297 list:
3299 .Bl -tag -width ft=
3300 .It Cd ft=
3301 a font attribute:
3302 .Ql bold ,
3303 .Ql reverse
3305 .Ql underline .
3306 It is possible (and often applicable) to specify multiple font
3307 attributes for a single mapping.
3309 .It Cd fg=
3310 foreground colour attribute:
3311 .Ql black ,
3312 .Ql blue ,
3313 .Ql green ,
3314 .Ql red ,
3315 .Ql brown ,
3316 .Ql magenta ,
3317 .Ql cyan
3319 .Ql white .
3320 To specify a 256-color mode a decimal number colour specification in
3321 the range 0 to 255, inclusive, is supported, and interpreted as follows:
3323 .Bl -tag -compact -width "999 - 999"
3324 .It 0 - 7
3325 the standard ISO 6429 colors, as above.
3326 .It 8 - 15
3327 high intensity variants of the standard colors.
3328 .It 16 - 231
3329 216 colors in tuples of 6.
3330 .It 232 - 255
3331 grayscale from black to white in 24 steps.
3333 .Bd -literal -offset indent
3334 #!/bin/sh -
3335 fg() { printf "\e033[38;5;${1}m($1)"; }
3336 bg() { printf "\e033[48;5;${1}m($1)"; }
3338 while [ $i -lt 256 ]; do fg $i; i=$(($i + 1)); done
3339 printf "\e033[0m\en"
3341 while [ $i -lt 256 ]; do bg $i; i=$(($i + 1)); done
3342 printf "\e033[0m\en"
3345 .It Cd bg=
3346 background colour attribute (see
3347 .Cd fg=
3348 for possible values).
3352 Mappings may be removed with the command
3353 .Ic uncolour .
3354 For a generic overview see the section
3355 .Sx "Coloured display" .
3359 .It Ic Copy
3360 (C) Copy messages to files whose names are derived from the author of
3361 the respective message and don't mark them as being saved;
3362 otherwise identical to
3363 .Ic Save .
3366 .It Ic copy
3367 (c) Copy messages to the named file and don't mark them as being saved;
3368 otherwise identical to
3369 .Ic save .
3372 .It Ic customhdr
3373 \*(NQ With no arguments, shows all currently-defined custom headers.
3374 With one argument, shows that custom header.
3375 With more than one argument, creates a new or replaces an existing
3376 custom header with the name given as the first argument, the content of
3377 which being defined by the concatenated remaining arguments.
3378 .Ic uncustomhdr
3379 can be used to delete custom headers.
3380 \*(ID Overwriting of automatically managed headers is neither supported
3381 nor prevented.
3382 Defined custom headers will be injected into newly composed or forwarded
3383 messages, e.g.:
3385 .Dl customhdr OpenPGP id=12345678; url=http://www.YYY.ZZ
3387 The \*(OB variable
3388 .Va customhdr
3389 may also be used to inject custom headers; it is covered by
3390 .Ic localopts .
3393 .It Ic cwd
3394 Show the name of the current working directory.
3397 .It Ic Decrypt
3398 \*(OP For unencrypted messages this command is identical to
3399 .Ic Copy ;
3400 Encrypted messages are first decrypted, if possible, and then copied.
3403 .It Ic decrypt
3404 \*(OP For unencrypted messages this command is identical to
3405 .Ic copy ;
3406 Encrypted messages are first decrypted, if possible, and then copied.
3409 .It Ic define
3410 Without arguments the current list of macros, including their content,
3411 is shown, otherwise a macro is defined.
3412 A macro definition is a sequence of commands in the following form:
3413 .Bd -literal -offset indent
3414 define name {
3415   command1
3416   command2
3417   ...
3418   commandN
3422 A defined macro can be invoked explicitly by using the
3423 .Ic call
3425 .Ic ~
3426 commands, or implicitly if a macro hook is triggered, e.g., a
3427 .Va folder-hook .
3428 Note that interpretation of
3429 .Ic localopts
3430 depends on how (i.e.,
3431 .Dq as what :
3432 normal macro, folder hook, hook, account switch) the macro is invoked.
3433 Macros can be deleted via
3434 .Ic undefine .
3436 .Sy \*(ID:
3437 Macro behaviour, including option localization, will change in v15.
3438 Please be aware of that and possibly embed a version check in a resource
3439 file of yours!
3442 .It Ic delete
3443 (d) Marks the given message list as
3444 .Ql deleted .
3445 Deleted messages will neither be saved in
3446 .Ev MBOX
3447 nor will they be available for most other commands.
3450 .It Ic discard
3451 (di) Identical to
3452 .Ic ignore .
3453 Also see
3454 .Ic retain .
3458 .It Ic dp , dt
3459 Deletes the current message and displays the next message.
3460 If there is no next message, \*(UA says
3461 .Dq at EOF .
3464 .It Ic dotmove
3465 Move the
3466 .Dq dot
3467 up or down by one message when given
3468 .Ql +
3470 .Ql -
3471 argument, respectively.
3474 .It Ic draft
3475 Takes a message list and marks each given message as a draft.
3476 This mark has no technical meaning in the mail system;
3477 it just causes messages to be marked in the header summary,
3478 and makes them specially addressable.
3481 .It Ic echo
3482 (ec) Echoes its arguments after applying
3483 .Xr sh 1 Ns -style
3484 expansions and filename transformations, as documented for
3485 .Sx COMMANDS .
3488 .It Ic edit
3489 (e) Point the text editor (as defined in
3490 .Ev EDITOR )
3491 at each message from the given list in turn.
3492 Modified contents are discarded unless the
3493 .Va writebackedited
3494 variable is set.
3497 .It Ic elif
3498 Part of the
3499 .Ic if Ns / Ns Ic elif Ns / Ns Ic else Ns / Ns Ic endif
3500 conditional \(em if the condition of a preceding
3501 .Ic if
3502 was false, check the following condition and execute the following block
3503 if it evaluates true.
3506 .It Ic else
3507 (el) Part of the
3508 .Ic if Ns / Ns Ic elif Ns / Ns Ic else Ns / Ns Ic endif
3509 conditional \(em if none of the conditions of the preceding
3510 .Ic if
3512 .Ic elif
3513 commands was true, the
3514 .Ic else
3515 block is executed.
3518 .It Ic endif
3519 (en) Marks the end of an
3520 .Ic if Ns / Ns Ic elif Ns / Ns Ic else Ns / Ns Ic endif
3521 conditional execution block.
3525 .It Ic environ
3526 \*(NQ \*(UA has a strict notion about which variables are
3527 .Sx "INTERNAL VARIABLES"
3528 and which are managed in the program
3529 .Sx ENVIRONMENT .
3530 Since some of the latter are a vivid part of \*(UAs functioning,
3531 however, they are transparently integrated into the normal handling of
3532 internal variables via
3533 .Ic set
3535 .Ic unset .
3536 To integrate other environment variables of choice into this
3537 transparent handling, and also to export internal variables into the
3538 process environment where they normally are not, a
3539 .Ql link
3540 needs to become established with this command, as in, e.g.,
3543 .Dl environ link PERL5LIB from TZ
3546 Afterwards changing such variables with
3547 .Ic set
3548 will cause automatic updates of the program environment, and therefore
3549 be inherited by newly created child processes.
3550 Sufficient system support provided (it was in BSD as early as 1987, and
3551 is standardized since Y2K) removing such variables with
3552 .Ic unset
3553 will remove them also from the program environment, but in any way
3554 the knowledge they ever have been
3555 .Ql link Ns
3556 ed will be lost.
3557 Note this implies that
3558 .Ic localopts
3559 may cause loss of links.
3562 The command
3563 .Ql unlink
3564 will remove an existing link, but leaves the variables as such intact.
3565 Additionally the subcommands
3566 .Ql set
3568 .Ql unset
3569 are provided, which work exactly the same as the documented commands
3570 .Ic set
3572 .Ic unset ,
3573 but (additionally) link the variable(s) with the program environment and
3574 thus immediately export them to, or remove them from (if possible),
3575 respectively, the program environment.
3579 .It Ic errors
3580 \*(OP Since \*(UA uses the console as a user interface it can happen
3581 that messages scroll by too fast to become recognized.
3582 Optionally an error message ring queue is available which stores
3583 duplicates of any error message and notifies the user in interactive
3584 sessions whenever a new error has occurred.
3585 The queue is finite: if its maximum size is reached any new message
3586 replaces the eldest.
3587 The command
3588 .Ic errors
3589 can be used to manage this message queue: if given
3590 .Ar show
3591 or no argument the queue will be displayed and cleared,
3592 .Ar clear
3593 will only clear all messages from the queue.
3596 .It Ic exit
3597 (ex or x) Exit from \*(UA without changing the active mailbox and skip
3598 any saving of messages in
3599 .Ev MBOX
3600 as well as a possibly tracked line editor history file.
3603 .It Ic File
3604 (Fi) Like
3605 .Ic file ,
3606 but open the mailbox readonly.
3609 .It Ic file
3610 (fi) The file command switches to a new mailbox.
3611 Without arguments it shows status information of the current mailbox.
3612 If an argument is given, it will write out changes (such as deletions)
3613 the user has made and open a new mailbox.
3614 Some special conventions are recognized for the
3615 .Ar name
3616 argument:
3618 .Bl -tag -compact -offset indent -width ".Ar %:__lespec"
3619 .It Ar #
3620 (number sign) means the previous file,
3621 .It Ar %
3622 (percent sign) means the invoking user's system mailbox, which either
3623 is the (itself expandable)
3624 .Va inbox
3625 if that is set, the standardized absolute pathname indicated by
3626 .Ev MAIL
3627 if that is set, or a builtin compile-time default otherwise.
3628 .It Ar %user
3629 means the primary system mailbox of
3630 .Ar user
3631 (and never the value of
3632 .Va inbox ,
3633 regardless of its actual setting),
3634 .It Ar &
3635 (ampersand) means the invoking user's
3636 .Ev MBOX
3637 file and
3638 .It Ar +file
3639 means a
3640 .Ar file
3641 in the
3642 .Va folder
3643 directory.
3644 .It Ar %:filespec
3645 expands to the same value as
3646 .Ar filespec ,
3647 but the file is handled as a primary system mailbox by, e.g., the
3648 .Ic mbox
3650 .Ic save
3651 commands, meaning that messages that have been read in the current
3652 session will be moved to the
3653 .Ev MBOX
3654 mailbox instead of simply being flagged as read.
3657 If the name matches one of the strings defined with the command
3658 .Ic shortcut ,
3659 it is replaced by its long form and expanded.
3660 If the name ends with
3661 .Ql .gz ,
3662 .Ql .bz2
3664 .Ql .xz
3665 it is treated as being compressed with
3666 .Xr gzip 1 ,
3667 .Xr bzip2 1
3669 .Xr xz 1 ,
3670 respectively, and transparently handled through an intermediate
3671 (un)compression step (using a temporary file) with the according
3672 facility, sufficient support provided.
3673 Likewise, if the named file doesn't exist, but a file with one of the
3674 mentioned compression extensions does, then the name is automatically
3675 expanded and the compressed file is used.
3677 Otherwise, if the name ends with an extension for which
3678 .Va file-hook-load-EXTENSION
3680 .Va file-hook-save-EXTENSION
3681 variables are set, then the given hooks will be used to load and save
3682 .Dq name ,
3683 and \*(UA will work with an intermediate temporary file.
3685 MBOX files (flat file-based mailboxes) are generally locked during file
3686 operations in order to avoid inconsistencies due to concurrent
3687 modifications.
3688 \*(OPal Mailbox files which \*(UA treats as the system
3689 .Va inbox
3690 .Pf ( Ev MAIL )
3691 and primary mailboxes will also be protected by so-called dotlock
3692 files, the traditional way of mail spool file locking: for any file
3693 .Ql a
3694 a lock file
3695 .Ql a.lock
3696 will be created for the duration of the synchronization \(em
3697 as necessary a privilege-separated dotlock child process will be used
3698 to accommodate for necessary privilege adjustments in order to create
3699 the dotlock file in the same directory
3700 and with the same user and group identities as the file of interest.
3703 .Ar name
3704 refers to a directory with the subdirectories
3705 .Ql tmp ,
3706 .Ql new
3708 .Ql cur ,
3709 then it is treated as a folder in
3710 .Dq Maildir
3711 format; \*(ID the variable
3712 .Va newfolders
3713 can be used to control the format of yet non-existent folders.
3714 A name of the form
3716 .Dl \*(IN protocol://[user[:password]@]host[:port][/path]
3717 .Dl \*(OU protocol://[user@]host[:port][/path]
3719 is taken as an Internet mailbox specification.
3720 The \*(OPally supported protocols are
3721 .Ar pop3
3722 (POP3) and
3723 .Ar pop3s
3724 (POP3 with SSL/TLS encrypted transport).
3726 .Ar [/path]
3727 part is valid only for IMAP; there it defaults to
3728 .Ar INBOX .
3729 Also see the section
3730 .Sx "On URL syntax and credential lookup" .
3732 \*(OU If
3733 .Ar user
3734 contains special characters, in particular
3735 .Ql /
3737 .Ql % ,
3738 they must be escaped in URL notation \(en the command
3739 .Ic urlcodec
3740 can be used to show the necessary conversion.
3743 .It Ic flag
3744 Takes a message list and marks the messages as
3745 .Ic flag Ns
3746 ged for urgent/special attention.
3747 This mark has no technical meaning in the mail system;
3748 it just causes messages to be highlighted in the header summary,
3749 and makes them specially addressable.
3752 .It Ic folder
3753 (fold) The same as
3754 .Ic file .
3757 .It Ic folders
3758 With no arguments, list the names of the folders in the folder directory.
3759 With an existing folder as an argument,
3760 lists the names of folders below the named folder.
3763 .It Ic Followup
3764 (F) Similar to
3765 .Ic Respond ,
3766 but saves the message in a file named after the local part of the first
3767 recipient's address (instead of in
3768 .Va record Ns ).
3771 .It Ic followup
3772 (fo) Similar to
3773 .Ic respond ,
3774 but saves the message in a file named after the local part of the first
3775 recipient's address (instead of in
3776 .Va record Ns ).
3779 .It Ic followupall
3780 Similar to
3781 .Ic followup ,
3782 but responds to all recipients regardless of the
3783 .Va flipr
3784 variable.
3787 .It Ic followupsender
3788 Similar to
3789 .Ic Followup ,
3790 but responds to the sender only regardless of the
3791 .Va flipr
3792 variable.
3795 .It Ic Forward
3796 Alias for
3797 .Ic Fwd .
3800 .It Ic forward
3801 Alias for
3802 .Ic fwd .
3805 .It Ic from
3806 (f) Takes a list of message specifications and displays a summary of
3807 their message headers, exactly as via
3808 .Ic headers .
3809 An alias of this command is
3810 .Ic search .
3811 Also see
3812 .Sx "Specifying messages" .
3815 .It Ic Fwd
3816 Similar to
3817 .Ic fwd ,
3818 but saves the message in a file named after the local part of the
3819 recipient's address (instead of in
3820 .Va record Ns ).
3823 .It Ic fwd
3824 Takes a message and the address of a recipient
3825 and forwards the message to him.
3826 The text of the original message is included in the new one,
3827 with the value of the
3828 .Va fwdheading
3829 variable preceding it.
3831 .Ic fwdignore
3833 .Ic fwdretain
3834 commands specify which header fields are included in the new message.
3835 Only the first part of a multipart message is included unless the
3836 .Va forward-as-attachment
3837 option is set.
3838 Unless the option
3839 .Va fullnames
3840 is set recipient addresses will be stripped from comments, names etc.
3843 .It Ic fwdignore
3844 Specifies which header fields are to be ignored with the command
3845 .Ic fwd .
3846 This command has no effect when the
3847 .Va forward-as-attachment
3848 option is set.
3851 .It Ic fwdretain
3852 Specifies which header fields are to be retained with the command
3853 .Ic fwd .
3854 .Ic fwdretain
3855 overrides
3856 .Ic fwdignore .
3857 This command has no effect when the
3858 .Va forward-as-attachment
3859 option is set.
3862 .It Ic ghost
3863 Define or list command aliases, so-called ghosts.
3864 Without arguments a list of all currently known aliases is shown.
3865 With one argument the expansion of the given alias is shown.
3866 With two or more arguments a command alias is defined or updated: the
3867 first argument is the name under which the remaining command line should
3868 be accessible, the content of which can be just about anything.
3869 A ghost can be used everywhere a normal command can be used, but always
3870 takes precedence; any arguments that are given to the command alias are
3871 joined onto the alias content, and the resulting string forms the
3872 command line that is, in effect, executed.
3873 Also see
3874 .Ic unghost .
3875 .Bd -literal -offset indent
3876 ? gh xx
3877 `ghost': no such alias: "xx"
3878 ? gh xx echo hello,
3879 ? gh xx
3880 ghost xx "echo hello,"
3881 ? xx
3882 hello,
3883 ? xx world
3884 hello, world
3888 .It Ic headers
3889 (h) Show the current group of headers, the size of which depends on
3890 the variable
3891 .Va screen
3892 and the style of which can be adjusted with the variable
3893 .Va headline .
3894 If a message-specification is given the group of headers containing the
3895 first message therein is shown and the message at the top of the screen
3896 becomes the new
3897 .Dq dot .
3900 .It Ic help
3901 (hel) A synonym for
3902 .Ic \&? .
3905 .It Ic history
3906 \*(OP Either
3907 .Ar show
3909 .Ar clear
3910 the list of history entries;
3911 a decimal
3912 .Ar NUMBER
3913 argument selects and shows the respective history entry \(en
3914 press
3915 .Dq ENTER
3916 to accept it, and the history entry will become the new history top.
3917 The default mode if no arguments are given is
3918 .Ar show .
3921 .It Ic hold
3922 (ho, also
3923 .Ic preserve )
3924 Takes a message list and marks each message therein to be saved in the
3925 user's system
3926 .Va inbox
3927 instead of in
3928 .Ev MBOX .
3929 Does not override the
3930 .Ic delete
3931 command.
3932 \*(UA deviates from the POSIX standard with this command, because a
3933 .Ic next
3934 command issued after
3935 .Ic hold
3936 will display the following message, not the current one.
3940 .It Ic if
3941 (i) Part of the nestable
3942 .Ic if Ns / Ns Ic elif Ns / Ns Ic else Ns / Ns Ic endif
3943 conditional execution construct \(em if the given condition is true then
3944 the encapsulated block is executed.
3945 POSIX only supports the (case-insensitive) conditions
3946 .Ql r Ns
3947 eceive
3949 .Ql s Ns
3950 end, all remaining conditions are non-portable extensions; note that
3951 falsely specified conditions cause the execution of the entire
3952 conditional construct until the (matching) closing
3953 .Ic endif
3954 command to be suppressed.
3955 The syntax of the nestable
3956 .Ic if
3957 conditional execution construct requires that each condition and syntax
3958 element is surrounded by whitespace.
3960 .Bd -literal -offset indent
3961 if receive
3962   commands ...
3963 else
3964   commands ...
3965 endif
3969 The (case-insensitive) condition
3970 .Ql t Ns
3971 erminal will evaluate to true if the standard input is a terminal, i.e.,
3972 in interactive sessions.
3973 Another condition can be any boolean value (see the section
3974 .Sx "INTERNAL VARIABLES"
3975 for textual boolean representations) to mark an enwrapped block as
3976 .Dq never execute
3978 .Dq always execute .
3979 It is possible to check
3980 .Sx "INTERNAL VARIABLES"
3981 as well as
3982 .Sx ENVIRONMENT
3983 variables for existence or compare their expansion against a user given
3984 value or another variable by using the
3985 .Ql $
3986 .Pf ( Dq variable next )
3987 conditional trigger character;
3988 a variable on the right hand side may be signalled using the same
3989 mechanism.
3990 The variable names may be enclosed in a pair of matching braces.
3993 The available comparison operators are
3994 .Ql <
3995 (less than),
3996 .Ql <=
3997 (less than or equal to),
3998 .Ql ==
3999 (equal),
4000 .Ql !=
4001 (not equal),
4002 .Ql >=
4003 (greater than or equal to),
4004 .Ql >
4005 (greater than),
4006 .Ql =@
4007 (is substring of) and
4008 .Ql !@
4009 (is not substring of).
4010 The values of the left and right hand side are treated as strings and
4011 are compared 8-bit byte-wise, ignoring case according to the rules of
4012 the US-ASCII encoding (therefore, dependent on the active locale,
4013 possibly producing false results for strings in the locale encoding).
4014 Except for the substring checks the comparison will instead be performed
4015 arithmetically if both, the user given value as well as the variable
4016 content, can be parsed as numbers (integers).
4017 An unset variable is treated as the empty string.
4020 When the \*(OPal regular expression support is available, the additional
4021 test cases
4022 .Ql =~
4024 .Ql !~
4025 can be used.
4026 They treat the right hand side as an extended regular expression that is
4027 matched case-insensitively and according to the active
4028 .Ev LC_CTYPE
4029 locale, meaning that strings in the locale encoding should be matched
4030 correctly.
4033 Conditions can be joined via AND-OR lists (where the AND operator is
4034 .Ql &&
4035 and the OR operator is
4036 .Ql || ) ,
4037 which have equal precedence and will be evaluated with left
4038 associativity, thus using the same syntax that is known for the
4039 .Xr sh 1 .
4040 It is also possible to form groups of conditions and lists by enclosing
4041 them in pairs of brackets
4042 .Ql [\ \&.\&.\&.\ ] ,
4043 which may be interlocked within each other, and also be joined via
4044 AND-OR lists.
4047 The results of individual conditions and entire groups may be modified
4048 via unary operators: the unary operator
4049 .Ql \&!
4050 will reverse the result.
4052 .Bd -literal -offset indent
4053 if $debug
4054   echo *debug* is set
4055 endif
4056 if $ttycharset == "UTF-8"
4057   echo *ttycharset* is set to UTF-8, case-insensitively
4058 endif
4059 set t1=one t2=one
4060 if ${t1} == ${t2}
4061   echo These two variables are equal
4062 endif
4063 if $version-major >= 15
4064   echo Running a new version..
4065   if $features =@ +regex
4066     if $TERM =~ "^xterm\&.*"
4067       echo ..in an X terminal
4068     endif
4069   endif
4070   if [ [ true ] && [ [ ${debug} ] || [ $verbose ] ] ]
4071     echo Noisy, noisy
4072   endif
4073   if true && $debug || ${verbose}
4074     echo Left associativity, as is known from the shell
4075   endif
4076   if ! ! true && ! [ ! $debug && ! $verbose ]
4077     echo Unary operator support
4078   endif
4079 endif
4084 .It Ic ignore
4085 Without arguments the list of ignored header fields is shown,
4086 otherwise the given list of header fields is added to the ignore list:
4087 Header fields in the ignore list are not shown on the terminal when
4088 a message is displayed.
4089 To display a message in its entirety, use the commands
4090 .Ic Type
4092 .Ic Print .
4093 Also see
4094 .Ic discard
4096 .Ic retain .
4099 .It Ic list
4100 Shows the names of all available commands, alphabetically sorted.
4101 If given any non-whitespace argument the list will be shown in the order
4102 in which command prefixes are searched.
4103 A more
4104 .Va verbose
4105 output is available.
4108 .It Ic localopts
4109 This command can be used to localize changes to variables, meaning that
4110 their state will be reverted to the former one once the covered scope
4111 is left.
4112 It can only be used inside of macro definition blocks introduced by
4113 .Ic account
4115 .Ic define ,
4116 and is interpreted as a boolean (string, see
4117 .Sx "INTERNAL VARIABLES" ) ;
4119 .Dq covered scope
4120 of an account is left once it is switched off again.
4121 .Bd -literal -offset indent
4122 define temporary_settings {
4123   set global_option1
4124   localopts on
4125   set local_option1
4126   set local_option2
4127   localopts off
4128   set global_option2
4132 .Sy Note
4133 that this setting
4134 .Dq stacks up :
4135 i.e., if
4136 .Ql macro1
4137 enables change localization and calls
4138 .Ql macro2 ,
4139 which explicitly resets localization, then any value changes within
4140 .Ql macro2
4141 will still be reverted by
4142 .Ql macro1 !
4143 \*(ID Once the outermost level, the one which enabled localization
4144 first, is left, but no earlier, all adjustments will be unrolled.
4145 \*(ID Likewise worth knowing, if in this example
4146 .Ql macro2
4147 changes to a different
4148 .Ic account
4149 which sets some variables that are yet covered by localizations, their
4150 scope will be extended, and in fact leaving the
4151 .Ic account
4152 will (thus) restore settings in (likely) global scope which actually
4153 were defined in a local, private context.
4156 .It Ic Lreply
4157 Reply to messages that come in via known
4158 .Pf ( Ic mlist )
4159 or subscribed
4160 .Pf ( Ic mlsubscribe )
4161 mailing lists, or pretend to do so (see
4162 .Sx "Mailing lists" ) :
4163 on top of the usual
4164 .Ic reply
4165 functionality this will actively resort and even remove message
4166 recipients in order to generate a message that is supposed to be sent to
4167 a mailing list.
4168 For example it will also implicitly generate a
4169 .Ql Mail-Followup-To:
4170 header if that seems useful, regardless of the setting of the variable
4171 .Va followup-to .
4174 .It Ic Mail
4175 Similar to
4176 .Ic mail ,
4177 but saves the message in a file named after the local part of the first
4178 recipient's address (instead of in
4179 .Va record Ns ).
4182 .It Ic mail
4183 (m) Takes a (list of) recipient address(es) as (an) argument(s),
4184 or asks on standard input if none were given;
4185 then collects the remaining mail content and sends it out.
4188 .It Ic mbox
4189 (mb) The given message list is to be sent to
4190 .Ev MBOX
4191 when \*(UA is quit; this is the default action unless the
4192 .Va hold
4193 option is set.
4194 \*(ID This command can only be used in a primary system mailbox (see
4195 .Ic file ) .
4198 .It Ic mimetype
4199 Without any arguments the content of the MIME type cache will displayed.
4200 Otherwise each argument defines a complete MIME type specification of
4201 a type that shall be added (prepended) to the cache.
4202 In any event MIME type sources are loaded first as necessary \(en
4203 .Va mimetypes-load-control
4204 can be used to fine-tune which sources are actually loaded.
4205 Refer to the section on
4206 .Sx "The mime.types files"
4207 for more on MIME type specifications and this topic in general.
4208 MIME type unregistration and cache resets can be triggered with
4209 .Ic unmimetype .
4212 .It Ic mlist
4213 Without arguments the list of all currently defined mailing lists
4214 (and their attributes, if any) is shown; a more verbose listing will be
4215 produced if either of
4216 .Va debug
4218 .Va verbose
4219 are set.
4220 Otherwise all given arguments (which need not be quoted except for
4221 whitespace) will be added and henceforth be recognized as mailing lists.
4222 Mailing lists may be removed via the command
4223 .Ic unmlist .
4225 If the \*(OPal regular expression support is available then mailing
4226 lists may also be specified as (extended) regular expressions (see
4227 .Xr re_format 7
4228 for more on those).
4231 .It Ic mlsubscribe
4232 Without arguments the list of all currently defined mailing lists which
4233 have a subscription attribute is shown; a more verbose listing will be
4234 produced if either of
4235 .Va debug
4237 .Va verbose
4238 are set.
4239 Otherwise this attribute will be set for all given mailing lists,
4240 newly creating them as necessary (as via
4241 .Ic mlist ) .
4242 Subscription attributes may be removed via the command
4243 .Ic unmlsubscribe .
4244 Also see
4245 .Va followup-to .
4248 .It Ic Move
4249 Similar to
4250 .Ic move ,
4251 but moves the messages to a file named after the local part of the
4252 sender address of the first message (instead of in
4253 .Va record Ns ).
4256 .It Ic move
4257 Acts like
4258 .Ic copy
4259 but marks the messages for deletion if they were transferred
4260 successfully.
4263 .It Ic More
4264 Like
4265 .Ic more ,
4266 but also displays ignored header fields and all MIME parts.
4267 Identical to
4268 .Ic Page .
4271 .It Ic more
4272 Invokes the
4273 .Ev PAGER
4274 on the given messages, even in non-interactive mode and as long as the
4275 standard output is a terminal.
4276 Identical to
4277 .Ic page .
4280 .It Ic netrc
4281 \*(OP When used without arguments or if
4282 .Ar show
4283 has been given the content of the
4284 .Pa .netrc
4285 cache is shown, loading it first as necessary.
4286 If the argument is
4287 .Ar load
4288 then the cache will only be initialized and
4289 .Ar clear
4290 will remove its contents.
4291 Note that \*(UA will try to load the file only once, use
4292 .Ql Ic \&\&netrc Ns \:\0\:clear
4293 to unlock further attempts.
4295 .Va netrc-lookup ,
4296 .Va netrc-pipe
4297 and the section
4298 .Sx "On URL syntax and credential lookup" ;
4299 the section
4300 .Sx "The .netrc file"
4301 documents the file format in detail.
4304 .It Ic newmail
4305 Checks for new mail in the current folder without committing any changes
4306 before.
4307 If new mail is present, a message is shown.
4308 If the
4309 .Va header
4310 variable is set,
4311 the headers of each new message are also shown.
4312 This command is not available for all mailbox types.
4315 .It Ic next
4316 (n) (like
4317 .Ql +
4319 .Dq ENTER )
4320 Goes to the next message in sequence and types it.
4321 With an argument list, types the next matching message.
4324 .It Ic New
4325 Same as
4326 .Ic Unread .
4329 .It Ic new
4330 Same as
4331 .Ic unread .
4334 .It Ic noop
4335 If the current folder is accessed via a network connection, a
4336 .Dq NOOP
4337 command is sent, otherwise no operation is performed.
4340 .It Ic Page
4341 Like
4342 .Ic page ,
4343 but also displays ignored header fields and all MIME parts.
4344 Identical to
4345 .Ic More .
4348 .It Ic page
4349 Invokes the
4350 .Ev PAGER
4351 on the given messages, even in non-interactive mode and as long as the
4352 standard output is a terminal.
4353 Identical to
4354 .Ic more .
4357 .It Ic Pipe
4358 Like
4359 .Ic pipe
4360 but also pipes ignored header fields and all parts of MIME
4361 .Ql multipart/alternative
4362 messages.
4365 .It Ic pipe
4366 (pi) Takes a message list and a shell command
4367 and pipes the messages through the command.
4368 Without an argument the current message is piped through the command
4369 given by the
4370 .Va cmd
4371 variable.
4372 If the
4373 .Va page
4374 variable is set,
4375 every message is followed by a formfeed character.
4378 .It Ic preserve
4379 (pre) A synonym for
4380 .Ic hold .
4383 .It Ic Print
4384 (P) Alias for
4385 .Ic Type .
4388 .It Ic print
4389 (p) Research
4391 equivalent of
4392 .Ic type .
4395 .It Ic quit
4396 (q) Terminates the session, saving all undeleted, unsaved messages in
4397 the current
4398 .Ev MBOX ,
4399 preserving all messages marked with
4400 .Ic hold
4402 .Ic preserve
4403 or never referenced in the system
4404 .Va inbox ,
4405 and removing all other messages from the primary system mailbox.
4406 If new mail has arrived during the session,
4407 the message
4408 .Dq You have new mail
4409 will be shown.
4410 If given while editing a mailbox file with the command line flag
4411 .Fl f ,
4412 then the edit file is rewritten.
4413 A return to the shell is effected,
4414 unless the rewrite of edit file fails,
4415 in which case the user can escape with the exit command.
4418 .It Ic redirect
4419 Same as
4420 .Ic resend .
4423 .It Ic Redirect
4424 Same as
4425 .Ic Resend .
4428 .It Ic remove
4429 Removes the named files or directories.
4430 If a name refer to a mailbox, e.g., a Maildir mailbox, then a mailbox
4431 type specific removal will be performed, deleting the complete mailbox.
4432 The user is asked for confirmation in interactive mode.
4435 .It Ic rename
4436 Takes the name of an existing folder
4437 and the name for the new folder
4438 and renames the first to the second one.
4439 Both folders must be of the same type.
4442 .It Ic Reply
4443 (R) Reply to originator.
4444 Does not reply to other recipients of the original message.
4445 .Va flipr
4446 will exchange this command with
4447 .Ic reply .
4448 Unless the option
4449 .Va fullnames
4450 is set the recipient address will be stripped from comments, names etc.
4453 .It Ic reply
4454 (r) Take a message and group-responds to it by addressing the sender
4455 and all recipients.
4456 .Va followup-to ,
4457 .Va followup-to-honour ,
4458 .Va reply-to-honour
4459 as well as
4460 .Va recipients-in-cc
4461 influence response behaviour.
4462 The command
4463 .Ic Lreply
4464 offers special support for replying to mailing lists.
4465 Unless the option
4466 .Va fullnames
4467 is set recipient addresses will be stripped from comments, names etc.
4469 .Va flipr
4470 is set the commands
4471 .Ic Reply
4473 .Ic reply
4474 are exchanged.
4477 .It Ic replyall
4478 Similar to
4479 .Ic reply ,
4480 but initiates a group-reply regardless of the value of
4481 .Va flipr .
4484 .It Ic replysender
4485 Similar to
4486 .Ic Reply ,
4487 but responds to the sender only regardless of the value of
4488 .Va flipr .
4491 .It Ic Resend
4492 Like
4493 .Ic resend ,
4494 but does not add any header lines.
4495 This is not a way to hide the sender's identity,
4496 but useful for sending a message again to the same recipients.
4499 .It Ic resend
4500 Takes a list of messages and a user name
4501 and sends each message to the named user.
4502 .Ql Resent-From:
4503 and related header fields are prepended to the new copy of the message.
4506 .It Ic Respond
4507 Same as
4508 .Ic Reply .
4511 .It Ic respond
4512 Same as
4513 .Ic reply .
4516 .It Ic respondall
4517 Same as
4518 .Ic replyall .
4521 .It Ic respondsender
4522 Same as
4523 .Ic replysender .
4526 .It Ic retain
4527 (ret) Without arguments the list of retained header fields is shown,
4528 otherwise the given list of header fields is added to the retain list:
4529 Header fields in the retain list are shown on the terminal when
4530 a message is displayed, all other header fields are suppressed.
4531 To display a message in its entirety, use the commands
4532 .Ic Type
4534 .Ic Print .
4535 Also see
4536 .Ic discard
4538 .Ic ignore ;
4539 .Ic retain
4540 takes precedence over the mentioned.
4543 .It Ic Save
4544 (S) Similar to
4545 .Ic save,
4546 but saves the messages in a file named after the local part of the
4547 sender of the first message instead of (in
4548 .Va record
4549 and) taking a filename argument.
4552 .It Ic save
4553 (s) Takes a message list and a filename and appends each message in turn
4554 to the end of the file.
4555 If no filename is given, the
4556 .Ev MBOX
4557 file is used.
4558 The filename in quotes, followed by the generated character count
4559 is echoed on the user's terminal.
4560 If editing a primary system mailbox the messages are marked for deletion.
4561 Filename interpretation as described for the
4562 .Ic file
4563 command is performed.
4566 .It Ic savediscard
4567 Same as
4568 .Ic saveignore .
4571 .It Ic saveignore
4572 Is to
4573 .Ic save
4574 what
4575 .Ic ignore
4576 is to
4577 .Ic print
4579 .Ic type .
4580 Header fields thus marked are filtered out when saving a message by
4581 .Ic save
4582 or when automatically saving to
4583 .Ev MBOX .
4584 This command should only be applied to header fields that do not contain
4585 information needed to decode the message,
4586 as MIME content fields do.
4589 .It Ic saveretain
4590 Is to
4591 .Ic save
4592 what
4593 .Ic retain
4594 is to
4595 .Ic print
4597 .Ic type .
4598 Header fields thus marked are the only ones saved with a message when
4599 saving by
4600 .Ic save
4601 or when automatically saving to
4602 .Ev MBOX .
4603 .Ic saveretain
4604 overrides
4605 .Ic saveignore .
4606 The use of this command is strongly discouraged since it may strip
4607 header fields that are needed to decode the message correctly.
4610 .It Ic search
4611 Takes a message specification (list) and displays a header summary of
4612 all matching messages, as via
4613 .Ic headers .
4614 This command is an alias of
4615 .Ic from .
4616 Also see
4617 .Sx "Specifying messages" .
4620 .It Ic seen
4621 Takes a message list and marks all messages as having been read.
4624 .It Ic set
4625 (se) Without arguments this command shows all internal variables which
4626 are currently known to \*(UA (they have been set).
4627 A more verbose listing will be produced if either of
4628 .Va debug
4630 .Va verbose
4631 are set, in which case variables may be preceded with a comment line
4632 that gives some context of what \*(UA knows about the given variable.
4634 Otherwise the given variables (and arguments) are set or adjusted.
4635 Arguments are of the form
4636 .Ql name=value
4637 (no space before or after
4638 .Ql = ) ,
4639 or plain
4640 .Ql name
4641 if there is no value, i.e., a boolean variable.
4642 Quotation marks may be placed around any part of the assignment
4643 statement to quote blanks or tabs, e.g.,
4645 .Dl set indentprefix='->'
4647 If an argument begins with
4648 .Ql no ,
4649 as in
4650 .Ql set nosave ,
4651 the effect is the same as invoking the
4652 .Ic unset
4653 command with the remaining part of the variable
4654 .Pf ( Ql unset save ) .
4657 .Ql name
4658 that is known to map to an environment variable will automatically cause
4659 updates in the program environment (unsetting a variable in the
4660 environment requires corresponding system support).
4661 Please use the command
4662 .Ic environ
4663 for further environmental control.
4664 Also see
4665 .Ic varedit ,
4666 .Ic varshow
4667 and the sections
4668 .Sx "INTERNAL VARIABLES"
4670 .Sx ENVIRONMENT .
4673 .It Ic shell
4674 (sh) Invokes an interactive version of the shell.
4677 .It Ic shortcut
4678 Without arguments the list of all currently defined shortcuts is
4679 shown.
4680 Otherwise all given arguments (which need not be quoted except for
4681 whitespace) are treated as pairs of shortcuts and their expansions,
4682 creating new or changing already existing shortcuts, as necessary.
4683 Shortcuts may be removed via the command
4684 .Ic unshortcut .
4685 The expansion strings should be in the syntax that has been described
4686 for the
4687 .Ic file
4688 command.
4691 .It Ic show
4692 Like
4693 .Ic type ,
4694 but performs neither MIME decoding nor decryption, so that the raw
4695 message text is shown.
4698 .It Ic size
4699 (si) Shows the size in characters of each message of the given
4700 message-list.
4703 .It Ic sort
4704 Shows the current sorting criterion when used without an argument.
4705 Otherwise creates a sorted representation of the current folder,
4706 and changes the
4707 .Ic next
4708 command and the addressing modes such that they refer to messages in
4709 the sorted order.
4710 Message numbers are the same as in regular mode.
4711 If the
4712 .Va header
4713 variable is set,
4714 a header summary in the new order is also displayed.
4715 Automatic folder sorting can be enabled by setting the
4716 .Va autosort
4717 variable, as in, e.g.,
4718 .Ql set autosort=thread .
4719 Possible sorting criterions are:
4721 .Bl -tag -compact -offset indent -width "subject"
4722 .It date
4723 Sort the messages by their
4724 .Ql Date:
4725 field, that is by the time they were sent.
4726 .It from
4727 Sort messages by the value of their
4728 .Ql From:
4729 field, that is by the address of the sender.
4730 If the
4731 .Va showname
4732 variable is set, the sender's real name (if any) is used.
4733 .It size
4734 Sort the messages by their size.
4735 .It spam
4736 \*(OP Sort the message by their spam score, as has been classified by
4737 .Ic spamrate .
4738 .It status
4739 Sort the messages by their message status.
4740 .It subject
4741 Sort the messages by their subject.
4742 .It thread
4743 Create a threaded display.
4744 .It to
4745 Sort messages by the value of their
4746 .Ql To:
4747 field, that is by the address of the recipient.
4748 If the
4749 .Va showname
4750 variable is set, the recipient's real name (if any) is used.
4754 .It Ic source
4755 (so) The source command reads commands from the given file, which is
4756 subject to the usual filename expansions (see introductional words of
4757 .Sx COMMANDS ) .
4758 If the given argument ends with a vertical bar
4759 .Ql |
4760 then the argument will instead be interpreted as a shell command and
4761 \*(UA will read the output generated by it.
4762 Interpretation of commands read is stopped when an error is encountered.
4763 \*(ID Note that
4764 .Ic \&\&source
4765 cannot be used from within macros that execute as
4766 .Va folder-hook Ns s
4768 .Ic account Ns s ,
4769 i.e., it can only be called from macros that were
4770 .Ic call Ns ed .
4773 .It Ic source_if
4774 The difference to
4775 .Ic source
4776 (beside not supporting pipe syntax aka shell command input) is that
4777 this command will not generate an error if the given file argument
4778 cannot be opened successfully.
4781 .It Ic spamclear
4782 \*(OP Takes a list of messages and clears their
4783 .Ql is-spam
4784 flag.
4787 .It Ic spamforget
4788 \*(OP Takes a list of messages and causes the
4789 .Va spam-interface
4790 to forget it has ever used them to train its Bayesian filter.
4791 Unless otherwise noted the
4792 .Ql is-spam
4793 flag of the message is inspected to chose whether a message shall be
4794 forgotten to be
4795 .Dq ham
4797 .Dq spam .
4800 .It Ic spamham
4801 \*(OP Takes a list of messages and informs the Bayesian filter of the
4802 .Va spam-interface
4803 that they are
4804 .Dq ham .
4805 This also clears the
4806 .Ql is-spam
4807 flag of the messages in question.
4810 .It Ic spamrate
4811 \*(OP Takes a list of messages and rates them using the configured
4812 .Va spam-interface ,
4813 without modifying the messages, but setting their
4814 .Ql is-spam
4815 flag as appropriate; because the spam rating headers are lost the rate
4816 will be forgotten once the mailbox is left.
4817 Refer to the manual section
4818 .Sx "Handling spam"
4819 for the complete picture of spam handling in \*(UA.
4822 .It Ic spamset
4823 \*(OP Takes a list of messages and sets their
4824 .Ql is-spam
4825 flag.
4828 .It Ic spamspam
4829 \*(OP Takes a list of messages and informs the Bayesian filter of the
4830 .Va spam-interface
4831 that they are
4832 .Dq spam .
4833 This also sets the
4834 .Ql is-spam
4835 flag of the messages in question.
4838 .It Ic thread
4839 \*(OB The same as
4840 .Ql sort thread
4841 (consider using a
4842 .Ql ghost
4843 as necessary).
4844 Create a threaded representation of the current folder,
4845 i.\|e. indent messages that are replies to other messages in the header
4846 display and change the
4847 .Ic next
4848 command and the addressing modes such that they refer to messages in the
4849 threaded order.
4850 Message numbers are the same as in unthreaded mode.
4851 If the
4852 .Va header
4853 variable is set,
4854 a header summary in threaded order is also displayed.
4857 .It Ic Top
4858 Like
4859 .Ic top
4860 but honours
4861 .Ic ignore
4863 .Ic retain
4864 filter lists.
4867 .It Ic top
4868 (to) Takes a message list and types out the first
4869 .Va toplines
4870 lines of each message on the users' terminal.
4871 The only header fields that are displayed are
4872 .Ql From: ,
4873 .Ql To: ,
4874 .Ql CC: ,
4876 .Ql Subject:
4877 .Pf ( Ic Top
4878 will instead honour configured lists).
4879 It is possible to apply compression to what is displayed by setting
4880 .Va topsqueeze .
4881 Messages are decrypted and converted to the terminal character set
4882 if necessary.
4885 .It Ic touch
4886 (tou) Takes a message list and marks the messages for saving in
4887 .Ev MBOX .
4888 \*(UA deviates from the POSIX standard with this command,
4889 as a following
4890 .Ic next
4891 command will display the following message instead of the current one.
4894 .It Ic Type
4895 (T) Like
4896 .Ic type
4897 but also displays out ignored header fields and all parts of MIME
4898 .Ql multipart/alternative
4899 messages.
4902 .It Ic type
4903 (t) Takes a message list and types out each message on the users'
4904 terminal, honouring
4905 .Ic ignore
4907 .Ic retain
4908 lists.
4909 For MIME multipart messages, all parts with a content type of
4910 .Ql text
4912 .Ql message
4913 are shown, the other are hidden except for their headers.
4914 Messages are decrypted and converted to the terminal character set
4915 if necessary.
4918 .It Ic unaccount
4919 Delete all given accounts.
4920 An error message is shown if a given account is not defined.
4921 The special name
4922 .Ql *
4923 will discard all existing accounts.
4926 .It Ic unalias
4927 (una) Takes a list of names defined by alias commands
4928 and discards the remembered groups of users.
4929 The special name
4930 .Ql *
4931 will discard all existing aliases.
4934 .It Ic unanswered
4935 Takes a message list and marks each message as not having been answered.
4938 .It Ic unbind
4939 Forget about a key
4940 .Ic bind Ns
4941 ing, specified by its context and input sequence, both of which may be
4942 specified as a wildcard (asterisk,
4943 .Ql * ) ,
4944 e.g.,
4945 .Ql unbind * *
4946 will remove all bindings of all contexts.
4949 .It Ic uncollapse
4950 Only applicable to threaded mode.
4951 Takes a message list and makes the message and all replies to it visible
4952 in header summaries again.
4953 When a message becomes the current message,
4954 it is automatically made visible.
4955 Also when a message with collapsed replies is displayed,
4956 all of these are automatically uncollapsed.
4959 .It Ic uncolour
4960 Forget about a
4961 .Ic colour
4962 mapping for the given colour type (see
4963 .Ic colour
4964 for a list of types) and mapping; if the optional precondition argument
4965 is used then only the exact tuple of mapping and precondition is removed.
4966 The special name
4967 .Ql *
4968 will remove all mappings (no precondition allowed).
4969 Also see
4970 .Sx "Coloured display"
4971 for the general picture.
4974 .It Ic uncustomhdr
4975 Deletes the custom headers given as arguments.
4976 The special name
4977 .Ql *
4978 will remove all custom headers.
4981 .It Ic undefine
4982 Undefine all given macros.
4983 An error message is shown if a given macro is not defined.
4984 The special name
4985 .Ql *
4986 will discard all existing macros.
4989 .It Ic undelete
4990 (u) Takes a message list and marks each message as not being deleted.
4993 .It Ic undraft
4994 Takes a message list and
4995 .Pf un Ic draft Ns
4996 s each message.
4999 .It Ic unflag
5000 Takes a message list and marks each message as not being
5001 .Ic flag Ns ged .
5004 .It Ic unfwdignore
5005 Removes the header field names from the list of ignored fields for the
5006 .Ic forward
5007 command.
5008 The special name
5009 .Ql *
5010 will remove all fields.
5013 .It Ic unfwdretain
5014 Removes the header field names from the list of retained fields for the
5015 .Ic forward
5016 command.
5017 The special name
5018 .Ql *
5019 will remove all fields.
5022 .It Ic unghost
5023 Remove all the given command
5024 .Ic ghost Ns s Ns .
5025 The special name
5026 .Ql *
5027 will remove all ghosts.
5030 .It Ic unignore
5031 Removes the header field names from the list of ignored fields.
5032 The special name
5033 .Ql *
5034 will remove all fields.
5037 .It Ic unmimetype
5038 Delete all given MIME types, e.g.,
5039 .Ql unmimetype text/plain
5040 will remove all registered specifications for the MIME type
5041 .Ql text/plain .
5042 The special name
5043 .Ql *
5044 will discard all existing MIME types, just as will
5045 .Ql reset ,
5046 but which also reenables cache initialization via
5047 .Va mimetypes-load-control .
5050 .It Ic unmlist
5051 Forget about all the given mailing lists.
5052 The special name
5053 .Ql *
5054 will remove all lists.
5055 Also see
5056 .Ic mlist .
5059 .It Ic unmlsubscribe
5060 Remove the subscription attribute from all given mailing lists.
5061 The special name
5062 .Ql *
5063 will clear the attribute from all lists which have it set.
5064 Also see
5065 .Ic mlsubscribe .
5068 .It Ic Unread
5069 Same as
5070 .Ic unread .
5073 .It Ic unread
5074 Takes a message list and marks each message as not having been read.
5077 .It Ic unretain
5078 Removes the header field names from the list of retained fields.
5079 The special name
5080 .Ql *
5081 will remove all fields.
5084 .It Ic unsaveignore
5085 Removes the header field names from the list of ignored fields for
5086 saving.
5087 The special name
5088 .Ql *
5089 will remove all fields.
5092 .It Ic unsaveretain
5093 Removes the header field names from the list of retained fields for
5094 saving.
5095 The special name
5096 .Ql *
5097 will remove all fields.
5100 .It Ic unset
5101 (uns) Takes a list of internal variable names and discards their
5102 remembered values; the reverse of
5103 .Ic set .
5104 Also see
5105 .Ic environ .
5108 .It Ic unshortcut
5109 Deletes the shortcut names given as arguments.
5110 The special name
5111 .Ql *
5112 will remove all shortcuts.
5115 .It Ic unsort
5116 Disable sorted or threaded mode
5117 (see the
5118 .Ic sort
5120 .Ic thread
5121 commands),
5122 return to normal message order and,
5123 if the
5124 .Va header
5125 variable is set,
5126 displays a header summary.
5129 .It Ic unthread
5130 \*(OB
5131 Same as
5132 .Ic unsort .
5135 .It Ic urlcodec
5136 Perform URL percent codec operations, rather according to RFC 3986,
5137 on all given strings.
5138 This is character set agnostic and thus locale dependent, and it may
5139 decode bytes which are invalid in the current locale, unless the input
5140 solely consists of characters in the portable character set, see
5141 .Sx "Character sets" .
5142 The first argument specifies the operation:
5143 .Ar enc[ode]
5145 .Ar dec[code]
5146 perform plain URL percent en- and decoding, respectively.
5147 .Ar p[ath]enc[ode]
5149 .Ar p[ath]dec[ode]
5150 perform a slightly modified operation which should be better for
5151 pathnames: it doesn't allow a tilde
5152 .Ql ~ ,
5153 and will neither accept hyphen
5154 .Ql -
5155 nor dot
5156 .Ql .
5157 as an initial character.
5160 .It Ic varedit
5161 Edit the values of or create the given variable(s) in the
5162 .Ev EDITOR .
5163 Boolean variables cannot be edited.
5166 .It Ic varshow
5167 This command produces the same output as the listing mode of
5168 .Ic set ,
5169 including
5170 .Va verbose Ns
5171 ity adjustments, but only for the given variables.
5174 .It Ic verify
5175 \*(OP Takes a message list and verifies each message.
5176 If a message is not a S/MIME signed message,
5177 verification will fail for it.
5178 The verification process checks if the message was signed using a valid
5179 certificate,
5180 if the message sender's email address matches one of those contained
5181 within the certificate,
5182 and if the message content has been altered.
5185 .It Ic version
5186 Shows the
5187 .Va version
5189 .Va features
5190 of \*(UA.
5193 .It Ic visual
5194 (v) Takes a message list and invokes the display editor on each message.
5195 Modified contents are discarded unless the
5196 .Va writebackedited
5197 variable is set.
5200 .It Ic write
5201 (w) For conventional messages the body without all headers is written.
5202 The original message is never marked for deletion in the originating
5203 mail folder.
5204 The output is decrypted and converted to its native format as necessary.
5205 If the output file exists, the text is appended.
5206 If a message is in MIME multipart format its first part is written to
5207 the specified file as for conventional messages, handling of the remains
5208 depends on the execution mode.
5209 No special handling of compressed files is performed.
5211 In interactive mode the user is consecutively asked for the filenames of
5212 the processed parts.
5213 For convience saving of each part may be skipped by giving an empty
5214 value, the same result as writing it to
5215 .Pa /dev/null .
5216 Shell piping the part content by specifying a leading vertical bar
5217 .Ql |
5218 character for the filename is supported.
5219 Other user input is expanded as usually for folders, e.g., tilde
5220 expansion is performed, and contents of the destination file are
5221 overwritten if the file previously existed.
5223 \*(ID In non-interactive mode any part which does not specify a filename
5224 is ignored, and suspicious parts of filenames of the remaining parts are
5225 URL percent encoded (as via
5226 .Ic urlencode )
5227 to prevent injection of malicious character sequences, resulting in
5228 a filename that will be written into the current directory.
5229 Existing files won't be overwritten, instead the part number or
5230 a dot are appended after a number sign
5231 .Ql #
5232 to the name until file creation succeeds (or fails due to other
5233 reasons).
5236 .It Ic xit
5237 (x) A synonym for
5238 .Ic exit .
5241 .It Ic z
5242 \*(UA presents message headers in
5243 .Va screen Ns
5244 fuls as described under the
5245 .Ic headers
5246 command.
5247 Without arguments this command scrolls to the next window of messages,
5248 likewise if the argument is
5249 .Ql + .
5250 An argument of
5251 .Ql -
5252 scrolls to the last,
5253 .Ql ^
5254 scrolls to the first, and
5255 .Ql $
5256 to the last
5257 .Va \&\&screen
5258 of messages.
5259 A number argument prefixed by
5260 .Ql +
5262 .Ql \-
5263 indicates that the window is calculated in relation to the current
5264 position, and a number without a prefix specifies an absolute position.
5267 .It Ic Z
5268 Similar to
5269 .Ic z ,
5270 but scrolls to the next or previous window that contains at least one
5271 .Ql new
5273 .Ic flag Ns
5274 ged message.
5276 .\" }}}
5279 .\" .Sh TILDE ESCAPES {{{
5280 .Sh "TILDE ESCAPES"
5282 Here is a summary of the tilde escapes,
5283 which are used to perform special functions when composing messages.
5284 Tilde escapes are only recognized at the beginning of lines.
5285 The name
5286 .Dq tilde escape
5287 is somewhat of a misnomer since the actual escape character can be
5288 changed by adjusting the option
5289 .Va escape .
5291 .Bl -tag -width ".Ic __ filename"
5293 .It Ic ~~ Ar string
5294 Insert the string of text in the message prefaced by a single
5295 .Ql ~ .
5296 (If the escape character has been changed,
5297 that character must be doubled
5298 in order to send it at the beginning of a line.)
5301 .It Ic ~! Ar command
5302 Execute the indicated shell
5303 .Ar command ,
5304 then return to the message.
5307 .It Ic ~.
5308 Same effect as typing the end-of-file character.
5311 .It Ic ~: Ar \*(UA-command Ns \0or Ic ~_ Ar \*(UA-command
5312 Execute the given \*(UA command.
5313 Not all commands, however, are allowed.
5316 .It Ic ~?
5317 Write a summary of command escapes.
5320 .It Ic ~< Ar filename
5321 Identical to
5322 .Ic ~r .
5325 .It Ic ~<! Ar command
5326 .Ar command
5327 is executed using the shell.
5328 Its standard output is inserted into the message.
5331 .It Ic ~@ Op Ar filename...
5332 With no arguments, edit the attachment list interactively.
5333 If an attachment's file name is left empty,
5334 that attachment is deleted from the list.
5335 When the end of the attachment list is reached,
5336 \*(UA will ask for further attachments until an empty name is given.
5337 If a given file name solely consists of the number sign
5338 .Ql #
5339 followed by a valid message number of the currently active mailbox, then
5340 the given message is attached as a MIME
5341 .Ql message/rfc822
5342 and the rest of this section does not apply.
5344 If character set conversion has been compiled into \*(UA, then this mode
5345 gives the user the option to specify input and output character sets,
5346 unless the file extension indicates binary content, in which case \*(UA
5347 asks whether this step shall be skipped for the attachment in question.
5348 If not skipped, then the charset that succeeds to represent the
5349 attachment data will be used in the
5350 .Ql charset=
5351 MIME parameter of the mail message:
5353 .Bl -bullet -compact
5355 If input and output character sets are specified, then the conversion is
5356 performed on the fly.
5357 The user will be asked repeatedly until the desired conversion succeeds.
5359 If only an output character set is specified, then the input is assumed
5360 to be in the
5361 .Va ttycharset
5362 charset and will be converted to the given output charset on the fly.
5363 The user will be asked repeatedly until the desired conversion succeeds.
5365 If no character sets are specified at all then the algorithm that is
5366 documented in the section
5367 .Sx "Character sets"
5368 is applied, but directly and on the fly.
5369 The user will be asked repeatedly until the desired conversion succeeds.
5371 Finally, if an input-, but no output character set is specified, then no
5372 conversion is ever performed, but the
5373 .Ql charset=
5374 MIME parameter value will still be set to the user input.
5376 The character set selection loop can be left by typing
5377 .Ql control-C ,
5378 i.e., causing an interrupt.
5379 .\" \*(OU next sentence
5380 Note that before \*(UA version 15.0 this terminates the entire
5381 current attachment selection, not only the character set selection.
5384 Without character set conversion support, \*(UA will ask for the input
5385 character set only, and it'll set the
5386 .Ql charset=
5387 MIME parameter value to the given input, if any;
5388 if no user input is seen then the
5389 .Va ttycharset
5390 character set will be used for the parameter value instead.
5391 Note that the file extension check isn't performed in this mode, since
5392 no conversion will take place anyway.
5394 Note that in non-interactive mode, for reproduceabilities sake, there
5395 will always be two questions for each attachment, regardless of whether
5396 character set conversion is available and what the file extension is.
5397 The first asks for the filename, and the second asks for the input
5398 character set to be passed through to the corresponding MIME parameter;
5399 no conversion will be tried if there is input to the latter question,
5400 otherwise the usual conversion algorithm, as above, is applied.
5401 For message attachments, the answer to the second question is completely
5402 ignored.
5404 If (instead)
5405 .Ar filename
5406 arguments are specified for the
5407 .Ic \&\&~@
5408 command they are treated as a file list of
5409 .Xr sh 1 Ns
5410 -style quoted arguments, optionally also separated by commas, which are
5411 expanded and then appended to the existing list of message attachments.
5412 Message attachments can only be added via the first method.
5413 In this mode the (text) attachments are assumed to be in
5414 .Va ttycharset
5415 encoding, and will be evaluated as documented in the section
5416 .Sx "Character sets" .
5419 .It Ic ~A
5420 Inserts the string contained in the
5421 .Va Sign
5422 variable (same as
5423 .Ql Ic ~i Ns \0Sign ) .
5424 The escape sequences tabulator
5425 .Ql \et
5426 and newline
5427 .Ql \en
5428 are understood.
5431 .It Ic ~a
5432 Inserts the string contained in the
5433 .Va sign
5434 variable (same as
5435 .Ql Ic ~i Ns \0sign ) .
5436 The escape sequences tabulator
5437 .Ql \et
5438 and newline
5439 .Ql \en
5440 are understood.
5443 .It Ic ~b Ar name ...
5444 Add the given names to the list of blind carbon copy recipients.
5447 .It Ic ~c Ar name ...
5448 Add the given names to the list of carbon copy recipients.
5451 .It Ic ~d
5452 Read the file specified by the
5453 .Ev DEAD
5454 variable into the message.
5457 .It Ic ~e
5458 Invoke the text editor on the message collected so far.
5459 After the editing session is finished,
5460 the user may continue appending text to the message.
5463 .It Ic ~F Ar messages
5464 Read the named messages into the message being sent, including all
5465 message headers and MIME parts.
5466 If no messages are specified, read in the current message.
5469 .It Ic ~f Ar messages
5470 Read the named messages into the message being sent.
5471 If no messages are specified, read in the current message.
5472 .Ic ignore
5474 .Ic retain
5475 lists are used to modify the message headers.
5476 For MIME multipart messages,
5477 only the first displayable part is included.
5480 .It Ic ~H
5481 Edit the message header fields
5482 .Ql From: ,
5483 .Ql Reply-To:
5485 .Ql Sender:
5486 by typing each one in turn and allowing the user to edit the field.
5487 The default values for these fields originate from the
5488 .Va from , replyto
5490 .Va sender
5491 variables.
5494 .It Ic ~h
5495 Edit the message header fields
5496 .Ql To: ,
5497 .Ql Cc: ,
5498 .Ql Bcc:
5500 .Ql Subject:
5501 by typing each one in turn and allowing the user to edit the field.
5504 .It Ic ~i Ar variable
5505 Insert the value of the specified variable into the message,
5506 adding a newline character at the end.
5507 The message remains unaltered if the variable is unset or empty.
5508 The escape sequences tabulator
5509 .Ql \et
5510 and newline
5511 .Ql \en
5512 are understood.
5515 .It Ic ~M Ar messages
5516 Read the named messages into the message being sent,
5517 indented by
5518 .Va indentprefix .
5519 If no messages are specified, read the current message.
5522 .It Ic ~m Ar messages
5523 Read the named messages into the message being sent,
5524 indented by
5525 .Va indentprefix .
5526 If no messages are specified, read the current message.
5527 .Ic ignore
5529 .Ic retain
5530 lists are used to modify the message headers.
5531 For MIME multipart messages,
5532 only the first displayable part is included.
5535 .It Ic ~p
5536 Display the message collected so far,
5537 prefaced by the message header fields
5538 and followed by the attachment list, if any.
5541 .It Ic ~q
5542 Abort the message being sent,
5543 copying it to the file specified by the
5544 .Ev DEAD
5545 variable if
5546 .Va save
5547 is set.
5550 .It Ic ~R Ar filename
5551 Read the named file into the message, indented by
5552 .Va indentprefix .
5555 .It Ic ~r Ar filename
5556 Read the named file into the message.
5559 .It Ic ~s Ar string
5560 Cause the named string to become the current subject field.
5563 .It Ic ~t Ar name ...
5564 Add the given name(s) to the direct recipient list.
5567 .It Ic ~U Ar messages
5568 Read in the given / current message(s) excluding all headers, indented by
5569 .Va indentprefix .
5572 .It Ic ~u Ar messages
5573 Read in the given / current message(s), excluding all headers.
5576 .It Ic ~v
5577 Invoke an alternate editor (defined by the
5578 .Ev VISUAL
5579 option) on the message collected so far.
5580 Usually, the alternate editor will be a screen editor.
5581 After the editor is quit,
5582 the user may resume appending text to the end of the message.
5585 .It Ic ~w Ar filename
5586 Write the message onto the named file.
5587 If the file exists,
5588 the message is appended to it.
5591 .It Ic ~x
5592 Same as
5593 .Ic ~q ,
5594 except that the message is not saved at all.
5597 .It Ic ~| Ar command
5598 Pipe the message through the specified filter command.
5599 If the command gives no output or terminates abnormally,
5600 retain the original text of the message.
5601 E.g., the command
5602 .Xr fmt 1
5603 is often used as a rejustifying filter.
5605 .\" }}}
5608 .\" .Sh INTERNAL VARIABLES {{{
5609 .Sh "INTERNAL VARIABLES"
5611 Internal \*(UA variables are controlled via the
5612 .Ic set
5614 .Ic unset
5615 commands; prefixing a variable name with the string
5616 .Ql no
5617 and calling
5618 .Ic set
5619 has the same effect as using
5620 .Ic unset :
5621 .Ql unset crt
5623 .Ql set nocrt
5624 do the same thing.
5625 Creation or editing of variables can be performed in the
5626 .Ev EDITOR
5627 with the command
5628 .Ic varedit .
5629 .Ic varshow
5630 will give more insight on the given variable(s), and
5631 .Ic set ,
5632 when called without arguments, will show a listing of all variables.
5633 Both commands support a more
5634 .Va verbose
5635 listing mode.
5636 Some well-known variables will also become inherited from the
5637 program
5638 .Sx ENVIRONMENT
5639 implicitly, others can be explicitly imported with the command
5640 .Ic environ
5641 and henceforth share the said properties.
5644 Two different kind of internal variables exist.
5645 There are boolean variables, which can only be in one of the two states
5646 .Dq set
5648 .Dq unset ,
5649 and value variables with a(n optional) string value.
5650 For the latter proper quoting is necessary upon assignment time, the
5651 introduction of the section
5652 .Sx COMMANDS
5653 documents the supported quoting rules.
5655 .Bd -literal -offset indent
5656 wysh set one=val\e 1 two="val 2" \e
5657     three='val "3"' four=$'val \e'4\e''
5658 varshow one two three four
5659 unset one two three four
5663 Dependent upon the actual option the string values will be interpreted
5664 as numbers, colour names, normal text etc., but there also exists
5665 a special kind of string value, the
5666 .Dq boolean string ,
5667 which must either be a decimal integer (in which case
5668 .Ql 0
5669 is false and
5670 .Ql 1
5671 and any other value is true) or any of the (case-insensitive) strings
5672 .Ql off ,
5673 .Ql no ,
5674 .Ql n
5676 .Ql false
5677 for a false boolean and
5678 .Ql on ,
5679 .Ql yes ,
5680 .Ql y
5682 .Ql true
5683 for a true boolean; a special kind of boolean string is the
5684 .Dq quadoption ,
5685 which is a boolean string that can optionally be prefixed with the
5686 (case-insensitive) term
5687 .Ql ask- ,
5688 as in
5689 .Ql ask-yes ,
5690 which causes prompting of the user in interactive mode, with the given
5691 boolean as the default value.
5693 .\" .Ss "Initial settings" {{{
5694 .\" (Keep in SYNC: ./nail.h:okeys, ./nail.rc, ./nail.1:"Initial settings")
5695 .Ss "Initial Settings"
5697 The standard POSIX 2008/Cor 2-2016 mandates the following initial
5698 variable settings:
5699 .Pf no Va allnet ,
5700 .Pf no Va append ,
5701 .Va asksub ,
5702 .Pf no Va askbcc ,
5703 .Pf no Va autoprint ,
5704 .Pf no Va bang ,
5705 .Pf no Va cmd ,
5706 .Pf no Va crt ,
5707 .Pf no Va debug ,
5708 .Pf no Va dot ,
5709 .Va escape
5710 set to
5711 .Ql ~ ,
5712 .Pf no Va flipr ,
5713 .Pf no Va folder ,
5714 .Va header ,
5715 .Pf no Va hold ,
5716 .Pf no Va ignore ,
5717 .Pf no Va ignoreeof ,
5718 .Pf no Va keep ,
5719 .Pf no Va keepsave ,
5720 .Pf no Va metoo ,
5721 .Pf no Va outfolder ,
5722 .Pf no Va page ,
5723 .Va prompt
5724 set to
5725 .Ql ?\0
5726 (note that \*(UA deviates from the standard by using
5727 .Ql \e&\0 ,
5728 but the
5729 .Ql \e&
5730 special prompt escape results in
5731 .Dq \&?
5732 being shown unless
5733 .Va bsdcompat
5734 is set),
5735 .Pf no Va quiet ,
5736 .Pf no Va record ,
5737 .Va save ,
5738 .Pf no Va sendwait ,
5739 .Pf no Va showto ,
5740 .Pf no Va Sign ,
5741 .Pf no Va sign ,
5742 .Va toplines
5743 set to
5744 .Ql 5 .
5747 Notes: \*(UA doesn't support the
5748 .Pf no Va onehop
5749 variable \(en use command line options or
5750 .Va mta-arguments
5751 to pass options through to a
5752 .Va mta .
5753 And the default global
5754 .Pa \*(UR
5755 file (which is loaded unless the
5756 .Fl n
5757 command line flag has been used or the
5758 .Ev NAIL_NO_SYSTEM_RC
5759 environment variable is set) bends those initial settings a bit, e.g.,
5760 it sets the variables
5761 .Va hold ,
5762 .Va keepsave
5764 .Va keep ,
5765 to name a few, calls
5766 .Ic retain
5767 etc., and should thus be taken into account.
5768 .\" }}}
5770 .\" .Ss "Variables" {{{
5771 .Ss "Variables"
5773 .Bl -tag -width ".It Va _utoprin_"
5775 .It Va add-file-recipients
5776 \*(BO When file or pipe recipients have been specified,
5777 mention them in the corresponding address fields of the message instead
5778 of silently stripping them from their recipient list.
5779 By default such addressees are not mentioned.
5782 .It Va allnet
5783 \*(BO Causes only the local part to be evaluated
5784 when comparing addresses.
5787 .It Va append
5788 \*(BO Causes messages saved in
5789 .Ev MBOX
5790 to be appended to the end rather than prepended.
5791 This should always be set.
5794 .It Va ask
5795 \*(BO Causes \*(UA to prompt for the subject of each message sent.
5796 If the user responds with simply a newline,
5797 no subject field will be sent.
5800 .It Va askatend
5801 \*(BO Causes the prompts for
5802 .Ql Cc:
5804 .Ql Bcc:
5805 lists to appear after the message has been edited.
5808 .It Va askattach
5809 \*(BO If set, \*(UA asks for files to attach at the end of each message,
5810 shall the list be found empty at that time.
5811 An empty line finalizes the list.
5814 .It Va askcc
5815 \*(BO Causes the user to be prompted for carbon copy recipients
5816 (at the end of each message if
5817 .Va askatend
5819 .Va bsdcompat
5820 are set) shall the list be found empty (at that time).
5821 An empty line finalizes the list.
5824 .It Va askbcc
5825 \*(BO Causes the user to be prompted for blind carbon copy
5826 recipients (at the end of each message if
5827 .Va askatend
5829 .Va bsdcompat
5830 are set) shall the list be found empty (at that time).
5831 An empty line finalizes the list.
5834 .It Va asksign
5835 \*(BO\*(OP Causes the user to be prompted if the message is to be
5836 signed at the end of each message.
5838 .Va smime-sign
5839 variable is ignored when this variable is set.
5842 .It Va asksub
5843 \*(BO Alternative name for
5844 .Va ask .
5850 .It Va attachment-ask-content-description , \
5851   attachment-ask-content-disposition , \
5852   attachment-ask-content-id , \
5853   attachment-ask-content-type
5854 \*(BO If set then the user will be prompted for some attachment
5855 information when editing the attachment list.
5856 It is advisable to not use these but for the first of the variables;
5857 even for that it has to be noted that the data is used
5858 .Dq as is .
5862 .It Va attrlist
5863 A sequence of characters to display in the
5864 .Ql attribute
5865 column of the
5866 .Va headline
5867 as shown in the display of
5868 .Ic headers ;
5869 each for one type of messages (see
5870 .Sx "Message states" ) ,
5871 with the default being
5872 .Ql NUROSPMFAT+\-$~
5874 .Ql NU\ \ *HMFAT+\-$~
5875 if the
5876 .Va bsdflags
5877 variable is set, in the following order:
5879 .Bl -tag -compact -offset indent -width ".It Ql _"
5880 .It Ql N
5881 new.
5882 .It Ql U
5883 unread but old.
5884 .It Ql R
5885 new but read.
5886 .It Ql O
5887 read and old.
5888 .It Ql S
5889 saved.
5890 .It Ql P
5891 preserved.
5892 .It Ql M
5893 mboxed.
5894 .It Ql F
5895 flagged.
5896 .It Ql A
5897 answered.
5898 .It Ql T
5899 draft.
5900 .It Ql +
5901 start of a collapsed thread.
5902 .It Ql -
5903 an uncollapsed thread (TODO ignored for now).
5904 .It Ql $
5905 classified as spam.
5906 .It Ql ~
5907 classified as possible spam.
5912 .It Va autobcc
5913 Specifies a list of recipients to which a blind carbon copy of each
5914 outgoing message will be sent automatically.
5917 .It Va autocc
5918 Specifies a list of recipients to which a carbon copy of each outgoing
5919 message will be sent automatically.
5922 .It Va autocollapse
5923 \*(BO Causes threads to be collapsed automatically when threaded mode
5924 is entered (see the
5925 .Ic collapse
5926 command).
5929 .It Va autoprint
5930 \*(BO Causes the delete command to behave like
5931 .Ql dp - ;
5932 thus, after deleting a message the next one will be typed automatically.
5935 .It Va autothread
5936 \*(BO\*(OB Causes threaded mode (see the
5937 .Ic thread
5938 command) to be entered automatically when a folder is opened.
5939 The same as
5940 .Ql autosort=thread .
5943 .It Va autosort
5944 Causes sorted mode (see the
5945 .Ic sort
5946 command) to be entered automatically with the value of this option as
5947 sorting method when a folder is opened, e.g.,
5948 .Ql set autosort=thread .
5951 .It Va bang
5952 \*(BO Enables the substitution of
5953 .Ql \&!
5954 by the contents of the last command line in shell escapes.
5957 .It Va batch-exit-on-error
5958 \*(BO If the batch mode has been enabled via the
5959 .Fl #
5960 command line option, then this variable will be consulted whenever \*(UA
5961 completes one operation (returns to the command prompt); if it is set
5962 then \*(UA will terminate if the last operation generated an error.
5965 .It Va bind-timeout
5966 \*(OP Terminals generate multi-byte sequences for certain forms of
5967 input, for example for function and other special keys.
5968 Some terminals however do not write these multi-byte sequences as
5969 a whole, but byte-by-byte, and the latter is what \*(UA actually reads.
5970 This variable specifies the timeout in milliseconds that the MLE (see
5971 .Sx "On terminal control and line editor" )
5972 waits for more bytes to arrive unless it considers a sequence
5973 .Dq complete .
5974 The default is 200.
5977 .It Va bsdannounce
5978 \*(BO Causes automatic display of a header summary after executing a
5979 .Ic file
5980 command, and thus complements the standard variable
5981 .Va header ,
5982 which controls header summary display on program startup.
5983 It is only meaningful if
5984 .Va header
5985 is also set.
5988 .It Va bsdcompat
5989 \*(BO Sets some cosmetical features to traditional BSD style;
5990 has the same affect as setting
5991 .Va askatend
5992 and all other variables prefixed with
5993 .Ql bsd ;
5994 it also changes the meaning of the \*(UA specific
5995 .Ql \e&
5996 .Va prompt
5997 escape sequence and changes behaviour of
5998 .Va emptystart
5999 (which doesn't exist in BSD).
6002 .It Va bsdflags
6003 \*(BO Changes the letters shown in the first column of a header
6004 summary to traditional BSD style.
6007 .It Va bsdheadline
6008 \*(BO Changes the display of columns in a header summary to traditional
6009 BSD style.
6012 .It Va bsdmsgs
6013 \*(BO Changes some informational messages to traditional BSD style.
6016 .It Va bsdorder
6017 \*(BO Causes the
6018 .Ql Subject:
6019 field to appear immediately after the
6020 .Ql To:
6021 field in message headers and with the
6022 .Ic ~h
6023 .Sx "TILDE ESCAPES" .
6026 .It Va charset-7bit
6027 The value that should appear in the
6028 .Ql charset=
6029 parameter of
6030 .Ql Content-Type:
6031 MIME header fields when no character set conversion of the message data
6032 was performed.
6033 This defaults to US-ASCII, and the chosen character set should be
6034 US-ASCII compatible.
6037 .It Va charset-8bit
6038 \*(OP The default 8-bit character set that is used as an implicit last
6039 member of the variable
6040 .Va sendcharsets .
6041 This defaults to UTF-8.
6042 If no character set conversion capabilities are available in \*(UA then
6043 the only supported character set is
6044 .Va ttycharset .
6045 Refer to the section
6046 .Sx "Character sets"
6047 for the complete picture of character set conversion in \*(UA.
6050 .It Va charset-unknown-8bit
6051 \*(OP RFC 1428 specifies conditions when internet mail gateways shall
6052 .Dq upgrade
6053 the content of a mail message by using a character set with the name
6054 .Ql unknown-8bit .
6055 Because of the unclassified nature of this character set \*(UA will not
6056 be capable to convert this character set to any other character set.
6057 If this variable is set any message part which uses the character set
6058 .Ql unknown-8bit
6059 is assumed to really be in the character set given in the value,
6060 otherwise the (final) value of
6061 .Va charset-8bit
6062 is used for this purpose.
6064 This variable will also be taken into account if a MIME type (see
6065 .Sx "The mime.types files" )
6066 of a MIME message part that uses the
6067 .Ql binary
6068 character set is forcefully treated as text.
6071 .It Va cmd
6072 The default value for the
6073 .Ic pipe
6074 command.
6077 .It Va colour-disable
6078 \*(BO\*(OP Forcefully disable usage of colours.
6079 Also see the section
6080 .Sx "Coloured display" .
6083 .It Va colour-pager
6084 \*(BO\*(OP Whether colour shall be used for output that is paged through
6085 .Ev PAGER .
6086 Note that pagers may need special flags, e.g.,
6087 .Xr less 1
6088 requires the option
6089 .Fl \&\&R
6091 .Xr lv 1
6092 the option
6093 .Fl \&\&c
6094 in order to support colours.
6095 Often doing manual adjustments is unnecessary since \*(UA may perform
6096 adjustments dependend on the value of the environment variable
6097 .Ev PAGER
6098 (see there for more).
6101 .It Va crt
6102 In a(n interactive) terminal session, then if this valued option is set
6103 it'll be used as a threshold to determine how many lines the given
6104 output has to span before it will be displayed via the configured
6105 .Ev PAGER ;
6106 Usage of the
6107 .Ev PAGER
6108 can be forced by setting this to the value
6109 .Ql 0 ,
6110 setting it without a value will deduce the current height of the
6111 terminal screen to compute the treshold (see
6112 .Ev LINES ,
6113 .Va screen
6115 .Xr stty 1 ) .
6118 .It Va customhdr
6119 \*(OB A variable counterpart of the
6120 .Ic customhdr
6121 command (see there for documentation), interpreted as a comma-separated
6122 list of custom headers to be injected, to include commas in the header
6123 bodies escape them with reverse solidus, e.g.:
6125 .Dl set customhdr='Hdr1: Body1-1\e, Body1-2,  Hdr2: Body2'
6128 .It Va datefield
6129 In the summary of
6130 .Ic headers
6131 the message date, if any is to be displayed according to the format of
6132 .Va headline ,
6133 is by default taken from the
6134 .Ql From_
6135 line of the message.
6136 If this variable is set the date as given in the
6137 .Ql Date:
6138 header field is used instead, converted to local time.
6139 To control the display format of the date assign a valid
6140 .Xr strftime 3
6141 format string.
6142 (Note that the
6143 .Ql %n
6144 format should not be used, because \*(UA doesn't take embedded newlines
6145 into account when calculating how many lines fit onto the screen.)
6146 Also see
6147 .Va datefield-markout-older .
6150 .It Va datefield-markout-older
6151 This option, when set in addition to
6152 .Va datefield ,
6153 is used to display
6154 .Dq older
6155 messages (concept is rather comparable to the
6156 .Fl \&\&l
6157 option of the POSIX utility
6158 .Xr ls 1 ) .
6159 The content interpretation is identical to
6160 .Va \&\&datefield .
6163 .It Va debug
6164 \*(BO Enables debug messages and obsoletion warnings, disables the
6165 actual delivery of messages and also implies
6166 .Pf no Va record
6167 as well as
6168 .Pf no Va save .
6171 .It Va disposition-notification-send
6172 \*(BO\*(OP Emit a
6173 .Ql Disposition-Notification-To:
6174 header (RFC 3798) with the message.
6175 This requires the
6176 .Va from
6177 variable to be set.
6178 .\" TODO .It Va disposition-notification-send-HOST
6179 .\"Overrides
6180 .\".Va disposition-notification-send
6181 .\" for SMTP accounts on a specific host.
6182 .\" TODO .It Va disposition-notification-send-USER@HOST
6183 .\"Overrides
6184 .\".Va disposition-notification-send
6185 .\"for a specific account.
6188 .It Va dot
6189 \*(BO When dot is set, a period
6190 .Ql \&.
6191 on a line by itself during message input in (interactive) compose mode
6192 will be treated as end-of-message (in addition to the normal end-of-file
6193 condition).
6195 .Va ignoreeof
6196 is set
6197 .Pf no Va dot
6198 is ignored.
6201 .It Va dotlock-ignore-error
6202 \*(BO\*(OP Synchronization of mailboxes which \*(UA treats as system
6203 mailboxes (see the command
6204 .Ic file )
6205 will be protected with so-called dotlock files\(emthe traditional mail
6206 spool file locking method\(emin addition to system file locking.
6207 Because \*(UA ships with a privilege-separated dotlock creation program
6208 that should always be able to create such a dotlock file there is no
6209 good reason to ignore dotlock file creation errors, and thus these are
6210 fatal unless this variable is set.
6213 .It Va editalong
6214 \*(BO If this variable is set then the editor is started automatically
6215 when a message is composed in interactive mode, as if the
6216 .Ic ~e
6217 .Sx "TILDE ESCAPES"
6218 had been specified.
6220 .Va editheaders
6221 variable is implied for this automatically spawned editor session.
6224 .It Va editheaders
6225 \*(BO When a message is edited while being composed,
6226 its header is included in the editable text.
6228 .Ql To: ,
6229 .Ql Cc: ,
6230 .Ql Bcc: ,
6231 .Ql Subject: ,
6232 .Ql From: ,
6233 .Ql Reply-To:
6235 .Ql Sender:
6236 fields are accepted within the header, other fields are ignored.
6239 .It Va emptystart
6240 \*(BO When entering interactive mode \*(UA normally writes
6241 .Dq \&No mail for user
6242 and exits immediately if a mailbox is empty or doesn't exist.
6243 If this option is set \*(UA starts even with an empty or nonexistent
6244 mailbox (the latter behaviour furtherly depends upon
6245 .Va bsdcompat ,
6246 though).
6249 .It Va encoding
6250 Suggestion for the MIME encoding to use in outgoing text messages
6251 and message parts.
6252 Valid values are the default
6253 .Ql quoted-printable ,
6254 .Ql 8bit
6256 .Ql base64 .
6257 .Ql 8bit
6258 may cause problems when transferring mail messages over channels that
6259 are not ESMTP (RFC 1869) compliant.
6260 If there is no need to encode a message,
6261 .Ql 7bit
6262 transfer mode is always used regardless of this variable.
6263 Binary data is always encoded as
6264 .Ql base64 .
6267 .It Va escape
6268 If defined, the first character of this option
6269 gives the character to use in place of
6270 .Ql ~
6271 to denote
6272 .Sx "TILDE ESCAPES" .
6275 .It Va expandaddr
6276 If not set then file and command pipeline targets are not allowed,
6277 and any such address will be filtered out, giving a warning message.
6278 If set without a value then all possible recipient address
6279 specifications will be accepted \(en see the section
6280 .Sx "On sending mail, and non-interactive mode"
6281 for more on this.
6282 To accept them, but only in interactive mode, or when tilde commands
6283 were enabled explicitly by using one of the command line options
6284 .Fl ~
6286 .Fl # ,
6287 set this to the (case-insensitive) value
6288 .Ql restrict
6289 (note right now this is actually like setting
6290 .Ql restrict,-all,+name,+addr ) .
6292 In fact the value is interpreted as a comma-separated list of values.
6293 If it contains
6294 .Ql fail
6295 then the existence of disallowed specifications is treated as a hard
6296 send error instead of only filtering them out.
6297 The remaining values specify whether a specific type of recipient
6298 address specification is allowed (optionally indicated by a plus sign
6299 .Ql +
6300 prefix) or disallowed (prefixed with a hyphen
6301 .Ql - ) .
6302 The value
6303 .Ql all
6304 addresses all possible address specifications,
6305 .Ql file
6306 file targets,
6307 .Ql pipe
6308 command pipeline targets,
6309 .Ql name
6310 plain user names and (MTA) aliases (\*(OB
6311 .Ql noalias
6312 may be used as an alternative syntax to
6313 .Ql -name )
6315 .Ql addr
6316 network addresses.
6317 These kind of values are interpreted in the given order, so that
6318 .Ql restrict,\:fail,\:+file,\:-all,\:+addr
6319 will cause hard errors for any non-network address recipient address
6320 unless \*(UA is in interactive mode or has been started with the
6321 .Fl ~
6323 .Fl #
6324 command line option; in the latter case(s) any address may be used, then.
6327 .It Va expandargv
6328 Unless this variable is set additional
6329 .Va mta
6330 (Mail-Transfer-Agent)
6331 arguments from the command line, as can be given after a
6332 .Fl \&\&-
6333 separator, are ignored due to safety reasons.
6334 However, if set to the special (case-insensitive) value
6335 .Ql fail ,
6336 then the presence of additional MTA arguments is treated as a hard
6337 error that causes \*(UA to exit with failure status.
6338 A lesser strict variant is the otherwise identical
6339 .Ql restrict ,
6340 which does accept such arguments in interactive mode, or if tilde
6341 commands were enabled explicitly by using one of the command line options
6342 .Fl ~
6344 .Fl # .
6347 .It Va features
6348 \*(RO String giving a list of features \*(UA, preceded with a plus-sign
6349 .Ql +
6350 if the feature is available, and a minus-sign
6351 .Ql -
6352 otherwise.
6353 The output of the command
6354 .Ic version
6355 will include this information.
6358 .It Va flipr
6359 \*(BO This option reverses the meanings of a set of reply commands,
6360 turning the lowercase variants, which by default address all recipients
6361 included in the header of a message
6362 .Pf ( Ic reply , respond , followup )
6363 into the uppercase variants, which by default address the sender only
6364 .Pf ( Ic Reply , Respond , Followup )
6365 and vice versa.
6366 The commands
6367 .Ic replysender , respondsender , followupsender
6368 as well as
6369 .Ic replyall , respondall , followupall
6370 are not affected by the current setting of
6371 .Va flipr .
6375 .It Va file-hook-load-EXTENSION , file-hook-save-EXTENSION
6376 It is possible to install file hooks which will be used by the
6377 .Ic file
6378 command in order to be able to transparently handle (through an
6379 intermediate temporary file) files with specific
6380 .Ql EXTENSION Ns
6381 s: the variable values can include shell snippets and are expected to
6382 write data to standard output / read data from standard input,
6383 respectively.
6384 \*(ID The variables may not be changed while there is a mailbox
6385 attendant.
6386 .Bd -literal -offset indent
6387 set file-hook-load-xy='echo >&2 XY-LOAD; gzip -cd' \e
6388     file-hook-save-xy='echo >&2 XY-SAVE; gzip -c' \e
6389     record=+null-sent.xy
6393 .It Va folder
6394 The default path under which mailboxes are to be saved:
6395 file names that begin with the plus-sign
6396 .Ql +
6397 will be expanded by prefixing them with the value of this variable.
6398 The same special syntax conventions as documented for the
6399 .Ic file
6400 command may be used; if the non-empty value doesn't start with a solidus
6401 .Ql / ,
6402 then the value of
6403 .Ev HOME
6404 will be prefixed automatically.
6405 If unset or the empty string any
6406 .Ql +
6407 prefixing file names will remain unexpanded.
6410 .It Va folder-hook
6411 This variable can be set to the name of a
6412 .Ic define Ns d
6413 macro which will be called whenever a
6414 .Ic file
6415 is opened.
6416 The macro will also be invoked when new mail arrives,
6417 but message lists for commands executed from the macro
6418 only include newly arrived messages then.
6419 .Ic localopts
6420 are activated by default in a folder hook, causing the covered settings
6421 to be reverted once the folder is left again.
6423 .Sy \*(ID:
6424 Macro behaviour, including option localization, will change in v15.
6425 Please be aware of that and possibly embed a version check in a resource
6426 file of yours.
6429 .It Va folder-hook-FOLDER
6430 Overrides
6431 .Va folder-hook
6432 for a folder named
6433 .Ql FOLDER .
6434 Unlike other folder specifications, the fully expanded name of a folder,
6435 without metacharacters, is used to avoid ambiguities.
6436 However, if the mailbox resides under
6437 .Va folder
6438 then the usual
6439 .Ql +
6440 specification is tried in addition, e.g., if
6441 .Va \&\&folder
6443 .Dq mail
6444 (and thus relative to the user's home directory) then
6445 .Pa /home/usr1/mail/sent
6446 will be tried as
6447 .Ql folder-hook-/home/usr1/mail/sent
6448 first, but then followed by
6449 .Ql folder-hook-+sent .
6452 .It Va followup-to
6453 \*(BO Controls whether a
6454 .Ql Mail-Followup-To:
6455 header is generated when sending messages to known mailing lists.
6456 Also see
6457 .Va followup-to-honour
6458 and the commands
6459 .Ic mlist , mlsubscribe , reply
6461 .Ic Lreply .
6464 .It Va followup-to-honour
6465 Controls whether a
6466 .Ql Mail-Followup-To:
6467 header is honoured when group-replying to a message via
6468 .Ic reply
6470 .Ic Lreply .
6471 This is a quadoption; if set without a value it defaults to
6472 .Dq yes .
6473 Also see
6474 .Va followup-to
6475 and the commands
6476 .Ic mlist
6478 .Ic mlsubscribe .
6481 .It Va forward-as-attachment
6482 \*(BO Original messages are normally sent as inline text with the
6483 .Ic forward
6484 command,
6485 and only the first part of a multipart message is included.
6486 With this option messages are sent as unmodified MIME
6487 .Ql message/rfc822
6488 attachments with all of their parts included.
6491 .It Va from
6492 The address (or a list of addresses) to put into the
6493 .Ql From:
6494 field of the message header, quoting RFC 5322:
6495 the author(s) of the message, that is, the mailbox(es) of the person(s)
6496 or system(s) responsible for the writing of the message.
6497 When
6498 .Ic reply Ns
6499 ing to messages these addresses are handled as if they were in the
6500 .Ic alternates
6501 list.
6503 If the machine's hostname is not valid at the Internet (for example at
6504 a dialup machine) then either this variable or
6505 .Va hostname
6506 (\*(IN and with a defined SMTP protocol in
6507 .Va mta
6508 .Va smtp-hostname
6509 adds even more fine-tuning capabilities),
6510 have to be set.
6512 .Va \&\&from
6513 contains more than one address,
6514 setting the
6515 .Va sender
6516 variable is required (according to the standard RFC 5322).
6519 .It Va fullnames
6520 \*(BO When replying to or forwarding a message \*(UA normally removes
6521 the comment and name parts of email addresses.
6522 If this variable is set such stripping is not performed,
6523 and comments, names etc. are retained.
6526 .It Va fwdheading
6527 The string to put before the text of a message with the
6528 .Ic forward
6529 command
6530 (unless the
6531 .Va forward-as-attachment
6532 variable is set).
6533 Defaults to
6534 .Dq -------- Original Message --------
6535 if unset; No heading is put if it is set to the empty string.
6538 .It Va header
6539 \*(BO Causes the header summary to be written at startup and after
6540 commands that affect the number of messages or the order of messages in
6541 the current folder; enabled by default.
6542 The command line option
6543 .Fl N
6544 can be used to set
6545 .Pf no Va header .
6546 The variable
6547 .Va bsdannounce
6548 complements this and controls header summary display on folder changes.
6552 .It Va headline
6553 A format string to use for the summary of
6554 .Ic headers ,
6555 similar to the ones used for
6556 .Xr printf 3
6557 formats.
6558 Format specifiers in the given string start with a percent character
6559 .Ql %
6560 and may be followed by an optional decimal number indicating the field
6561 width \(em if that is negative, the field is to be left-aligned.
6562 Valid format specifiers are:
6565 .Bl -tag -compact -offset indent -width "_%%_"
6566 .It Ql %%
6567 A plain percent character.
6568 .It Ql %>
6569 .Dq Dotmark :
6570 a space character but for the current message
6571 .Pf ( Dq dot ) ,
6572 for which it expands to
6573 .Ql > .
6574 .It Ql %<
6575 .Dq Dotmark :
6576 a space character but for the current message
6577 .Pf ( Dq dot ) ,
6578 for which it expands to
6579 .Ql < .
6580 .It Ql %$
6581 \*(OP The spam score of the message, as has been classified via the
6582 command
6583 .Ic spamrate .
6584 Shows only a replacement character if there is no spam support.
6585 .It Ql %a
6586 Message attribute character (status flag); the actual content can be
6587 adjusted by setting
6588 .Va attrlist .
6589 .It Ql %d
6590 The date when the message was received, or the date found in the
6591 .Ql From:
6592 header when the
6593 .Va datefield
6594 variable is set (optionally to a date display format string).
6595 .It Ql %e
6596 The indenting level in threaded mode.
6597 .It Ql %f
6598 The address of the message sender.
6599 .It Ql %i
6600 The message thread tree structure.
6601 (Note that this format doesn't support a field width.)
6602 .It Ql %l
6603 The number of lines of the message, if available.
6604 .It Ql %m
6605 Message number.
6606 .It Ql %o
6607 The number of octets (bytes) in the message, if available.
6608 .It Ql %s
6609 Message subject (if any).
6610 .It Ql %S
6611 Message subject (if any) in double quotes.
6612 .It Ql \&%T
6613 Message recipient flags: is the addressee of the message a known or
6614 subscribed mailing list \(en see
6615 .Ic mlist
6617 .Ic mlsubscribe .
6618 .It Ql %t
6619 The position in threaded/sorted order.
6622 The default is
6623 .Ql %>\&%a\&%m\ %-18f\ %16d\ %4l/%\-5o\ %i%-s ,
6625 .Ql %>\&%a\&%m\ %20-f\ \ %16d\ %3l/%\-5o\ %i%-S
6627 .Va bsdcompat
6628 is set.
6629 Also see
6630 .Va attrlist
6632 .Va headline-bidi .
6636 .It Va headline-bidi
6637 Bidirectional text requires special treatment when displaying headers,
6638 because numbers (in dates or for file sizes etc.) will not affect the
6639 current text direction, in effect resulting in ugly line layouts when
6640 arabic or other right-to-left text is to be displayed.
6641 On the other hand only a minority of terminals is capable to correctly
6642 handle direction changes, so that user interaction is necessary for
6643 acceptable results.
6644 Note that extended host system support is required nonetheless, e.g.,
6645 detection of the terminal character set is one precondition;
6646 and this feature only works in an Unicode (i.e., UTF-8) locale.
6648 In general setting this variable will cause \*(UA to encapsulate text
6649 fields that may occur when displaying
6650 .Va headline
6651 (and some other fields, like dynamic expansions in
6652 .Va prompt )
6653 with special Unicode control sequences;
6654 it is possible to fine-tune the terminal support level by assigning
6655 a value:
6656 no value (or any value other than
6657 .Ql 1 ,
6658 .Ql 2
6660 .Ql 3 )
6661 will make \*(UA assume that the terminal is capable to properly deal
6662 with Unicode version 6.3, in which case text is embedded in a pair of
6663 U+2068 (FIRST STRONG ISOLATE) and U+2069 (POP DIRECTIONAL ISOLATE)
6664 characters.
6665 In addition no space on the line is reserved for these characters.
6667 Weaker support is chosen by using the value
6668 .Ql 1
6669 (Unicode 6.3, but reserve the room of two spaces for writing the control
6670 sequences onto the line).
6671 The values
6672 .Ql 2
6674 .Ql 3
6675 select Unicode 1.1 support (U+200E, LEFT-TO-RIGHT MARK); the latter
6676 again reserves room for two spaces in addition.
6679 .It Va history-file
6680 \*(OP If a line editor is available then this can be set to
6681 name the (expandable) path of the location of a permanent history file.
6684 .It Va history-gabby
6685 \*(BO\*(OP Add more entries to the history as is normally done.
6688 .It Va history-gabby-persist
6689 \*(BO\*(OP \*(UA's own MLE will not save the additional
6690 .Va history-gabby
6691 entries in persistent storage unless this variable is set.
6692 On the other hand it will not loose the knowledge of whether
6693 a persistent entry was gabby or not.
6694 Also see
6695 .Va history-file .
6698 .It Va history-size
6699 \*(OP If a line editor is available this value restricts the
6700 amount of history entries that are saved into a set and valid
6701 .Va history-file .
6702 A value of less than 0 disables this feature;
6703 note that loading and incorporation of
6704 .Va history-file
6705 upon program startup can also be suppressed by doing this.
6706 If unset or 0, a default value will be used.
6707 Dependent on the available line editor this will also define the
6708 number of history entries in memory;
6709 it is also editor-specific whether runtime updates of this value will
6710 be honoured.
6713 .It Va hold
6714 \*(BO This option is used to hold messages in the system
6715 .Va inbox ,
6716 and it is set by default.
6719 .It Va hostname
6720 Use this string as hostname when expanding local addresses instead of
6721 the value obtained from
6722 .Xr uname 3
6724 .Xr getaddrinfo 3 ,
6725 i.e., in
6726 .Ql Message-ID:
6728 .Ql From:
6729 fields.
6730 Note that when SMTP transport is not used (via
6731 .Va mta ) ,
6732 then it is normally the responsibility of the MTA to create these
6733 fields, \*(IN in conjunction with SMTP however
6734 .Va smtp-hostname
6735 also influences the results:
6736 you should produce some test messages with the desired combination of
6737 .Va \&\&hostname ,
6738 and/or
6739 .Va from ,
6740 .Va sender
6741 etc. first.
6744 .It Va idna-disable
6745 \*(BO\*(OP Can be used to turn off the automatic conversion of domain
6746 names according to the rules of IDNA (internationalized domain names
6747 for applications).
6748 Since the IDNA code assumes that domain names are specified with the
6749 .Va ttycharset
6750 character set, an UTF-8 locale charset is required to represent all
6751 possible international domain names (before conversion, that is).
6754 .It Va ignore
6755 \*(BO Ignore interrupt signals from the terminal while entering
6756 messages; instead echo them as
6757 .Ql @
6758 characters and discard the current line.
6761 .It Va ignoreeof
6762 \*(BO Ignore end-of-file conditions
6763 .Pf ( Ql control-D )
6764 in compose mode on message input and in interactive command input.
6765 If set an interactive command input session can only be left by
6766 explicitly using one of the commands
6767 .Ic exit
6769 .Ic quit ,
6770 and message input in compose mode can only be terminated by entering
6771 a period
6772 .Ql \&.
6773 on a line by itself or by using the
6774 .Ic ~.
6775 .Sx "TILDE ESCAPES" ;
6776 .Va ignoreeof
6777 overrides a setting of
6778 .Pf no Va dot .
6781 .It Va inbox
6782 If this is set to a non-empty string it will be used for expansions of
6783 .Ql % ,
6785 .Ic file
6786 for more.
6787 The value supports a subset of filename expansions itself.
6790 .It Va indentprefix
6791 String used by the
6792 .Ic ~m , ~M
6794 .Ic ~R
6795 .Sx "TILDE ESCAPES"
6796 and by the
6797 .Va quote
6798 option for indenting messages,
6799 in place of the normal tabulator character
6800 .Ql ^I ,
6801 which is the default.
6802 Be sure to quote the value if it contains spaces or tabs.
6805 .It Va keep
6806 \*(BO If set, an empty mailbox file is not removed.
6807 This may improve the interoperability with other mail user agents
6808 when using a common folder directory, and prevents malicious users
6809 from creating fake mailboxes in a world-writable spool directory.
6810 Note this only applies to local regular (MBOX) files, other mailbox
6811 types will never be removed.
6814 .It Va keep-content-length
6815 \*(BO When (editing messages and) writing
6816 .Ev MBOX
6817 mailbox files \*(UA can be told to keep the
6818 .Ql Content-Length:
6820 .Ql Lines:
6821 header fields that some MUAs generate by setting this variable.
6822 Since \*(UA does neither use nor update these non-standardized header
6823 fields (which in itself shows one of their conceptual problems),
6824 stripping them should increase interoperability in between MUAs that
6825 work with with same mailbox files.
6826 Note that, if this is not set but
6827 .Va writebackedited ,
6828 as below, is, a possibly performed automatic stripping of these header
6829 fields already marks the message as being modified.
6832 .It Va keepsave
6833 \*(BO When a message is saved it is usually discarded from the
6834 originating folder when \*(UA is quit.
6835 Setting this option causes all saved message to be retained.
6838 .It Va line-editor-disable
6839 \*(BO Turn off any enhanced line editing capabilities (see
6840 .Sx "On terminal control and line editor"
6841 for more).
6844 .It Va line-editor-no-defaults
6845 \*(BO\*(OP Do not establish any default key binding.
6848 .It Va markanswered
6849 \*(BO When a message is replied to and this variable is set,
6850 it is marked as having been answered.
6851 This mark has no technical meaning in the mail system;
6852 it just causes messages to be marked in the header summary,
6853 and makes them specially addressable.
6856 .It Va memdebug
6857 \*(BO Internal development variable.
6860 .It Va message-id-disable
6861 \*(BO By setting this option the generation of
6862 .Ql Message-ID:
6863 can be completely suppressed, effectively leaving this task up to the
6864 .Va mta
6865 (Mail-Transfer-Agent) or the SMTP server.
6866 (According to RFC 5321 your SMTP server is not required to add this
6867 field by itself, so you should ensure that it accepts messages without a
6868 .Ql Message-ID . )
6871 .It Va message-inject-head
6872 A string to put at the beginning of each new message.
6873 The escape sequences tabulator
6874 .Ql \et
6875 and newline
6876 .Ql \en
6877 are understood.
6880 .It Va message-inject-tail
6881 A string to put at the end of each new message.
6882 The escape sequences tabulator
6883 .Ql \et
6884 and newline
6885 .Ql \en
6886 are understood.
6889 .It Va metoo
6890 \*(BO Usually, when an
6891 .Ic alias
6892 expansion contains the sender, the sender is removed from the expansion.
6893 Setting this option suppresses these removals.
6894 Note that a set
6895 .Va metoo
6896 also causes a
6897 .Ql -m
6898 option to be passed through to the
6899 .Va mta
6900 (Mail-Transfer-Agent); though most of the modern MTAs no longer document
6901 this flag, no MTA is known which doesn't support it (for historical
6902 compatibility).
6905 .It Va mime-allow-text-controls
6906 \*(BO When sending messages, each part of the message is MIME-inspected
6907 in order to classify the
6908 .Ql Content-Type:
6910 .Ql Content-Transfer-Encoding:
6911 (see
6912 .Va encoding )
6913 that is required to send this part over mail transport, i.e.,
6914 a computation rather similar to what the
6915 .Xr file 1
6916 command produces when used with the
6917 .Ql --mime
6918 option.
6920 This classification however treats text files which are encoded in
6921 UTF-16 (seen for HTML files) and similar character sets as binary
6922 octet-streams, forcefully changing any
6923 .Ql text/plain
6925 .Ql text/html
6926 specification to
6927 .Ql application/octet-stream :
6928 If that actually happens a yet unset charset MIME parameter is set to
6929 .Ql binary ,
6930 effectively making it impossible for the receiving MUA to automatically
6931 interpret the contents of the part.
6933 If this option is set, and the data was unambiguously identified as text
6934 data at first glance (by a
6935 .Ql .txt
6937 .Ql .html
6938 file extension), then the original
6939 .Ql Content-Type:
6940 will not be overwritten.
6943 .It Va mime-alternative-favour-rich
6944 \*(BO If this variable is set then rich MIME alternative parts (e.g.,
6945 HTML) will be preferred in favour of included plain text versions when
6946 displaying messages, provided that a handler exists which produces
6947 output that can be (re)integrated into \*(UA's normal visual display.
6948 (E.g., at the time of this writing some newsletters ship their full
6949 content only in the rich HTML part, whereas the plain text part only
6950 contains topic subjects.)
6953 .It Va mime-counter-evidence
6954 Normally the
6955 .Ql Content-Type:
6956 field is used to decide how to handle MIME parts.
6957 Some MUAs however don't use
6958 .Xr mime.types 5
6959 or a similar mechanism to correctly classify content, but simply specify
6960 .Ql application/octet-stream ,
6961 even for plain text attachments like
6962 .Ql text/diff .
6963 If this variable is set then \*(UA will try to classify such MIME
6964 message parts on its own, if possible, for example via a possibly
6965 existing attachment filename.
6966 A non-empty value may also be given, in which case a number is expected,
6967 actually a carrier of bits.
6968 Creating the bit-carrying number is a simple addition:
6969 .Bd -literal -offset indent
6970 ? !echo Value should be set to $((2 + 4 + 8))
6971 Value should be set to 14
6974 .Bl -bullet -compact
6976 If bit two is set (2) then the detected
6977 .Dq real
6978 content-type will be carried along with the message and be used for
6979 deciding which
6980 .Va pipe-TYPE/SUBTYPE
6981 is responsible for the MIME part, shall that question arise;
6982 when displaying such a MIME part the part-info will indicate the
6983 overridden content-type by showing a plus-sign
6984 .Ql + .
6986 If bit three is set (4) then the counter-evidence is always produced
6987 and a positive result will be used as the MIME type, even forcefully
6988 overriding the parts given MIME type.
6990 If bit four is set (8) then as a last resort the actual content of
6991 .Ql application/octet-stream
6992 parts will be inspected, so that data which looks like plain text can be
6993 treated as such.
6997 .It Va mimetypes-load-control
6998 This option can be used to control which of the
6999 .Xr mime.types 5
7000 databases are loaded by \*(UA, as furtherly described in the section
7001 .Sx "The mime.types files" .
7002 If the letter
7003 .Ql u
7004 is part of the option value, then the user's personal
7005 .Pa ~/.mime.types
7006 file will be loaded (if it exists); likewise the letter
7007 .Ql s
7008 controls loading of the system wide
7009 .Pa /etc/mime.types ;
7010 directives found in the user file take precedence, letter matching is
7011 case-insensitive.
7012 If this option is not set \*(UA will try to load both files.
7013 Incorporation of the \*(UA-builtin MIME types cannot be suppressed,
7014 but they will be matched last (the order can be listed via
7015 .Ic mimetype ) .
7017 More sources can be specified by using a different syntax: if the
7018 value string contains an equals sign
7019 .Ql =
7020 then it is instead parsed as a comma-separated list of the described
7021 letters plus
7022 .Ql f=FILENAME
7023 pairs; the given filenames will be expanded and loaded, and their
7024 content may use the extended syntax that is described in the section
7025 .Sx "The mime.types files" .
7026 Directives found in such files always take precedence (are prepended to
7027 the MIME type cache).
7031 .It Va mta
7032 To choose an alternate Mail-Transfer-Agent, set this option to either
7033 the full pathname of an executable (optionally prefixed with a
7034 .Ql file://
7035 protocol indicator), or \*(OPally a SMTP protocol URL, e.g., \*(IN
7037 .Dl smtps?://[user[:password]@]server[:port]
7039 (\*(OU:
7040 .Ql [smtp://]server[:port] . )
7041 The default has been chosen at compie time.
7042 All supported data transfers are executed in child processes, which
7043 run asynchronously, and without supervision, unless either the
7044 .Va sendwait
7045 or the
7046 .Va verbose
7047 variable is set.
7048 If such a child receives a TERM signal, it will abort and
7049 .Va save
7050 the message to
7051 .Ev DEAD ,
7052 if so configured.
7055 For a file-based MTA it may be necessary to set
7056 .Va mta-argv0
7057 in in order to choose the right target of a modern
7058 .Xr mailwrapper 8
7059 environment.
7060 It will be passed command line arguments from several possible sources:
7061 from the variable
7062 .Va mta-arguments
7063 if set, from the command line if given and the variable
7064 .Va expandargv
7065 allows their use.
7066 Argument processing of the MTA will be terminated with a
7067 .Fl \&\&-
7068 separator.
7071 The otherwise occurring implicit usage of the following MTA command
7072 line arguments can be disabled by setting the boolean option
7073 .Va mta-no-default-arguments
7074 (which will also disable passing
7075 .Fl \&\&-
7076 to the MTA):
7077 .Fl \&\&i
7078 (for not treating a line with only a dot
7079 .Ql \&.
7080 character as the end of input),
7081 .Fl \&\&m
7082 (shall the option
7083 .Va metoo
7084 be set) and
7085 .Fl \&\&v
7086 (if the
7087 .Va verbose
7088 option is set); in conjunction with the
7089 .Fl r
7090 command line option \*(UA will also pass
7091 .Fl \&\&f
7092 as well as possibly
7093 .Fl \&\&F .
7096 \*(OP \*(UA can send mail over SMTP network connections to a single
7097 defined SMTP smarthost, the access URL of which has to be assigned to
7098 .Va mta .
7099 To use this mode it is helpful to read
7100 .Sx "On URL syntax and credential lookup" .
7101 It may be necessary to set the
7102 .Va smtp-hostname
7103 variable in order to use a specific combination of
7104 .Va from ,
7105 .Va hostname
7107 .Va mta
7108 with some mail providers.
7111 .Bl -bullet -compact
7113 The plain SMTP protocol (RFC 5321) that normally lives on the
7114 server port 25 and requires setting the
7115 .Va smtp-use-starttls
7116 variable to enter a SSL/TLS encrypted session state.
7117 Assign a value like \*(IN
7118 .Ql smtp://[user[:password]@]server[:port]
7119 (\*(OU
7120 .Ql smtp://server[:port] )
7121 to choose this protocol.
7123 The so-called SMTPS which is supposed to live on server port 465
7124 and is automatically SSL/TLS secured.
7125 Unfortunately it never became a standardized protocol and may thus not
7126 be supported by your hosts network service database
7127 \(en in fact the port number has already been reassigned to other
7128 protocols!
7130 SMTPS is nonetheless a commonly offered protocol and thus can be
7131 chosen by assigning a value like \*(IN
7132 .Ql smtps://[user[:password]@]server[:port]
7133 (\*(OU
7134 .Ql smtps://server[:port] ) ;
7135 due to the mentioned problems it is usually necessary to explicitly
7136 specify the port as
7137 .Ql :465 ,
7138 however.
7140 Finally there is the SUBMISSION protocol (RFC 6409), which usually
7141 lives on server port 587 and is practically identically to the SMTP
7142 protocol from \*(UA's point of view beside that; it requires setting the
7143 .Va smtp-use-starttls
7144 variable to enter a SSL/TLS secured session state.
7145 Assign a value like \*(IN
7146 .Ql submission://[user[:password]@]server[:port]
7147 (\*(OU
7148 .Ql submission://server[:port] ) .
7153 .It Va mta-arguments
7154 Arguments to pass through to a file-based
7155 .Va mta
7156 can be given via this variable, the content of which will be split up in
7157 a vector of arguments, to be joined onto other possible MTA options:
7159 .Dl set mta-arguments='-t -X \&"/tmp/my log\&"'
7162 .It Va mta-no-default-arguments
7163 \*(BO Unless this option is set \*(UA will pass some well known
7164 standard command line options to a file-based
7165 .Va mta
7166 (Mail-Transfer-Agent), see there for more.
7169 .It Va mta-argv0
7170 Many systems use a so-called
7171 .Xr mailwrapper 8
7172 environment to ensure compatibility with
7173 .Xr sendmail 1 .
7174 This works by inspecting the name that was used to invoke the mail
7175 delivery system.
7176 If this variable is set then the mailwrapper (the program that is
7177 actually executed when calling the file-based
7178 .Va mta )
7179 will treat its contents as that name.
7180 The default is
7181 .Ql sendmail .
7184 .It Va NAIL_EXTRA_RC
7185 The name of an optional startup file to be read last.
7186 This variable has an effect only if it is set in any of the
7187 .Sx "Resource files" ,
7188 it is not imported from the environment.
7189 Use this file for commands that are not understood by other POSIX
7190 .Xr mailx 1
7191 implementations.
7193 .Mx Va netrc-lookup
7194 .It Va netrc-lookup-USER@HOST , netrc-lookup-HOST , netrc-lookup
7195 \*(BO\*(IN\*(OP Used to control usage of the users
7196 .Pa .netrc
7197 file for lookup of account credentials, as documented in the section
7198 .Sx "On URL syntax and credential lookup"
7199 and for the command
7200 .Ic netrc ;
7201 the section
7202 .Sx "The .netrc file"
7203 documents the file format.
7204 Also see
7205 .Va netrc-pipe .
7208 .It Va netrc-pipe
7209 \*(IN\*(OP When
7210 .Pa .netrc
7211 is loaded (see
7212 .Ic netrc
7214 .Va netrc-lookup )
7215 then \*(UA will read the output of a shell pipe instead of the users
7216 .Pa .netrc
7217 file if this variable is set (to the desired shell command).
7218 This can be used to, e.g., store
7219 .Pa .netrc
7220 in encrypted form:
7222 .Dl set netrc-pipe='gpg -qd ~/.netrc.pgp'
7225 .It Va newfolders
7226 If this variable has the value
7227 .Ql maildir ,
7228 newly created local folders will be in Maildir format.
7231 .It Va newmail
7232 Checks for new mail in the current folder each time the prompt is shown.
7233 A Maildir folder must be re-scanned to determine if new mail has arrived.
7234 If this variable is set to the special value
7235 .Ql nopoll
7236 then a Maildir folder will not be rescanned completely, but only
7237 timestamp changes are detected.
7241 .It Va on-compose-enter , on-compose-leave
7242 \*(ID Macro hooks which will be executed before compose mode is
7243 entered, and after composing has been finished, respectively.
7244 Please note that this interface is very likely to change in v15, and
7245 should therefore possibly even be seen as experimental.
7246 .Ic localopts
7247 are by default enabled for these hooks, causing any setting to be
7248 forgotten after the message has been sent.
7249 The following variables will be set temporarily during execution of the
7250 macros.
7252 .Bl -tag -compact -width ".It Va compose_subject"
7253 .It Va compose-from
7254 .Va from .
7255 .It Va compose-sender
7256 .Va sender .
7257 .It Va compose-to , compose-cc , compose-bcc
7258 The list of receiver addresses as a space-separated list.
7259 .It Va compose-subject
7260 The subject.
7264 .It Va outfolder
7265 \*(BO Causes the filename given in the
7266 .Va record
7267 variable
7268 and the sender-based filenames for the
7269 .Ic Copy
7271 .Ic Save
7272 commands to be interpreted relative to the directory given in the
7273 .Va folder
7274 variable rather than to the current directory,
7275 unless it is set to an absolute pathname.
7278 .It Va page
7279 \*(BO If set, each message feed through the command given for
7280 .Ic pipe
7281 is followed by a formfeed character
7282 .Ql \ef .
7284 .Mx Va password
7285 .It Va password-USER@HOST , password-HOST , password
7286 \*(IN Variable chain that sets a password, which is used in case none has
7287 been given in the protocol and account-specific URL;
7288 as a last resort \*(UA will ask for a password on the user's terminal if
7289 the authentication method requires a password.
7290 Specifying passwords in a startup file is generally a security risk;
7291 the file should be readable by the invoking user only.
7293 .It Va password-USER@HOST
7294 \*(OU (see the chain above for \*(IN)
7295 Set the password for
7296 .Ql USER
7297 when connecting to
7298 .Ql HOST .
7299 If no such variable is defined for a host,
7300 the user will be asked for a password on standard input.
7301 Specifying passwords in a startup file is generally a security risk;
7302 the file should be readable by the invoking user only.
7305 .It Va piperaw
7306 \*(BO Send messages to the
7307 .Ic pipe
7308 command without performing MIME and character set conversions.
7312 .It Va pipe-TYPE/SUBTYPE
7313 When a MIME message part of type
7314 .Ql TYPE/SUBTYPE
7315 (case-insensitive) is displayed or quoted,
7316 its text is filtered through the value of this variable interpreted as
7317 a shell command.
7318 The special value
7319 .Ql @
7320 forces interpretation of the message part as plain text, e.g.,
7321 .Ql set pipe-application/xml=@
7322 will henceforth display XML
7323 .Dq as is .
7324 (The same could also be achieved by adding a MIME type marker with the
7325 .Ic mimetype
7326 command.
7327 And \*(OPally MIME type handlers may be defined via
7328 .Sx "The Mailcap files"
7329 \(em corresponding flag strings are shown in parenthesis below.)
7332 The special value
7333 .Ql @
7334 can in fact be used to adjust usage and behaviour of a following shell
7335 command specification by appending trigger characters to it, e.g., the
7336 following hypothetical command specification could be used:
7337 .Bd -literal -offset indent
7338 set pipe-X/Y='@*!++=@vim ${NAIL_FILENAME_TEMPORARY}'
7342 .Bl -tag -compact -width ".It Ql __"
7343 .It Ql *
7344 Simply by using the special
7345 .Ql @
7346 prefix the MIME type (shell command) handler will only be invoked to
7347 display or convert the MIME part if the message is addressed directly
7348 and alone by itself.
7349 Use this trigger to disable this and always invoke the handler
7350 .Pf ( Cd x-mailx-always ) .
7352 .It Ql #
7353 If set the handler will not be invoked when a message is to be quoted,
7354 but only when it will be displayed
7355 .Pf ( Cd x-mailx-noquote ) .
7357 .It Ql &
7358 The command will be run asynchronously, i.e., without blocking \*(UA,
7359 which may be a handy way to display a, e.g., PDF file while also
7360 continuing to read the mail message
7361 .Pf ( Cd x-mailx-async ) .
7362 Asynchronous execution implies
7363 .Ql # .
7365 .It Ql \&!
7366 The command must be run on an interactive terminal, \*(UA will
7367 temporarily release the terminal to it
7368 .Pf ( Cd needsterminal ) .
7369 This flag is mutual exclusive with
7370 .Ql & ,
7371 will only be used in interactive mode and implies
7372 .Ql # .
7374 .It Ql +
7375 Request creation of a zero-sized temporary file, the absolute pathname
7376 of which will be made accessible via the environment variable
7377 .Ev NAIL_FILENAME_TEMPORARY
7378 .Pf ( Cd x-mailx-tmpfile ) .
7379 If this trigger is given twice then the file will be unlinked
7380 automatically by \*(UA when the command loop is entered again at latest
7381 .Pf ( Cd x-mailx-tmpfile-unlink ) .
7382 (Don't use this for asynchronous handlers.)
7384 .It Ql =
7385 Normally the MIME part content is passed to the handler via standard
7386 input; if this flag is set then the data will instead be written into
7387 .Ev NAIL_FILENAME_TEMPORARY
7388 .Pf ( Cd x-mailx-tmpfile-fill ) ,
7389 the creation of which is implied; note however that in order to cause
7390 deletion of the temporary file you still have to use two plus signs
7391 .Ql ++
7392 explicitly!
7394 .It Ql @
7395 To avoid ambiguities with normal shell command content you can use
7396 another at-sign to forcefully terminate interpretation of remaining
7397 characters.
7398 (Any character not in this list will have the same effect.)
7402 Some information about the MIME part to be displayed is embedded into
7403 the environment of the shell command:
7406 .Bl -tag -compact -width ".It Ev _AIL__ILENAME__ENERATED"
7408 .It Ev NAIL_CONTENT
7409 The MIME content-type of the part, if known, the empty string otherwise.
7412 .It Ev NAIL_CONTENT_EVIDENCE
7414 .Va mime-counter-evidence
7415 includes the carry-around-bit (2), then this will be set to the detected
7416 MIME content-type; not only then identical to
7417 .Ev \&\&NAIL_CONTENT
7418 otherwise.
7421 .It Ev NAIL_FILENAME
7422 The filename, if any is set, the empty string otherwise.
7425 .It Ev NAIL_FILENAME_GENERATED
7426 A random string.
7429 .It Ev NAIL_FILENAME_TEMPORARY
7430 If temporary file creation has been requested through the command prefix
7431 this variable will be set and contain the absolute pathname of the
7432 temporary file.
7435 .It Ev NAIL_TMPDIR
7436 The temporary directory that \*(UA uses.
7437 Usually identical to
7438 .Ev TMPDIR ,
7439 but guaranteed to be set and usable by child processes;
7440 to ensure the latter condition for
7441 .Ev \&\&TMPDIR
7442 also, it'll be set.
7447 .It Va pipe-EXTENSION
7448 This is identical to
7449 .Va pipe-TYPE/SUBTYPE
7450 except that
7451 .Ql EXTENSION
7452 (normalized to lowercase using character mappings of the ASCII charset)
7453 names a file extension, e.g.,
7454 .Ql xhtml .
7455 Handlers registered using this method take precedence.
7457 .Mx Va pop3-auth
7458 .It Va pop3-auth-USER@HOST , pop3-auth-HOST , pop3-auth
7459 \*(OP\*(IN Variable chain that sets the POP3 authentication method.
7460 The only possible value as of now is
7461 .Ql plain ,
7462 which is thus the default.
7465 .Mx Va pop3-bulk-load
7466 .It Va pop3-bulk-load-USER@HOST , pop3-bulk-load-HOST , pop3-bulk-load
7467 \*(BO\*(OP When accessing a POP3 server \*(UA loads the headers of
7468 the messages, and only requests the message bodies on user request.
7469 For the POP3 protocol this means that the message headers will be
7470 downloaded twice.
7471 If this option is set then \*(UA will download only complete messages
7472 from the given POP3 server(s) instead.
7474 .Mx Va pop3-keepalive
7475 .It Va pop3-keepalive-USER@HOST , pop3-keepalive-HOST , pop3-keepalive
7476 \*(OP POP3 servers close the connection after a period of inactivity;
7477 the standard requires this to be at least 10 minutes,
7478 but practical experience may vary.
7479 Setting this variable to a numeric value greater than
7480 .Ql 0
7481 causes a
7482 .Ql NOOP
7483 command to be sent each value seconds if no other operation is performed.
7485 .Mx Va pop3-no-apop
7486 .It Va pop3-no-apop-USER@HOST , pop3-no-apop-HOST , pop3-no-apop
7487 \*(BO\*(OP Unless this variable is set the
7488 .Ql APOP
7489 authentication method will be used when connecting to a POP3 server that
7490 advertises support.
7491 The advantage of
7492 .Ql APOP
7493 is that the password is not sent in clear text over the wire and that
7494 only a single packet is sent for the user/password tuple.
7495 Note that
7496 .Va pop3-no-apop-HOST
7497 requires \*(IN.
7499 .Mx Va pop3-use-starttls
7500 .It Va pop3-use-starttls-USER@HOST , pop3-use-starttls-HOST , pop3-use-starttls
7501 \*(BO\*(OP Causes \*(UA to issue a
7502 .Ql STLS
7503 command to make an unencrypted POP3 session SSL/TLS encrypted.
7504 This functionality is not supported by all servers,
7505 and is not used if the session is already encrypted by the POP3S method.
7506 Note that
7507 .Va pop3-use-starttls-HOST
7508 requires \*(IN.
7511 .It Va print-alternatives
7512 \*(BO When a MIME message part of type
7513 .Ql multipart/alternative
7514 is displayed and it contains a subpart of type
7515 .Ql text/plain ,
7516 other parts are normally discarded.
7517 Setting this variable causes all subparts to be displayed,
7518 just as if the surrounding part was of type
7519 .Ql multipart/mixed .
7522 .It Va prompt
7523 The string shown when a command is accepted.
7524 Prompting may be prevented by setting this to the null string
7525 (or by setting
7526 .Pf no Va prompt ) .
7527 If a value is assigned the following \*(UA specific additional sequences
7528 are understood:
7529 .Ql \e& ,
7530 which expands to
7531 .Dq \&?
7532 unless
7533 .Va bsdcompat
7534 is set, in which case it expands to
7535 .Dq \&& ;
7536 note that
7537 .Ql \e&\0
7538 is the default value of
7539 .Va \&\&prompt .
7540 .Ql \e? ,
7541 which will expand to
7542 .Dq 1
7543 if the last command failed and to
7544 .Dq 0
7545 otherwise,
7546 .Ql \e$ ,
7547 which will expand to the name of the currently active
7548 .Ic account ,
7549 if any, and to the empty string otherwise, and
7550 .Ql \e@ ,
7551 which will expand to the name of the currently active mailbox.
7552 (Note that the prompt buffer is size-limited, excess is cut off.)
7554 Even though
7555 .Va \&\&prompt
7556 checks for
7557 .Va headline-bidi
7558 to encapsulate the expansions of the
7559 .Ql \e$
7561 .Ql \e@
7562 escape sequences as necessary to correctly display bidirectional text,
7563 this is not true for the final string that makes up
7564 .Va \&\&prompt
7565 as such, i.e., real BIDI handling is not supported.
7568 .It Va quiet
7569 \*(BO Suppresses the printing of the version when first invoked.
7572 .It Va quote
7573 If set, \*(UA starts a replying message with the original message
7574 prefixed by the value of the variable
7575 .Va indentprefix .
7576 Normally, a heading consisting of
7577 .Dq Fromheaderfield wrote:
7578 is put before the quotation.
7579 If the string
7580 .Ql noheading
7581 is assigned to the
7582 .Va \&\&quote
7583 variable, this heading is omitted.
7584 If the string
7585 .Ql headers
7586 is assigned, the headers selected by the
7587 .Ic ignore Ns / Ns Ic retain
7588 commands are put above the message body,
7589 thus
7590 .Va \&\&quote
7591 acts like an automatic
7592 .Pf ` Ic ~m Ns '
7593 .Sx "TILDE ESCAPES"
7594 command, then.
7595 If the string
7596 .Ql allheaders
7597 is assigned, all headers are put above the message body and all MIME
7598 parts are included, making
7599 .Va \&\&quote
7600 act like an automatic
7601 .Pf ` Ic ~M Ns '
7602 command; also see
7603 .Va quote-as-attachment .
7606 .It Va quote-as-attachment
7607 \*(BO Add the original message in its entirety as a
7608 .Ql message/rfc822
7609 MIME attachment when replying to a message.
7610 Note this works regardless of the setting of
7611 .Va quote .
7614 .It Va quote-fold
7615 \*(OP Can be set in addition to
7616 .Va indentprefix .
7617 Setting this turns on a more fancy quotation algorithm in that leading
7618 quotation characters are compressed and overlong lines are folded.
7619 .Va \&\&quote-fold
7620 can be set to either one or two (space separated) numeric values,
7621 which are interpreted as the maximum (goal) and the minimum line length,
7622 respectively, in a spirit rather equal to the
7623 .Xr fmt 1
7624 program, but line-, not paragraph-based.
7625 If not set explicitly the minimum will reflect the goal algorithmically.
7626 The goal can't be smaller than the length of
7627 .Va indentprefix
7628 plus some additional pad.
7629 Necessary adjustments take place silently.
7632 .It Va recipients-in-cc
7633 \*(BO On group replies, specify only the sender of the original mail in
7634 .Ql To:
7635 and mention the other recipients in the secondary
7636 .Ql Cc: .
7637 By default all recipients of the original mail will be addressed via
7638 .Ql To: .
7641 .It Va record
7642 If defined, gives the pathname of the folder used to record all outgoing
7643 mail.
7644 If not defined, then outgoing mail is not saved.
7645 When saving to this folder fails the message is not sent,
7646 but instead saved to
7647 .Ev DEAD .
7650 .It Va record-resent
7651 \*(BO If both this variable and the
7652 .Va record
7653 variable are set,
7655 .Ic resend
7657 .Ic Resend
7658 commands save messages to the
7659 .Va record
7660 folder as it is normally only done for newly composed messages.
7663 .It Va reply-in-same-charset
7664 \*(BO If this variable is set \*(UA first tries to use the same
7665 character set of the original message for replies.
7666 If this fails, the mechanism described in
7667 .Sx "Character sets"
7668 is evaluated as usual.
7671 .It Va reply_strings
7672 Can be set to a comma-separated list of (case-insensitive according to
7673 ASCII rules) strings which shall be recognized in addition to the
7674 builtin strings as
7675 .Ql Subject:
7676 reply message indicators \(en builtin are
7677 .Ql Re: ,
7678 which is mandated by RFC 5322, as well as the german
7679 .Ql Aw: .
7682 .It Va replyto
7683 A list of addresses to put into the
7684 .Ql Reply-To:
7685 field of the message header.
7686 Members of this list are handled as if they were in the
7687 .Ic alternates
7688 list.
7691 .It Va reply-to-honour
7692 Controls whether a
7693 .Ql Reply-To:
7694 header is honoured when replying to a message via
7695 .Ic reply
7697 .Ic Lreply .
7698 This is a quadoption; if set without a value it defaults to
7699 .Dq yes .
7702 .It Va rfc822-body-from_
7703 \*(BO This variable can be used to force displaying a so-called
7704 .Ql From_
7705 line for messages that are embedded into an envelope mail via the
7706 .Ql message/rfc822
7707 MIME mechanism, for more visual convenience.
7710 .It Va save
7711 \*(BO Enable saving of (partial) messages in
7712 .Ev DEAD
7713 upon interrupt or delivery error.
7716 .It Va screen
7717 The number of lines that represents a
7718 .Dq screenful
7719 of lines, used in
7720 .Ic headers
7721 summary display,
7722 .Ic from
7723 .Ic search Ns
7724 ing, message
7725 .Ic top Ns
7726 line display and scrolling via
7727 .Ic z .
7728 If this variable is not set \*(UA falls back to a calculation based upon
7729 the detected terminal window size and the baud rate: the faster the
7730 terminal, the more will be shown.
7731 Overall screen dimensions and pager usage is influenced by the
7732 environment variables
7733 .Ev COLUMNS
7735 .Ev LINES
7736 and the variable
7737 .Va crt .
7740 .It Va searchheaders
7741 \*(BO Expand message-list specifiers in the form
7742 .Ql /x:y
7743 to all messages containing the substring
7744 .Dq y
7745 in the header field
7746 .Ql x .
7747 The string search is case insensitive.
7750 .It Va sendcharsets
7751 \*(OP A comma-separated list of character set names that can be used in
7752 outgoing internet mail.
7753 The value of the variable
7754 .Va charset-8bit
7755 is automatically appended to this list of character-sets.
7756 If no character set conversion capabilities are compiled into \*(UA then
7757 the only supported charset is
7758 .Va ttycharset .
7759 Also see
7760 .Va sendcharsets-else-ttycharset
7761 and refer to the section
7762 .Sx "Character sets"
7763 for the complete picture of character set conversion in \*(UA.
7766 .It Va sendcharsets-else-ttycharset
7767 \*(BO\*(OP If this variable is set, but
7768 .Va sendcharsets
7769 is not, then \*(UA acts as if
7770 .Va sendcharsets
7771 had been set to the value of the variable
7772 .Va ttycharset .
7773 In effect this combination passes through the message data in the
7774 character set of the current locale (given that
7775 .Va ttycharset
7776 hasn't been set manually), i.e., without converting it to the
7777 .Va charset-8bit
7778 fallback character set.
7779 Thus, mail message text will be in ISO-8859-1 encoding when send from
7780 within a ISO-8859-1 locale, and in UTF-8 encoding when send from within
7781 an UTF-8 locale.
7782 If no character set conversion capabilities are available in \*(UA then
7783 the only supported character set is
7784 .Va ttycharset .
7787 .It Va sender
7788 An address that is put into the
7789 .Ql Sender:
7790 field of outgoing messages, quoting RFC 5322: the mailbox of the agent
7791 responsible for the actual transmission of the message.
7792 This field should normally not be used unless the
7793 .Ql From:
7794 field contains more than one address, on which case it is required.
7796 .Va \&\&sender
7797 address is handled as if it were in the
7798 .Ic alternates
7799 list.
7802 .It Va sendmail
7803 \*(OB Predecessor of
7804 .Va mta .
7807 .It Va sendmail-arguments
7808 \*(OB Predecessor of
7809 .Va mta-arguments .
7812 .It Va sendmail-no-default-arguments
7813 \*(OB\*(BO Predecessor of
7814 .Va mta-no-default-arguments .
7817 .It Va sendmail-progname
7818 \*(OB Predecessor of
7819 .Va mta-argv0 .
7822 .It Va sendwait
7823 \*(BO When sending a message wait until the
7824 .Va mta
7825 (including the builtin SMTP one) exits before accepting further commands.
7826 .Sy Only
7827 with this variable set errors reported by the MTA will be recognizable!
7828 If the MTA returns a non-zero exit status,
7829 the exit status of \*(UA will also be non-zero.
7832 .It Va showlast
7833 \*(BO Setting this option causes \*(UA to start at the last message
7834 instead of the first one when opening a mail folder.
7837 .It Va showname
7838 \*(BO Causes \*(UA to use the sender's real name instead of the plain
7839 address in the header field summary and in message specifications.
7842 .It Va showto
7843 \*(BO Causes the recipient of the message to be shown in the header
7844 summary if the message was sent by the user.
7847 .It Va Sign
7848 A string for use with the
7849 .Ic ~A
7850 tilde escape.
7853 .It Va sign
7854 A string for use with the
7855 .Ic ~a
7856 tilde escape.
7859 .It Va signature
7860 Must correspond to the name of a readable file if set.
7861 The file's content is then appended to each singlepart message
7862 and to the first part of each multipart message.
7863 Be warned that there is no possibility to edit the signature for an
7864 individual message.
7867 .It Va skipemptybody
7868 \*(BO If an outgoing message does not contain any text in its first or
7869 only message part, do not send it but discard it silently (see also the
7870 command line option
7871 .Fl E ) .
7874 .It Va smime-ca-dir
7875 \*(OP Specifies a directory with CA certificates in PEM (Privacy
7876 Enhanced Mail) format for verification of S/MIME signed messages.
7879 .It Va smime-ca-file
7880 \*(OP Specifies a file with CA certificates in PEM format for
7881 verification of S/MIME signed messages.
7883 .Mx Va smime-cipher
7884 .It Va smime-cipher-USER@HOST , smime-cipher
7885 \*(OP Specifies the cipher to use when generating S/MIME encrypted
7886 messages (for the specified account).
7887 RFC 5751 mandates a default of
7888 .Ql aes128
7889 (AES-128 CBC).
7890 Possible values are (case-insensitive and) in decreasing cipher strength:
7891 .Ql aes256
7892 (AES-256 CBC),
7893 .Ql aes192
7894 (AES-192 CBC),
7895 .Ql aes128
7896 (AES-128 CBC),
7897 .Ql des3
7898 (DES EDE3 CBC, 168 bits; default if
7899 .Ql aes128
7900 isn't available) and
7901 .Ql des
7902 (DES CBC, 56 bits).
7904 The actually available cipher algorithms depend on the cryptographic
7905 library that \*(UA uses.
7906 \*(OP Support for more cipher algorithms may be available through
7907 dynamic loading via, e.g.,
7908 .Xr EVP_get_cipherbyname 3
7909 (OpenSSL) if \*(UA has been compiled to support this.
7912 .It Va smime-crl-dir
7913 \*(OP Specifies a directory that contains files with CRLs in PEM format
7914 to use when verifying S/MIME messages.
7917 .It Va smime-crl-file
7918 \*(OP Specifies a file that contains a CRL in PEM format to use when
7919 verifying S/MIME messages.
7922 .It Va smime-encrypt-USER@HOST
7923 \*(OP If this variable is set, messages send to the given receiver are
7924 encrypted before sending.
7925 The value of the variable must be set to the name of a file that
7926 contains a certificate in PEM format.
7928 If a message is sent to multiple recipients,
7929 each of them for whom a corresponding variable is set will receive an
7930 individually encrypted message;
7931 other recipients will continue to receive the message in plain text
7932 unless the
7933 .Va smime-force-encryption
7934 variable is set.
7935 It is recommended to sign encrypted messages, i.e., to also set the
7936 .Va smime-sign
7937 variable.
7940 .It Va smime-force-encryption
7941 \*(BO\*(OP Causes \*(UA to refuse sending unencrypted messages.
7944 .It Va smime-no-default-ca
7945 \*(BO\*(OP Don't load default CA locations when verifying S/MIME signed
7946 messages.
7949 .It Va smime-sign
7950 \*(BO\*(OP S/MIME sign outgoing messages with the user's private key
7951 and include the user's certificate as a MIME attachment.
7952 Signing a message enables a recipient to verify that the sender used
7953 a valid certificate,
7954 that the email addresses in the certificate match those in the message
7955 header and that the message content has not been altered.
7956 It does not change the message text,
7957 and people will be able to read the message as usual.
7958 Also see
7959 .Va smime-sign-cert , smime-sign-include-certs
7961 .Va smime-sign-message-digest .
7963 .Mx Va smime-sign-cert
7964 .It Va smime-sign-cert-USER@HOST , smime-sign-cert
7965 \*(OP Points to a file in PEM format.
7966 For the purpose of signing and decryption this file needs to contain the
7967 user's private key as well as his certificate.
7969 For message signing
7970 .Ql USER@HOST
7971 is always derived from the value of
7972 .Va from
7973 (or, if that contains multiple addresses,
7974 .Va sender ) .
7975 For the purpose of encryption the recipient's public encryption key
7976 (certificate) is expected; the command
7977 .Ic certsave
7978 can be used to save certificates of signed messages (the section
7979 .Sx "Signed and encrypted messages with S/MIME"
7980 gives some details).
7981 This mode of operation is usually driven by the specialized form.
7983 When decrypting messages the account is derived from the recipient
7984 fields
7985 .Pf ( Ql To:
7987 .Ql Cc: )
7988 of the message, which are searched for addresses for which such
7989 a variable is set.
7990 \*(UA always uses the first address that matches,
7991 so if the same message is sent to more than one of the user's addresses
7992 using different encryption keys, decryption might fail.
7994 .Mx Va smime-sign-include-certs
7995 .It Va smime-sign-include-certs-USER@HOST , smime-sign-include-certs
7996 \*(OP If used, this is supposed to a consist of a comma-separated list
7997 of files, each of which containing a single certificate in PEM format to
7998 be included in the S/MIME message in addition to the
7999 .Va smime-sign-cert
8000 certificate.
8001 This is most useful for long certificate chains if it is desired to aid
8002 the receiving party's verification process.
8003 Note that top level certificates may also be included in the chain but
8004 don't play a role for verification.
8005 Also see
8006 .Va smime-sign-cert .
8007 Remember that for this
8008 .Ql USER@HOST
8009 refers to the variable
8010 .Va from
8011 (or, if that contains multiple addresses,
8012 .Va sender ) .
8014 .Mx Va smime-sign-message-digest
8015 .It Va smime-sign-message-digest-USER@HOST , smime-sign-message-digest
8016 \*(OP Specifies the message digest to use when signing S/MIME messages.
8017 RFC 5751 mandates a default of
8018 .Ql sha1 .
8019 Possible values are (case-insensitive and) in decreasing cipher strength:
8020 .Ql sha512 ,
8021 .Ql sha384 ,
8022 .Ql sha256 ,
8023 .Ql sha224
8025 .Ql md5 .
8027 The actually available message digest algorithms depend on the
8028 cryptographic library that \*(UA uses.
8029 \*(OP Support for more message digest algorithms may be available
8030 through dynamic loading via, e.g.,
8031 .Xr EVP_get_digestbyname 3
8032 (OpenSSL) if \*(UA has been compiled to support this.
8033 Remember that for this
8034 .Ql USER@HOST
8035 refers to the variable
8036 .Va from
8037 (or, if that contains multiple addresses,
8038 .Va sender ) .
8041 .It Va smtp
8042 \*(OB\*(OP To use the builtin SMTP transport, specify a SMTP URL in
8043 .Va mta .
8044 \*(ID For compatibility reasons a set
8045 .Va smtp
8046 is used in preference of
8047 .Va mta .
8049 .Mx Va smtp-auth
8050 .It Va smtp-auth-USER@HOST , smtp-auth-HOST , smtp-auth
8051 \*(OP Variable chain that controls the SMTP
8052 .Va mta
8053 authentication method, possible values are
8054 .Ql none
8055 (\*(OU default),
8056 .Ql plain
8057 (\*(IN default),
8058 .Ql login
8059 as well as the \*(OPal methods
8060 .Ql cram-md5
8062 .Ql gssapi .
8064 .Ql none
8065 method doesn't need any user credentials,
8066 .Ql gssapi
8067 requires a user name and all other methods require a user name and
8068 a password.
8069 See \*(IN
8070 .Va mta ,
8071 .Va user
8073 .Va password
8074 (\*(OU
8075 .Va smtp-auth-password
8077 .Va smtp-auth-user ) .
8078 Note that
8079 .Va smtp-auth-HOST
8080 is \*(IN.
8081 \*(OU: Note for
8082 .Va smtp-auth-USER@HOST :
8083 may override dependent on sender address in the variable
8084 .Va from .
8086 .It Va smtp-auth-password
8087 \*(OP\*(OU Sets the global fallback password for SMTP authentication.
8088 If the authentication method requires a password, but neither
8089 .Va smtp-auth-password
8090 nor a matching
8091 .Va smtp-auth-password-USER@HOST
8092 can be found,
8093 \*(UA will ask for a password on the user's terminal.
8095 .It Va smtp-auth-password-USER@HOST
8096 \*(OU Overrides
8097 .Va smtp-auth-password
8098 for specific values of sender addresses, dependent upon the variable
8099 .Va from .
8101 .It Va smtp-auth-user
8102 \*(OP\*(OU Sets the global fallback user name for SMTP authentication.
8103 If the authentication method requires a user name, but neither
8104 .Va smtp-auth-user
8105 nor a matching
8106 .Va smtp-auth-user-USER@HOST
8107 can be found,
8108 \*(UA will ask for a user name on the user's terminal.
8110 .It Va smtp-auth-user-USER@HOST
8111 \*(OU Overrides
8112 .Va smtp-auth-user
8113 for specific values of sender addresses, dependent upon the variable
8114 .Va from .
8117 .It Va smtp-hostname
8118 \*(OP\*(IN Normally \*(UA uses the variable
8119 .Va from
8120 to derive the necessary
8121 .Ql USER@HOST
8122 information in order to issue a
8123 .Ql MAIL FROM:<>
8124 SMTP
8125 .Va mta
8126 command.
8127 Setting
8128 .Va smtp-hostname
8129 can be used to use the
8130 .Ql USER
8131 from the SMTP account
8132 .Pf ( Va mta
8133 or the
8134 .Va user
8135 variable chain)
8136 and the
8137 .Ql HOST
8138 from the content of this variable (or, if that is the empty string,
8139 .Va hostname
8140 or the local hostname as a last resort).
8141 This often allows using an address that is itself valid but hosted by
8142 a provider other than which (in
8143 .Va from )
8144 is about to send the message.
8145 Setting this variable also influences the generated
8146 .Ql Message-ID: .
8148 .Mx Va smtp-use-starttls
8149 .It Va smtp-use-starttls-USER@HOST , smtp-use-starttls-HOST , smtp-use-starttls
8150 \*(BO\*(OP Causes \*(UA to issue a
8151 .Ql STARTTLS
8152 command to make an SMTP
8153 .Va mta
8154 session SSL/TLS encrypted, i.e., to enable transport layer security.
8158 .It Va spam-interface
8159 \*(OP In order to use any of the spam-related commands (like, e.g.,
8160 .Ic spamrate )
8161 the desired spam interface must be defined by setting this variable.
8162 Please refer to the manual section
8163 .Sx "Handling spam"
8164 for the complete picture of spam handling in \*(UA.
8165 All or none of the following interfaces may be available:
8167 .Bl -tag -width ".It Ql _ilte_"
8168 .It Ql spamc
8169 Interaction with
8170 .Xr spamc 1
8171 from the
8172 .Xr spamassassin 1
8173 .Pf ( Lk http://spamassassin.apache.org SpamAssassin )
8174 suite.
8175 Different to the generic filter interface \*(UA will automatically add
8176 the correct arguments for a given command and has the necessary
8177 knowledge to parse the program's output.
8178 A default value for
8179 .Va spamc-command
8180 will have been compiled into the \*(UA binary if
8181 .Xr spamc 1
8182 has been found in
8183 .Ev PATH
8184 during compilation.
8185 Shall it be necessary to define a specific connection type (rather than
8186 using a configuration file for that), the variable
8187 .Va spamc-arguments
8188 can be used as in, e.g.,
8189 .Ql -d server.example.com -p 783 .
8190 It is also possible to specify a per-user configuration via
8191 .Va spamc-user .
8192 Note that this interface doesn't inspect the
8193 .Ql is-spam
8194 flag of a message for the command
8195 .Ic spamforget .
8197 .It Ql filter
8198 generic spam filter support via freely configurable hooks.
8199 This interface is meant for programs like
8200 .Xr bogofilter 1
8201 and requires according behaviour in respect to the hooks' exit
8202 status for at least the command
8203 .Ic spamrate
8204 .Pf ( Ql 0
8205 meaning a message is spam,
8206 .Ql 1
8207 for non-spam,
8208 .Ql 2
8209 for unsure and any other return value indicating a hard error);
8210 since the hooks can include shell code snippets diverting behaviour
8211 can be intercepted as necessary.
8212 The hooks are
8213 .Va spamfilter-ham , spamfilter-noham , spamfilter-nospam , \
8214   spamfilter-rate
8216 .Va spamfilter-spam ;
8217 the manual section
8218 .Sx "Handling spam"
8219 contains examples for some programs.
8220 The process environment of the hooks will have the variables
8221 .Ev NAIL_TMPDIR , TMPDIR
8223 .Ev NAIL_FILENAME_GENERATED
8224 set.
8225 Note that spam score support for
8226 .Ic spamrate
8227 isn't supported unless the \*(OPtional regular expression support is
8228 available and the
8229 .Va spamfilter-rate-scanscore
8230 variable is set.
8235 .It Va spam-maxsize
8236 \*(OP Messages that exceed this size won't be passed through to the
8237 configured
8238 .Va spam-interface .
8239 If unset or 0, the default of 420000 bytes is used.
8242 .It Va spamc-command
8243 \*(OP The path to the
8244 .Xr spamc 1
8245 program for the
8246 .Ql spamc
8247 .Va spam-interface .
8248 Note that the path is not expanded, but used
8249 .Dq as is .
8250 A fallback path will have been compiled into the \*(UA binary if the
8251 executable had been found during compilation.
8254 .It Va spamc-arguments
8255 \*(OP Even though \*(UA deals with most arguments for the
8256 .Ql spamc
8257 .Va spam-interface
8258 automatically, it may at least sometimes be desirable to specify
8259 connection-related ones via this variable, e.g.,
8260 .Ql -d server.example.com -p 783 .
8263 .It Va spamc-user
8264 \*(OP Specify a username for per-user configuration files for the
8265 .Ql spamc
8266 .Va spam-interface .
8267 If this is set to the empty string then \*(UA will use the name of the
8268 current
8269 .Va user .
8276 .It Va spamfilter-ham , spamfilter-noham , \
8277   spamfilter-nospam , spamfilter-rate , spamfilter-spam
8278 \*(OP Command and argument hooks for the
8279 .Ql filter
8280 .Va spam-interface .
8281 The manual section
8282 .Sx "Handling spam"
8283 contains examples for some programs.
8286 .It Va spamfilter-rate-scanscore
8287 \*(OP Because of the generic nature of the
8288 .Ql filter
8289 .Va spam-interface
8290 spam scores are not supported for it by default, but if the \*(OPtional
8291 regular expression support is available then setting this variable can
8292 be used to overcome this restriction.
8293 It is interpreted as follows: first a number (digits) is parsed that
8294 must be followed by a semicolon
8295 .Ql \&;
8296 and an extended regular expression.
8297 Then the latter is used to parse the first output line of the
8298 .Va spamfilter-rate
8299 hook, and, in case the evaluation is successful, the group that has been
8300 specified via the number is interpreted as a floating point scan score.
8303 .It Va ssl-ca-dir
8304 \*(OP Specifies a directory with CA certificates in PEM (Pricacy
8305 Enhanced Mail) for verification of of SSL/TLS server certificates.
8307 .Xr SSL_CTX_load_verify_locations 3
8308 for more information.
8311 .It Va ssl-ca-file
8312 \*(OP Specifies a file with CA certificates in PEM format for
8313 verification of SSL/TLS server certificates.
8315 .Xr SSL_CTX_load_verify_locations 3
8316 for more information.
8318 .Mx Va ssl-cert
8319 .It Va ssl-cert-USER@HOST , ssl-cert-HOST , ssl-cert
8320 \*(OP Variable chain that sets the file name for a SSL/TLS client
8321 certificate required by some servers.
8322 This is a direct interface to the
8323 .Ql Certificate
8324 slot of the
8325 .Xr SSL_CONF_cmd 3
8326 function of the OpenSSL library, if available.
8328 .Mx Va ssl-cipher-list
8329 .It Va ssl-cipher-list-USER@HOST , ssl-cipher-list-HOST , ssl-cipher-list
8330 \*(OP Specifies a list of ciphers for SSL/TLS connections.
8331 This is a direct interface to the
8332 .Ql CipherString
8333 slot of the
8334 .Xr SSL_CONF_cmd 3
8335 function of the OpenSSL library, if available; see
8336 .Xr ciphers 1
8337 for more information.
8338 By default \*(UA doesn't set a list of ciphers, which in effect will use a
8339 .Va ssl-protocol
8340 specific cipher (protocol standards ship with a list of acceptable
8341 ciphers), possibly cramped to what the actually used SSL/TLS library
8342 supports \(en the manual section
8343 .Sx "An example configuration"
8344 also contains a SSL/TLS use case.
8347 .It Va ssl-config-file
8348 \*(OP If this variable is set \*(UA will call
8349 .Xr CONF_modules_load_file 3
8350 to allow OpenSSL to be configured according to the host system wide
8351 security settings.
8352 If a non-empty value is given then this will be used to specify the
8353 configuration file to be used instead of the global OpenSSL default;
8354 note that in this case it is an error if the file cannot be loaded.
8355 The application name will always be passed as
8356 .Dq \*(uA .
8359 .It Va ssl-crl-file
8360 \*(OP Specifies a file that contains a CRL in PEM format to use when
8361 verifying SSL/TLS server certificates.
8364 .It Va ssl-crl-dir
8365 \*(OP Specifies a directory that contains files with CRLs in PEM format
8366 to use when verifying SSL/TLS server certificates.
8368 .Mx Va ssl-key
8369 .It Va ssl-key-USER@HOST , ssl-key-HOST , ssl-key
8370 \*(OP Variable chain that sets the file name for the private key of
8371 a SSL/TLS client certificate.
8372 If unset, the name of the certificate file is used.
8373 The file is expected to be in PEM format.
8374 This is a direct interface to the
8375 .Ql PrivateKey
8376 slot of the
8377 .Xr SSL_CONF_cmd 3
8378 function of the OpenSSL library, if available.
8380 .Mx Va ssl-method
8381 .It Va ssl-method-USER@HOST , ssl-method-HOST , ssl-method
8382 \*(OB\*(OP Please use the newer and more flexible
8383 .Va ssl-protocol
8384 instead: if both values are set,
8385 .Va ssl-protocol
8386 will take precedence!
8387 Can be set to the following values, the actually used
8388 .Va ssl-protocol
8389 specification to which it is mapped is shown in parenthesis:
8390 .Ql tls1.2
8391 .Pf ( Ql -ALL, TLSv1.2 ) ,
8392 .Ql tls1.1
8393 .Pf ( Ql -ALL, TLSv1.1 ) ,
8394 .Ql tls1
8395 .Pf ( Ql -ALL, TLSv1 )
8397 .Ql ssl3
8398 .Pf ( Ql -ALL, SSLv3 ) ;
8399 the special value
8400 .Ql auto
8401 is mapped to
8402 .Ql ALL, -SSLv2
8403 and thus includes the SSLv3 protocol.
8404 Note that SSLv2 is no longer supported at all.
8407 .It Va ssl-no-default-ca
8408 \*(BO\*(OP Don't load default CA locations to verify SSL/TLS server
8409 certificates.
8411 .Mx Va ssl-protocol
8412 .It Va ssl-protocol-USER@HOST , ssl-protocol-HOST , ssl-protocol
8413 \*(OP Specify the used SSL/TLS protocol.
8414 This is a direct interface to the
8415 .Ql Protocol
8416 slot of the
8417 .Xr SSL_CONF_cmd 3
8418 function of the OpenSSL library, if available;
8419 otherwise an \*(UA internal parser is used which understands the
8420 following subset of (case-insensitive) command strings:
8421 .Ql SSLv3 ,
8422 .Ql TLSv1 ,
8423 .Ql TLSv1.1
8425 .Ql TLSv1.2 ,
8426 as well as the special value
8427 .Ql ALL .
8428 Multiple specifications may be given via a comma-separated list which
8429 ignores any whitespace.
8430 An optional
8431 .Ql +
8432 plus prefix will enable a protocol, a
8433 .Ql -
8434 minus prefix will disable it, so that
8435 .Ql -ALL, TLSv1.2
8436 will enable only the TLSv1.2 protocol.
8438 It depends upon the used TLS/SSL library which protocols are actually
8439 supported and which protocols are used if
8440 .Va ssl-protocol
8441 is not set, but note that SSLv2 is no longer supported at all and
8442 actively disabled.
8443 Especially for older protocols explicitly securing
8444 .Va ssl-cipher-list
8445 may be worthwile, see
8446 .Sx "An example configuration" .
8449 .It Va ssl-rand-egd
8450 \*(OP Gives the pathname to an entropy daemon socket, see
8451 .Xr RAND_egd 3 .
8452 Not all SSL/TLS libraries support this.
8455 .It Va ssl-rand-file
8456 \*(OP Gives the filename to a file with random entropy data, see
8457 .Xr RAND_load_file 3 .
8458 If this variable is not set, or set to the empty string, or if the
8459 filename expansion failed, then
8460 .Xr RAND_file_name 3
8461 will be used to create the filename if, and only if,
8462 .Xr RAND_status 3
8463 documents that the SSL PRNG is not yet sufficiently seeded.
8464 If \*(UA successfully seeded the SSL PRNG then it'll update the file via
8465 .Xr RAND_write_file 3 .
8466 This variable is only used if
8467 .Va ssl-rand-egd
8468 is not set (or not supported by the SSL/TLS library).
8470 .Mx Va ssl-verify
8471 .It Va ssl-verify-USER@HOST , ssl-verify-HOST , ssl-verify
8472 \*(OP Variable chain that sets the action to be performed if an error
8473 occurs during SSL/TLS server certificate validation.
8474 Valid (case-insensitive) values are
8475 .Ql strict
8476 (fail and close connection immediately),
8477 .Ql ask
8478 (ask whether to continue on standard input),
8479 .Ql warn
8480 (show a warning and continue),
8481 .Ql ignore
8482 (do not perform validation).
8483 The default is
8484 .Ql ask .
8487 .It Va stealthmua
8488 If only set without an assigned value, then this option inhibits the
8489 generation of the
8490 .Ql Message-ID:
8492 .Ql User-Agent:
8493 header fields that include obvious references to \*(UA.
8494 There are two pitfalls associated with this:
8495 First, the message id of outgoing messages is not known anymore.
8496 Second, an expert may still use the remaining information in the header
8497 to track down the originating mail user agent.
8498 If set to the value
8499 .Ql noagent ,
8500 then the mentioned
8501 .Ql Message-ID:
8502 suppression doesn't occur.
8506 .It Va termcap
8507 (\*(OP) This specifies a comma-separated list of
8508 .Lb libterminfo
8509 and/or
8510 .Lb libtermcap
8511 capabilities (see
8512 .Sx "On terminal control and line editor" ,
8513 escape commas with reverse solidus) to be used to overwrite or define
8514 entries.
8515 Note that this variable will only be queried once at program startup and
8516 can thus only be specified in resource files or on the command line.
8519 String capabilities form
8520 .Ql cap=value
8521 pairs and are expected unless noted otherwise.
8522 Numerics have to be notated as
8523 .Ql cap#number
8524 where the number is expected in normal decimal notation.
8525 Finally, booleans don't have any value but indicate a true or false
8526 state simply by being defined or not; this indeed means that \*(UA
8527 doesn't support undefining an existing boolean.
8528 String capability values will undergo some expansions before use:
8529 for one notations like
8530 .Ql ^LETTER
8531 stand for
8532 .Ql control-LETTER ,
8533 and for clarification purposes
8534 .Ql \eE
8535 can be used to specify
8536 .Ql escape
8537 (the control notation
8538 .Ql ^[
8539 could lead to misreadings when a left bracket follows, which it does for
8540 the standard CSI sequence);
8541 finally three letter octal sequences, as in
8542 .Ql \e061 ,
8543 are supported.
8544 To specify that a terminal supports 256-colours, and to define sequences
8545 that home the cursor and produce an audible bell, one might write:
8547 .Bd -literal -offset indent
8548 set termcap='Co#256,home=\eE[H,bel=^G'
8552 The following terminal capabilities are or may be meaningful for the
8553 operation of the builtin line editor or \*(UA in general:
8556 .Bl -tag -compact -width yay
8557 .\" HAVE_COLOUR
8558 .It Cd colors Ns \0or Cd Co
8559 .Cd max_colors :
8560 numeric capability specifying the maximum number of colours.
8561 Note that \*(UA doesn't actually care about the terminal beside that,
8562 but always emits ANSI / ISO 6429 escape sequences.
8564 .\" HAVE_TERMCAP
8565 .It Cd rmcup Ns \0or Cd te Ns \0/ Cd smcup Ns \0or Cd ti
8566 .Cd exit_ca_mode
8568 .Cd enter_ca_mode ,
8569 respectively: exit and enter the alternative screen
8570 .Dq ca-mode ,
8571 effectively turning \*(UA into a fullscreen application.
8572 To disable that, set (at least) one to the empty string.
8574 .It Cd smkx Ns \0or Cd ks Ns \0/ Cd rmkx Ns \0or Cd ke
8575 .Cd keypad_xmit
8577 .Cd keypad_local ,
8578 respectively: enable and disable the keypad.
8579 This is always enabled if available, because it seems even keyboards
8580 without keypads generate other key codes for, e.g., cursor keys in that
8581 case, and only if enabled we see the codes that we are interested in.
8583 .It Cd ed Ns \0or Cd cd
8584 .Cd clr_eos :
8585 clear the screen.
8587 .It Cd clear Ns \0or Cd cl
8588 .Cd clear_screen :
8589 clear the screen and home cursor.
8590 (Will be simulated via
8591 .Cd ho
8592 plus
8593 .Cd cd . )
8595 .It Cd home Ns \0or Cd ho
8596 .Cd cursor_home :
8597 home cursor.
8599 .\" HAVE_MLE
8600 .It Cd el Ns \0or Cd ce
8601 .Cd clr_eol :
8602 clear to the end of line.
8603 (Will be simulated via
8604 .Cd ch
8605 plus repetitions of space characters.)
8607 .It Cd hpa Ns \0or Cd ch
8608 .Cd column_address :
8609 move the cursor (to the given column parameter) in the current row.
8610 (Will be simulated via
8611 .Cd cr
8612 plus
8613 .Cd nd . )
8615 .It Cd cr
8616 .Cd carriage_return :
8617 move to the first column in the current row.
8618 The default builtin fallback is
8619 .Ql \er .
8621 .It Cd cub1 Ns \0or Cd le
8622 .Cd cursor_left :
8623 move the cursor left one space (non-destructively).
8624 The default builtin fallback is
8625 .Ql \eb .
8627 .It Cd cuf1 Ns \0or Cd nd
8628 .Cd cursor_right :
8629 move the cursor right one space (non-destructively).
8630 The default builtin fallback is
8631 .Ql \eE[C ,
8632 which is used by most terminals.
8633 Less often occur
8634 .Ql \eEC
8636 .Ql \eEOC .
8640 Many more capabilities which describe key-sequences are documented for
8641 .Ic bind .
8644 .It Va termcap-disable
8645 \*(OP Disable any interaction with a terminal control library.
8646 If set only some generic fallback builtins and possibly the content of
8647 .Va termcap
8648 describe the terminal to \*(UA.
8649 .Sy Note
8650 that this variable will only be queried once at program startup and can
8651 thus only be specified in resource files or on the command line.
8654 .It Va toplines
8655 If defined, gives the number of lines of a message to be displayed
8656 with the command
8657 .Ic top ;
8658 if unset, the first five lines are printed, if set to 0 the variable
8659 .Va screen
8660 is inspected.
8661 If the value is negative then its absolute value will be used for right
8662 shifting the
8663 .Va screen
8664 height;  (shifting bitwise is like dividing algorithmically, but since
8665 it takes away bits the value decreases pretty fast).
8668 .It Va topsqueeze
8669 \*(BO If set then the
8670 .Ic top
8671 command series will strip adjacent empty lines and quotations.
8674 .It Va ttycharset
8675 The character set of the terminal \*(UA operates on,
8676 and the one and only supported character set that \*(UA can use if no
8677 character set conversion capabilities have been compiled into it,
8678 in which case it defaults to ISO-8859-1 unless it can deduce a value
8679 from the
8680 .Ev LC_CTYPE
8681 locale environment.
8682 Refer to the section
8683 .Sx "Character sets"
8684 for the complete picture about character sets.
8687 .It Va typescript-mode
8688 \*(BO A special multiplex variable that disables all variables and
8689 settings which result in behaviour that interferes with running \*(UA in
8690 .Xr script 1 ,
8691 e.g., it sets
8692 .Va colour-disable ,
8693 .Va line-editor-disable
8694 and (before startup completed only)
8695 .Va termcap-disable .
8696 Unsetting it doesn't restore the former state of the covered settings.
8699 .It Va umask
8700 For a safety-by-default policy \*(UA sets its process
8701 .Xr umask 2
8703 .Ql 0077 ,
8704 but this variable can be used to override that:
8705 set it to an empty value to don't change the (current) setting,
8706 otherwise the process file mode creation mask is updated to the new value.
8707 Child processes inherit the process file mode creation mask.
8709 .Mx Va user
8710 .It Va user-HOST , user
8711 \*(IN Variable chain that sets a global fallback user name, which is
8712 used in case none has been given in the protocol and account-specific
8713 URL.
8714 This variable defaults to the name of the user who runs \*(UA.
8717 .It Va v15-compat
8718 \*(BO Setting this option enables upward compatibility with \*(UA
8719 version 15.0 in respect to which configuration options are available and
8720 how they are handled.
8721 This manual uses \*(IN and \*(OU to refer to the new and the old way of
8722 doing things, respectively.
8725 .It Va verbose
8726 \*(BO Setting this option, also controllable via the command line option
8727 .Fl v ,
8728 causes \*(UA to be more verbose, e.g., it will display obsoletion
8729 warnings and SSL/TLS certificate chains.
8730 Even though marked \*(BO this option may be set twice in order to
8731 increase the level of verbosity even more, in which case even details of
8732 the actual message delivery and protocol conversations are shown.
8733 A single
8734 .Pf no Va verbose
8735 is sufficient to disable verbosity as such.
8741 .It Va version , version-major , version-minor , version-update
8742 \*(RO \*(UA version information: the first variable contains a string
8743 containing the complete version identification, the latter three contain
8744 only digits: the major, minor and update version numbers.
8745 The output of the command
8746 .Ic version
8747 will include this information.
8750 .It Va writebackedited
8751 If this variable is set messages modified using the
8752 .Ic edit
8754 .Ic visual
8755 commands are written back to the current folder when it is quit;
8756 it is only honoured for writable folders in MBOX format, though.
8757 Note that the editor will be pointed to the raw message content in that
8758 case, i.e., neither MIME decoding nor decryption will have been
8759 performed, and proper RFC 4155
8760 .Ql From_
8761 quoting of newly added or edited content is also left as an excercise to
8762 the user.
8764 .\" }}} (Variables)
8765 .\" }}} (INTERNAL VARIABLES)
8768 .\" .Sh ENVIRONMENT {{{
8769 .Sh ENVIRONMENT
8771 The term
8772 .Dq environment variable
8773 should be considered an indication that these variables are either
8774 standardized as vivid parts of process environments, or that they are
8775 commonly found in there.
8776 The process environment is inherited from the
8777 .Xr sh 1
8778 once \*(UA is started, and unless otherwise explicitly noted handling of
8779 the following variables transparently integrates into that of the
8780 .Sx "INTERNAL VARIABLES"
8781 from \*(UA's point of view.
8782 This means that, e.g., they can be managed via
8783 .Ic set
8785 .Ic unset ,
8786 causing automatic program environment updates (to be inherited by
8787 newly created child processes).
8790 In order to transparently integrate other environment variables equally
8791 they need to be imported (linked) with the command
8792 .Ic environ .
8793 This command can also be used to set and unset non-integrated
8794 environment variables from scratch, sufficient system support provided.
8795 The following example, applicable to a POSIX shell, sets the
8796 .Ev COLUMNS
8797 environment variable for \*(UA only, and beforehand exports the
8798 .Ev EDITOR
8799 in order to affect any further processing in the running shell:
8801 .Bd -literal -offset indent
8802 $ EDITOR="vim -u ${HOME}/.vimrc"
8803 $ export EDITOR
8804 $ COLUMNS=80 \*(uA -R
8807 .Bl -tag -width ".It Ev _AILR_"
8809 .It Ev COLUMNS
8810 The user's preferred width in column positions for the terminal screen
8811 or window.
8812 Queried and used once on program startup, actively managed for child
8813 processes and the MLE (see
8814 .Sx "On terminal control and line editor" )
8815 in interactive mode thereafter.
8818 .It Ev DEAD
8819 The name of the (mailbox)
8820 .Ic file
8821 to use for saving aborted messages if
8822 .Va save
8823 is set; this defaults to
8824 .Pa dead.letter
8825 in the user's
8826 .Ev HOME
8827 directory.
8828 If the variable
8829 .Va debug
8830 is set no output will be generated, otherwise the contents of the file
8831 will be replaced.
8834 .It Ev EDITOR
8835 Pathname of the text editor to use in the
8836 .Ic edit
8837 command and
8838 .Ic ~e
8839 .Sx "TILDE ESCAPES" .
8840 A default editor is used if this value is not defined.
8843 .It Ev HOME
8844 The user's home directory.
8845 This variable is only used when it resides in the process environment.
8852 .It Ev LANG , LC_ALL , LC_COLLATE , LC_CTYPE , LC_MESSAGES
8854 .Xr locale 7
8856 .Sx "Character sets" .
8859 .It Ev LINES
8860 The user's preferred number of lines on a page or the vertical screen
8861 or window size in lines.
8862 Queried and used once on program startup, actively managed for child
8863 processes in interactive mode thereafter.
8866 .It Ev LISTER
8867 Pathname of the directory lister to use in the
8868 .Ic folders
8869 command when operating on local mailboxes.
8870 Default is
8871 .Xr ls 1
8872 (path search through
8873 .Ev SHELL ) .
8876 .It Ev LOGNAME
8877 Upon startup \*(UA will actively ensure that this variable refers to the
8878 name of the user who runs \*(UA, in order to be able to pass a verified
8879 name to any newly created child process.
8882 .It Ev MAIL
8883 Is used as the user's primary system mailbox, unless
8884 .Va inbox
8885 is set, see
8886 .Ic file .
8887 This is assumed to be an absolute pathname.
8890 .It Ev MAILCAPS
8891 \*(OP Overrides the default path search for
8892 .Sx "The Mailcap files" ,
8893 which is defined in the standard RFC 1524 as
8894 .Ql ~/.mailcap:\:/etc/mailcap:\:/usr/etc/mailcap:\:/usr/local/etc/mailcap .
8895 .\" TODO we should have a mailcaps-default virtual RDONLY option!
8896 (\*(UA makes it a configuration option, however.)
8897 Note this is not a search path, but a path search.
8900 .It Ev MAILRC
8901 Is used as a startup file instead of
8902 .Pa \*(ur
8903 if set.
8904 When \*(UA scripts are invoked on behalf of other users,
8905 either this variable should be set to
8906 .Pa /dev/null
8907 or the
8908 .Fl \&:
8909 command line option should be used in order to avoid side-effects from
8910 reading their configuration files.
8911 This variable is only used when it resides in the process environment.
8914 .It Ev MBOX
8915 The name of the user's mbox file.
8916 A logical subset of the special conventions that are documented for the
8917 .Ic file
8918 command and the
8919 .Va folder
8920 option may be used.
8921 The fallback default is
8922 .Pa mbox
8923 in the user's
8924 .Ev HOME
8925 directory.
8926 Traditionally this secondary mailbox is used as the file to save
8927 messages from the primary system mailbox that have been read.
8928 Also see
8929 .Sx "Message states" .
8932 .It Ev NAIL_NO_SYSTEM_RC
8933 If this variable is set then reading of
8934 .Pa \*(UR
8935 at startup is inhibited, i.e., the same effect is achieved as if \*(UA
8936 had been started up with the option
8937 .Fl n .
8938 This variable is only used when it resides in the process environment.
8941 .It Ev NETRC
8942 \*(IN\*(OP This variable overrides the default location of the user's
8943 .Pa .netrc
8944 file.
8947 .It Ev PAGER
8948 Pathname of the program to use for backing the command
8949 .Ic more ,
8950 and when the
8951 .Va crt
8952 variable enforces usage of a pager for output.
8953 The default paginator is
8954 .Xr more 1
8955 (path search through
8956 .Ev SHELL ) .
8958 \*(UA inspects the contents of this variable: if its contains the string
8959 .Dq less
8960 then a non-existing environment variable
8961 .Va LESS
8962 will be set to
8963 .Ql FRXi ,
8964 .Ql FRi
8966 .Ql Ri ,
8967 dependent on whether terminal control support is available and whether
8968 that supports full (alternative) screen mode or not (also see
8969 .Sx "On terminal control and line editor" ) .
8970 Likewise for
8971 .Dq lv
8972 .Va LV
8973 will optionally be set to
8974 .Dq -c .
8975 Alse see
8976 .Va colour-pager .
8979 .It Ev PATH
8980 A colon-separated list of directories that is searched by the shell when
8981 looking for commands, e.g.,
8982 .Ql /bin:/usr/bin:/usr/local/bin .
8985 .It Ev SHELL
8986 The shell to use for the commands
8987 .Ic \&! ,
8988 .Ic shell ,
8990 .Ic ~!
8991 .Sx "TILDE ESCAPES"
8992 and when starting subprocesses.
8993 A default shell is used if this option is not defined.
8996 .It Ev SOURCE_DATE_EPOCH
8997 If set, this specifies a time in seconds since the Unix epoch
8998 (1970-01-01) to be used in place of the current time.
8999 This is for the sake of reproduceability of tests, to be used during
9000 development or by software packagers.
9003 .It Ev TERM
9004 \*(OP The terminal type for which output is to be prepared.
9005 For extended colour and font control please refer to
9006 .Sx "Coloured display" ,
9007 and for terminal management in general to
9008 .Sx "On terminal control and line editor" .
9011 .It Ev TMPDIR
9012 Used as directory for temporary files instead of
9013 .Pa /tmp ,
9014 if set.
9015 This variable is only used when it resides in the process environment.
9018 .It Ev USER
9019 Identical to
9020 .Ev LOGNAME
9021 (see there), but this variable is not standardized, should therefore not
9022 be used, and is only corrected if already set.
9025 .It Ev VISUAL
9026 Pathname of the text editor to use in the
9027 .Ic visual
9028 command and
9029 .Ic ~v
9030 .Sx "TILDE ESCAPES" .
9032 .\" }}}
9035 .\" .Sh FILES {{{
9036 .Sh FILES
9038 .Bl -tag -width ".It Pa _etc/mime.type_"
9039 .It Pa \*(ur
9040 File giving initial commands.
9042 .It Pa \*(UR
9043 System wide initialization file.
9046 .It Pa ~/.mailcap
9047 \*(OP Personal MIME type handler definition file, see
9048 .Sx "The Mailcap files" .
9049 (RFC 1524 location, the actual path is a configuration option.)
9052 .It Pa /etc/mailcap
9053 \*(OP System wide MIME type handler definition file, see
9054 .Sx "The Mailcap files" .
9055 (RFC 1524 location, the actual path is a configuration option.)
9058 .It Pa ~/.mime.types
9059 Personal MIME types, see
9060 .Sx "The mime.types files" .
9063 .It Pa /etc/mime.types
9064 System wide MIME types, see
9065 .Sx "The mime.types files" .
9068 .It Pa ~/.netrc
9069 \*(IN\*(OP The default location of the users
9070 .Pa .netrc
9071 file \(en the section
9072 .Sx "The .netrc file"
9073 documents the file format.
9076 .\" .Ss "The mime.types files" {{{
9077 .Ss "The mime.types files"
9079 When sending messages \*(UA tries to determine the content type of all
9080 attachments.
9081 When displaying message content or attachments \*(UA uses the content
9082 type to decide whether it can directly display data or whether it needs
9083 to deal with content handlers.
9084 It learns about M(ultipurpose) I(nternet) M(ail) E(xtensions) types and
9085 how to treat them by reading
9086 .Pa mime.types
9087 files, the loading of which can be controlled by setting the variable
9088 .Va mimetypes-load-control .
9089 (The command
9090 .Ic mimetype
9091 can also be used to deal with MIME types.)
9092 .Pa mime.types
9093 files have the following syntax:
9096 .Dl type/subtype extension [extension ...]
9099 where
9100 .Ql type/subtype
9101 are strings describing the file contents, and one or multiple
9102 .Ql extension Ns
9103 s, separated by whitespace, name the part of a filename starting after
9104 the last dot (of interest).
9105 Comments may be introduced anywhere on a line with a number sign
9106 .Ql # ,
9107 causing the remaining line to be discarded.
9109 \*(UA also supports an extended, non-portable syntax in specially
9110 crafted files, which can be loaded via the alternative value syntax of
9111 .Va mimetypes-load-control
9112 and prepends an optional
9113 .Ql type-marker :
9116 .Dl [type-marker ]type/subtype extension [extension ...]
9119 The following type markers are supported:
9122 .Bl -tag -compact -offset indent -width ".It Ar _n_u"
9123 .It Ar @
9124 Treat message parts with this content as plain text.
9125 .It Ar @t@
9126 The same as plain
9127 .Ar @ .
9128 .It Ar @h@
9129 Treat message parts with this content as HTML tagsoup.
9130 If the \*(OPal HTML-tagsoup-to-text converter is not available treat
9131 the content as plain text instead.
9132 .It Ar @H@
9133 Likewise
9134 .Ar @h@
9135 but instead of falling back to plain text require an explicit content
9136 handler to be defined.
9140 Further reading:
9141 for sending messages:
9142 .Ic mimetype ,
9143 .Va mime-allow-text-controls ,
9144 .Va mimetypes-load-control .
9145 For reading etc. messages:
9146 .Sx "HTML mail and MIME attachments" ,
9147 .Sx "The Mailcap files" ,
9148 .Ic mimetype ,
9149 .Va mime-counter-evidence ,
9150 .Va mimetypes-load-control ,
9151 .Va pipe-TYPE/SUBTYPE ,
9152 .Va pipe-EXTENSION .
9153 .\" }}}
9155 .\" .Ss "The Mailcap files" {{{
9156 .Ss "The Mailcap files"
9158 RFC 1524 defines a
9159 .Dq User Agent Configuration Mechanism
9160 which \*(UA \*(OPally supports.
9161 It defines a file format to be used to inform mail user agent programs
9162 about the locally-installed facilities for handling various data
9163 formats, i.e., about commands and how they can be used to display, edit
9164 etc. MIME part contents, as well as a default path search that includes
9165 multiple possible locations of
9166 .Dq mailcap
9167 files and the
9168 .Ev MAILCAPS
9169 environment variable that can be used to overwrite that (repeating here
9170 that it is not a search path, but instead a path search specification).
9171 Any existing files will be loaded in sequence, appending any content to
9172 the list of MIME type handler directives.
9175 .Dq Mailcap
9176 files consist of a set of newline separated entries.
9177 Comment lines start with a number sign
9178 .Ql #
9179 (in the first column!) and are ignored.
9180 Empty lines are also ignored.
9181 All other lines form individual entries that must adhere to the syntax
9182 described below.
9183 To extend a single entry (not comment) its line can be continued on
9184 follow lines if newline characters are
9185 .Dq escaped
9186 by preceding them with the reverse solidus character
9187 .Ql \e .
9188 The standard doesn't specify how leading whitespace of follow lines is
9189 to be treated, therefore \*(UA retains it.
9192 .Dq Mailcap
9193 entries consist of a number of semicolon
9194 .Ql \&;
9195 separated fields, and the reverse solidus
9196 .Ql \e
9197 character can be used to escape any following character including
9198 semicolon and itself.
9199 The first two fields are mandatory and must occur in the specified
9200 order, the remaining fields are optional and may appear in any order.
9201 Leading and trailing whitespace of content is ignored (removed).
9204 The first field defines the MIME
9205 .Ql TYPE/SUBTYPE
9206 the entry is about to handle (case-insensitively, and no reverse solidus
9207 escaping is possible in this field).
9208 If the subtype is specified as an asterisk
9209 .Ql *
9210 the entry is meant to match all subtypes of the named type, e.g.,
9211 .Ql audio/*
9212 would match any audio type.
9213 The second field defines the shell command which shall be used to
9214 .Dq display
9215 MIME parts of the given type; it is implicitly called the
9216 .Cd view
9217 command.
9220 For data
9221 .Dq consuming
9222 shell commands message (MIME part) data is passed via standard input
9223 unless the given shell command includes one or more instances of the
9224 (unquoted) string
9225 .Ql %s ,
9226 in which case these instances will be replaced with a temporary filename
9227 and the data will have been stored in the file that is being pointed to.
9228 Likewise, for data
9229 .Dq producing
9230 shell commands data is assumed to be generated on standard output unless
9231 the given command includes (one ore multiple)
9232 .Ql %s .
9233 In any case any given
9234 .Ql %s
9235 format is replaced with a(n already) properly quoted filename.
9236 Note that when a command makes use of a temporary file via
9237 .Ql %s
9238 then \*(UA will remove it again, as if the
9239 .Cd x-mailx-tmpfile ,
9240 .Cd x-mailx-tmpfile-fill
9242 .Cd x-mailx-tmpfile-unlink
9243 flags had been set; see below for more.
9246 The optional fields either define a shell command or an attribute (flag)
9247 value, the latter being a single word and the former being a keyword
9248 naming the field followed by an equals sign
9249 .Ql =
9250 succeeded by a shell command, and as usual for any
9251 .Dq Mailcap
9252 content any whitespace surrounding the equals sign will be removed, too.
9253 Optional fields include the following:
9256 .Bl -tag -width textualnewlines
9257 .It Cd compose
9258 A program that can be used to compose a new body or body part in the
9259 given format.
9260 (Currently unused.)
9262 .It Cd composetyped
9263 Similar to the
9264 .Cd compose
9265 field, but is to be used when the composing program needs to specify the
9266 .Ql Content-type:
9267 header field to be applied to the composed data.
9268 (Currently unused.)
9270 .It Cd edit
9271 A program that can be used to edit a body or body part in the given
9272 format.
9273 (Currently unused.)
9275 .It Cd print
9276 A program that can be used to print a message or body part in the given
9277 format.
9278 (Currently unused.)
9280 .It Cd test
9281 Specifies a program to be run to test some condition, e.g., the machine
9282 architecture, or the window system in use, to determine whether or not
9283 this mailcap entry applies.
9284 If the test fails, a subsequent mailcap entry should be sought; also see
9285 .Cd x-mailx-test-once .
9287 .It Cd needsterminal
9288 This flag field indicates that the given shell command must be run on
9289 an interactive terminal.
9290 \*(UA will temporarily release the terminal to the given command in
9291 interactive mode, in non-interactive mode this entry will be entirely
9292 ignored; this flag implies
9293 .Cd x-mailx-noquote .
9295 .It Cd copiousoutput
9296 A flag field which indicates that the output of the
9297 .Cd view
9298 command will be an extended stream of textual output that can be
9299 (re)integrated into \*(UA's normal visual display.
9300 It is mutually exclusive with
9301 .Cd needsterminal
9302 and implies
9303 .Cd x-mailx-always .
9305 .It Cd textualnewlines
9306 A flag field which indicates that this type of data is line-oriented and
9307 that, if encoded in
9308 .Ql base64 ,
9309 all newlines should be converted to canonical form (CRLF) before
9310 encoding, and will be in that form after decoding.
9311 (Currently unused.)
9313 .It Cd nametemplate
9314 This field gives a file name format, in which
9315 .Ql %s
9316 will be replaced by a random string, the joined combination of which
9317 will be used as the filename denoted by
9318 .Ev NAIL_FILENAME_TEMPORARY .
9319 One could specify that a GIF file being passed to an image viewer should
9320 have a name ending in
9321 .Ql .gif
9322 by using
9323 .Ql nametemplate=%s.gif .
9324 Note that \*(UA ignores the name template unless that solely specifies
9325 a filename suffix that consists of (ASCII) alphabetic and numeric
9326 characters, the underscore and dot only.
9328 .It Cd x11-bitmap
9329 Names a file, in X11 bitmap (xbm) format, which points to an appropriate
9330 icon to be used to visually denote the presence of this kind of data.
9331 This field is not used by \*(UA.
9333 .It Cd description
9334 A textual description that describes this type of data.
9336 .It Cd x-mailx-always
9337 Extension flag field that denotes that the given
9338 .Cd view
9339 command shall be executed even if multiple messages will be displayed
9340 at once.
9341 Normally messages which require external viewers that produce output
9342 which doesn't integrate into \*(UA's visual display (i.e., don't have
9343 .Cd copiousoutput
9344 set) have to be addressed directly and individually.
9345 (To avoid cases where, e.g., a thousand PDF viewer instances are spawned
9346 in sequence.)
9348 .It Cd x-mailx-even-if-not-interactive
9349 An extension flag test field \(em by default handlers without
9350 .Cd copiousoutput
9351 are entirely ignored in non-interactive mode, but if this flag is set
9352 then their use will be considered.
9353 It is an error if this flag is set for commands that use the flag
9354 .Cd needsterminal .
9356 .It Cd x-mailx-noquote
9357 An extension flag field that indicates that even a
9358 .Cd copiousoutput
9359 .Cd view
9360 command shall not be used to generate message quotes
9361 (as it would be by default).
9363 .It Cd x-mailx-async
9364 Extension flag field that denotes that the given
9365 .Cd view
9366 command shall be executed asynchronously, without blocking \*(UA.
9367 Cannot be used in conjunction with
9368 .Cd needsterminal .
9370 .It Cd x-mailx-test-once
9371 Extension flag which denotes whether the given
9372 .Cd test
9373 command shall be evaluated once only and the (boolean) result be cached.
9374 This is handy if some global unchanging condition is to be queried, like
9375 .Dq running under the X Window System .
9377 .It Cd x-mailx-tmpfile
9378 Extension flag field that requests creation of a zero-sized temporary
9379 file, the name of which is to be placed in the environment variable
9380 .Ev NAIL_FILENAME_TEMPORARY .
9381 It is an error to use this flag with commands that include a
9382 .Ql %s
9383 format.
9385 .It Cd x-mailx-tmpfile-fill
9386 Normally the MIME part content is passed to the handler via standard
9387 input; if this flag is set then the data will instead be written into
9388 the implied
9389 .Cd x-mailx-tmpfile .
9390 In order to cause deletion of the temporary file you will have to set
9391 .Cd x-mailx-tmpfile-unlink
9392 explicitly!
9393 It is an error to use this flag with commands that include a
9394 .Ql %s
9395 format.
9397 .It Cd x-mailx-tmpfile-unlink
9398 Extension flag field that requests that the temporary file shall be
9399 deleted automatically when the command loop is entered again at latest.
9400 (Don't use this for asynchronous handlers.)
9401 It is an error to use this flag with commands that include a
9402 .Ql %s
9403 format, or without also setting
9404 .Cd x-mailx-tmpfile
9406 .Cd x-mailx-tmpfile-fill .
9408 .It Cd x-mailx-tmpfile-keep
9409 Using the string
9410 .Ql %s
9411 implies the three tmpfile related flags above, but if you want, e.g.,
9412 .Cd x-mailx-async
9413 and deal with the temporary file yourself, you can add in this flag to
9414 forcefully ignore
9415 .Cd x-mailx-tmpfile-unlink .
9420 The standard includes the possibility to define any number of additional
9421 entry fields, prefixed by
9422 .Ql x- .
9423 Flag fields apply to the entire
9424 .Dq Mailcap
9425 entry \(em in some unusual cases, this may not be desirable, but
9426 differentiation can be accomplished via separate entries, taking
9427 advantage of the fact that subsequent entries are searched if an earlier
9428 one does not provide enough information.
9429 E.g., if a
9430 .Cd view
9431 command needs to specify the
9432 .Cd needsterminal
9433 flag, but the
9434 .Cd compose
9435 command shall not, the following will help out the latter (with enabled
9436 .Va debug
9437 or an increased
9438 .Va verbose
9439 level \*(UA will show information about handler evaluation):
9441 .Bd -literal -offset indent
9442 application/postscript; ps-to-terminal %s; needsterminal
9443 application/postscript; ps-to-terminal %s; compose=idraw %s
9447 In fields any occurrence of the format string
9448 .Ql %t
9449 will be replaced by the
9450 .Ql TYPE/SUBTYPE
9451 specification.
9452 Named parameters from the
9453 .Ql Content-type:
9454 field may be placed in the command execution line using
9455 .Ql %{
9456 followed by the parameter name and a closing
9457 .Ql }
9458 character.
9459 The entire parameter should appear as a single command line argument,
9460 regardless of embedded spaces; thus:
9462 .Bd -literal -offset indent
9463 # Message
9464 Content-type:  multipart/mixed; boundary=42
9466 # Mailcap file
9467 multipart/*; /usr/local/bin/showmulti \e
9468   %t %{boundary}  ;  composetyped  = /usr/local/bin/makemulti
9470 # Executed shell command
9471 /usr/local/bin/showmulti multipart/mixed 42
9475 .\" TODO v15: Mailcap: %n,%F
9476 Note that \*(UA doesn't support handlers for multipart MIME parts as
9477 shown in this example (as of today).
9478 \*(UA doesn't support the additional formats
9479 .Ql %n
9481 .Ql %F .
9482 An example file, also showing how to properly deal with the expansion of
9483 .Ql %s ,
9484 which includes any quotes that are necessary to make it a valid shell
9485 argument by itself and thus will cause undesired behaviour when placed
9486 in additional user-provided quotes:
9488 .Bd -literal -offset indent
9489 # Comment line
9490 text/richtext; richtext %s; copiousoutput
9492 text/x-perl; perl -cWT %s
9494 application/pdf; \e
9495   infile=%s\e; \e
9496     trap "rm -f ${infile}" EXIT\e; \e
9497     trap "exit 75" INT QUIT TERM\e; \e
9498     mupdf %s; \e
9499   x-mailx-async; x-mailx-tmpfile-keep
9501 application/*; echo "This is \e"%t\e" but \e
9502     is 50 \e% Greek to me" \e; < %s head -c 1024 | cat -vET; \e
9503   copiousoutput; x-mailx-noquote
9507 Further reading:
9508 .Sx "HTML mail and MIME attachments" ,
9509 .Sx "The mime.types files" ,
9510 .Ic mimetype ,
9511 .Ev MAILCAPS ,
9512 .Va mime-counter-evidence ,
9513 .Va pipe-TYPE/SUBTYPE ,
9514 .Va pipe-EXTENSION .
9515 .\" }}}
9517 .\" .Ss "The .netrc file" {{{
9518 .Ss "The .netrc file"
9521 .Pa .netrc
9522 file contains user credentials for machine accounts.
9523 The default location in the user's
9524 .Ev HOME
9525 directory may be overridden by the
9526 .Ev NETRC
9527 environment variable.
9528 The file consists of space, tabulator or newline separated tokens.
9529 \*(UA implements a parser that supports a superset of the original BSD
9530 syntax, but users should nonetheless be aware of portability glitches
9531 of that file format, shall their
9532 .Pa .netrc
9533 be usable across multiple programs and platforms:
9536 .Bl -bullet -compact
9538 BSD doesn't support single, but only double quotation marks, e.g.,
9539 .Ql password="pass with spaces" .
9541 BSD (only?) supports escaping of single characters via a reverse solidus
9542 (e.g., a space can be escaped via
9543 .Ql \e\0 ) ,
9544 in- as well as outside of a quoted string.
9546 BSD doesn't require the final quotation mark of the final user input token.
9548 The original BSD (Berknet) parser also supported a format which allowed
9549 tokens to be separated with commas \(en whereas at least Hewlett-Packard
9550 still seems to support this syntax, \*(UA does not!
9552 As a non-portable extension some widely-used programs support
9553 shell-style comments: if an input line starts, after any amount of
9554 whitespace, with a number sign
9555 .Ql # ,
9556 then the rest of the line is ignored.
9558 Whereas other programs may require that the
9559 .Pa .netrc
9560 file is accessible by only the user if it contains a
9561 .Cd password
9562 token for any other
9563 .Cd login
9564 than
9565 .Dq anonymous ,
9566 \*(UA will always require these strict permissions.
9570 Of the following list of supported tokens \*(UA only uses (and caches)
9571 .Cd machine ,
9572 .Cd login
9574 .Cd password .
9575 At runtime the command
9576 .Ic netrc
9577 can be used to control \*(UA's
9578 .Pa .netrc
9579 cache.
9581 .Bl -tag -width password
9582 .It Cd machine Ar name
9583 The hostname of the entries' machine, lowercase-normalized by \*(UA
9584 before use.
9585 Any further file content, until either end-of-file or the occurrence
9586 of another
9587 .Cd machine
9588 or a
9589 .Cd default
9590 first-class token is bound (only related) to the machine
9591 .Ar name .
9593 As an extension that shouldn't be the cause of any worries
9594 \*(UA supports a single wildcard prefix for
9595 .Ar name :
9596 .Bd -literal -offset indent
9597 machine *.example.com login USER password PASS
9598 machine pop3.example.com login USER password PASS
9599 machine smtp.example.com login USER password PASS
9602 which would match
9603 .Ql xy.example.com
9604 as well as
9605 .Ql pop3.example.com ,
9606 but neither
9607 .Ql example.com
9609 .Ql local.smtp.example.com .
9610 Note that in the example neither
9611 .Ql pop3.example.com
9613 .Ql smtp.example.com
9614 will be matched by the wildcard, since the exact matches take
9615 precedence (it is however faster to specify it the other way around).
9617 .It Cd default
9618 This is the same as
9619 .Cd machine
9620 except that it is a fallback entry that is used shall none of the
9621 specified machines match; only one default token may be specified,
9622 and it must be the last first-class token.
9624 .It Cd login Ar name
9625 The user name on the remote machine.
9627 .It Cd password Ar string
9628 The user's password on the remote machine.
9630 .It Cd account Ar string
9631 Supply an additional account password.
9632 This is merely for FTP purposes.
9634 .It Cd macdef Ar name
9635 Define a macro.
9636 A macro is defined with the specified
9637 .Ar name ;
9638 it is formed from all lines beginning with the next line and continuing
9639 until a blank line is (consecutive newline characters are) encountered.
9640 (Note that
9641 .Cd macdef
9642 entries cannot be utilized by multiple machines, too, but must be
9643 defined following the
9644 .Ic machine
9645 they are intended to be used with.)
9646 If a macro named
9647 .Ar init
9648 exists, it is automatically run as the last step of the login process.
9649 This is merely for FTP purposes.
9651 .\" }}}
9653 .\" }}}
9656 .\" .Sh EXAMPLES {{{
9657 .Sh EXAMPLES
9659 .\" .Ss "An example configuration" {{{
9660 .Ss "An example configuration"
9662 .Bd -literal -offset indent
9663 # This example assumes v15.0 compatibility mode
9664 set v15-compat
9666 # Where are the up-to-date SSL certificates?
9667 #set ssl-ca-dir=/etc/ssl/certs
9668 set ssl-ca-file=/etc/ssl/certs/ca-certificates.crt
9670 # (Since we manage up-to-date ones explicitly, don't use any,
9671 # possibly outdated, default certificates shipped with OpenSSL)
9672 set ssl-no-default-ca
9674 # Don't use protocols older than TLS v1.2.
9675 # Change this only when the remote server doesn't support it:
9676 # maybe use ssl-protocol-HOST (or -USER@HOST) syntax to define
9677 # such explicit exceptions, then
9678 set ssl-protocol='-ALL,+TLSv1.2'
9680 # Explicitly define the list of ciphers, which may improve security,
9681 # especially with protocols older than TLS v1.2.  See ciphers(1).
9682 # Including "@STRENGTH" will sort the final list by algorithm strength.
9683 # In reality it is possibly best to only use ssl-cipher-list-HOST
9684 # (or -USER@HOST), as necessary, again..
9685 set ssl-cipher-list=TLSv1.2:!aNULL:!eNULL:!MEDIUM:!LOW:!EXPORT:@STRENGTH
9686 # ALL:!aNULL:!MEDIUM:!LOW:!MD5:!RC4:!EXPORT:@STRENGTH
9688 # Request strict transport security checks!
9689 set ssl-verify=strict
9691 # Essential setting: select allowed character sets
9692 set sendcharsets=utf-8,iso-8859-1
9694 # A very kind option: when replying to a message, first try to
9695 # use the same encoding that the original poster used herself!
9696 set reply-in-same-charset
9698 # When replying to or forwarding a message the comment and name
9699 # parts of email addresses are removed unless this variable is set
9700 set fullnames
9702 # When sending messages, wait until the Mail-Transfer-Agent finishs.
9703 # Only like this you'll be able to see errors reported through the
9704 # exit status of the MTA (including the builtin SMTP one)!
9705 set sendwait
9707 # Only use builtin MIME types, no mime.types(5) files
9708 set mimetypes-load-control
9710 # Default directory where we act in (relative to $HOME)
9711 set folder=mail
9712 # A leading "+" (often) means: under *folder*
9713 # *record* is used to save copies of sent messages
9714 set MBOX=+mbox.mbox record=+sent.mbox DEAD=+dead.txt
9716 # Make "file mymbox" and "file myrec" go to..
9717 shortcut mymbox %:+mbox.mbox myrec +sent.mbox
9719 # Not really optional, e.g., for S/MIME
9720 set from='Your Name <address@exam.ple>'
9722 # It may be necessary to set hostname and/or smtp-hostname
9723 # if the "SERVER" of mta and "domain" of from don't match.
9724 # The `urlencode' command can be used to encode USER and PASS
9725 set mta=(smtps?|submission)://[USER[:PASS]@]SERVER[:PORT] \e
9726     smtp-auth=login/plain... \e
9727     smtp-use-starttls
9729 # Never refuse to start into interactive mode, and more
9730 set emptystart \e
9731     colour-pager crt= \e
9732     followup-to followup-to-honour=ask-yes \e
9733     history-file=+.\*(uAhist history-size=-1 history-gabby \e
9734     mime-counter-evidence=0xE \e
9735     prompt='?\e?[\e$ \e@]\e& ' \e
9736     reply-to-honour=ask-yes \e
9737     umask=
9739 # When `t'yping messages, show only these headers
9740 # (use `T'ype for all headers and `S'how for raw message)
9741 retain date from to cc subject
9743 # Some mailing lists
9744 mlist '@xyz-editor\e.xyz$' '@xyzf\e.xyz$'
9745 mlsubscribe '^xfans@xfans\e.xyz$'
9747 # A real life example of a very huge free mail provider
9748 account XooglX {
9749   set folder=~/spool/XooglX inbox=+syste.mbox sent=+sent
9750   set from='Your Name <address@examp.ple>'
9751   set mta=smtp://USER:PASS@smtp.gmXil.com smtp-use-starttls
9754 # Here is a pretty large one which does not allow sending mails
9755 # if there is a domain name mismatch on the SMTP protocol level,
9756 # which would bite us if the value of from does not match, e.g.,
9757 # for people who have a sXXXXeforge project and want to speak
9758 # with the mailing list under their project account (in from),
9759 # still sending the message through their normal mail provider
9760 account XandeX {
9761   set folder=~/spool/XandeX inbox=+syste.mbox sent=+sent
9762   set from='Your Name <address@exam.ple>'
9763   set mta=smtps://USER:PASS@smtp.yaXXex.ru:465 \e
9764       hostname=yaXXex.com smtp-hostname=
9767 # Create some new commands so that, e.g., `ls /tmp' will..
9768 wysh ghost lls '!ls ${LS_COLOR_FLAG} -aFlrS'
9769 wysh ghost llS '!ls ${LS_COLOR_FLAG} -aFlS'
9770 wysh ghost ls '!ls ${LS_COLOR_FLAG} -aFrS'
9771 wysh ghost lS '!ls ${LS_COLOR_FLAG} -aFS'
9772 wysh ghost lla '!ls ${LS_COLOR_FLAG} -aFlr'
9773 wysh ghost llA '!ls ${LS_COLOR_FLAG} -aFl'
9774 wysh ghost la '!ls ${LS_COLOR_FLAG} -aFr'
9775 wysh ghost lA '!ls ${LS_COLOR_FLAG} -aF'
9776 wysh ghost ll '!ls ${LS_COLOR_FLAG} -aFltr'
9777 wysh ghost lL '!ls ${LS_COLOR_FLAG} -aFlt'
9778 wysh ghost l '!ls ${LS_COLOR_FLAG} -aFtr'
9779 wysh ghost L '!ls ${LS_COLOR_FLAG} -aFt'
9781 # We don't support gpg(1) directly yet.  But simple --clearsign'd
9782 # message parts can be dealt with as follows:
9783 define V {
9784   wysh set pipe-text/plain=$'@*#++=@\e
9785     < "${NAIL_FILENAME_TEMPORARY}" awk \e
9786         -v TMPFILE="${NAIL_FILENAME_TEMPORARY}" \e'\e
9787       BEGIN {done=0}\e
9788       /^-----BEGIN PGP SIGNED MESSAGE-----/,/^$/{\e
9789         if (done++ != 0)\e
9790           next;\e
9791         print "--- GPG --verify ---";\e
9792         system("gpg --verify " TMPFILE " 2>&1");\e
9793         print "--- GPG --verify ---";\e
9794         print "";\e
9795         next;\e
9796       }\e
9797       /^-----BEGIN PGP SIGNATURE-----/,\e
9798           /^-----END PGP SIGNATURE-----/{\e
9799         next;\e
9800       }\e
9801       {print}\e
9802       \e''
9803   print
9805 ghost V call V
9807 define RK {
9808   !printf 'Key IDs to gpg --recv-keys: ';\e
9809     read keyids;\e
9810     gpg --recv-keys ${keyids};
9812 ghost RK call RK
9816 When storing passwords in
9817 .Pa \*(ur
9818 appropriate permissions should be set on this file with
9819 .Ql $ chmod 0600 \*(ur .
9820 If the \*(OPal
9821 .Va netrc-lookup
9822 is available user credentials can be stored in the central
9823 .Pa .netrc
9824 file instead; e.g., here is a different version of the example account
9825 that sets up SMTP and POP3:
9827 .Bd -literal -offset indent
9828 account XandeX {
9829   set folder=~/spool/XandeX inbox=+syste.mbox sent=+sent
9830   set from='Your Name <address@exam.ple>'
9831   set netrc-lookup
9832   # Load an encrypted ~/.netrc by uncommenting the next line
9833   #set netrc-pipe='gpg -qd ~/.netrc.pgp'
9835   set mta=smtps://smtp.yXXXXx.ru:465 \e
9836       smtp-hostname= hostname=yXXXXx.com
9837   set pop3-keepalive=240 pop3-no-apop-pop.yXXXXx.ru
9838   ghost xp fi pop3s://pop.yXXXXx.ru
9843 and, in the
9844 .Pa .netrc
9845 file:
9847 .Bd -literal -offset indent
9848 machine *.yXXXXx.ru login USER password PASS
9852 This configuration should now work just fine:
9855 .Dl $ echo text | \*(uA -vv -AXandeX -s Subject user@exam.ple
9856 .\" }}}
9858 .\" .Ss "Signed and encrypted messages with S/MIME" {{{
9859 .Ss "Signed and encrypted messages with S/MIME"
9861 \*(OP S/MIME provides two central mechanisms:
9862 message signing and message encryption.
9863 A signed message contains some data in addition to the regular text.
9864 The data can be used to verify that the message was sent using a valid
9865 certificate, that the sender's address in the message header matches
9866 that in the certificate, and that the message text has not been altered.
9867 Signing a message does not change its regular text;
9868 it can be read regardless of whether the recipient's software is able to
9869 handle S/MIME.
9872 It is thus usually possible to sign all outgoing messages if so desired.
9873 Encryption, in contrast, makes the message text invisible for all people
9874 except those who have access to the secret decryption key.
9875 To encrypt a message, the specific recipient's public encryption key
9876 must be known.
9877 It is therefore not possible to send encrypted mail to people unless their
9878 key has been retrieved from either previous communication or public key
9879 directories.
9880 A message should always be signed before it is encrypted.
9881 Otherwise, it is still possible that the encrypted message text is
9882 altered.
9885 A central concept to S/MIME is that of the certification authority (CA).
9886 A CA is a trusted institution that issues certificates.
9887 For each of these certificates it can be verified that it really
9888 originates from the CA, provided that the CA's own certificate is
9889 previously known.
9890 A set of CA certificates is usually delivered with OpenSSL and installed
9891 on your system.
9892 If you trust the source of your OpenSSL software installation,
9893 this offers reasonable security for S/MIME on the Internet.
9894 (Otherwise set
9895 .Va ssl-no-default-ca
9896 and use
9897 .Va smime-ca-file
9898 and/or
9899 .Va smime-ca-dir . )
9900 In general, a certificate cannot be more secure than the method its CA
9901 certificate has been retrieved with, though.
9902 Thus if you download a CA certificate from the Internet,
9903 you can only trust the messages you verify using that certificate as
9904 much as you trust the download process.
9907 The first thing you need for participating in S/MIME message exchange is
9908 your personal certificate, including a private key.
9909 The certificate contains public information, in particular your name and
9910 your email address(es), and the public key that is used by others to
9911 encrypt messages for you,
9912 and to verify signed messages they supposedly received from you.
9913 The certificate is included in each signed message you send.
9914 The private key must be kept secret.
9915 It is used to decrypt messages that were previously encrypted with your
9916 public key, and to sign messages.
9919 For personal use it is recommended that you get a S/MIME certificate
9920 from one of the major CAs on the Internet using your WWW browser.
9921 Many CAs offer such certificates for free.
9922 There is also
9923 .Lk https://www.CAcert.org
9924 which issues client and server certificates to members of their
9925 community for free; their root certificate
9926 .Pf ( Lk https://\:www.cacert.org/\:certs/\:root.crt )
9927 is often not in the default set of trusted CA root certificates, though,
9928 which means you will have to download their root certificate separately
9929 and ensure it is part of our S/MIME certificate validation chain by
9930 including it in
9931 .Va smime-ca-dir
9932 or as a vivid member of the
9933 .Va smime-ca-file .
9934 But let's take a step-by-step tour on how to setup S/MIME with
9935 a certificate from CAcert.org despite this situation!
9938 First of all you will have to become a member of the CAcert.org
9939 community, simply by registrating yourself via the web interface.
9940 Once you are, create and verify all email addresses you want to be able
9941 to create signed and encrypted messages for/with using the corresponding
9942 entries of the web interface.
9943 Now ready to create S/MIME certificates, so let's create a new
9944 .Dq client certificate ,
9945 ensure to include all email addresses that should be covered by the
9946 certificate in the following web form, and also to use your name as the
9947 .Dq common name .
9950 Create a private key and a certificate request on your local computer
9951 (please see the manual pages of the used commands for more in-depth
9952 knowledge on what the used arguments etc. do):
9955 .Dl openssl req -nodes -newkey rsa:4096 -keyout key.pem -out creq.pem
9958 Afterwards copy-and-paste the content of
9959 .Dq creq.pem
9960 into the certificate-request (CSR) field of the web form on the
9961 CAcert.org website (you may need to unfold some
9962 .Dq advanced options
9963 to see the corresponding text field).
9964 This last step will ensure that your private key (which never left your
9965 box) and the certificate belong together (through the public key that
9966 will find its way into the certificate via the certificate-request).
9967 You are now ready and can create your CAcert certified certificate.
9968 Download and store or copy-and-paste it as
9969 .Dq pub.crt .
9972 Yay.
9973 In order to use your new S/MIME setup you will have to create
9974 a combined private key/public key (certificate) file:
9977 .Dl cat key.pem pub.crt > ME@HERE.com.paired
9980 This is the file \*(UA will work with.
9981 If you have created your private key with a passphrase then \*(UA will
9982 ask you for it whenever a message is signed or decrypted.
9983 Set the following variables to henceforth use S/MIME (setting
9984 .Va smime-ca-file
9985 is of interest for verification only):
9987 .Bd -literal -offset indent
9988 set smime-ca-file=ALL-TRUSTED-ROOT-CERTS-HERE \e
9989   smime-sign-cert=ME@HERE.com.paired \e
9990   smime-sign-message-digest=SHA256 \e
9991   smime-sign
9995 From each signed message you send, the recipient can fetch your
9996 certificate and use it to send encrypted mail back to you.
9997 Accordingly if somebody sends you a signed message, you can do the same,
9998 and use the
9999 .Ic verify
10000 command to check the validity of the certificate.
10003 Variables of interest for S/MIME signing:
10004 .Va smime-ca-dir ,
10005 .Va smime-ca-file ,
10006 .Va smime-crl-dir ,
10007 .Va smime-crl-file ,
10008 .Va smime-no-default-ca ,
10009 .Va smime-sign ,
10010 .Va smime-sign-cert ,
10011 .Va smime-sign-include-certs
10013 .Va smime-sign-message-digest .
10016 After it has been verified save the certificate via
10017 .Ic certsave
10018 and tell \*(UA that it should use it for encryption for further
10019 communication with that somebody:
10021 .Bd -literal -offset indent
10022 certsave FILENAME
10023 set smime-encrypt-USER@HOST=FILENAME \e
10024     smime-cipher-USER@HOST=AES256
10028 Additional variables of interest for S/MIME en- and decryption:
10029 .Va smime-cipher
10031 .Va smime-encrypt-USER@HOST .
10034 You should carefully consider if you prefer to store encrypted messages
10035 in decrypted form.
10036 If you do, anybody who has access to your mail folders can read them,
10037 but if you do not, you might be unable to read them yourself later if
10038 you happen to lose your private key.
10040 .Ic decrypt
10041 command saves messages in decrypted form, while the
10042 .Ic save , copy ,
10044 .Ic move
10045 commands leave them encrypted.
10048 Note that neither S/MIME signing nor encryption applies to message
10049 subjects or other header fields yet.
10050 Thus they may not contain sensitive information for encrypted messages,
10051 and cannot be trusted even if the message content has been verified.
10052 When sending signed messages,
10053 it is recommended to repeat any important header information in the
10054 message text.
10055 .\" }}}
10057 .\" .Ss "Using CRLs with S/MIME or SSL/TLS" {{{
10058 .Ss "Using CRLs with S/MIME or SSL/TLS"
10060 \*(OP Certification authorities (CAs) issue certificate revocation
10061 lists (CRLs) on a regular basis.
10062 These lists contain the serial numbers of certificates that have been
10063 declared invalid after they have been issued.
10064 Such usually happens because the private key for the certificate has
10065 been compromised,
10066 because the owner of the certificate has left the organization that is
10067 mentioned in the certificate, etc.
10068 To seriously use S/MIME or SSL/TLS verification,
10069 an up-to-date CRL is required for each trusted CA.
10070 There is otherwise no method to distinguish between valid and
10071 invalidated certificates.
10072 \*(UA currently offers no mechanism to fetch CRLs, nor to access them on
10073 the Internet, so you have to retrieve them by some external mechanism.
10076 \*(UA accepts CRLs in PEM format only;
10077 CRLs in DER format must be converted, like, e.\|g.:
10080 .Dl $ openssl crl \-inform DER \-in crl.der \-out crl.pem
10083 To tell \*(UA about the CRLs, a directory that contains all CRL files
10084 (and no other files) must be created.
10086 .Va smime-crl-dir
10088 .Va ssl-crl-dir
10089 variables, respectively, must then be set to point to that directory.
10090 After that, \*(UA requires a CRL to be present for each CA that is used
10091 to verify a certificate.
10092 .\" }}}
10094 .\" .Ss "Handling spam" {{{
10095 .Ss "Handling spam"
10097 \*(OP \*(UA can make use of several spam interfaces for the purpose of
10098 identification of, and, in general, dealing with spam messages.
10099 A precondition of most commands in order to function is that the
10100 .Va spam-interface
10101 variable is set to one of the supported interfaces.
10102 Once messages have been identified as spam their (volatile)
10103 .Ql is-spam
10104 state can be prompted: the
10105 .Ql Ar :s
10107 .Ql Ar :S
10108 message specifications will address respective messages and their
10109 .Va attrlist
10110 entries will be used when displaying the
10111 .Va headline
10112 in the header display.
10114 .Bl -bullet
10116 .Ic spamrate
10117 rates the given messages and sets their
10118 .Ql is-spam
10119 flag accordingly.
10120 If the spam interface offers spam scores those can also be displayed in
10121 the header display by including the
10122 .Ql %$
10123 format in the
10124 .Va headline
10125 variable.
10127 .Ic spamham ,
10128 .Ic spamspam
10130 .Ic spamforget
10131 will interact with the Bayesian filter of the chosen interface and learn
10132 the given messages as
10133 .Dq ham
10135 .Dq spam ,
10136 respectively; the last command can be used to cause
10137 .Dq unlearning
10138 of messages; it adheres to their current
10139 .Ql is-spam
10140 state and thus reverts previous teachings.
10142 .Ic spamclear
10144 .Ic spamset
10145 will simply set and clear, respectively, the mentioned volatile
10146 .Ql is-spam
10147 message flag, without any interface interaction.
10152 .Xr spamassassin 1
10153 based
10154 .Va spam-interface
10155 .Ql spamc
10156 requires a running instance of the
10157 .Xr spamd 1
10158 server in order to function, started with the option
10159 .Fl -allow-tell
10160 shall Bayesian filter learning be possible.
10162 .Bd -literal -offset indent
10163 $ spamd -i localhost:2142 -i /tmp/.spamsock -d [-L] [-l]
10164 $ spamd --listen=localhost:2142 --listen=/tmp/.spamsock \e
10165     --daemonize [--local] [--allow-tell]
10169 Thereafter \*(UA can make use of these interfaces:
10171 .Bd -literal -offset indent
10172 $ \*(uA -Sspam-interface=spamc -Sspam-maxsize=500000 \e
10173     -Sspamc-command=/usr/local/bin/spamc \e
10174     -Sspamc-arguments="-U /tmp/.spamsock" -Sspamc-user=
10176 $ \*(uA -Sspam-interface=spamc -Sspam-maxsize=500000 \e
10177     -Sspamc-command=/usr/local/bin/spamc \e
10178     -Sspamc-arguments="-d localhost -p 2142" -Sspamc-user=
10182 Using the generic filter approach allows usage of programs like
10183 .Xr bogofilter 1 .
10184 Here is an example, requiring it to be accessible via
10185 .Ev PATH :
10187 .Bd -literal -offset indent
10188 $ \*(uA -Sspam-interface=filter -Sspam-maxsize=500000 \e
10189     -Sspamfilter-ham="bogofilter -n" \e
10190     -Sspamfilter-noham="bogofilter -N" \e
10191     -Sspamfilter-nospam="bogofilter -S" \e
10192     -Sspamfilter-rate="bogofilter -TTu 2>/dev/null" \e
10193     -Sspamfilter-spam="bogofilter -s" \e
10194     -Sspamfilter-rate-scanscore="1;^(.+)$"
10198 Because messages must exist on local storage in order to be scored (or
10199 used for Bayesian filter training), it is possibly a good idea to
10200 perform the local spam check last:
10202 .Bd -literal -offset indent
10203 define spamdelhook {
10204   # Server side DCC
10205   spamset (header x-dcc-brand-metrics "bulk")
10206   # Server-side spamassassin(1)
10207   spamset (header x-spam-flag "YES")
10208   del :s # TODO we HAVE to be able to do `spamrate :u ! :sS'
10209   move :S +maybe-spam
10210   spamrate :u
10211   del :s
10212   move :S +maybe-spam
10214 set folder-hook-FOLDER=spamdelhook
10218 See also the documentation for the variables
10219 .Va spam-interface , spam-maxsize ,
10220 .Va spamc-command , spamc-arguments , spamc-user ,
10221 .Va spamfilter-ham , spamfilter-noham , spamfilter-nospam , \
10222   spamfilter-rate
10224 .Va spamfilter-rate-scanscore .
10225 .\" }}}
10226 .\" }}} (Examples)
10229 .\" .Sh "FAQ" {{{
10230 .Sh "FAQ"
10232 In general it is a good idea to turn on
10233 .Va debug
10234 .Pf ( Fl d )
10235 and / or
10236 .Va verbose
10237 .Pf ( Fl v ,
10238 twice) if something doesn't work well.
10239 Very often a diagnostic message can be produced that leads to the
10240 problems' solution.
10242 .\" .Ss "\*(UA shortly hangs on startup" {{{
10243 .Ss "\*(UA shortly hangs on startup"
10245 This can have two reasons, one is the necessity to wait for a file lock
10246 and can't be helped, the other being that \*(UA calls the function
10247 .Xr uname 2
10248 in order to query the nodename of the box (sometimes the real one is
10249 needed instead of the one represented by the internal variable
10250 .Va hostname ) .
10251 You may have varying success by ensuring that the real hostname and
10252 .Ql localhost
10253 have entries in
10254 .Pa /etc/hosts ,
10255 or, more generally, that the name service is properly setup \(en
10256 and does
10257 .Xr hostname 1
10258 return what you'd expect?
10259 Does this local hostname has a domain suffix?
10260 RFC 6762 standardized the link-local top-level domain
10261 .Ql .local .
10262 .\" }}}
10264 .\" .Ss "\*(UA exits quick, and output is cleared away" {{{
10265 .Ss "\*(UA exits quick, and output is cleared away"
10267 When this happens even with
10268 .Va emptystart
10269 set, then this most likely indicates a problem with the creation of
10270 so-called dotlock files: setting
10271 .Va dotlock-ignore-error
10272 should overcome this situation.
10273 This only avoids symptoms, it doesn't address the problem, though.
10274 Since the output is cleared away \*(UA has support for
10275 .Sx "On terminal control and line editor" ,
10276 and switches to the
10277 .Dq ca-mode ,
10278 which causes the output clearance: by doing
10279 .Ql set termcap='smcup='
10280 this mode can be suppressed, and by setting
10281 .Va verbose
10282 (twice) the actual problem should be reported.
10283 .\" }}}
10285 .\" .Ss "I can't login to Google mail aka GMail" {{{
10286 .Ss "I can't login to Google mail aka GMail"
10288 Since 2014 some free service providers classify programs as
10289 .Dq less secure
10290 unless they use a special authentification method (OAuth 2.0) which
10291 wasn't standardized for non-HTTP protocol authentication token query
10292 until August 2015 (RFC 7628).
10295 Different to Kerberos / GSSAPI, which is developed since the mid of the
10296 1980s, where a user can easily create a local authentication ticket for
10297 her- and himself with the locally installed
10298 .Xr kinit 1
10299 program, that protocol has no such local part but instead requires
10300 a world-wide-web query to create or fetch a token; since there is no
10301 local cache this query has to be performed whenever \*(UA is invoked
10302 from the command line (in interactive sessions situation may differ).
10305 \*(UA doesn't support OAuth.
10306 Because of this it is necessary to declare \*(UA a
10307 .Dq less secure app
10308 (on the providers account web page) in order to read and send mail.
10309 However, it also seems possible to take the following steps instead:
10312 .Bl -enum -compact
10314 give the provider the number of a mobile phone,
10316 enable
10317 .Dq 2-Step Verification ,
10319 create an application specific password (16 characters), and
10321 use that special password instead of your real Google account password in
10322 \*(UA (for more on that see the section
10323 .Sx "On URL syntax and credential lookup" ) .
10325 .\" }}}
10327 .\" .Ss "Not \(dqdefunctional\(dq, but the editor key won't work" {{{
10328 .Ss "Not \(dqdefunctional\(dq, but the editor key won't work"
10330 It can happen that the terminal library (see
10331 .Sx "On terminal control and line editor",
10332 .Ic bind ,
10333 .Va termcap )
10334 reports different codes than the terminal really sends, in which case
10335 \*(UA will tell that a key binding is functional, but won't be able to
10336 recognize it because the received data doesn't match anything expected.
10337 The verbose listing of
10338 .Ic bind Ns
10339 ings will show the byte sequences that are expected.
10342 To overcome the situation, use, e.g., the program
10343 .Xr cat 1 ,
10344 in conjunction with the
10345 .Fl \&\&v
10346 flag if available, to see the byte sequences which are actually produced
10347 by keypresses, and use the variable
10348 .Va termcap
10349 to make \*(UA aware of them.
10350 E.g., the terminal this is typed on produces some false sequences, here
10351 an example showing the shifted home key:
10353 .Bd -literal -offset indent
10354 ? set verbose
10355 ? bind*
10356 # 1B 5B=[ 31=1 3B=; 32=2 48=H
10357   bind base :kHOM z0
10358 ? x
10359 $ cat -v
10360 ^[[H
10361 ? \*(uA -v -Stermcap='kHOM=\eE[H'
10362 ? bind*
10363 # 1B 5B=[ 48=H
10364   bind base :kHOM z0
10366 .\" }}}
10367 .\" }}}
10370 .\" .Sh "SEE ALSO" {{{
10371 .Sh "SEE ALSO"
10373 .Xr bogofilter 1 ,
10374 .Xr gpg 1 ,
10375 .Xr more 1 ,
10376 .Xr newaliases 1 ,
10377 .Xr openssl 1 ,
10378 .Xr sendmail 1 ,
10379 .Xr sh 1 ,
10380 .Xr spamassassin 1 ,
10381 .Xr iconv 3 ,
10382 .Xr setlocale 3 ,
10383 .Xr aliases 5 ,
10384 .Xr termcap 5 ,
10385 .Xr terminfo 5 ,
10386 .Xr locale 7 ,
10387 .Xr mailaddr 7 ,
10388 .Xr re_format 7 ,
10389 .Xr mailwrapper 8 ,
10390 .Xr sendmail 8
10391 .\" }}}
10394 .\" .Sh HISTORY {{{
10395 .Sh HISTORY
10397 M. Douglas McIlroy writes in his article
10398 .Dq A Research UNIX Reader: Annotated Excerpts \
10399 from the Programmer's Manual, 1971-1986
10401 .Xr mail 1
10402 command already appeared in First Edition
10404 in 1971:
10406 .Bd -ragged -offset indent
10407 Electronic mail was there from the start.
10408 Never satisfied with its exact behavior, everybody touched it at one
10409 time or another: to assure the safety of simultaneous access, to improve
10410 privacy, to survive crashes, to exploit uucp, to screen out foreign
10411 freeloaders, or whatever.
10412 Not until v7 did the interface change (Thompson).
10413 Later, as mail became global in its reach, Dave Presotto took charge and
10414 brought order to communications with a grab-bag of external networks
10415 (v8).
10420 Mail was written in 1978 by Kurt Shoens and developed as part of the
10423 distribution until 1995.
10424 Mail has then seen further development in open source
10426 variants, noticeably by Christos Zoulas in
10427 .Pf Net Bx .
10428 Basing upon this Nail, later Heirloom Mailx, was developed by Gunnar
10429 Ritter in the years 2000 until 2008.
10430 Since 2012 S-nail is maintained by Steffen (Daode) Nurpmeso.
10431 This man page is derived from
10432 .Dq The Mail Reference Manual
10433 that was originally written by Kurt Shoens.
10434 .\" }}}
10437 .Sh AUTHORS
10439 .An "Kurt Shoens" ,
10440 .An "Edward Wang" ,
10441 .An "Keith Bostic" ,
10442 .An "Christos Zoulas" ,
10443 .An "Gunnar Ritter" ,
10444 .An "Steffen Nurpmeso" Aq Mt s-nail-users@lists.sourceforge.net
10445 (later
10446 .Mt s-mailx@sdaoden.eu ) .
10449 .\" .Sh CAVEATS {{{
10450 .Sh CAVEATS
10452 \*(ID Interrupting an operation via
10453 .Dv \&\&SIGINT
10455 .Ql control-C
10456 is often problematic: many library functions cannot deal with the
10457 .Fn siglongjmp 3
10458 that this software (still) performs.
10461 The SMTP and POP3 protocol support of \*(UA is very basic.
10462 Also, if it fails to contact its upstream SMTP server, it will not make
10463 further attempts to transfer the message at a later time (setting
10464 .Va save
10466 .Va sendwait
10467 may be useful).
10468 If this is a concern, it might be better to set up a local SMTP server
10469 that is capable of message queuing.
10470 .\" }}}
10473 .Sh BUGS
10475 After deleting some message of a POP3 mailbox the header summary falsely
10476 claims that there are no messages to display, you need to perform
10477 a scroll or dot movement to restore proper state.
10479 In threaded display a power user may encounter crashes very
10480 occasionally (this is may and very).
10482 The file
10483 .Pa TODO
10484 in the source repository lists future directions.
10485 .\" s-ts-mode