Try improve doc of *hostname*/Message-Id: relation
[s-mailx.git] / nail.1
blob5f6b238a5bdcb1c04bcbe245cdb5e9520cfccd50
1 .\" Copyright (c) 1980, 1990, 1993
2 .\"     The Regents of the University of California.  All rights reserved.
3 .\" Copyright (c) 2000
4 .\"     Gunnar Ritter.  All rights reserved.
5 .\" Copyright (c) 2012 Steffen "Daode" Nurpmeso.
6 .\" All rights reserved.
7 .\"
8 .\" Redistribution and use in source and binary forms, with or without
9 .\" modification, are permitted provided that the following conditions
10 .\" are met:
11 .\" 1. Redistributions of source code must retain the above copyright
12 .\"    notice, this list of conditions and the following disclaimer.
13 .\" 2. Redistributions in binary form must reproduce the above copyright
14 .\"    notice, this list of conditions and the following disclaimer in the
15 .\"    documentation and/or other materials provided with the distribution.
16 .\" 3. All advertising materials mentioning features or use of this software
17 .\"    must display the following acknowledgement:
18 .\"     This product includes software developed by the University of
19 .\"     California, Berkeley and its contributors.
20 .\"     This product includes software developed by Gunnar Ritter
21 .\"     and his contributors.
22 .\" 4. Neither the name of the University nor the names of its contributors
23 .\"    may be used to endorse or promote products derived from this software
24 .\"    without specific prior written permission.
25 .\"
26 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS '\fIAS IS\fR' AND
27 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
28 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
29 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
30 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
31 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
32 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
33 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
34 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
35 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
36 .\" SUCH DAMAGE.
37 .\"
38 .TH S-NAIL 1 "2012-09-28" "S-nail" "User Commands"
39 .ds UA \\fIS-nail\\fR
40 .ds ua \\fIs-nail\\fR
41 .ds ba \\fBs-nail\\fR
42 .\" ##  --  >8  --  8<  --  ##
43 .SH NAME
44 \*(UA \- send and receive Internet mail
45 .SH SYNOPSIS
46 .PD 0
47 .HP
48 .ad l
49 \*(ba [\fB\-BDdEFinOtv~\fR]
50 [\fB\-s\fI\ subject\fR] [\fB\-a\fI\ attachment\fR ]
51 [\fB\-c\fI\ cc-addr\fR] [\fB\-b\fI\ bcc-addr\fR] [\fB\-r\fI\ from-addr\fR]
52 [\fB\-h\fI\ hops\fR]
53 [\fB\-A\fI\ account\fR]
54 [\fB\-S\fI\ variable\fR[\fB=\fIvalue\fR]]
55 \fIto-addr\fR .\ .\ .
56 .HP
57 .ad l
58 \*(ba [\fB\-BDdeEHiInNRv~\fR] [\fB\-T\fI\ name\fR]
59 [\fB\-A\fI\ account\fR]
60 [\fB\-S\fI\ variable\fR[\fB=\fIvalue\fR]]
61 \fB\-f\fR [\fIname\fR]
62 .HP
63 .ad l
64 \*(ba [\fB\-BDdeEinNRv~\fR]
65 [\fB\-A\fI\ account\fR]
66 [\fB\-S\fI\ variable\fR[\fB=\fIvalue\fR]]
67 [\fB\-u\fI\ user\fR]
68 .br
69 .PD
70 .ad b
71 .SH DESCRIPTION
72 \*(UA is an intelligent mail processing system, which has
73 a command syntax reminiscent of
74 .IR ed (1)
75 with lines replaced by messages.
76 It is based on Berkeley Mail 8.1,
77 is intended to provide the functionality of the POSIX
78 .B mailx
79 command,
80 and offers extensions
81 for MIME, IMAP, POP3, SMTP, and S/MIME.
82 \*(UA provides enhanced
83 features for interactive use, such as caching and disconnected
84 operation for IMAP, message threading, scoring, and filtering.
85 It is also usable as a mail batch language, both for sending
86 and receiving mail.
87 .PP
88 The following options are accepted:
89 .TP
90 .BI \-A \ name
91 Executes an 
92 .I account
93 command (see below)
94 for \fIname\fR after the startup files have been read.
95 .TP
96 .BI \-a \ file
97 Attach the given file to the message.
98 .TP
99 .B \-B
100 Make standard input and standard output line-buffered.
102 .BI \-b \ address
103 Send blind carbon copies to list.
104 List should be a comma-separated
105 list of names.
107 .BI \-c \ address
108 Send carbon copies to list of users.
110 .B \-D
111 Start in
112 .I disconnected
113 mode; see the description for the
114 .I disconnected
115 variable option.
117 .B \-d
118 Enables debugging messages and disables the actual delivery of messages.
119 Unlike
120 .IR \-v ,
121 this option is intended for \*(UA development only.
123 .B \-e
124 Just check if mail is present in the system mailbox.
125 If yes, return an exit status of zero,
126 else, a non-zero value.
128 .B \-E
129 If an outgoing message does not contain any text
130 in its first or only message part,
131 do not send it but discard it silently,
132 effectively setting the
133 .I skipemptybody
134 variable at program startup.
135 This is useful for sending messages
136 from scripts started by
137 .IR cron (8).
139 \fB\-f\fR [\fIfile\fR]
140 Read in the contents of the user's mbox
141 (or the specified file)
142 for processing;
143 when \*(UA is quit, it writes
144 undeleted messages back
145 to this file.
146 The string \fIfile\fR is handled
147 as described for the
148 .I folder
149 command below.
151 .B \-F
152 Save the message to send
153 in a file named after the local part
154 of the first recipient's address.
156 .B \-H
157 Print header summaries for all messages and exit.
159 \fB\-h\fI hops\fR
160 Invoke sendmail with the specified hop count.
161 This option has no effect when SMTP is used for sending mail.
163 .B \-i
164 Ignore tty interrupt signals.
165 This is
166 particularly useful when using
167 \*(UA on noisy phone lines.
169 .B \-I
170 Shows the `Newsgroup:' or `Article-Id:' fields
171 in the header summary.
172 Only applicable in combination with
173 .IR \-f .
175 .B \-n
176 Inhibits reading /etc/\*(ua.rc upon startup.
177 This option should be activated for
178 \*(UA scripts that are invoked on more than one machine,
179 because the contents of that file may differ between them.
181 .B \-N
182 Inhibits the initial display of message headers when reading mail
183 or editing a mail folder.
185 .BI \-O \ option
186 Pass the given option through to sendmail.
187 This option has no effect when SMTP is used for sending mail.
189 .BI \-q \ file
190 Start the message with the contents of the specified file.
191 May be given in send mode only.
193 .BI \-r \ address
194 Sets the
195 .I From
196 address. Overrides any
197 .I from
198 variable specified in environment or startup files.
199 Tilde escapes are disabled.
200 The \fI\-r\fI address\fR options are passed to the mail transfer agent
201 unless SMTP is used.
202 This option exists for compatibility only;
203 it is recommended to set the 
204 .I from
205 variable directly instead.
207 .B \-R
208 Opens any folders read-only.
210 .BI \-s \ subject
211 Specify subject on command line (only the first argument after the
212 .I \-s
213 flag is used as a subject; be careful to quote subjects
214 containing spaces).
216 \fB\-S\fI\ variable\fR[\fB=\fIvalue\fR]
217 Sets the internal option
218 .I variable
219 and, in case of a string option,
220 assigns
221 .I value
222 to it.
223 These assignments take place after the resource files have been loaded.
225 .BI \-T \ name
226 Writes the `Message-Id:' and `Article-Id:' header fields
227 of each message read in the file
228 .IR name .
229 Implies
230 .IR \-I .
231 Compressed files are handled as described for the
232 .I folder
233 command below.
235 .B \-t
236 The message to be sent is expected to contain a message header
237 with `To:', `Cc:', or `Bcc:' fields giving its recipients
238 and `Subject:' giving the subject of the message.
239 Recipients and subject specified on the command line are ignored.
241 .BI \-u \ user
242 Reads the mailbox of the given user name.
244 .B \-v
245 Verbose mode.
246 The details of
247 delivery are displayed on the user's terminal.
249 .B \-V
250 Print \*(UA's version and exit.
252 .B \-~
253 Enable tilde escapes even if not in interactive mode.
254 .SS "Sending mail"
255 To send a message to one or more people,
256 \*(UA can be invoked with arguments
257 which are the names of people
258 to whom the mail will be sent.
259 The user is then expected to type in his message,
260 followed by an `control-D' at the beginning of a line.
261 The section below Replying to
262 or originating mail,
263 describes some features of /*(UA
264 available to help when composing letters.
265 .SS "Reading mail"
266 In normal usage \*(UA is given no arguments
267 and checks the user's mail out of the post office,
268 then prints out a one line header
269 of each message found.
270 The current message is initially
271 the first message (numbered 1)
272 and can be printed using the print command
273 which can be abbreviated `p').
274 The user can move among the messages
275 much as he moves between lines in
276 .IR ed (1),
277 with the commands `+' and `\-' moving backwards and forwards,
278 and simple numbers.
279 .SS "Disposing of mail"
280 After examining a message
281 the user can delete `d') the message
282 or reply `r') to it.
283 Deletion causes the \*(UA program
284 to forget about the message.
285 This is not irreversible;
286 the message can be undeleted `u')
287 by giving its number,
288 or the \*(UA session can be aborted
289 by giving the exit `x') command.
290 Deleted messages will, however,
291 usually disappear never to be seen again.
292 .SS "Specifying messages"
293 Commands such as print and delete
294 can be given a list of message numbers
295 as arguments to apply to a number of messages at once.
296 Thus `\fIdelete 1 2\fR' deletes messages 1 and 2,
297 while `\fIdelete 1-5\fR' deletes messages 1 through 5.
298 In sorted or threaded mode (see the
299 .I sort
301 .I thread
302 commands),
303 `\fIdelete 1-5\fR' deletes the messages
304 that are located between (and including) messages 1 through 5
305 in the sorted/threaded order,
306 as shown in the header summary.
307 The following special message names exist:
309 .B :n
310 All new messages.
312 .B :o
313 All old messages (any not in state read or new).
315 .B :u
316 All unread messages.
318 .B :d
319 All deleted messages (for the
320 .I undelete
321 command).
323 .B :r
324 All read messages.
326 .B :f
327 All `flagged' messages.
329 .B :a
330 All answered messages
331 (cf. the
332 .I markanswered
333 variable).
335 .B :t
336 All messages marked as draft.
338 .B :k
339 All `killed' messages.
341 .B :j
342 All messages classified as junk.
344 .B .
345 The current message.
347 .B ;
348 The message that was previously the current message.
350 .B ,
351 The parent message of the current message,
352 that is the message with the Message-ID
353 given in the `In-Reply-To:' field
354 or the last entry of the `References:' field
355 of the current message.
357 .B \-
358 The next previous undeleted message,
359 or the next previous deleted message for the
360 .I undelete
361 command.
362 In sorted/threaded mode,
363 the next previous such message in the sorted/threaded order.
365 .B +
366 The next undeleted message,
367 or the next deleted message for the
368 .I undelete
369 command.
370 In sorted/threaded mode,
371 the next such message in the sorted/threaded order.
373 .B ^
374 The first undeleted message,
375 or the first deleted message
376 for the
377 .I undelete
378 command.
379 In sorted/threaded mode,
380 the first such message in the sorted/threaded order.
382 .B $
383 The last message.
384 In sorted/threaded mode,
385 the last message in the sorted/threaded order.
387 .BI & x
388 In threaded mode,
389 selects the message addressed with
390 .IR x ,
391 where
392 .I x
393 is any other message specification,
394 and all messages from the thread that begins at it.
395 Otherwise, it is identical to
396 .IR x .
398 .I x
399 is omitted,
400 the thread beginning with the current message is selected.
402 .B *
403 All messages.
405 .B `
406 All messages that were included in the message list
407 for the previous command.
409 .BI / string
410 All messages that contain
411 .I string
412 in the subject field (case ignored).
413 See also the
414 .I searchheaders
415 variable.
417 .I string
418 is empty,
419 the string from the previous specification of that type is used again.
421 .I address
422 All messages from
423 .IR address .
424 By default, this is a case-sensitive search
425 for the complete email address.
426 If the
427 .I allnet
428 variable is set,
429 only the local part of the addresses is evaluated for the comparison.
430 Otherwise if the
431 .I showname
432 variable is set,
433 a case-sensitive search for the complete real name
434 of a sender is performed.
435 The IMAP-style
436 .BI (from\  address)
437 expression can be used instead
438 if substring matches are desired.
440 .BI ( criterion )
441 All messages that satisfy the given IMAP-style SEARCH
442 .IR criterion .
443 This addressing mode is available with all types of folders;
444 for folders not located on IMAP servers,
445 or for servers unable to execute the SEARCH command,
446 \*(UA will perform the search locally.
447 Strings must be enclosed by double quotes `"' in their entirety
448 if they contain white space or parentheses;
449 within the quotes,
450 only backslash `\e' is recognized as an escape character.
451 All string searches are case-insensitive.
452 When the description indicates
453 that the `envelope' representation of an address field is used,
454 this means that the search string is checked against
455 both a list constructed as
458 \fB("\fIreal name\fB" "\fIsource-route\fB" "\fIlocal-part\fB" "\fIdomain-part\fB")\fR
461 for each address,
462 and the addresses without real names
463 from the respective header field.
464 Criteria can be nested using parentheses.
466 \fB(\fIcriterion1 criterion2\fR .\|.\|. \fIcriterionN\fB)\fR
467 All messages that satisfy all of the given criteria.
469 .BI (or " criterion1 criterion2" )
470 All messages that satisfy either
471 .I criterion1
473 .IR criterion2 ,
474 or both.
475 To connect more than two criteria using `or',
476 (or) specifications have to be nested using additional parentheses,
477 as with `(or\ a\ (or\ b\ c))';
478 `(or\ a\ b\ c)' means ((a or b) and c).
479 For a simple `or' operation of independent criteria
480 on the lowest nesting level,
481 it is possible to achieve similar effects by using
482 three separate criteria, as with
483 `(a)\ (b)\ (c)'.
485 .BI (not " criterion" )
486 All messages that do not satisfy
487 .IR criterion .
489 .BI (bcc " string" )
490 All messages that contain
491 .I string
492 in the `envelope' representation of the
493 .I Bcc:
494 field.
496 .BI (cc " string" )
497 All messages that contain
498 .I string
499 in the `envelope' representation of the
500 .I Cc:
501 field.
503 .BI (from " string" )
504 All messages that contain
505 .I string
506 in the `envelope' representation of the
507 .I From:
508 field.
510 .BI (subject " string" )
511 All messages that contain
512 .I string
513 in the
514 .I Subject:
515 field.
517 .BI (to " string" )
518 All messages that contain
519 .I string
520 in the `envelope' representation of the
521 .I To:
522 field.
524 .BI (header " name string" )
525 All messages that contain
526 .I string
527 in the specified
528 .I Name:
529 field.
531 .BI (body " string" )
532 All messages that contain
533 .I string
534 in their body.
536 .BI (text " string" )
537 All messages that contain
538 .I string
539 in their header or body.
541 .BI (larger " size" )
542 All messages that are larger than
543 .I size
544 (in bytes).
546 .BI (smaller " size" )
547 All messages that are smaller than
548 .I size
549 (in bytes).
551 .BI (before " date" )
552 All messages that were received before
553 .IR date ;
554 .I date
555 must be in the form
556 \fId\fR[\fId\fR]\fB-\fImon\fB-\fIyyyy\fR,
557 where \fId\fR[\fId\fR] is the day of the month
558 as one or two digits,
559 .I mon
560 is the name of the month\(emone of
561 `Jan', `Feb', `Mar',
562 `Apr', `May', `Jun',
563 `Jul', `Aug', `Sep',
564 `Oct', `Nov', or `Dec',
566 .I yyyy
567 is the year as four digits;
568 e.\|g. "30-Aug-2004".
570 .BI (on " date" )
571 All messages that were received on the specified date.
573 .BI (since " date" )
574 All messages that were received since the specified date.
576 .BI (sentbefore " date" )
577 All messages that were sent on the specified date.
579 .BI (senton " date" )
580 All messages that were sent on the specified date.
582 .BI (sentsince " date" )
583 All messages that were sent since the specified date.
585 .B ()
586 The same criterion as for the previous search.
587 This specification cannot be used as part of another criterion.
588 If the previous command line contained more than one independent criterion,
589 the last of those criteria is used.
591 A practical method to read a set of messages
592 is to issue a
593 .I from
594 command with the search criteria first
595 to check for appropriate messages,
596 and to read each single message then by typing `\fB`\fR' repeatedly.
597 .SS "Replying to or originating mail"
599 .I reply
600 command can be used
601 to set up a response to a message,
602 sending it back to the person who it was from.
603 Text the user types in then,
604 up to an end-of-file,
605 defines the contents of the message.
606 While the user is composing a message,
607 \*(UA treats lines beginning with the character `~' specially.
608 For instance, typing `~m' (alone on a line)
609 will place a copy of the current message into the response
610 right shifting it by a tabstop
611 (see
612 .I indentprefix
613 variable, below).
614 Other escapes will set up subject fields,
615 add and delete recipients to the message,
616 attach files to it
617 and allow the user to escape to an editor
618 to revise the message
619 or to a shell to run some commands.
620 (These options are given in the summary below.)
621 .SS "Ending a mail processing session"
622 The user can end a \*(UA session
623 with the quit (`q') command.
624 Messages which have been examined
625 go to the user's mbox file
626 unless they have been deleted
627 in which case they are discarded.
628 Unexamined messages go back
629 to the post office.
630 (See the \-f option above).
631 .SS "Personal and systemwide distribution lists"
632 It is also possible to create
633 a personal distribution lists so that,
634 for instance, the user can send mail
635 to `\fIcohorts\fR' and have it go
636 to a group of people.
637 Such lists can be defined by placing a line like
640         \fBalias\fI cohorts bill ozalp jkf mark kridle@ucbcory\fR
643 in the file .mailrc in the user's home directory.
644 The current list of such aliases
645 can be displayed with the alias command in \*(UA.
646 System wide distribution lists can be created
647 by editing /etc/aliases, see
648 .IR aliases (5)
650 .IR sendmail (8);
651 these are kept in a different syntax.
652 In mail the user sends,
653 personal aliases will be expanded
654 in mail sent to others so that
655 they will be able to reply to the recipients.
656 System wide aliases are not expanded when the mail is sent,
657 but any reply returned to the machine
658 will have the system wide alias expanded
659 as all mail goes through sendmail.
660 .SS "Recipient address specifications"
661 When an address is used to name a recipient
662 (in any of To, Cc, or Bcc),
663 names of local mail folders
664 and pipes to external commands
665 can also be specified;
666 the message text is then written to them.
667 The rules are: Any name which starts with a
668 .RB ` | '
669 character specifies a pipe,
670 the command string following the `|'
671 is executed and the message is sent to its standard input;
672 any other name which contains a
673 .RB ` @ '
674 character is treated as a mail address;
675 any other name which starts with a
676 .RB ` + '
677 character specifies a folder name;
678 any other name which contains a
679 .RB ` / '
680 character
681 but no
682 .RB ` ! '
684 .RB ` % '
685 character before also specifies a folder name;
686 what remains is treated as a mail address.
687 Compressed folders are handled as described for the
688 .I folder
689 command below.
690 .SS "Network mail (Internet / ARPA, UUCP, Berknet)"
692 .IR mailaddr (7)
693 for a description of network addresses.
694 \*(UA has a number of options
695 which can be set in the .mailrc file
696 to alter its behavior;
697 thus `\fIset askcc\fR' enables the askcc feature.
698 (These options are summarized below).
699 .SS "MIME types"
700 For any outgoing attachment,
701 \*(UA tries to determine the content type.
702 It does this by reading MIME type files
703 whose lines have the following syntax:
706         \fItype\fB/\fIsubtype      extension \fR[\fIextension \fR.\ .\ .]\fR
709 where type/subtype are strings describing the file contents,
710 and extension is the part of a filename starting after the last dot.
711 Any line not immediately beginning with an ASCII alphabetical character is
712 ignored by \*(UA.
713 If there is a match with the extension of the file to attach,
714 the given type/subtype pair is used.
715 Otherwise, or if the filename has no extension,
716 the content types text/plain or application/octet-stream are used,
717 the first for text or international text files,
718 the second for any file that contains formatting characters
719 other than newlines and horizontal tabulators.
720 .SS "Character sets"
721 \*(UA normally detects the character set of the terminal
722 using the LC_CTYPE locale setting.
723 If the locale cannot be used appropriately,
724 the \fIttycharset\fR variable should be set
725 to provide an explicit value.
726 When reading messages,
727 their text is converted to the terminal character set if possible.
728 Unprintable characters and illegal byte sequences are detected
729 and replaced by Unicode substitute characters or question marks
730 unless the
731 .I print-all-chars
732 is set at initialization time.
734 The character set for outgoing messages
735 is not necessarily the same
736 as the one used on the terminal.
737 If an outgoing text message
738 contains characters not representable in US-ASCII,
739 the character set being used
740 must be declared within its header.
741 Permissible values can be declared
742 using the \fIsendcharsets\fR variable,
743 separated by commas;
744 \*(UA tries each of the values in order
745 and uses the first appropriate one.
746 If the message contains characters that cannot be represented
747 in any of the given character sets,
748 the message will not be sent,
749 and its text will be saved to the `dead.letter' file.
750 Messages that contain NUL bytes are not converted.
752 Outgoing attachments are converted if they are plain text.
753 If the
754 .I sendcharsets
755 variable contains more than one character set name,
757 .I ~@
758 tilde escape will ask for the character sets for individual attachments
759 if it is invoked without arguments.
761 Best results are usually achieved
762 when \*(UA is run in a UTF-8 locale
763 on a UTF-8 capable terminal.
764 In this setup,
765 characters from various countries can be displayed,
766 while it is still possible to use more simple
767 character sets for sending
768 to retain maximum compatibility with older mail clients.
769 .SS "Commands"
770 Each command is typed on a line by itself,
771 and may take arguments following the command word.
772 The command need not be typed in its entirety \(en
773 the first command which matches the typed prefix is used.
774 For commands which take message lists as arguments,
775 if no message list is given,
776 then the next message forward which satisfies
777 the command's requirements is used.
778 If there are no messages forward of the current message,
779 the search proceeds backwards,
780 and if there are no good messages at all,
781 \*(UA types `\fIapplicable messages\fR' and aborts the command.
782 If the command begins with a \fI#\fR sign,
783 the line is ignored.
785 The arguments to commands can be quoted, using the following methods:
786 .IP \(bu
787 An argument can be enclosed between paired double-quotes
788 "\|" or single-quotes '\|'; any white space, shell
789 word expansion, or backslash characters within the quotes
790 are treated literally as part of the argument.
791 A double-quote will be treated literally within
792 single-quotes and vice versa. These special properties of
793 the quote marks occur only when they are paired at the
794 beginning and end of the argument.
795 .IP \(bu
796 A backslash outside of the enclosing quotes is discarded
797 and the following character is treated literally as part of
798 the argument.
799 .IP \(bu
800 An unquoted backslash at the end of a command line is
801 discarded and the next line continues the command.
803 Filenames, where expected, are subjected to the following
804 transformations, in sequence:
805 .IP \(bu
806 If the filename begins with an unquoted plus sign, and
808 .I folder
809 variable is defined,
810 the plus sign will be replaced by the value of the
811 .I folder
812 variable followed by a slash. If the
813 .I folder
814 variable is
815 unset or is set to null, the filename will be unchanged.
816 .IP \(bu
817 Shell word expansions are applied to the filename.
818 If more than a single pathname results
819 from this expansion and the command is expecting one
820 file, an error results.
822 The following commands are provided:
824 .B \-
825 Print out the preceding message.
826 If given a numeric argument n,
827 goes to the n'th previous message and prints it.
829 .B ?
830 Prints a brief summary of commands.
832 .B !
833 Executes the shell (see
834 .IR sh (1)
836 .IR csh (1))
837 command which follows.
839 .B |
840 A synonym for the \fIpipe\fR command.
842 .B account
843 (ac) Creates, selects or lists
844 an email account.
845 An account is formed by a group of commands,
846 primarily of those to set variables.
847 With two arguments,
848 of which the second is a `{',
849 the first argument gives an account name,
850 and the following lines create a group of commands for that account
851 until a line containing a single `}' appears.
852 With one argument,
853 the previously created group of commands
854 for the account name is executed,
855 and a
856 .I folder
857 command is executed for the system mailbox or inbox
858 of that account.
859 Without arguments,
860 the list of accounts and their contents are printed.
861 As an example,
864     \fBaccount\fI myisp\fR \fB{\fR
865         set folder=imaps://mylogin@imap.myisp.example
866         set record=+Sent
867         set from="myname@myisp.example (My Name)"
868         set smtp=smtp.myisp.example
869     \fB}\fR
872 creates an account named `myisp'
873 which can later be selected by specifying `account myisp'.
875 .B alias
876 (a) With no arguments,
877 prints out all currently-defined aliases.
878 With one argument, prints out that alias.
879 With more than one argument,
880 creates a new alias or changes an old one.
882 .B alternates
883 (alt) The alternates command is useful
884 if the user has accounts on several machines.
885 It can be used to inform \*(UA
886 that the listed addresses all belong to the invoking user.
887 When he replies to messages,
888 \*(UA will not send a copy of the message
889 to any of the addresses
890 listed on the alternates list.
891 If the alternates command is given
892 with no argument,
893 the current set of alternate names is displayed.
895 .B answered
896 (ans) Takes a message list and marks each message
897 as a having been answered.
898 This mark has no technical meaning in the mail system;
899 it just causes messages to be marked in the header summary,
900 and makes them specially addressable.
902 .B cache
903 Only applicable to cached IMAP mailboxes;
904 takes a message list and reads the specified messages
905 into the IMAP cache.
907 .B call
908 Calls a macro (see the
909 .I define
910 command).
912 .B cd
913 Same as chdir.
915 .B certsave
916 Only applicable to S/MIME signed messages.
917 Takes a message list and a file name
918 and saves the certificates contained within the message signatures
919 to the named file in both human-readable and PEM format.
920 The certificates can later be used to send encrypted messages
921 to the messages' originators by setting the
922 .I smime-encrypt-user@host
923 variable.
925 .B chdir
926 (ch) Changes the user's working directory to that specified,
927 if given.
928 If no directory is given,
929 then changes to the user's login directory.
931 .B classify
932 (cl) Takes a list of messages and
933 examines their contents for characteristics of junk mail
934 using Bayesian filtering.
935 Messages considered to be junk are then marked as such.
936 The junk mail database is not changed.
938 .B collapse
939 (coll)
940 Only applicable to threaded mode.
941 Takes a message list
942 and makes all replies to these messages invisible
943 in header summaries,
944 unless they are in state `new'.
946 .B connect
947 (conn) If operating in disconnected mode on an IMAP mailbox,
948 switch to online mode and connect to the mail server
949 while retaining the mailbox status.
950 See the description of the
951 .I disconnected
952 variable for more information.
954 .B copy
955 (c) The copy command does the same thing that
956 .I save
957 does,
958 except that it does not mark the messages
959 it is used on for deletion when the user quits.
960 Compressed files and IMAP mailboxes are handled as described for the
961 .I folder
962 command.
964 .B Copy
965 (C) Similar to
966 .IR copy ,
967 but saves the messages in a file named after the local part
968 of the sender address of the first message.
970 .B decrypt
971 (dec) For unencrypted messages,
972 this command is identical to
973 .IR copy .
974 Encrypted messages are first decrypted, if possible,
975 and then copied.
977 .B Decrypt
978 (Dec) Similar to
979 .IR decrypt ,
980 but saves the messages in a file named after the local part
981 of the sender address of the first message.
983 .B define
984 (def) Defines a macro.
985 A macro definition is a sequence of commands in the following form:
988     \fBdefine\fR \fIname\fB {\fR
989         \fIcommand1\fR
990         \fIcommand2\fR
991         .\|.\|.
992         \fIcommandN\fR
993     \fB}\fR
996 Once defined, a macro can be explicitly invoked using the
997 .I call
998 command,
999 or can be implicitly invoked by setting the
1000 .I folder-hook
1002 .I folder-hook-fullname
1003 variables.
1005 .B defines
1006 Prints the currently defined macros including their contents.
1008 .B delete
1009 (d) Takes a list of messages as argument
1010 and marks them all as deleted.
1011 Deleted messages will not be saved in mbox,
1012 nor will they be available for most other commands.
1014 .B discard
1015 Same as ignore.
1017 .B disconnect
1018 (disco) If operating in online mode on an IMAP mailbox,
1019 switch to disconnected mode while retaining the mailbox status.
1020 See the description of the
1021 .I disconnected
1022 variable for more information.
1023 A list of messages may optionally be given as argument;
1024 the respective messages are then read into the cache
1025 before the connection is closed.
1026 Thus `disco *' makes the entire current mailbox
1027 available for disconnected use.
1029 .BR dp \ or \ dt
1030 Deletes the current message
1031 and prints the next message.
1032 If there is no next message,
1033 \*(UA says `\fIat EOF\fR'.
1035 .B draft
1036 Takes a message list and marks each message
1037 as a draft.
1038 This mark has no technical meaning in the mail system;
1039 it just causes messages to be marked in the header summary,
1040 and makes them specially addressable.
1042 .B echo
1043 Echoes its arguments,
1044 resolving special names
1045 as documented for the folder command.
1046 The escape sequences
1047 `\fB\ea\fR',
1048 `\fB\eb\fR',
1049 `\fB\ec\fR',
1050 `\fB\ef\fR',
1051 `\fB\en\fR',
1052 `\fB\er\fR',
1053 `\fB\et\fR',
1054 `\fB\ev\fR',
1055 `\fB\e\e\fR', and
1056 `\fB\e0\fInum\fR'
1057 are interpreted
1058 as with the
1059 .IR echo (1)
1060 command.
1062 .B edit
1063 (e) Takes a list of messages
1064 and points the text editor
1065 at each one in turn.
1066 Modified contents are discarded
1067 unless the
1068 .I writebackedited
1069 variable is set.
1071 .B else
1072 Marks the end of the then-part
1073 of an if statement
1074 and the beginning of the part
1075 to take effect if the condition
1076 of the if statement is false.
1078 .B endif
1079 Marks the end of an if statement.
1081 .B exit
1082 (ex or x) Effects an immediate return to the Shell
1083 without modifying the user's system mailbox,
1084 his mbox file,
1085 or his edit file in \-f.
1087 .B file
1088 (fi) The same as folder.
1090 .B flag
1091 (fl) Takes a message list
1092 and marks the messages as `flagged' for urgent/special attention.
1093 This mark has no technical meaning in the mail system;
1094 it just causes messages to be highlighted in the header summary,
1095 and makes them specially addressable.
1097 .B folders
1098 With no arguments,
1099 list the names of the folders in the folder directory.
1100 With an existing folder as an argument,
1101 lists then names of folders below the named folder;
1102 e.\|g. the command `folders @'
1103 lists the folders on the base level of the current IMAP server.
1104 See also the
1105 .I imap-list-depth
1106 variable.
1108 .B folder
1109 (fold) The folder command switches
1110 to a new mail file or folder.
1111 With no arguments, it tells the user
1112 which file he is currently reading.
1113 If an argument is given,
1114 it will write out changes
1115 (such as deletions) the user has made
1116 in the current file and read in
1117 the new file.
1118 Some special conventions are recognized for the name.
1119 \fB#\fR means the previous file,
1120 \fB%\fR means the invoking user's system mailbox,
1121 \fB%\fIuser\fR means \fIuser's\fR system mailbox,
1122 \fB&\fR means the invoking user's mbox file,
1123 and \fB+\fIfile\fI means a \fIfile\fR in the folder directory.
1124 \fB%:\fIfilespec\fR expands to the same value as \fIfilespec\fR,
1125 but the file is handled as a system mailbox
1126 e.\ g. by the mbox and save commands.
1127 If the name matches one of the strings defined with the
1128 .I shortcut
1129 command,
1130 it is replaced by its long form and expanded.
1131 If the name ends with \fB.gz\fR or \fB.bz2\fR,
1132 it is treated as compressed with
1133 .IR gzip (1)
1135 .IR bzip2 (1),
1136 respectively.
1137 Likewise, if \fIname\fR does not exist,
1138 but either \fIname\fB.gz\fR or \fIname\fB.bz2\fR exists,
1139 the compressed file is used.
1140 If \fIname\fR refers to a directory
1141 with the subdirectories `tmp', `new', and `cur',
1142 it is treated as a folder in
1143 .I maildir
1144 format.
1145 A name of the form
1148        \fIprotocol\fB://\fR[\fIuser\fB@\fR]\fIhost\fR[\fB:\fIport\fR][\fB/\fIfile\fR]
1151 is taken as an Internet mailbox specification.
1152 The supported protocols are currently
1153 .B imap
1154 (IMAP v4r1),
1155 .B imaps
1156 (IMAP with SSL/TLS encryption),
1157 .B pop3
1158 (POP3),
1160 .B pop3s
1161 (POP3 with SSL/TLS encryption).
1163 .I user
1164 contains special characters, in particular `/' or `%',
1165 they must be escaped in URL notation,
1166 as `%2F' or `%25'.
1167 The optional
1168 .I file
1169 part applies to IMAP only;
1170 if it is omitted,
1171 the default `INBOX' is used.
1172 If \*(UA is connected to an IMAP server,
1173 a name of the form \fB@\fImailbox\fR
1174 refers to the \fImailbox\fR on that server.
1175 If the `folder' variable refers to an IMAP account,
1176 the special name `%' selects the `INBOX' on that account.
1178 .B Followup
1179 (F) Similar to
1180 .IR Respond ,
1181 but saves the message in a file
1182 named after the local part of the first recipient's address.
1184 .B followup
1185 (fo) Similar to
1186 .IR respond ,
1187 but saves the message in a file
1188 named after the local part of the first recipient's address.
1190 .B followupall
1191 Similar to
1192 .IR followup ,
1193 but responds to all recipients regardless of the
1194 .I flipr
1196 .I Replyall
1197 variables.
1199 .B followupsender
1200 Similar to
1201 .IR Followup ,
1202 but responds to the sender only regardless of the
1203 .I flipr
1205 .I Replyall
1206 variables.
1208 .B forward
1209 (fwd)
1210 Takes a message and the address of a recipient
1211 and forwards the message to him.
1212 The text of the original message is included in the new one,
1213 with the value of the
1214 .I fwdheading
1215 variable printed before.
1217 .I fwdignore
1219 .I fwdretain
1220 commands specify which header fields are included in the new message.
1221 Only the first part of a multipart message is included unless the
1222 .I forward-as-attachment
1223 option is set.
1225 .B Forward
1226 (Fwd)
1227 Similar to
1228 .IR forward ,
1229 but saves the message in a file named after
1230 the local part of the recipient's address.
1232 .B from
1233 (f) Takes a list of messages
1234 and prints their message headers,
1235 piped through the pager if the output does not fit on the screen.
1237 .B fwdignore
1238 Specifies which header fields are to be ignored with the
1239 .I forward
1240 command.
1241 This command has no effect when the
1242 .I forward-as-attachment
1243 option is set.
1245 .B fwdretain
1246 Specifies which header fields are to be retained with the
1247 .I forward
1248 command.
1249 .I fwdretain
1250 overrides
1251 .IR fwdignore .
1252 This command has no effect when the
1253 .I forward-as-attachment
1254 option is set.
1256 .B good
1257 (go) Takes a list of messages
1258 and marks all of them as not being junk mail.
1259 Data from these messages is then inserted
1260 into the junk mail database for future classification.
1262 .B headers
1263 (h) Lists the current range of headers,
1264 which is an 18-message group.
1265 If a `+' argument is given,
1266 then the next 18-message group is printed,
1267 and if a `\-' argument is given,
1268 the previous 18-message group is printed.
1270 .B help
1271 A synonym for ?.
1273 .B hold
1274 (ho, also preserve) Takes a message list
1275 and marks each message therein to be saved
1276 in the user's system mailbox
1277 instead of in mbox.
1278 Does not override the delete command.
1279 \*(UA deviates from the POSIX standard with this command,
1280 as a `next' command issued after `hold'
1281 will display the following message,
1282 not the current one.
1284 .B if
1285 Commands in \*(UA's startup files
1286 can be executed conditionally
1287 depending on whether the user is sending
1288 or receiving mail with the if command.
1289 For example:
1292         \fBif \fIreceive\fR
1293                 \fIcommands .\ .\ .\fR
1294         \fBendif\fR
1297 An else form is also available:
1300         \fBif \fIreceive\fR
1301                 \fIcommands .\ .\ .\fR
1302         \fBelse\fR
1303                 \fIcommands .\ .\ .\fR
1304         \fBendif\fR
1307 Note that the only allowed conditions are
1308 .BR receive ,
1309 .BR send ,
1311 .B term
1312 (execute command if standard input is a tty).
1314 .B ignore
1315 Add the list of header fields named to the ignored list.
1316 Header fields in the ignore list are not printed
1317 on the terminal when a message is printed.
1318 This command is very handy for suppression
1319 of certain machine-generated header fields.
1320 The Type and Print commands can be used
1321 to print a message in its entirety,
1322 including ignored fields.
1323 If ignore is executed with no arguments,
1324 it lists the current set of ignored fields.
1326 .B imap
1327 Sends command strings directly to the current IMAP server.
1328 \*(UA operates always in IMAP \fIselected state\fR
1329 on the current mailbox;
1330 commands that change this
1331 will produce undesirable results
1332 and should be avoided.
1333 Useful IMAP commands are:
1336 .B create
1337 Takes the name of an IMAP mailbox as an argument
1338 and creates it.
1340 .B getquotaroot
1341 .\" RFC 2087
1342 Takes the name of an IMAP mailbox as an argument
1343 and prints the quotas that apply to the mailbox.
1344 Not all IMAP servers support this command.
1346 .B namespace
1347 .\" RFC 2342
1348 Takes no arguments and prints the Personal Namespaces,
1349 the Other User's Namespaces,
1350 and the Shared Namespaces.
1351 Each namespace type is printed in parentheses;
1352 if there are multiple namespaces of the same type,
1353 inner parentheses separate them.
1354 For each namespace,
1355 a namespace prefix and a hierarchy separator is listed.
1356 Not all IMAP servers support this command.
1359 .B inc
1360 Same as
1361 .IR newmail .
1363 .B junk
1364 (j) Takes a list of messages
1365 and marks all of them as junk mail.
1366 Data from these messages is then inserted
1367 into the junk mail database for future classification.
1369 .B kill
1370 (k) Takes a list of messages and `kills' them.
1371 Killed messages are not printed in header summaries,
1372 and are ignored by the
1373 .I next
1374 command.
1376 .I kill
1377 command also sets the score of the messages to negative infinity,
1378 so that subsequent
1379 .I score
1380 commands will not unkill them again.
1381 Killing is only effective for the current session on a folder;
1382 when it is quit, all messages are automatically unkilled.
1384 .B list
1385 Prints the names of all available commands.
1387 .B Mail
1388 (M) Similar to
1389 .IR mail ,
1390 but saves the message in a file
1391 named after the local part of the first recipient's address.
1393 .B mail
1394 (m) Takes as argument login names
1395 and distribution group names
1396 and sends mail to those people.
1398 .B mbox
1399 Indicate that a list of messages be sent
1400 to mbox in the user's home directory when
1401 \*(UA is quit.
1402 This is the default action for messages
1403 if unless the
1404 .I hold
1405 option is set.
1406 \*(UA deviates from the POSIX standard with this command,
1407 as a `next' command issued after `mbox'
1408 will display the following message,
1409 not the current one.
1411 .B move
1412 (mv) Acts like
1413 .IR copy ,
1414 but marks the messages for deletion
1415 if they were transferred successfully.
1417 .B Move
1418 (Mv) Similar to
1419 .IR move ,
1420 but moves the messages to a file named after the local part
1421 of the sender address of the first message.
1423 .B newmail
1424 Checks for new mail in the current folder
1425 without committing any changes before.
1426 If new mail is present, a message is printed.
1427 If the
1428 .I header
1429 variable is set,
1430 the headers of each new message are also printed.
1432 .B next
1433 (n) like + or CR) Goes to the next message
1434 in sequence and types it.
1435 With an argument list, types the next matching message.
1437 .B New
1438 Same as
1439 .IR unread .
1441 .B new
1442 Same as
1443 .IR unread .
1445 .B online
1446 Same as
1447 .IR connect .
1449 .B noop
1450 If the current folder is located on an IMAP or POP3 server,
1451 a NOOP command is sent.
1452 Otherwise, no operation is performed.
1454 .B Pipe
1455 (Pi) Like
1456 .I pipe
1457 but also
1458 pipes ignored header fields
1459 and all parts of MIME
1460 .I multipart/alternative
1461 messages.
1463 .B pipe
1464 (pi) Takes a message list and a shell command
1465 and pipes the messages through the command.
1466 Without an argument,
1467 the current message is piped
1468 through the command given by the \fIcmd\fR variable.
1469 If the \fI page\fR variable is set,
1470 every message is followed by a formfeed character.
1472 .B preserve
1473 (pre) A synonym for
1474 .IR hold .
1476 .B Print
1477 (P) Like
1478 .I print
1479 but also
1480 prints out ignored header fields
1481 and all parts of MIME
1482 .I multipart/alternative
1483 messages.
1484 See also
1485 .IR print ,
1486 .IR ignore ,
1488 .IR retain .
1490 .B print
1491 (p) Takes a message list and types out each message
1492 on the user's terminal.
1493 If the message is a MIME multipart message,
1494 all parts with a content type of `text' or `message' are shown,
1495 the other are hidden except for their headers.
1496 Messages are decrypted and converted to the terminal character set
1497 if necessary.
1499 .B probability
1500 (prob) For each word given as argument,
1501 the contents of its junk mail database entry are printed.
1503 .B quit
1504 (q) Terminates the session, saving all undeleted,
1505 unsaved messages in the user's mbox file in his login directory,
1506 preserving all messages marked with hold or preserve
1507 or never referenced in his system mailbox,
1508 and removing all other messages from his system mailbox.
1509 If new mail has arrived during the session,
1510 the message `\fIYou have new mail\fR' is given.
1511 If given while editing a mailbox file with the \-f flag,
1512 then the edit file is rewritten.
1513 A return to the Shell is effected,
1514 unless the rewrite of edit file fails,
1515 in which case the user can escape
1516 with the exit command.
1518 .B redirect
1519 (red) Same as
1520 .IR resend .
1522 .B Redirect
1523 (Red) Same as
1524 .IR Resend .
1526 .B remove
1527 (rem) Removes the named folders.
1528 The user is asked for confirmation
1529 in interactive mode.
1531 .B rename
1532 (ren) Takes the name of an existing folder
1533 and the name for the new folder
1534 and renames the first to the second one.
1535 Both folders must be of the same type
1536 and must be located on the current server for IMAP.
1538 .B Reply
1539 (R) Reply to originator.
1540 Does not reply to other recipients
1541 of the original message.
1543 .BR reply
1544 (r) Takes a message list and sends mail
1545 to the sender and all recipients of the specified message.
1546 The default message must not be deleted.
1548 .B replyall
1549 Similar to
1550 .IR reply ,
1551 but responds to all recipients regardless of the
1552 .I flipr
1554 .I Replyall
1555 variables.
1557 .B replysender
1558 Similar to
1559 .IR Reply ,
1560 but responds to the sender only regardless of the
1561 .I flipr
1563 .I Replyall
1564 variables.
1566 .B Resend
1567 Like
1568 .IR resend ,
1569 but does not add any header lines.
1570 This is not a way to hide the sender's identity,
1571 but useful for sending a message again
1572 to the same recipients.
1574 .B resend
1575 Takes a list of messages and a user name
1576 and sends each message to the named user.
1577 `Resent-From:' and related header fields are prepended
1578 to the new copy of the message.
1580 .B Respond
1581 Same as
1582 .IR Reply .
1584 .B respond
1585 Same as
1586 .IR reply .
1588 .B respondall
1589 Same as
1590 .IR replyall .
1592 .B respondsender
1593 Same as
1594 .IR replysender .
1596 .B retain
1597 Add the list of header fields named to the retained list.
1598 Only the header fields in the retain list are shown
1599 on the terminal when a message is printed.
1600 All other header fields are suppressed.
1601 The Type and Print commands can be used
1602 to print a message in its entirety.
1603 If retain is executed with no arguments,
1604 it lists the current set of retained fields.
1606 .B Save
1608 Similar to
1609 .IR save ,
1610 but saves the messages
1611 in a file named after the local part
1612 of the sender of the first message
1613 instead of taking a filename argument.
1615 .B save
1616 (s) Takes a message list and a filename
1617 and appends each message
1618 in turn to the end of the file.
1619 If no filename is given,
1620 the mbox file is used.
1621 The filename in quotes,
1622 followed by the line count and character count
1623 is echoed on the user's terminal.
1624 If editing a system mailbox,
1625 the messages are marked for deletion.
1626 Compressed files and IMAP mailboxes are handled as described for the
1627 .I \-f
1628 command line option above.
1630 .B savediscard
1631 Same as saveignore.
1633 .B saveignore
1634 Saveignore is to save what ignore is to print and type.
1635 Header fields thus marked are filtered out
1636 when saving a message by save
1637 or when automatically saving to mbox.
1638 This command should only be applied to header fields
1639 that do not contain information needed to decode the message,
1640 as MIME content fields do.
1641 If saving messages on an IMAP account,
1642 ignoring fields makes it impossible
1643 to copy the data directly on the server,
1644 thus operation usually becomes much slower.
1646 .B saveretain
1647 Saveretain is to save what retain is to print and type.
1648 Header fields thus marked are the only ones
1649 saved with a message when saving by save
1650 or when automatically saving to mbox.
1651 Saveretain overrides saveignore.
1652 The use of this command is strongly discouraged
1653 since it may strip header fields
1654 that are needed to decode the message correctly.
1656 .B score
1657 (sc) Takes a message list and a floating point number
1658 and adds the number to the score of each given message.
1659 All messages start at score 0 when a folder is opened.
1660 When the score of a message becomes negative, it is `killed'
1661 with the effects described for the
1662 .I kill
1663 command;
1664 otherwise if it was negative before and becomes positive,
1665 it is `unkilled'.
1666 Scores only refer to the currently opened instance of a folder.
1668 .B set
1669 (se) With no arguments, prints all variable values,
1670 piped through the pager if the output does not fit on the screen.
1671 Otherwise, sets option.
1672 Arguments are of the form option=value
1673 (no space before or after =)
1674 or option.
1675 Quotation marks may be placed around any part of the
1676 assignment statement to quote blanks
1677 or tabs, i.\|e. `\fIset indentprefix="\->"\fR'.
1678 If an argument begins with
1679 .BR no ,
1680 as in `\fBset no\fIsave\fR',
1681 the effect is the same as invoking the
1682 .I unset
1683 command with the remaining part of the variable
1684 (`\fIunset \fIsave\fR').
1686 .B seen
1687 Takes a message list and marks all messages as having been read.
1689 .B shell
1690 (sh) Invokes an interactive version of the shell.
1692 .B shortcut
1693 Defines a shortcut name and its string for expansion,
1694 as described for the
1695 .I folder
1696 command.
1697 With no arguments,
1698 a list of defined shortcuts is printed.
1700 .B show
1701 (Sh) Like
1702 .IR print ,
1703 but performs neither MIME decoding nor decryption
1704 so that the raw message text is shown.
1706 .B size
1707 Takes a message list and prints out
1708 the size in characters of each message.
1710 .B sort
1711 Create a sorted representation of the current folder,
1712 and change the
1713 .I next
1714 command and the addressing modes
1715 such that they refer to messages in the sorted order.
1716 Message numbers are the same as in regular mode.
1717 If the
1718 .I header
1719 variable is set,
1720 a header summary in the new order is also printed.
1721 Possible sorting criteria are:
1724 .B date
1725 Sort the messages by their `Date:' field,
1726 that is by the time they were sent.
1728 .B from
1729 Sort messages by the value of their `From:' field,
1730 that is by the address of the sender.
1731 If the
1732 .I showname
1733 variable is set,
1734 the sender's real name (if any) is used.
1736 .B size
1737 Sort the messages by their size.
1739 .B score
1740 Sort the messages by their score.
1742 .B status
1743 Sort the messages by their message status
1744 (new, read, old, etc.).
1746 .B subject
1747 Sort the messages by their subject.
1749 .B thread
1750 Create a threaded order,
1751 as with the
1752 .I thread
1753 command.
1755 .B to
1756 Sort messages by the value of their `To:' field,
1757 that is by the address of the recipient.
1758 If the
1759 .I showname
1760 variable is set,
1761 the recipient's real name (if any) is used.
1764 If no argument is given,
1765 the current sorting criterion is printed.
1767 .B source
1768 The source command reads commands from a file.
1770 .B thread
1771 (th) Create a threaded representation of the current folder,
1772 i.\|e. indent messages that are replies to other messages
1773 in the header display,
1774 and change the
1775 .I next
1776 command and the addressing modes
1777 such that they refer to messages in the threaded order.
1778 Message numbers are the same as in unthreaded mode.
1779 If the
1780 .I header
1781 variable is set,
1782 a header summary in threaded order is also printed.
1784 .B top
1785 Takes a message list and prints the top few lines of each.
1786 The number of lines printed is controlled
1787 by the variable toplines
1788 and defaults to five.
1790 .B touch
1791 Takes a message list
1792 and marks the messages for saving in the
1793 .I mbox
1794 file.
1795 \*(UA deviates from the POSIX standard with this command,
1796 as a `next' command issued after `mbox'
1797 will display the following message,
1798 not the current one.
1800 .B Type
1801 (T) Identical to the Print command.
1803 .B type
1804 (t) A synonym for print.
1806 .B unalias
1807 Takes a list of names defined by alias commands
1808 and discards the remembered groups of users.
1809 The group names no longer have any significance.
1811 .B unanswered
1812 Takes a message list and marks each message
1813 as not having been answered.
1815 .B uncollapse
1816 (unc)
1817 Only applicable to threaded mode.
1818 Takes a message list
1819 and makes the message and all replies to it visible
1820 in header summaries again.
1821 When a message becomes the current message,
1822 it is automatically made visible.
1823 Also when a message with collapsed replies is printed,
1824 all of these are automatically uncollapsed.
1826 .B undef
1827 Undefines each of the named macros.
1828 It is not an error to use a name that does not belong to
1829 one of the currently defined macros.
1831 .B undelete
1832 (u) Takes a message list and marks each message as not being deleted.
1834 .B undraft
1835 Takes a message list and marks each message
1836 as a draft.
1838 .B unflag
1839 Takes a message list and marks each message as not being `flagged'.
1841 .B unfwdignore
1842 Removes the header field names
1843 from the list of ignored fields for the
1844 .I forward
1845 command.
1847 .B unfwdretain
1848 Removes the header field names
1849 from the list of retained fields for the
1850 .I forward
1851 command.
1853 .B ungood
1854 Takes a message list and undoes the effect of a
1855 .I good
1856 command that was previously applied on exactly these messages.
1858 .B unignore
1859 Removes the header field names
1860 from the list of ignored fields.
1862 .B unjunk
1863 Takes a message list and undoes the effect of a
1864 .I junk
1865 command that was previously applied on exactly these messages.
1867 .B unkill
1868 Takes a message list and `unkills' each message.
1869 Also sets the score of the messages to 0.
1871 .B Unread
1872 Same as
1873 .IR unread .
1875 .B unread
1876 (U) Takes a message list and marks each message
1877 as not having been read.
1879 .B unretain
1880 Removes the header field names
1881 from the list of retained fields.
1883 .B unsaveignore
1884 Removes the header field names
1885 from the list of ignored fields for saving.
1887 .B unsaveretain
1888 Removes the header field names
1889 from the list of retained fields for saving.
1891 .B unset
1892 Takes a list of option names and discards their remembered
1893 values;
1894 the inverse of set.
1896 .B unshortcut
1897 Deletes the shortcut names given as arguments.
1899 .B unsort
1900 Disable sorted or threaded mode (see the
1901 .I sort
1903 .I thread
1904 commands), return to normal message order
1905 and,
1906 if the
1907 .I header
1908 variable is set,
1909 print a header summary.
1911 .B unthread
1912 (unth) Same as
1913 .IR unsort .
1915 .B verify
1916 (verif)
1917 Takes a message list and verifies each message.
1918 If a message is not an S/MIME signed message,
1919 verification will fail for it.
1920 The verification process checks
1921 if the message was signed using a valid certificate,
1922 if the message sender's email address matches
1923 one of those contained within the certificate,
1924 and if the message content has been altered.
1926 .B visual
1927 (v) Takes a message list and invokes the display editor
1928 on each message.
1929 Modified contents are discarded
1930 unless the
1931 .I writebackedited
1932 variable is set.
1934 .B write
1935 (w) For conventional messages,
1936 the body without all headers is written.
1937 The output is decrypted and converted
1938 to its native format, if necessary.
1939 If the output file exists,
1940 the text is appended.\(emIf a message is in MIME multipart format,
1941 its first part is written to the specified file
1942 as for conventional messages,
1943 and the user is asked for a filename
1944 to save each other part;
1945 if the contents of the first part are not to be saved,
1946 `write /dev/null' can be used.
1947 For the second and subsequent parts,
1948 if the filename given starts with a `|' character,
1949 the part is piped through the remainder of the filename
1950 interpreted as a shell command.
1951 In non-interactive mode, only the parts of the multipart message
1952 that have a filename given in the part header are written,
1953 the other are discarded.
1954 The original message is never marked for deletion
1955 in the originating mail folder.
1956 For attachments,
1957 the contents of the destination file are overwritten
1958 if the file previously existed.
1959 No special handling of compressed files is performed.
1961 .B xit
1962 (x) A synonym for exit.
1964 .B z
1965 \*(UA presents message headers in windowfuls
1966 as described under the headers command.
1967 The z command scrolls to the next window of messages.
1968 If an argument is given,
1969 it specifies the window to use.
1970 A number prefixed by `+' or `\-' indicates
1971 that the window is calculated in relation
1972 to the current position.
1973 A number without a prefix specifies an
1974 absolute window number,
1975 and a `$' lets \*(UA scroll
1976 to the last window of messages.
1978 .B Z
1979 Similar to
1980 .IR z ,
1981 but scrolls to the next or previous window
1982 that contains at least one new or `flagged' message.
1983 .SS "Tilde escapes"
1984 Here is a summary of the tilde escapes,
1985 which are used when composing
1986 messages to perform special functions.
1987 Tilde escapes are only recognized
1988 at the beginning of lines.
1989 The name `\fItilde escape\fR' is somewhat of a misnomer
1990 since the actual escape character can be set
1991 by the option escape.
1993 .BI ~! command
1994 Execute the indicated shell command,
1995 then return to the message.
1997 .B ~.
1998 Same effect as typing the end-of-file character.
2000 .BI ~< filename
2001 Identical to ~r.
2003 .BI ~<! command
2004 Command is executed using the shell.
2005 Its standard output is inserted into the message.
2007 \fB~@\fR [\fIfilename\fR .\ .\ . ]
2008 With no arguments, edit the attachment list.
2009 First, the user can edit all existing attachment data.
2010 If an attachment's file name is left empty,
2011 that attachment is deleted from the list.
2012 When the end of the attachment list is reached,
2013 \*(UA will ask for further attachments,
2014 until an empty file name is given.
2015 If \fIfilename\fP arguments are specified,
2016 all of them are appended to the end of the attachment list.
2017 Filenames which contain white space
2018 can only be specified
2019 with the first method (no \fIfilename\fP arguments).
2021 .B ~A
2022 Inserts the string contained in the
2023 .I Sign
2024 variable
2025 (same as `~i Sign').
2026 The escape sequences `\fB\et\fR' (tabulator) and `\fB\en\fR' (newline)
2027 are understood.
2029 .B ~a
2030 Inserts the string contained in the
2031 .B sign
2032 variable
2033 (same as `~i sign').
2034 The escape sequences `\fB\et\fR' (tabulator) and `\fB\en\fR' (newline)
2035 are understood.
2037 .BI ~b "name .\ .\ ."
2038 Add the given names to the list of carbon copy recipients
2039 but do not make the names visible in the Cc: line
2040 (`blind' carbon copy).
2042 .BI ~c "name .\ .\ ."
2043 Add the given names to the list of carbon copy recipients.
2045 .B ~d
2046 Read the file `dead.letter' from the user's home directory
2047 into the message.
2049 .B ~e
2050 Invoke the text editor on the message collected so far.
2051 After the editing session is finished,
2052 the user may continue appending text
2053 to the message.
2055 .BI ~f messages
2056 Read the named messages into the message being sent.
2057 If no messages are specified,
2058 read in the current message.
2059 Message headers currently being ignored
2060 (by the ignore or retain command)
2061 are not included.
2062 For MIME multipart messages,
2063 only the first printable part is included.
2065 .BI ~F messages
2066 Identical to ~f, except all message headers and
2067 all MIME parts are included.
2069 .B ~h
2070 Edit the message header fields
2071 `To:', `Cc:', `Bcc:', and `Subject:'
2072 by typing each one in turn
2073 and allowing the user to append text
2074 to the end or modify the field
2075 by using the current terminal erase and kill characters.
2077 .B ~H
2078 Edit the message header fields
2079 `From:', `Reply-To:', `Sender:', and `Organization:'
2080 in the same manner as described for
2081 .IR ~h .
2082 The default values for these fields originate from the
2083 .IR from ,
2084 .IR replyto ,
2086 .I ORGANIZATION
2087 variables.
2088 If this tilde command has been used,
2089 changing the variables has no effect on the current message anymore.
2091 .BI ~i variable
2092 Insert the value of the specified variable
2093 into the message adding a newline character at the end.
2094 If the variable is unset or empty,
2095 the message remains unaltered.
2096 The escape sequences `\fB\et\fR' (tabulator) and `\fB\en\fR' (newline)
2097 are understood.
2099 .BI ~m messages
2100 Read the named messages into the message being sent,
2101 indented by a tab or by the value of indentprefix.
2102 If no messages are specified,
2103 read the current message.
2104 Message headers currently being ignored
2105 (by the ignore or retain command)
2106 are not included.
2107 For MIME multipart messages,
2108 only the first printable part is included.
2110 .BI ~M messages
2111 Identical to ~m, except all message headers and
2112 all MIME parts are included.
2114 .B ~p
2115 Print out the message collected so far,
2116 prefaced by the message header fields
2117 and followed by the attachment list, if any.
2118 If the message text is longer than the screen size,
2119 it is piped through the pager.
2121 .B ~q
2122 Abort the message being sent,
2123 copying the message to
2124 `dead.letter' in the user's home directory
2125 if save is set.
2127 .BI ~r filename
2128 Read the named file into the message.
2130 .BI ~s string
2131 Cause the named string to become the current subject field.
2133 .BI ~t "name .\ .\ ."
2134 Add the given names to the direct recipient list.
2136 .B ~v
2137 Invoke an alternate editor
2138 (defined by the VISUAL option)
2139 on the message collected so far.
2140 Usually, the alternate editor
2141 will be a screen editor.
2142 After the editor is quit,
2143 the user may resume appending text
2144 to the end of the message.
2146 .BI ~w filename
2147 Write the message onto the named file.
2148 If the file exists,
2149 the message is appended to it.
2151 .B ~x
2152 Same as ~q,
2153 except that the message is not saved to the `dead.letter' file.
2155 .BI ~| command
2156 Pipe the message through the command as a filter.
2157 If the command gives no output or terminates abnormally,
2158 retain the original text of the message.
2159 The command
2160 .IR fmt (1)
2161 is often used
2162 as command to rejustify the message.
2164 .BI ~: \*(ua-command
2165 Execute the given \*(UA command.
2166 Not all commands, however, are allowed.
2168 .BI ~_ \*(ua-command
2169 Identical to ~:.
2171 .BI ~~ string
2172 Insert the string of text in the message
2173 prefaced by a single ~.
2174 If the escape character has been changed,
2175 that character must be doubled
2176 in order to send it at the beginning of a line.
2177 .SS "Variable options"
2178 Options are controlled via set and unset commands,
2179 see their entries for a syntax description.
2180 An option is also set
2181 if it is passed to \*(UA
2182 as part of the environment
2183 (this is not restricted to specific variables as in the POSIX standard).
2184 A value given in a startup file overrides
2185 a value imported from the environment.
2186 Options may be either binary,
2187 in which case it is only significant
2188 to see whether they are set or not;
2189 or string, in which case the actual value is of interest.
2190 .SS "Binary options"
2192 The binary options include the following:
2194 .B allnet
2195 Causes only the local part to be evaluated
2196 when comparing addresses.
2198 .B append
2199 Causes messages saved in mbox to be appended to the end
2200 rather than prepended.
2201 This should always be set.
2203 .BR ask \ or \ asksub
2204 Causes \*(UA to prompt for the subject
2205 of each message sent.
2206 If the user responds with simply a newline,
2207 no subject field will be sent.
2209 .B askatend
2210 Causes the prompts for `Cc:' and `Bcc:' lists
2211 to appear after the message has been edited.
2213 .B askattach
2214 If set, \*(UA asks for files to attach at the end of each message.
2215 Responding with a newline indicates not to include an attachment.
2217 .B askcc
2218 Causes the user to be prompted
2219 for additional carbon copy recipients
2220 (at the end of each message if
2221 .I askatend
2223 .I bsdcompat
2224 is set).
2225 Responding with a newline
2226 indicates the user's satisfaction with the current list.
2228 .B askbcc
2229 Causes the user to be prompted
2230 for additional blind carbon copy recipients
2231 (at the end of each message if
2232 .I askatend
2234 .I bsdcompat
2235 is set).
2236 Responding with a newline
2237 indicates the user's satisfaction with the current list.
2239 .B asksign
2240 Causes the user to be prompted
2241 if the message is to be signed
2242 at the end of each message.
2244 .I smime-sign
2245 variable is ignored when this variable is set.
2247 .B autocollapse
2248 Causes threads to be collapsed automatically when
2249 threaded mode is entered
2250 (see the
2251 .I collapse
2252 command).
2254 .B autoinc
2255 Same as
2256 .IR newmail .
2258 .B autoprint
2259 Causes the delete command to behave like dp \-
2260 thus, after deleting a message,
2261 the next one will be typed automatically.
2263 .B autothread
2264 Causes threaded mode (see the
2265 .I thread
2266 command) to be entered automatically
2267 when a folder is opened.
2269 .B bang
2270 Enables the substitution of `\fB!\fR'
2271 by the contents of the last command line
2272 in shell escapes.
2274 .B bsdannounce
2275 Causes automatic display of a header summary after executing a
2276 .I folder
2277 command.
2279 .B bsdcompat
2280 Sets some cosmetical features to traditional BSD style;
2281 has the same affect as setting `askatend' and
2282 all other variables prefixed with `bsd',
2283 setting prompt to `&\ ', and changing the default pager to
2284 .IR more .
2286 .B bsdflags
2287 Changes the letters printed in the first column of a header summary
2288 to traditional BSD style.
2290 .B bsdheadline
2291 Changes the display of columns in a header summary
2292 to traditional BSD style.
2294 .B bsdmsgs
2295 Changes some informational messages
2296 to traditional BSD style.
2298 .B bsdorder
2299 Causes the `Subject:' field to appear
2300 immediately after the `To:' field
2301 in message headers and with the
2302 .I ~h
2303 tilde command.
2305 .B bsdset
2306 Changes the output format of the
2307 .I set
2308 command to traditional BSD style.
2310 .B chained-junk-tokens
2311 Normally, the Bayesian junk mail filter bases its classifications
2312 on single word tokens extracted from messages.
2313 If this option is set,
2314 adjacent words are combined to pairs,
2315 which are then used as additional tokens.
2316 This usually improves the accuracy of the filter,
2317 but also increases the junk mail database
2318 five- to tenfold.
2320 .B datefield
2321 The date in a header summary
2322 is normally the date of the mailbox `From\ ' line of the message.
2323 If this variable is set,
2324 the date as given in the `Date:' header field is used,
2325 converted to local time.
2327 .B debug
2328 Prints debugging messages and disables the actual delivery of messages.
2329 Unlike
2330 .IR verbose ,
2331 this option is intended for \*(UA development only.
2333 .B disconnected
2334 When an IMAP mailbox is selected and this variable is set,
2335 no connection to the server is initiated.
2336 Instead, data is obtained from the local cache (see
2337 .IR imap-cache ).
2338 Mailboxes that are not present in the cache
2339 and messages that have not yet entirely been fetched from the server
2340 are not available;
2341 to fetch all messages in a mailbox at once,
2342 the command `copy * /dev/null' can be used
2343 while still in
2344 .I online
2345 mode.
2346 Changes that are made to IMAP mailboxes in disconnected mode
2347 are queued and committed later
2348 when a connection to that server is opened in online mode.
2349 This procedure is not completely reliable
2350 since it cannot be guaranteed that the IMAP unique identifiers (UIDs)
2351 on the server still match the ones in the cache at that time.
2352 Data is saved to `dead.letter' when this problem occurs.
2354 \fBdisconnected-\fIuser\fB@\fIhost\fR
2355 The specified account is handled as described for the
2356 .I disconnected
2357 variable above,
2358 but other accounts are not affected.
2360 .B dot
2361 The binary option dot causes \*(UA to interpret
2362 a period alone on a line
2363 as the terminator of a message the user is sending.
2365 .B editheaders
2366 When a message is edited while being composed,
2367 its header is included in the editable text.
2368 `To:', `Cc:', `Bcc:', `Subject:', `From:', `Reply-To:', `Sender:',
2369 and 'Organization:'
2370 fields are accepted within the header,
2371 other fields are ignored.
2373 .B emptybox
2374 If set, an empty mailbox file is not removed.
2375 This may improve the interoperability with other mail user agents
2376 when using a common folder directory.
2378 .B emptystart
2379 If the mailbox is empty,
2380 \*(UA normally prints \fI`No mail for user'\fR
2381 and exits immediately.
2382 If this option is set,
2383 \*(UA starts even with an empty mailbox.
2385 .B flipr
2386 Exchanges the
2387 .I Respond
2388 with the
2389 .I respond
2390 commands and vice-versa.
2392 .B forward-as-attachment
2393 Original messages are normally sent as inline text with the
2394 .I forward
2395 command,
2396 and only the first part of a multipart message is included.
2397 With this option,
2398 messages are sent as MIME
2399 .I message/rfc822
2400 attachments,
2401 and all of their parts are included.
2403 .I fwdignore
2405 .I fwdretain
2406 options are ignored when the
2407 .I forward-as-attachment
2408 option is set.
2410 .B fullnames
2411 When replying to a message,
2412 \*(UA normally removes the comment parts of email addresses,
2413 which by convention contain the full names of the recipients.
2414 If this variable is set,
2415 such stripping is not performed,
2416 and comments are retained.
2418 .B header
2419 Causes the header summary to be written at startup
2420 and after commands that affect the number of messages
2421 or the order of messages in the current folder;
2422 enabled by default.
2424 .B hold
2425 This option is used to hold messages
2426 in the system mailbox by default.
2428 .B ignore
2429 Causes interrupt signals from the terminal
2430 to be ignored and echoed as @'s.
2432 .B ignoreeof
2433 An option related to dot is ignoreeof
2434 which makes \*(UA refuse to
2435 accept a control-d as the end of a message.
2436 Ignoreeof also applies to \*(UA command mode.
2438 .B imap-use-starttls
2439 Causes \*(UA to issue a STARTTLS command
2440 to make an unencrypted IMAP session SSL/TLS encrypted.
2441 This functionality is not supported by all servers,
2442 and is not used if the session is already encrypted by the IMAPS method.
2444 \fBimap-use-starttls-\fIuser\fB@\fIhost\fR
2445 Activates
2446 .I imap-use-starttls
2447 for a specific account.
2449 .B keep
2450 This option causes \*(UA to truncate the user's system mailbox
2451 instead of deleting it when it is empty.
2452 This should always be set,
2453 since it prevents malicious users
2454 from creating fake mail folders
2455 in a world-writable spool directory.
2457 .B keepsave
2458 When a message is saved,
2459 it is usually discarded
2460 from the originating folder
2461 when \*(UA is quit.
2462 Setting this option
2463 causes all saved message to be retained.
2465 .B markanswered
2466 When a message is replied to
2467 and this variable is set,
2468 it is marked as having been answered.
2469 This mark has no technical meaning in the mail system;
2470 it just causes messages to be marked in the header summary,
2471 and makes them specially addressable.
2473 .B metoo
2474 Usually, when a group is expanded
2475 that contains the sender,
2476 the sender is removed from the expansion.
2477 Setting this option causes
2478 the sender to be included in the group.
2480 .B newmail
2481 Checks for new mail in the current folder
2482 each time the prompt is printed.
2483 For IMAP mailboxes,
2484 the server is then polled for new mail,
2485 which may result in delayed operation
2486 if the connection to the server is slow.
2488 .I maildir
2489 folder must be re-scanned to determine
2490 if new mail has arrived.
2492 If this variable is set to the special value
2493 .BR nopoll ,
2494 an IMAP server is not actively asked for new mail,
2495 but new mail may still be detected and announced
2496 with any other IMAP command that is sent to the server.
2498 .I maildir
2499 folder is not scanned then.
2501 In any case,
2502 the IMAP server may send notifications about messages
2503 that have been deleted on the server
2504 by another process or client.
2505 In this case, `Expunged \fIn\fR messages' is printed
2506 regardless of this variable,
2507 and message numbers may have changed.
2509 .B noheader
2510 Setting the option noheader is the same
2511 as giving the \-N flag on the command line.
2513 .B outfolder
2514 Causes the filename given in the
2515 .I record
2516 variable
2517 and the sender-based filenames for the
2518 .I Copy
2520 .I Save
2521 commands
2522 to be interpreted relative to the directory given in the
2523 .I folder
2524 variable rather than to the current directory
2525 unless it is an absolute pathname.
2527 .B page
2528 If set, each message the \fIpipe\fR command prints out
2529 is followed by a formfeed character.
2531 .B piperaw
2532 Send messages to the
2533 .I pipe
2534 command without performing MIME and character set conversions.
2536 .B pop3-use-apop
2537 If this variable is set,
2538 the APOP authentication method is used
2539 when a connection to a POP3 server is initiated.
2540 The advantage of this method over the usual USER/PASS authentication is
2541 that the password is not sent over the network in clear text.
2542 The connection fails
2543 if the server does not support the APOP command.
2545 \fBpop3-use-apop-\fIuser\fB@\fIhost\fR
2546 Enables
2547 .I pop3-use-apop
2548 for a specific account.
2550 .B pop3-use-starttls
2551 Causes \*(UA to issue a STLS command
2552 to make an unencrypted POP3 session SSL/TLS encrypted.
2553 This functionality is not supported by all servers,
2554 and is not used if the session is already encrypted by the POP3S method.
2556 \fBpop3-use-starttls-\fIuser\fB@\fIhost\fR
2557 Activates
2558 .I pop3-use-starttls
2559 for a specific account.
2561 .B print-all-chars
2562 This option causes all characters to be considered printable.
2563 It is only effective if given in a startup file.
2564 With this option set,
2565 some character sequences in messages
2566 may put the user's terminal in an undefined state
2567 when printed;
2568 it should only be used as a last resort
2569 if no working system locale can be found.
2571 .B print-alternatives
2572 When a MIME message part of type
2573 .I multipart/alternative
2574 is displayed and it contains a subpart of type
2575 .IR text/plain ,
2576 other parts are normally discarded.
2577 Setting this variable causes all subparts to be displayed,
2578 just as if the surrounding part was of type
2579 .IR multipart/mixed .
2581 .B quiet
2582 Suppresses the printing of the version when first invoked.
2584 .B recipients-in-cc
2585 On group replies, specify only the sender of the original mail
2586 in \fI`To:'\fR and mention it's other recipients in the secondary
2587 \fI`Cc:'\fR.
2589 .B record-resent
2590 If both this variable and the
2591 .I record
2592 variable are set,
2594 .I resend
2596 .I Resend
2597 commands save messages to the
2598 .I record
2599 folder as it is normally only done for newly composed messages.
2601 .B reply-in-same-charset
2602 If this variable is set,
2603 \*(UA first tries to use the same character set
2604 of the original message for replies.
2605 If this fails,
2607 .I sendcharsets
2608 variable is evaluated as usual.
2610 .B Replyall
2611 Reverses the sense of reply and Reply commands.
2613 .B save
2614 When the user aborts a message
2615 with two RUBOUT (interrupt characters)
2616 \*(UA copies the partial letter
2617 to the file `dead.letter' in the home directory.
2618 This option is set by default.
2620 .B searchheaders
2621 If this option is set, then
2622 a message-list specifier in the form `\fI/x:y\fR'
2623 will expand to all messages containing
2624 the substring `\fIy\fR' in the header field `\fIx\fR'.
2625 The string search is case insensitive.
2627 .B sendwait
2628 When sending a message,
2629 wait until the mail transfer agent exits
2630 before accepting further commands.
2631 If the mail transfer agent returns a non-zero exit status,
2632 the exit status of \*(ua will also be non-zero.
2634 .B showlast
2635 Setting this option causes \*(UA to start at the
2636 last message instead of the first one when opening a mail folder.
2638 .B showname
2639 Causes \*(UA
2640 to use the sender's real name instead of the plain address
2641 in the header field summary and in message specifications.
2643 .B showto
2644 Causes the recipient of the message to be shown in the header summary
2645 if the message was sent by the user.
2647 .B skipemptybody
2648 If an outgoing message does not contain any text
2649 in its first or only message part,
2650 do not send it but discard it silently
2651 (see also the
2652 .I \-E
2653 option).
2655 .B smime-force-encryption
2656 Causes \*(UA
2657 to refuse sending unencrypted messages.
2659 .B smime-sign
2660 If this variable is set,
2661 outgoing messages are S/MIME signed with the user's private key.
2662 Signing a message enables a recipient to verify
2663 that the sender used a valid certificate,
2664 that the email addresses in the certificate
2665 match those in the message header,
2666 and that the message content has not been altered.
2667 It does not change the message text,
2668 and people will be able to read the message as usual.
2670 .B smime-no-default-ca
2671 Do not load the default CA locations
2672 when verifying S/MIME signed messages.
2673 Only applicable if S/MIME support is built using OpenSSL.
2675 .B smtp-use-starttls
2676 Causes \*(UA to issue a STARTTLS command
2677 to make an SMTP session SSL/TLS encrypted.
2678 Not all servers support this command;
2679 because of common implementation defects,
2680 it cannot be automatically determined
2681 whether a server supports it or not.
2683 .B ssl-no-default-ca
2684 Do not load the default CA locations
2685 to verify SSL/TLS server certificates.
2686 Only applicable if SSL/TLS support is built using OpenSSL.
2688 .B ssl-v2-allow
2689 Accept SSLv2 connections.
2690 These are normally not allowed
2691 because this protocol version is insecure.
2693 .B verbose
2694 Setting the option verbose is the same
2695 as using the \-v flag on the command line.
2696 When \*(UA runs in verbose mode,
2697 details of the actual message delivery
2698 and protocol conversations for IMAP, POP3, and SMTP,
2699 as well as of other internal processes,
2700 are displayed on the user's terminal,
2701 This is sometimes useful to debug problems.
2702 \*(UA prints all data that is sent to remote servers in clear texts,
2703 including passwords,
2704 so care should be taken that no unauthorized option
2705 can view the screen if this option is enabled.
2707 .B writebackedited
2708 If this variable is set,
2709 messages modified using the
2710 .I edit
2712 .I visual
2713 commands are written back to the current folder when it is quit.
2714 This is only possible for writable folders in
2715 .I mbox
2716 format.
2717 Setting this variable also disables
2718 MIME decoding and decryption for the editing commands.
2719 .SS "String Options"
2721 The string options include the following:
2723 .B attrlist
2724 A sequence of characters to print in the `attribute'
2725 column of a header summary,
2726 each for one type of messages in the following order:
2727 new,
2728 unread but old,
2729 new but read,
2730 read and old,
2731 saved,
2732 preserved,
2733 mboxed,
2734 flagged,
2735 answered,
2736 draft,
2737 killed,
2738 start of a collapsed thread,
2739 collapsed,
2740 classified as junk.
2741 The default is `NUROSPMFATK+\-J',
2742 or `NU\ \ *HMFATK+\-J' if
2743 .I bsdflags
2744 or the
2745 .I SYSV3
2746 environment variable
2747 are set.
2749 .B autobcc
2750 Specifies a list of recipients to which
2751 a blind carbon copy of each outgoing message
2752 will be sent automatically.
2754 .B autocc
2755 Specifies a list of recipients to which
2756 a carbon copy of each outgoing message
2757 will be sent automatically.
2759 .B autosort
2760 Causes sorted mode (see the
2761 .I sort
2762 command) to be entered automatically
2763 with the value of this option as sorting method
2764 when a folder is opened.
2766 .B cmd
2767 The default value for the \fIpipe\fR command.
2769 .B crt
2770 The valued option crt is used as a threshold
2771 to determine how long a message must be
2772 before PAGER is used to read it.
2773 If crt is set without a value,
2774 then the height of the terminal screen stored in the system
2775 is used to compute the threshold (see
2776 .IR stty (1)).
2778 .B DEAD
2779 The name of the file to use
2780 for saving aborted messages.
2781 This defaults to `dead.letter'
2782 in the user's home directory.
2784 .B EDITOR
2785 Pathname of the text editor to use
2786 in the edit command and ~e escape.
2787 If not defined,
2788 then a default editor is used.
2790 .B encoding
2791 The default MIME encoding to use
2792 in outgoing text messages and message parts.
2793 Valid values are \fI8bit\fR or \fIquoted-printable\fR.
2794 The default is \fI8bit\fR.
2795 In case the mail transfer system
2796 is not ESMTP compliant,
2797 \fIquoted-printable\fR should be used instead.
2798 If there is no need to encode a message,
2799 \fI7bit\fR transfer mode is used,
2800 without regard to the value of this variable.
2801 Binary data is always encoded in \fIbase64\fR mode.
2803 .B escape
2804 If defined, the first character of this option
2805 gives the character to use in the place of ~ to denote escapes.
2807 .B folder
2808 The name of the directory to use
2809 for storing folders of messages.
2810 All folder names that begin with `+'
2811 refer to files below that directory.
2812 If the directory name begins with a `/',
2813 \*(UA considers it to be an absolute pathname;
2814 otherwise, the folder directory is found
2815 relative to the user's home directory.
2817 The directory name may also refer to an IMAP account;
2818 any names that begin with `+'
2819 then refer to IMAP mailboxes on that account.
2820 An IMAP folder is normally given in the form
2823     imaps://mylogin@imap.myisp.example
2826 In this case,
2827 the `+' and `@' prefixes for folder names
2828 have the same effect
2829 (see the
2830 .I folder
2831 command).
2833 Some IMAP servers do not accept the creation of mailboxes
2834 in the hierarchy base;
2835 they require that they are created as subfolders of `INBOX'.
2836 With such servers,
2837 a folder name of the form
2840     imaps://mylogin@imap.myisp.example/INBOX.\&
2843 should be used
2844 (the last character is the server's hierarchy delimiter).
2845 Folder names prefixed by `+' will then refer to folders below `INBOX',
2846 while folder names prefixed by `@'
2847 refer to folders below the hierarchy base.
2848 See the
2849 .I imap namespace
2850 command for a method to detect the appropriate prefix and delimiter.
2852 .B folder-hook
2853 When a folder is opened and this variable is set,
2854 the macro corresponding to the value of this variable is executed.
2855 The macro is also invoked when new mail arrives,
2856 but message lists for commands executed from the macro
2857 only include newly arrived messages then.
2859 \fBfolder-hook-\fIfullname\fR
2860 When a folder named
2861 .I fullname
2862 is opened,
2863 the macro corresponding to the value of this variable is executed.
2864 Unlike other folder specifications,
2865 the fully expanded name of a folder, without metacharacters,
2866 is used to avoid ambiguities.
2867 The macro specified with
2868 .I folder-hook
2869 is not executed if this variable is effective for a folder
2870 (unless it is explicitly invoked within the called macro).
2872 .B from
2873 The address (or a list of addresses)
2874 to put into the \fI`From:'\fR field of the message header.
2875 If replying to a message,
2876 these addresses are handled as if they were in the alternates list.
2877 .\" If this variable is set,
2878 .\" a \fI`Sender:'\fR field containing the user's name
2879 .\" is also generated,
2880 .\" unless the variable \fIsmtp\fR is set
2881 .\" and its value differs from \fIlocalhost\fR.
2882 If the machine's hostname is not valid at the Internet
2883 (for example at a dialup machine),
2884 either this variable or
2885 .I hostname
2886 have to be set or \*(UA will not generate Message-ID header fields
2887 but leave that task up to a (obviously present) local Mail Transfer
2888 Agent (MTA).
2890 .I from
2891 contains more than one address,
2893 .I sender
2894 variable must also be set.
2896 .B fwdheading
2897 The string to print before the text of a message
2898 with the
2899 .I forward
2900 command
2901 (unless the
2902 .I forward-as-attachment
2903 variable is set).
2904 Defaults to ``-------- Original Message --------'' if unset.
2905 If it is set to the empty string,
2906 no heading is printed.
2908 .B headline
2909 A format string to use for the header summary,
2910 similar to
2911 .I printf
2912 formats.
2913 A `%' character introduces a format specifier.
2914 It may be followed by a number indicating the field width.
2915 If the field is a number,
2916 the width may be negative,
2917 which indicates that it is to be left-aligned.
2918 Valid format specifiers are:
2920 .in +4m
2922 l4fB l.
2923 %a      Message attributes.
2924 %c      The score of the message.
2925 %d      The date when the message was received.
2926 %e      The indenting level in threaded mode.
2927 %f      The address of the message sender.
2928 %i      The message thread structure.
2929 %l      The number of lines of the message.
2930 %m      Message number.
2931 %o      The number of octets (bytes) in the message.
2932 %s      Message subject (if any).
2933 %S      Message subject (if any) in double quotes.
2934 %t      The position in threaded/sorted order.
2935 %>      A `>' for the current message, otherwise ` '.
2936 %<      A `<' for the current message, otherwise ` '.
2937 %%      A `%' character.
2939 .in -4m
2941 The default is `%>\&%a\&%m\ %18f\ %16d\ %4l/%\-5o\ %i%s',
2942 or `%>\&%a\&%m\ %20f\ \ %16d\ %3l/%\-5o\ %i%S' if
2943 .I bsdcompat
2944 is set.
2946 .B hostname
2947 Use this string as hostname
2948 when expanding local addresses instead of the value obtained from
2949 .IR uname (2)
2951 .IR getaddrinfo (3).
2952 Note that this must be set explicitly to become used for the
2953 generation of Message-ID fields.
2955 .B imap-auth
2956 Sets the IMAP authentication method.
2957 Valid values are `login' for the usual password-based authentication
2958 (the default),
2959 `cram-md5', which is a password-based authentication
2960 that does not send the password over the network in clear text,
2961 and `gssapi' for GSSAPI-based authentication.
2963 \fBimap-auth-\fIuser\fB@\fIhost\fR
2964 Sets the IMAP authentication method for a specific account.
2966 .B imap-cache
2967 Enables caching of IMAP mailboxes.
2968 The value of this variable must point to a directory
2969 that is either existent or can be created by \*(UA.
2970 All contents of the cache can be deleted by \*(UA
2971 at any time;
2972 it is not safe to make assumptions about them.
2974 .B imap-keepalive
2975 IMAP servers may close the connection
2976 after a period of inactivity;
2977 the standard requires this to be at least 30 minutes,
2978 but practical experience may vary.
2979 Setting this variable to a numeric
2980 .I value
2981 greater than 0
2982 causes a NOOP command to be sent each
2983 .I value
2984 seconds if no other operation is performed.
2986 .B imap-list-depth
2987 When retrieving the list of folders on an IMAP server, the
2988 .I folders
2989 command stops after it has reached a certain depth
2990 to avoid possible infinite loops.
2991 The value of this variable sets the maximum depth allowed.
2992 The default is 2.
2993 If the folder separator on the current IMAP server is a slash `/',
2994 this variable has no effect,
2995 and the
2996 .I folders
2997 command does not descend to subfolders.
2999 .B indentprefix
3000 String used by the `\fI~m\fR' and `\fI~M\fR' tilde escapes
3001 and by the \fIquote\fR option
3002 for indenting messages,
3003 in place of the normal tab character (^I).
3004 Be sure to quote the value
3005 if it contains spaces or tabs.
3007 .B junkdb
3008 The location of the junk mail database.
3009 The string is treated like a folder name,
3010 as described for the
3011 .I folder
3012 command.
3014 The files in the junk mail database are normally stored in
3015 .IR compress (1)
3016 format for saving space.
3017 If processing time is considered more important,
3018 .IR uncompress (1)
3019 can be used to store them in plain form.
3020 \*(UA will then work using the uncompressed files.
3022 .B LISTER
3023 Pathname of the directory lister
3024 to use in the
3025 .I folders
3026 command
3027 when operating on local mailboxes.
3028 Default is /bin/ls.
3030 .B MAIL
3031 Is used as the user's mailbox, if set.
3032 Otherwise, a system-dependent default is used.
3033 Can be a
3034 \fIprotocol\fB://\fR
3035 string (see the
3036 .I folder
3037 command for more information).
3039 .B MBOX
3040 The name of the mbox file.
3041 It can be the name of a folder.
3042 The default is `\fImbox\fR'
3043 in the user's home directory.
3045 .B NAIL_EXTRA_RC
3046 The name of an optional startup file
3047 to be read after ~/.mailrc.
3048 This variable is ignored if it is imported from the environment;
3049 it has an effect only if it is set in /etc/nail.rc or ~/.mailrc
3050 to allow bypassing the configuration with e. g. `MAILRC=/dev/null'.
3051 Use this file for commands
3052 that are not understood by other \*(UA implementations.
3054 .B NAIL_HEAD
3055 A string to put at the beginning of each new message.
3056 The escape sequences `\fB\et\fR' (tabulator) and `\fB\en\fR' (newline)
3057 are understood.
3059 .B NAIL_TAIL
3060 A string to put at the end of each new message.
3061 The escape sequences `\fB\et\fR' (tabulator) and `\fB\en\fR' (newline)
3062 are understood.
3064 .B maximum-unencoded-line-length
3065 Messages that contain lines longer than the value of this variable
3066 are encoded in quoted-printable
3067 even if they contain only ASCII characters.
3068 The maximum effective value is 950.
3069 If set to 0,
3070 all ASCII text messages are encoded in quoted-printable.
3071 S/MIME signed messages are always encoded
3072 in quoted-printable regardless of the value of this variable.
3074 .B newfolders
3075 If this variable has the value
3076 .BR maildir ,
3077 newly created local folders will be in
3078 .I maildir
3079 format.
3081 .B nss-config-dir
3082 A directory that contains the files
3083 .RI cert N .db
3084 to retrieve certificates,
3085 .RI key N .db
3086 to retrieve private keys,
3087 and secmod.db,
3088 where
3089 .I N
3090 is a digit.
3091 These are usually taken from Mozilla installations,
3092 so an appropriate value might be
3093 `~/.mozilla/firefox/default.clm'.
3094 \*(UA opens these files read-only
3095 and does not modify them.
3096 However, if the files are modified by Mozilla
3097 while \*(UA is running,
3098 it will print a `Bad database' message.
3099 It may be necessary to create copies of these files
3100 that are exclusively used by \*(UA then.
3101 Only applicable if S/MIME and SSL/TLS support is built using
3102 Network Security Services (NSS).
3104 .B ORGANIZATION
3105 The value to put into the \fI`Organization:'\fR field of the message header.
3107 .B PAGER
3108 Pathname of the program to use
3109 in the more command
3110 or when crt variable is set.
3111 The default paginator
3112 .IR pg (1)
3113 or, in BSD compatibility mode,
3114 .IR more (1)
3115 is used
3116 if this option is not defined.
3118 \fBpassword-\fIuser\fB@\fIhost\fR
3119 Set the password for
3120 .I user
3121 when connecting to
3122 .IR host .
3123 If no such variable is defined for a host,
3124 the user will be asked for a password on standard input.
3125 Specifying passwords in a startup file
3126 is generally a security risk,
3127 the file should be readable
3128 by the invoking user only.
3130 .BI pipe- content/subcontent
3131 When a MIME message part of
3132 .I content/subcontent
3133 type is displayed or it is replied to,
3134 its text is filtered through the value of this variable
3135 interpreted as a shell command.
3136 Special care must be taken when using such commands
3137 as mail viruses may be distributed by this method;
3138 if messages of type
3139 .I application/x-sh
3140 were filtered through the shell, for example,
3141 a message sender could easily execute arbitrary code
3142 on the system \*(UA is running on.
3144 .B pop3-keepalive
3145 POP3 servers may close the connection
3146 after a period of inactivity;
3147 the standard requires this to be at least 10 minutes,
3148 but practical experience may vary.
3149 Setting this variable to a numeric
3150 .I value
3151 greater than 0
3152 causes a NOOP command to be sent each
3153 .I value
3154 seconds if no other operation is performed.
3156 .B prompt
3157 The string printed when a command is accepted.
3158 Defaults to `\fB?\ \fR',
3159 or to `\fB&\ \fR' if the
3160 .I bsdcompat
3161 variable is set.
3163 .B quote
3164 If set, \*(UA starts a replying message with the original message
3165 prefixed by the value of the variable \fIindentprefix\fR.
3166 Normally, a heading consisting of `Fromheaderfield wrote:' is printed
3167 before the quotation.
3168 If the string \fInoheading\fR is assigned to the \fIquote\fR variable,
3169 this heading is omitted.
3170 If the string \fIheaders\fR is assigned,
3171 the headers selected by the ignore/retain commands
3172 are printed above the message body,
3173 thus \fIquote\fR acts like an automatic ~m command then.
3174 If the string \fIallheaders\fR is assigned,
3175 all headers are printed above the message body,
3176 and all MIME parts are included,
3177 thus \fIquote\fR acts like an automatic ~M command then.
3179 .B quote-fold
3180 If set in addition to \fIindentprefix\fR, \*(UA interprets this
3181 number as the maximum line length of the quotation when replying to a
3182 message.
3183 Setting this turns on a more fancy quotation algorithm in that leading
3184 quotation characters are compressed and overlong lines are folded to
3185 \fIquote-fold\fR characters each, breaking at whitespace as necessary
3186 and starting the follow lines with fillers to pad up to the last
3187 quotation markers width.
3188 The value of \fIquote-fold\fR can't be smaller than the length of
3189 \fIindentprefix\fR plus some additional pad.  It is automatically
3190 adjusted to the minimum as necessary.
3192 .B record
3193 If defined, gives the pathname of the folder
3194 used to record all outgoing mail.
3195 If not defined,
3196 then outgoing mail is not so saved.
3197 When saving to this folder fails,
3198 the message is not sent
3199 but saved to the `dead.letter' file instead.
3201 .B replyto
3202 A list of addresses to put into the \fI`Reply-To:'\fR field
3203 of the message header.
3204 If replying to a message, such addresses are handled
3205 as if they were in the alternates list.
3207 .B screen
3208 When \*(UA initially prints the message headers,
3209 it determines the number to print
3210 by looking at the speed of the terminal.
3211 The faster the terminal, the more it prints.
3212 This option overrides this calculation
3213 and specifies how many message headers
3214 are printed.
3215 This number is also used
3216 for scrolling with the z command.
3218 .B sendcharsets
3219 A comma-separated list of character set names
3220 that can be used in Internet mail.
3221 When a message that contains characters not representable in US-ASCII
3222 is prepared for sending,
3223 \*(UA tries to convert its text
3224 to each of the given character sets in order
3225 and uses the first appropriate one.
3226 The default is `utf-8'.
3228 Character sets assigned to this variable should be ordered
3229 in ascending complexity.
3230 That is, the list should start with e.\|g.
3231 `iso-8859-1' for compatibility with older mail clients,
3232 might contain some other language-specific character sets,
3233 and should end with `utf-8'
3234 to handle messages that combine texts in multiple languages.
3236 .B sender
3237 An address that is put into the `Sender:' field
3238 of outgoing messages.
3239 This field needs not normally be present.
3240 It is, however, required
3241 if the `From:' field contains more than one address.
3242 It can also be used to indicate that a message
3243 was sent on behalf of somebody other;
3244 in this case, `From:' should contain the address
3245 of the person that took responsibility for the message,
3246 and `Sender:' should contain the address
3247 of the person that actually sent the message.
3249 .I sender
3250 address is handled as if it were in the
3251 .I alternates
3252 list.
3254 .B sendmail
3255 To use an alternate mail delivery system,
3256 set this option to the full pathname
3257 of the program to use.
3258 This should be used with care.
3260 .B SHELL
3261 Pathname of the shell to use
3262 in the ! command and the ~! escape.
3263 A default shell is used
3264 if this option is not defined.
3267 .B Sign
3268 A string for use with the
3269 .I ~A
3270 command.
3272 .B sign
3273 A string for use with the
3274 .I ~a
3275 command.
3277 .B signature
3278 Must correspond to the name of a readable file if set.
3279 The file's content is then appended to each singlepart message
3280 and to the first part of each multipart message.
3281 Be warned that there is no possibility
3282 to edit the signature for an individual message.
3284 .B smime-ca-dir
3285 Specifies a directory with CA certificates for verification
3286 of S/MIME signed messages.
3287 The format is the same as described in
3288 .IR SSL_CTX_load_verify_locations (3).
3289 Only applicable if S/MIME support is built using OpenSSL.
3291 .B smime-ca-file
3292 Specifies a file with CA certificates for verification
3293 of S/MIME signed messages.
3294 The format is the same as described in
3295 .IR SSL_CTX_load_verify_locations (3).
3296 Only applicable if S/MIME support is built using OpenSSL.
3298 \fBsmime-cipher-\fIuser@host\fR
3299 Specifies a cipher to use when generating S/MIME encrypted messages
3301 .IR user@host .
3302 Valid ciphers are
3303 .B rc2-40
3304 (RC2 with 40 bits),
3305 .B rc2-64
3306 (RC2 with 64 bits),
3307 .B des
3308 (DES, 56 bits)
3310 .B des-ede3
3311 (3DES, 112/168 bits).
3312 The default is 3DES.
3313 It is not recommended to use the other ciphers
3314 unless a recipient's client is actually unable to handle 3DES
3315 since they are comparatively weak;
3316 but even so, the recipient should upgrade his software in preference.
3318 .B smime-crl-file
3319 Specifies a file that contains a CRL in PEM format
3320 to use when verifying S/MIME messages.
3321 Only applicable if S/MIME support is built using OpenSSL.
3323 .B smime-crl-dir
3324 Specifies a directory that contains files with CRLs in PEM format
3325 to use when verifying S/MIME messages.
3326 Only applicable if S/MIME support is built using OpenSSL.
3328 \fBsmime-encrypt-\fIuser@host\fR
3329 If this variable is set,
3330 messages to
3331 .I user@host
3332 are encrypted before sending.
3333 If S/MIME support is built using OpenSSL,
3334 the value of the variable must be set to the name of a file
3335 that contains a certificate in PEM format.
3336 If S/MIME support is built using NSS,
3337 the value of this variable is ignored,
3338 but if multiple certificates for
3339 .I user@host
3340 are available, the
3341 .I smime-nickname-user@host
3342 variable should be set.
3343 Otherwise a certificate for the recipient
3344 is automatically retrieved from the certificate database,
3345 if possible.
3347 If a message is sent to multiple recipients,
3348 each of them for whom a corresponding variable is set
3349 will receive an individually encrypted message;
3350 other recipients will continue to receive the message in plain text
3351 unless the
3352 .I smime-force-encryption
3353 variable is set.
3354 It is recommended to sign encrypted messages,
3355 i.\|e. to also set the
3356 .I smime-sign
3357 variable.
3359 \fBsmime-nickname-\fIuser@host\fR
3360 Specifies the nickname of a certificate
3361 to be used when encrypting messages for
3362 .I user@host .
3363 Only applicable if S/MIME support is built using NSS.
3365 .B smime-sign-cert
3366 Points to a file in PEM format
3367 that contains the user's private key
3368 as well as his certificate.
3369 Both are used with S/MIME
3370 for signing and decrypting messages.
3371 Only applicable if S/MIME support is built using OpenSSL.
3373 \fBsmime-sign-cert-\fIuser@host\fR
3374 Overrides
3375 .I smime-sign-cert
3376 for the specific addresses.
3377 When signing messages and the value of the
3378 .I from
3379 variable is set
3381 .IR user@host ,
3382 the specific file is used.
3383 When decrypting messages,
3384 their recipient fields (To: and Cc:) are searched for addresses
3385 for which such a variable is set.
3386 \*(UA always uses the first address that matches,
3387 so if the same message is sent to more than one
3388 of the user's addresses using different encryption keys,
3389 decryption might fail.
3390 Only applicable if S/MIME support is built using OpenSSL.
3392 .B smime-sign-include-certs
3393 If used, this must be set to a comma-separated list of files,
3394 each of which containing a single certificate in PEM format
3395 to be included in the S/MIME message in addition to the
3396 .IR smime-sign-cert
3397 certificate.
3398 This is most useful for long certificate chains if it is
3399 desired to aid the receiving party's verification process.
3400 Only applicable if S/MIME support is built using OpenSSL.
3402 \fBsmime-sign-include-certs-\fIuser@host\fR
3403 Overrides
3404 .I smime-sign-include-certs
3405 for the specific addresses.
3406 Refer to the discussion of \fBsmime-sign-cert-\fIuser@host\fR
3407 for more on this topic.
3409 .B smime-sign-nickname
3410 Specifies that the named certificate be used for signing mail.
3411 If this variable is not set,
3412 but a single certificate matching the current
3413 .I from
3414 address is found in the database,
3415 that one is used automatically.
3416 Only applicable if S/MIME support is built using NSS.
3418 \fBsmime-sign-nickname-\fIuser@host\fR
3419 Overrides
3420 .I smime-sign-nickname
3421 for a specific address.
3422 Only applicable if S/MIME support is built using NSS.
3424 .B smtp
3425 Normally, \*(UA invokes
3426 .IR sendmail (8)
3427 directly to transfer messages.
3428 If the \fIsmtp\fR variable is set, a SMTP connection to
3429 the server specified by the value of this variable
3430 is used instead.
3431 If the SMTP server does not use the standard port,
3432 a value of \fIserver:port\fR can be given,
3433 with \fIport\fR as a name or as a number.
3435 There are two possible methods to get SSL/TLS encrypted SMTP sessions:
3436 First, the STARTTLS command can be used to encrypt a session
3437 after it has been initiated,
3438 but before any user-related data has been sent; see
3439 .I \%smtp-use-starttls
3440 above.
3441 Second, some servers accept sessions that are encrypted
3442 from their beginning on. This mode is configured by assigning
3443 \fBsmtps://\fIserver\fR[\fB:\fIport\fR]
3444 to the
3445 .I smtp
3446 variable.
3448 The SMTP transfer is executed in a child process;
3449 unless either the
3450 .I sendwait
3451 or the
3452 .I verbose
3453 variable is set,
3454 this process runs asynchronously.
3455 If it receives a TERM signal,
3456 it will abort and save the message to the `dead.letter' file.
3458 .B smtp-auth
3459 Sets the SMTP authentication method.
3460 If set to `login',
3461 or if unset and smtp-auth-user is set,
3462 AUTH LOGIN is used.
3463 If set to `cram-md5',
3464 AUTH CRAM-MD5 is used;
3465 if set to `plain',
3466 AUTH PLAIN is used.
3467 Otherwise,
3468 no SMTP authentication is performed.
3470 \fBsmtp-auth-\fIuser\fB@\fIhost\fR
3471 Overrides
3472 .I smtp-auth
3473 for specific values of sender addresses,
3474 depending on the
3475 .I from
3476 variable.
3478 .B smtp-auth-password
3479 Sets the global password for SMTP AUTH.
3480 Both user and password have to be given
3481 for AUTH LOGIN and AUTH CRAM-MD5.
3483 \fBsmtp-auth-password-\fIuser\fB@\fIhost\fR
3484 Overrides
3485 .I smtp-auth-password
3486 for specific values of sender addresses,
3487 depending on the
3488 .I from
3489 variable.
3491 .B smtp-auth-user
3492 Sets the global user name for SMTP AUTH.
3493 Both user and password have to be given
3494 for AUTH LOGIN and AUTH CRAM-MD5.
3496 If this variable is set but neither
3497 .I smtp-auth-password
3498 or a matching
3499 .I smtp-auth-password-user@host
3500 can be found,
3501 \*(UA will as for a password on the user's terminal.
3503 \fBsmtp-auth-user-\fIuser\fB@\fIhost\fR
3504 Overrides
3505 .I smtp-auth-user
3506 for specific values of sender addresses,
3507 depending on the
3508 .I from
3509 variable.
3511 .B ssl-ca-dir
3512 Specifies a directory with CA certificates for verification
3513 of SSL/TLS server certificates.
3515 .IR SSL_CTX_load_verify_locations (3)
3516 for more information.
3517 Only applicable if SSL/TLS support is built using OpenSSL.
3519 .B ssl-ca-file
3520 Specifies a file with CA certificates for verification
3521 of SSL/TLS server certificates.
3523 .IR SSL_CTX_load_verify_locations (3)
3524 for more information.
3525 Only applicable if SSL/TLS support is built using OpenSSL.
3527 .B ssl-cert
3528 Sets the file name 
3529 for a SSL/TLS client certificate
3530 required by some servers.
3531 Only applicable if SSL/TLS support is built using OpenSSL.
3533 \fBssl-cert-\fIuser\fB@\fIhost\fR
3534 Sets an account-specific file name
3535 for a SSL/TLS client certificate
3536 required by some servers.
3537 Overrides
3538 .I ssl-cert
3539 for the specified account.
3540 Only applicable if SSL/TLS support is built using OpenSSL.
3542 .B ssl-cipher-list
3543 Specifies a list of ciphers for SSL/TLS connections.
3544 See ciphers(1) for more information.
3545 Only applicable if SSL/TLS support is built using OpenSSL.
3547 .B ssl-crl-file
3548 Specifies a file that contains a CRL in PEM format
3549 to use when verifying SSL/TLS server certificates.
3550 Only applicable if SSL/TLS support is built using OpenSSL.
3552 .B ssl-crl-dir
3553 Specifies a directory that contains files with CRLs in PEM format
3554 to use when verifying SSL/TLS server certificates.
3555 Only applicable if SSL/TLS support is built using OpenSSL.
3557 .B ssl-key
3558 Sets the file name
3559 for the private key of a SSL/TLS client certificate.
3560 If unset, the name of the certificate file is used.
3561 The file is expected to be in PEM format.
3562 Only applicable if SSL/TLS support is built using OpenSSL.
3564 \fBssl-key-\fIuser\fB@\fIhost\fR
3565 Sets an account-specific file name
3566 for the private key of a SSL/TLS client certificate.
3567 Overrides
3568 .I ssl-key
3569 for the specified account.
3570 Only applicable if SSL/TLS support is built using OpenSSL.
3572 .B ssl-method
3573 Selects a SSL/TLS protocol version;
3574 valid values are `ssl2', `ssl3', and `tls1'.
3575 If unset, the method is selected automatically,
3576 if possible.
3578 \fBssl-method-\fIuser\fB@\fIhost\fR
3579 Overrides
3580 .I ssl-method
3581 for a specific account.
3583 .B ssl-rand-egd
3584 Gives the pathname to an entropy daemon socket,
3586 .IR RAND_egd (3).
3588 .B ssl-rand-file
3589 Gives the pathname to a file with entropy data,
3591 .IR RAND_load_file (3).
3592 If the file is a regular file writable by the invoking user,
3593 new data is written to it after it has been loaded.
3594 Only applicable if SSL/TLS support is built using OpenSSL.
3596 .B ssl-verify
3597 Sets the action to be performed if an error occurs
3598 during SSL/TLS server certificate validation.
3599 Valid values are
3600 `strict' (fail and close connection immediately),
3601 `ask' (ask whether to continue on standard input),
3602 `warn' (print a warning and continue),
3603 `ignore' (do not perform validation).
3604 The default is `ask'.
3606 \fBssl-verify-\fIuser\fB@\fIhost\fR
3607 Overrides
3608 .I ssl-verify
3609 for a specific account.
3611 .B stealthmua
3612 If only set without a value assigned, then this option inhibits the
3613 generation of the \fI`Message-Id:'\fR and \fI`User-Agent:'\fR
3614 header fields that include obvious references to \*(UA.
3615 There are two pitfalls associated with this:
3616 First, the message id of outgoing messages is not known anymore.
3617 Second, an expert may still use the remaining information in the header
3618 to track down the originating mail user agent.
3619 If set to the value `noagent', then the mentioned \fI`Message-Id:'\fR
3620 supression doesn't occur.
3622 .B toplines
3623 If defined, gives the number of lines
3624 of a message to be printed out
3625 with the top command;
3626 normally, the first five
3627 lines are printed.
3629 .B ttycharset
3630 The character set of the terminal \*(UA operates on.
3631 There is normally no need to set this variable
3632 since \*(UA can determine this automatically
3633 by looking at the LC_CTYPE locale setting;
3634 if this succeeds, the value is assigned at startup
3635 and will be displayed by the \fIset\fP command.
3636 Note that this is not necessarily a character set name
3637 that can be used in Internet messages.
3639 .B VISUAL
3640 Pathname of the text editor to use
3641 in the visual command and ~v escape.
3642 .SH ENVIRONMENT VARIABLES
3643 Besides the variables described above, \*(UA uses
3644 the following environment strings:
3646 .B HOME
3647 The user's home directory.
3649 \fBLANG\fR, \fBLC_ALL\fR, \fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR
3651 .IR locale (7).
3653 .B MAILRC
3654 Is used as startup file instead of ~/.mailrc if set.
3655 When \*(UA
3656 scripts are invoked on behalf of other users,
3657 this variable should be set to `/dev/null'
3658 to avoid side-effects from reading their configuration files.
3660 .B NAILRC
3661 If this variable is set and
3662 .I MAILRC
3663 is not set,
3664 it is read as startup file.
3666 .B SYSV3
3667 Changes the letters printed in the first column of a header summary.
3669 .B TMPDIR
3670 Used as directory for temporary files instead of /tmp, if set.
3671 .SH FILES
3673 ~/.mailrc
3674 File giving initial commands.
3676 /etc/\*(ua.rc
3677 System wide initialization file.
3679 ~/.mime.types
3680 Personal MIME types.
3682 /etc/mime.types
3683 System wide MIME types.
3684 .SH EXAMPLES
3685 .SS "Getting started"
3686 The \*(UA
3687 command has two distinct usages, according to whether one
3688 wants to send or receive mail.
3689 Sending mail is simple: to send a
3690 message to a user whose email address is, say,
3691 <bill@host.example>,
3692 use the shell
3693 command:
3696     $ \*(ba\fI bill@host.example\fR
3699 then type your message.
3700 \*(UA will prompt you for a message
3701 .I subject 
3702 first;
3703 after that, lines typed by you form the body of the message.
3704 When you reach the end of the message, type
3705 an EOT (control\-d) at the beginning of a line, which will cause
3706 \*(UA to echo `EOT' and return you to the shell.
3708 If, while you are composing the message
3709 you decide that you do not wish to send it after all, you can
3710 abort the letter with a \s-2RUBOUT\s0.  Typing a single \s-2RUBOUT\s0
3711 causes \*(UA
3712 to print `(Interrupt -- one more to kill letter)'.
3713 Typing a second
3714 \s-2RUBOUT\s0 causes \*(UA
3715 to save your partial letter on the file `dead.letter'
3716 in your home directory and abort the letter.
3717 Once you have
3718 sent mail to someone, there is no way to undo the act, so be
3719 careful.
3721 If you want to send the same message to several other people,
3722 you can list their email addresses on the command line.
3723 Thus,
3726     $ \*(ba\fI sam@workstation.example bob@server.example\fR
3727     Subject: Fees
3728     Tuition fees are due next Friday.  Don't forget!
3729     <Control\-d>
3730     EOT
3731     $
3734 will send the reminder to \fI<sam@workstation.example>\fR.
3736 \fI<bob@server.example>\fR.
3738 To read your mail, simply type
3741     $ \*(ba
3744 \*(UA
3745 will respond by typing its version number and date and then listing
3746 the messages you have waiting.
3747 Then it will type a prompt and await your command.
3748 The messages are assigned numbers starting with 1\(emyou
3749 refer to the messages with these numbers.
3750 \*(UA keeps track of which messages are
3751 .I new
3752 (have been sent since you last read your mail) and
3753 .I read
3754 (have been read by you).  New messages have an
3755 .B N
3756 next to them in the header listing and old, but unread messages have
3758 .B U
3759 next to them.
3760 \*(UA keeps track of new/old and read/unread messages by putting a
3761 header field called
3762 .I Status
3763 into your messages.
3765 To look at a specific message, use the
3766 .I type
3767 command, which may be abbreviated to simply
3768 .I t .
3769 For example, if you had the following messages:
3772     O 1 drfoo@myhost.example Wed Sep  1 19:52  18/631 "Fees"
3773     O 2 sam@friends.example  Thu Sep  2 00:08  30/895
3776 you could examine the first message by giving the command:
3779     \fBtype\fR 1
3782 which might cause \*(UA to respond with, for example:
3785     Message  1:
3786     From drfoo@myhost.example Wed Sep  1 19:52:25 2004
3787     Subject: Fees
3788     Status: R
3790     Tuition fees are due next Wednesday.  Don't forget!
3794 Many \*(UA
3795 commands that operate on messages take a message number as an
3796 argument like the
3797 .I type
3798 command.
3799 For these commands, there is a notion of a current message.
3800 When you enter the \*(UA
3801 program, the current message is initially the first
3802 (or the first recent) one.
3803 Thus, you can often omit the message number and use, for example,
3806     \fBt\fR
3809 to type the current message.
3810 As a further shorthand, you can type a message
3811 by simply giving its message number.
3812 Hence,
3815     1
3818 would type the first message.
3820 Frequently, it is useful to read the messages in your mailbox in order,
3821 one after another.
3822 You can read the next message in \*(UA
3823 by simply typing a newline.
3824 As a special case, you can type a newline as your first command to
3825 \*(UA to type the first message.
3827 If, after typing a message, you wish to immediately send a reply,
3828 you can do so with the
3829 .I reply
3830 command.
3831 This command,
3832 like
3833 .IR type ,
3834 takes a message number as an argument.
3835 \*(UA
3836 then begins a message addressed to the user who sent you the message.
3837 You may then type in your letter in reply, followed by a <control-d>
3838 at the beginning of a line, as before.
3840 Note that \*(UA
3841 copies the subject header from the original message.
3842 This is useful in that correspondence
3843 about a particular matter will tend to retain the same subject heading,
3844 making it easy to recognize.
3845 If there are other header fields in the message,
3846 like `Cc:',
3847 the information found will also be used.
3849 Sometimes you will receive a message that has been sent to
3850 several people and wish to reply only
3851 to the person who sent it.
3852 .I Reply
3853 with a capital
3854 .I R
3855 replies to a message, but sends a copy to the sender only.
3857 If you wish, while reading your mail, to send a message to someone,
3858 but not as a reply to one of your messages, you can send the message
3859 directly with the
3860 .I mail
3861 command, which takes as arguments the names of the recipients you wish
3862 to send to.
3863 For example, to send a message to <frank@machine.example>,
3864 you would do:
3867     \fBmail\fI frank@machine.example\fR
3870 To delete a message from the mail folder,
3871 you can use the
3872 .I delete
3873 command.
3874 In addition to not saving deleted messages,
3875 \*(UA will not let you type them, either.
3876 The effect is to make the message disappear
3877 altogether, along with its number.
3879 Many features of \*(UA can be tailored to your liking with the
3880 .I set
3881 command.
3883 .I set
3884 command has two forms, depending on whether you are setting a
3885 .I binary
3886 option or a
3887 .I valued
3888 option.
3889 Binary options are either on or off.  For example, the
3890 .I askcc
3891 option informs \*(UA
3892 that each time you send a message, you want it to prompt you for
3893 a `Cc:' header,
3894 to be included in the message.
3895 To set the
3896 .I askcc
3897 option, you would type
3900     \fBset\fR askcc
3903 Valued options are values which \*(UA uses to adapt to your tastes.
3904 For example, the
3905 .I record
3906 option tells \*(UA
3907 where to save messages sent by you,
3908 and is specified by
3911     \fBset\fR record=Sent
3914 for example.
3915 Note that no spaces are allowed in
3916 .I "set record=Sent".
3918 \*(UA includes a simple facility for maintaining groups of messages
3919 together in folders.
3920 To use the folder facility, you must tell \*(UA
3921 where you wish to keep your folders.
3922 Each folder of messages will be a single file.
3923 For convenience, all of your folders are kept in
3924 a single directory of your choosing.
3925 To tell \*(UA where your folder directory is, put a line of the form
3928     \fBset folder=\fIletters\fR
3931 in your
3932 .I .mailrc
3933 file.
3934 If, as in the example above,
3935 your folder directory does not begin with a `/',
3936 \*(UA will assume that your folder directory is to be found starting
3937 from your home directory.
3939 Anywhere a file name is expected, you can use a folder name, preceded
3940 with `+'.
3941 For example, to put a message into a folder with the
3942 .I save
3943 command, you can use:
3946     \fBsave +\fIclasswork\fR
3949 to save the current message in the
3950 .I classwork
3951 folder.
3952 If the
3953 .I classwork
3954 folder does not yet exist, it will be created.
3955 Note that messages which are saved with the
3956 .I save
3957 command are automatically removed from your system mailbox.
3959 In order to make a copy of a message in a folder without causing
3960 that message to be removed from your system mailbox, use the
3961 .I copy
3962 command, which is identical in all other respects to the
3963 .I save
3964 command.
3967 .I folder
3968 command
3969 can be used to direct \*(UA to the contents of a different folder.
3970 For example,
3973     \fBfolder +\fIclasswork\fR
3976 directs \*(UA to read the contents of the
3977 .I classwork
3978 folder.
3979 All of the commands that you can use on your system
3980 mailbox are also applicable to folders, including
3981 .IR type ,
3982 .IR delete ,
3984 .IR reply .
3985 To inquire which folder you are currently editing, use simply:
3988     \fBfolder\fR
3991 To list your current set of folders, use the
3992 .I folders
3993 command.
3995 Finally, the
3996 .I help
3997 command is available to print out a brief summary of the most important
3998 \*(UA commands.
4000 While typing in a message to be sent to others, it is often
4001 useful to be able to invoke the text editor on the partial message,
4002 print the message, execute a shell command, or do some other
4003 auxiliary function. 
4004 \*(UA provides these capabilities through
4005 .I "tilde escapes" ,
4006 which consist of a tilde (~) at the beginning of a line, followed by
4007 a single character which indicates the function to be performed.
4008 For example, to print the text of the message so far, use:
4011     \fB~p\fR
4014 which will print a line of dashes, the recipients of your message, and
4015 the text of the message so far.
4016 A list of the most important tilde escapes is available with `~?'.
4017 .SS "IMAP or POP3 client setup"
4018 First you need the following data from your ISP:
4019 the host name of the IMAP or POP3 server,
4020 user name and password for this server,
4021 and a notice whether the server uses SSL/TLS encryption.
4022 Assuming the host name is `server.myisp.example'
4023 and your user name for that server is `mylogin',
4024 you can refer to this account using the
4025 .I folder
4026 command or
4027 .I \-f
4028 command line option with
4031     \fBimaps://\fImylogin\fB@\fIserver.myisp.example\fR
4034 (This string is not necessarily the same as your Internet mail address.)
4035 You can replace `imaps://' with `imap://'
4036 if the server does not support SSL/TLS.
4037 (If SSL/TLS support is built using NSS, the
4038 .I nss-config-dir
4039 variable must be set before a connection can be initiated,
4040 see above).
4041 Use `pop3s://' or `pop3://' if the server does not offer IMAP.
4042 You should use IMAP if you can, though;
4043 first because it requires fewer network operations than POP3
4044 to get the contents of the mailbox
4045 and is thus faster;
4046 and second because message attributes
4047 are maintained by the IMAP server,
4048 so you can easily distinguish new and old messages
4049 each time you connect.
4050 Even if the server does not accept IMAPS or POP3S connections,
4051 it is possible that it supports the STARTTLS method
4052 to make a session SSL/TLS encrypted
4053 after the initial connection has been performed,
4054 but before authentication begins.
4055 The only reliable method to see if this works is to try it; enter one of
4058     \fBset imap-use-starttls\fR
4059     \fBset pop3-use-starttls\fR
4062 before you initiate the connection.
4064 As you probably want messages to be deleted from this account
4065 after saving them,
4066 prefix it with `\fI%:\fR'.
4068 .I shortcut
4069 command can be used to avoid typing that many characters
4070 every time you want to connect:
4073     \fBshortcut \fImyisp\fB \fB%:imaps://\fImylogin\fB@\fIserver.myisp.example\fR
4076 You might want to put this string into a startup file.
4077 As the
4078 .I shortcut
4079 command is specific to this implementation of
4080 \*(UA and will confuse other implementations,
4081 it should not be used in
4082 .IR ~/.mailrc ,
4083 instead, put
4086     \fBset NAIL_EXTRA_RC=\fI~/.\*(uarc\fR
4090 .I ~/.mailrc
4091 and create a file
4092 .I ~/.\*(uarc
4093 containing the
4094 .I shortcut
4095 command above.
4096 You can then access your remote mailbox by invoking
4097 `\*(ua \-f \fImyisp\fR' on the command line,
4098 or by executing `fi \fImyisp\fR' within \*(UA.
4100 If you want to use more than one IMAP mailbox on a server,
4101 or if you want to use the IMAP server for mail storage too,
4103 .I account
4104 command
4105 (which is also \*(UA-\fRspecific)
4106 is more appropriate than the
4107 .I shortcut
4108 command.
4109 You can put the following in
4110 .IR ~/.\*(uarc :
4113     \fBaccount \fImyisp \fB{\fR
4114         \fBset folder=imaps://\fImylogin\fB@\fIserver.myisp.example\fR
4115         \fBset record=+\fISent \fBMBOX=+\fImbox \fBoutfolder\fR
4116     \fB}\fR
4119 and can then access incoming mail for this account by invoking
4120 `\*(ua \-A \fImyisp\fR' on the command line,
4121 or by executing `ac \fImyisp\fR' within \*(UA.
4122 After that,
4123 a command like `copy \fI1\fR +\fIotherfolder\fR'
4124 will refer to \fIotherfolder\fR on the IMAP server.
4125 In particular,
4126 `fi &' will change to the
4127 .I mbox
4128 folder,
4130 `fi +Sent' will show your recorded sent mail,
4131 with both folders located on the IMAP server.
4133 \*(UA will ask you for a password string
4134 each time you connect to a remote account.
4135 If you can reasonably trust the security
4136 of your workstation,
4137 you can give this password in the startup file as
4140     \fBset password-\fImylogin\fB@\fIserver.myisp.example\fB="\fISECRET\fB"\fR
4143 You should change the permissions of this file to 0600, see
4144 .IR chmod (1).
4146 \*(UA supports different authentication methods for both IMAP and POP3.
4147 If Kerberos is used at your location,
4148 you can try to activate GSSAPI-based authentication by
4151     \fBset imap-auth=gssapi\fR
4154 The advantage of this method is that
4155 \*(UA does not need to know your password at all,
4156 nor needs to send sensitive data over the network.
4157 Otherwise, the options
4160     \fBset imap-auth=cram-md5\fR
4161     \fBset pop3-use-apop\fR
4164 for IMAP and POP3, respectively,
4165 offer authentication methods
4166 that avoid to send the password in clear text over the network,
4167 which is especially important if SSL/TLS cannot be used.
4168 If the server does not offer any of these authentication methods,
4169 conventional user/password based authentication must be used.
4170 It is sometimes helpful to set the
4171 .I verbose
4172 option when authentication problems occur.
4173 \*(UA will display all data sent to the server in clear text on the
4174 screen with this option,
4175 including passwords.
4176 You should thus take care that no unauthorized person
4177 can look at your terminal when this option is set.
4179 If you regularly use the same workstation
4180 to access IMAP accounts,
4181 you can greatly enhance performance
4182 by enabling local caching of IMAP messages.
4183 For any message that has been fully or partially fetched from the server,
4184 a local copy is made and is used when the message is accessed again,
4185 so most data is transferred over the network once only.
4186 To enable the IMAP cache,
4187 select a local directory name and put
4190     \fBset imap-cache=\fI~/localdirectory\fR
4193 in the startup file.
4194 All files within that directory
4195 can be overwritten or deleted by \*(UA at any time,
4196 so you should not use the directory to store other information.
4198 Once the cache contains some messages,
4199 it is not strictly necessary anymore
4200 to open a connection to the IMAP server
4201 to access them.
4202 When \*(UA is invoked with the \fI\-D\fR option,
4203 or when the
4204 .I disconnected
4205 variable is set,
4206 only cached data is used
4207 for any folder you open.
4208 Messages that have not yet been completely cached
4209 are not available then,
4210 but all other messages can be handled
4211 as usual.
4212 Changes made to IMAP mailboxes in
4213 .I disconnected
4214 mode are committed to the IMAP server
4215 next time it is used in
4216 .I online
4217 mode.
4218 Synchronizing the local status
4219 with the status on the server
4220 is thus partially within your responsibility;
4221 if you forget to initiate a connection to the server again
4222 before you leave your location,
4223 changes made on one workstation
4224 are not available on others.
4225 Also if you alter IMAP mailboxes from a workstation
4226 while uncommitted changes are still pending on another,
4227 the latter data may become invalid.
4228 The same might also happen because of internal server status changes.
4229 You should thus carefully evaluate this feature in your environment
4230 before you rely on it.
4232 Many servers will close the connection
4233 after a short period of inactivity. Use one of
4236     \fBset pop3-keepalive=\fI30\fR
4237     \fBset imap-keepalive=\fI240\fR
4240 to send a keepalive message each 30 seconds for POP3,
4241 or each 4 minutes for IMAP.
4243 If you encounter problems connecting to a SSL/TLS server,
4244 try the
4245 .I ssl-rand-egd
4247 .I ssl-rand-file
4248 variables (see the OpenSSL FAQ for more information)
4249 or specify the protocol version with
4250 .IR ssl-method .
4251 Contact your ISP
4252 if you need a client certificate
4253 or if verification of the server certificate fails.
4254 If the failed certificate is indeed valid,
4255 fetch its CA certificate by executing the shell command
4258     $ \fBopenssl s_client </dev/null \-showcerts \-connect \e
4259            \fIserver.myisp.example\fB:\fIimaps\fB 2>&1 | tee \fIlog\fR
4262 (see
4263 .IR s_client (1))
4264 and put it into the file specified with
4265 .IR ssl-ca-file .
4266 The data you need is located at the end of the certificate chain
4267 within (and including) the `BEGIN CERTIFICATE'
4268 and `END CERTIFICATE' lines.
4269 (Note that it is possible to fetch
4270 a forged certificate by this method.
4271 You can only completely rely
4272 on the authenticity of the CA certificate
4273 if you fetch it in a way that is trusted by other means,
4274 such as by personally receiving the certificate on storage media.)
4275 .SS "Creating a score file or message filter"
4276 The scoring commands are best separated
4277 from other configuration for clarity,
4278 and are mostly \*(UA specific.
4279 It is thus recommended to put them in a separate file
4280 that is sourced from your NAIL_EXTRA_RC as follows:
4283     \fBsource\fI ~/.scores\fR
4286 The \fI.scores\fR file could then look as follows:
4289     \fBdefine\fR \fIlist\fR {
4290         \fBscore\fR (subject "important discussion") +10
4291         \fBscore\fR (subject "annoying discussion") \-10
4292         \fBscore\fR (from "nicefellow@goodnet") +15
4293         \fBscore\fR (from "badguy@poornet") \-5
4294         \fBmove\fR (header x-spam-flag "+++++") \fI+junk\fR
4295     }
4296     \fBset folder-hook-\fRimap://user@host/public.list=\fIlist\fR
4299 In this scheme,
4300 you would see any mail from `nicefellow@goodnet',
4301 even if the surrounding discussion is annoying;
4302 but you normally would not see mail from `badguy@poornet',
4303 unless he participates in the important discussion.
4304 Messages that are marked with five or more plus characters
4305 in their `X-Spam-Flag' field
4306 (inserted by some server-side filtering software)
4307 are moved to the folder `junk' in the
4308 .I folder
4309 directory.
4311 Be aware that all criteria in (\|) lead to substring matches,
4312 so you would also score messages
4313 from e.\|g. `notsobadguy@poornetmakers' negative here.
4314 It is possible to select addresses exactly using \fI"address"\fR
4315 message specifications,
4316 but these cannot be executed remotely 
4317 and will thus cause all headers
4318 to be downloaded from IMAP servers while looking for matches.
4320 When searching messages on an IMAP server,
4321 best performance is usually achieved
4322 by sending as many criteria as possible
4323 in one large (\|) specification,
4324 because each single such specification
4325 will result in a separate network operation.
4326 .SS "Activating the Bayesian filter"
4327 The Bayesian junk mail filter works
4328 by examining the words contained in messages.
4329 You decide yourself what a good and what a bad message is.
4330 Thus the resulting filter is your very personal one;
4331 once it is correctly set up,
4332 it will filter only messages similar to those
4333 previously specified by you.
4335 To use the Bayesian filter,
4336 a location for the junk mail database must be defined first:
4339     \fBset junkdb=\fI~/.junkdb\fR
4342 The junk mail database does not contain
4343 actual words extracted from messages,
4344 but hashed representations of them.
4345 A foreign person who can read the database
4346 could only examine the frequency of previously known words
4347 in your mail.
4349 If you have sufficient disk space (several 10\ MB) available,
4350 it is recommended that you set the
4351 .I chained-junk-tokens
4352 option.
4353 The filter will then also consider two-word tokens,
4354 improving its accuracy.
4356 A set of good messages and junk messages must now be available;
4357 it is also possible to use the incoming new messages for this purpose,
4358 although it will of course take some time
4359 until the filter becomes useful then.
4360 Do not underestimate the amount of statistical data needed;
4361 some hundred messages are typically necessary
4362 to get satisfactory results,
4363 and many thousand messages for best operation.
4364 You have to pass the good messages to the
4365 .I good
4366 command,
4367 and the junk messages to the
4368 .I junk
4369 command.
4370 If you ever accidentally mark a good message as junk or vice-versa,
4371 call the
4372 .I ungood
4374 .I unjunk
4375 command to correct this.
4377 Once a reasonable amount of statistics has been collected,
4378 new messages can be classified automatically.
4380 .I classify
4381 command marks all messages that the filter considers to be junk,
4382 but it does not perform any action on them by default.
4383 It is recommended that you move these messages into a separate
4384 folder just for the case that false positives occur,
4385 or to pass them to the
4386 .I junk
4387 command later again to further improve the junk mail database.
4388 To automatically move incoming junk messages
4389 every time the inbox is opened,
4390 put lines like the following into your
4391 .I .scores
4392 file (or whatever name you gave to the file in the last example):
4395     \fBdefine\fR \fIjunkfilter\fR {
4396         \fBclassify (smaller \fI20000\fB) :n\fR
4397         \fBmove :j\fR \fI+junk\fR
4398     }
4399     \fBset folder-hook-\fRimap://user@host/INBOX=\fIjunkfilter\fR
4402 If you set the
4403 .I verbose
4404 option before running the
4405 .I classify
4406 command,
4407 \*(UA prints the words it uses for calculating the junk status
4408 along with their statistical probabilities.
4409 This can help you to find out
4410 why some messages are not classified
4411 as you would like them to be.
4412 To see the statistical probability of a given word,
4413 use the
4414 .I probability
4415 command.
4417 If a junk message was not recognized as such,
4418 use the
4419 .I junk
4420 command to correct this.
4421 Also if you encounter a false positive
4422 (a good message that was wrongly classified as junk),
4423 pass it to the
4424 .I good
4425 command.
4427 Since the
4428 .I classify
4429 command must examine the entire text
4430 of all new messages in the respective folder,
4431 this will also cause all of them to be downloaded from the IMAP server.
4432 You should thus restrict the size of messages for automatic filtering.
4433 If server-based filtering is also available,
4434 you might try if that works for you first.
4435 .SS "Reading HTML mail"
4436 You need either the
4437 .I w3m
4439 .I lynx
4440 utility
4441 or another command-line web browser
4442 that can write plain text to standard output.
4445     \fBset pipe-text/html=\fR"w3m -dump -T text/html"
4451     \fBset pipe-text/html=\fR"lynx -dump -force_html /dev/stdin"
4454 will then cause HTML message parts to be converted into a more friendly form.
4455 .SS "Viewing PDF attachments"
4456 Most PDF viewers do not accept input directly from a pipe.
4457 It is thus necessary to store the attachment in a temporary file, as with
4460     \fBset pipe-application/pdf=\fR"cat >/tmp/\*(ua$$.pdf; \e
4461            acroread /tmp/\*(ua$$.pdf; rm /tmp/\*(ua$$.pdf"
4464 Note that security defects are discovered in PDF viewers
4465 from time to time.
4466 Automatical command execution like this
4467 can compromise your system security,
4468 in particular if you stay not always informed
4469 about such issues.
4470 .SS "Signed and encrypted messages with S/MIME"
4471 S/MIME provides two central mechanisms:
4472 message signing and message encryption.
4473 A signed message contains some data in addition
4474 to the regular text.
4475 The data can be used to verify
4476 that the message was sent using a valid certificate,
4477 that the sender's address in the message header
4478 matches that in the certificate,
4479 and that the message text has not been altered.
4480 Signing a message does not change its regular text;
4481 it can be read regardless of whether the recipient's software
4482 is able to handle S/MIME.
4483 It is thus usually possible to sign all outgoing messages
4484 if so desired.\(emEncryption, in contrast,
4485 makes the message text invisible for all people
4486 except those who have access to the secret decryption key.
4487 To encrypt a message,
4488 the specific recipient's public encryption key must be known.
4489 It is thus not possible to send encrypted mail to people
4490 unless their key has been retrieved
4491 from either previous communication or public key directories.
4492 A message should always be signed before it is encrypted.
4493 Otherwise, it is still possible that the encrypted message text
4494 is altered.
4496 A central concept to S/MIME is that of the certification authority (CA).
4497 A CA is a trusted institution that issues certificates.
4498 For each of these certificates,
4499 it can be verified that it really originates from the CA,
4500 provided that the CA's own certificate is previously known.
4501 A set of CA certificates is usually delivered with OpenSSL
4502 and installed on your system.
4503 If you trust the source of your OpenSSL software installation,
4504 this offers reasonable security for S/MIME on the Internet.
4505 In general, a certificate cannot be more secure
4506 than the method its CA certificate has been retrieved with, though.
4507 Thus if you download a CA certificate from the Internet,
4508 you can only trust the messages you verify using that certificate
4509 as much as you trust the download process.
4511 The first thing you need for participating in S/MIME message exchange
4512 is your personal certificate,
4513 including a private key.
4514 The certificate contains public information,
4515 in particular your name and your email address,
4516 and the public key that is used by others
4517 to encrypt messages for you,
4518 and to verify signed messages they supposedly received from you.
4519 The certificate is included in each signed message you send.
4520 The private key must be kept secret.
4521 It is used to decrypt messages that were
4522 previously encrypted with your public key,
4523 and to sign messages.
4525 For personal use,
4526 it is recommended that you get a S/MIME certificate
4527 from one of the major CAs on the Internet using your WWW browser.
4528 (Many CAs offer such certificates for free.)
4529 You will usually receive
4530 a combined certificate and private key
4531 in PKCS#12 format which
4532 \*(UA does not directly accept
4533 if S/MIME support is built using OpenSSL.
4534 To convert it to PEM format,
4535 use the following shell command:
4538     $ \fBopenssl pkcs12 \-in \fIcert.p12\fB \-out \fIcert.pem\fB \-clcerts \e
4539         \-nodes\fR
4542 If you omit the
4543 .I \-nodes
4544 parameter,
4545 you can specifiy an additional
4546 .I "PEM pass phrase"
4547 for protecting the private key.
4548 \*(UA will then ask you for that pass phrase
4549 each time it signs or decrypts a message.
4550 You can then use
4553     \fBset smime-sign-cert-\fImyname@myisp.example\fB=\fIcert.pem\fR
4556 to make this private key and certificate known to \*(UA.
4558 If S/MIME support is built using NSS,
4559 the PKCS#12 file must be installed using Mozilla
4560 (provided that
4561 .I nss-config-dir
4562 is set appropriately,
4563 see above),
4564 and no further action is necessary
4565 unless multiple user certificates
4566 for the same email address are installed.
4567 In this case,
4569 .I smime-sign-nickname
4570 variable has to be set appropriately.
4572 You can now sign outgoing messages.
4573 Just use
4576     \fBset smime-sign\fR
4579 to do so.
4581 From each signed message you send,
4582 the recipient can fetch your certificate
4583 and use it to send encrypted mail back to you.
4584 Accordingly if somebody sends you a signed message,
4585 you can do the same.
4586 First use the
4587 .I verify
4588 command to check the validity of the certificate.
4589 After that,
4590 retrieve the certificate and tell
4591 \*(UA that it should use it for encryption:
4594     \fBcertsave\fI filename\fR
4595     \fBset smime-encrypt-\fIuser@host\fB=\fIfilename\fR
4598 If S/MIME support is built using NSS,
4599 the saved certificate must be installed using Mozilla.
4600 The value of the
4601 .I smime-encrypt-user@host
4602 is ignored then,
4603 but if multiple certificates for the recipient are available,
4605 .I smime-nickname-user@host
4606 variable must be set.
4608 You should carefully consider
4609 if you prefer to store encrypted messages in decrypted form.
4610 If you do, anybody who has access to your mail folders can read them,
4611 but if you do not,
4612 you might be unable to read them yourself later
4613 if you happen to lose your private key.
4615 .I decrypt
4616 command saves messages in decrypted form,
4617 while the
4618 .IR save ,
4619 .IR copy ,
4621 .I move
4622 commands leave them encrypted.
4624 Note that neither S/MIME signing nor encryption
4625 applies to message subjects or other header fields.
4626 Thus they may not contain sensitive information
4627 for encrypted messages,
4628 and cannot be trusted even if the message content
4629 has been verified.
4630 When sending signed messages,
4631 it is recommended to repeat any important header information
4632 in the message text.
4633 .SS "Using CRLs with S/MIME or SSL/TLS"
4634 Certification authorities (CAs) issue
4635 certificate revocation lists (CRLs) on a regular basis.
4636 These lists contain the serial numbers of certificates
4637 that have been declared invalid after they have been issued.
4638 Such usually happens
4639 because the private key for the certificate has been compromised,
4640 because the owner of the certificate has left
4641 the organization that is mentioned in the certificate,
4642 etc.
4643 To seriously use S/MIME or SSL/TLS verification,
4644 an up-to-date CRL is required for each trusted CA.
4645 There is otherwise no method
4646 to distinguish between valid and invalidated certificates.
4647 \*(UA currently offers no mechanism to fetch CRLs,
4648 or to access them on the Internet,
4649 so you have to retrieve them by some external mechanism.
4651 If S/MIME and SSL/TLS support are built using OpenSSL,
4652 \*(UA accepts CRLs in PEM format only;
4653 CRLs in DER format must be converted,
4654 e.\|g. with the shell command
4657     $ \fBopenssl crl \-inform DER \-in \fIcrl.der\fB \-out \fIcrl.pem\fR
4660 To tell \*(UA about the CRLs,
4661 a directory
4662 that contains all CRL files
4663 (and no other files)
4664 must be created.
4666 .I smime-crl-dir
4668 .I ssl-crl-dir
4669 variables, respectively,
4670 must then be set to point to that directory.
4671 After that,
4672 \*(UA requires a CRL to be present
4673 for each CA that is used
4674 to verify a certificate.
4676 If S/MIME and SSL/TLS support are built using NSS,
4677 CRLs can be imported in Mozilla applications
4678 (provided that
4679 .I nss-config-dir
4680 is set appropriately).
4681 .SS "Sending mail from scripts"
4682 If you want to send mail from scripts,
4683 you must be aware that
4684 \*(UA reads the user's configuration files by default.
4685 So unless your script is only intended for your own personal use
4686 (as e.g. a cron job),
4687 you need to circumvent this by invoking \*(UA like
4690     \fBMAILRC=/dev/null \*(ua \-n\fR
4693 You then need to create a configuration for \*(UA for your script.
4694 This can be done by either pointing the
4695 .I MAILRC
4696 variable to a custom configuration file,
4697 or by passing the configuration in environment variables.
4698 Since many of the configuration options are not valid shell variables, the
4699 .I env
4700 command is useful in this situation.
4701 An invocation could thus look like
4704     \fBenv MAILRC=/dev/null\fR from=\fIscriptreply@domain\fR smtp=\fIhost\fR \e
4705           smtp-auth-user=\fIlogin\fR smtp-auth-password=\fIsecret\fR \e
4706           smtp-auth=\fIlogin\fR \*(ba\fB \-n\fR \-s "\fIsubject\fR" \e
4707           \-a \fIattachment_file\fR \fIrecipient@domain\fR <\fIcontent_file\fR
4708 .SH "SEE ALSO"
4709 fmt(1),
4710 newaliases(1),
4711 openssl(1),
4712 pg(1),
4713 more(1),
4714 vacation(1),
4715 ssl(3),
4716 aliases(5),
4717 locale(7),
4718 mailaddr(7),
4719 sendmail(8)
4720 .SH NOTES
4722 Variables in the environment passed to \*(UA cannot be unset.
4724 The character set conversion relies
4725 on the
4726 .IR iconv (3)
4727 function.
4728 Its functionality differs widely
4729 between the various system environments \*(UA runs on.
4730 If the message `Cannot convert from \fIa\fR to \fIb\fR' appears,
4731 either some characters within the message header or text
4732 are not appropriate for the currently selected terminal character set,
4733 or the needed conversion is not supported by the system.
4734 In the first case,
4735 it is necessary to set
4736 an appropriate LC_CTYPE locale (e.\|g. \fIen_US\fR)
4737 or the
4738 .I ttycharset
4739 variable.
4740 In the second case, the
4741 .I sendcharsets
4743 .I ttycharset
4744 variables must be set to the same value
4745 to inhibit character set conversion.
4747 .I iconv()
4748 is not available at all,
4749 the value assigned to
4750 .I sendcharsets
4751 must match the character set that is used on the terminal.
4753 \*(UA expects input text to be in Unix format,
4754 with lines separated by 
4755 .I newline
4756 (^J, \en) characters only.
4757 Non-Unix text files that use
4758 .I carriage return
4759 (^M, \er)
4760 characters in addition will be treated as binary data;
4761 to send such files as text, strip these characters e.\ g. by
4764 tr \-d '\e015' <input | \*(ua .\ .\ .
4767 or fix the tools that generate them.
4769 Limitations with IMAP mailboxes are:
4770 It is not possible to edit messages,
4771 but it is possible to append them.
4772 Thus to edit a message,
4773 create a local copy of it,
4774 edit it, append it,
4775 and delete the original.
4776 The line count for the header display
4777 is only appropriate if the entire message has been downloaded
4778 from the server.
4779 The marking of messages as `new' is performed by the IMAP server;
4780 use of the
4781 .I exit
4782 command instead of
4783 .I quit
4784 will not cause it to be reset,
4785 and if the
4786 .IR autoinc / newmail
4787 variables are unset,
4788 messages that arrived during a session
4789 will not be in state `new' anymore
4790 when the folder is opened again.
4791 Also if commands queued in disconnected mode are committed,
4792 the IMAP server will delete the `new' flag
4793 for all messages in the changed folder,
4794 and new messages will appear as unread
4795 when it is selected for viewing later.
4796 The `flagged', `answered', and `draft' attributes are usually permanent,
4797 but some IMAP servers are known to drop them without notification.
4798 .\" This is why \*(UA does not even check if storing them succeeds.
4799 Message numbers may change with IMAP
4800 every time before the prompt is printed
4801 if \*(UA is notified by the server
4802 that messages have been deleted
4803 by some other client or process.
4804 In this case, `Expunged \fIn\fR messages' is printed,
4805 and message numbers may have changed.
4807 Limitations with POP3 mailboxes are:
4808 It is not possible to edit messages,
4809 they can only be copied and deleted.
4810 The line count for the header display
4811 is only appropriate if the entire message has been downloaded
4812 from the server.
4813 The status field of a message is maintained by the server
4814 between connections;
4815 some servers do not update it at all,
4816 and with a server that does,
4817 the `exit' command will not cause the message status to be reset.
4818 The `newmail' command and the `newmail' variable
4819 have no effect.
4820 It is not possible to rename or to remove POP3 mailboxes.
4822 If a
4823 .SM RUBOUT
4824 (interrupt) is typed while an IMAP or POP3 operation is in progress,
4825 \*(UA will wait until the operation can be safely aborted,
4826 and will then return to the command loop
4827 and print the prompt again.
4828 When a second
4829 .I RUBOUT
4830 is typed while \*(UA is waiting for the operation to complete,
4831 the operation itself will be canceled.
4832 In this case,
4833 data that has not been fetched yet
4834 will have to be fetched
4835 before the next command can be performed.
4836 If the canceled operation
4837 was using an SSL/TLS encrypted channel,
4838 an error in the SSL transport will very likely result,
4839 and the connection is no longer usable.
4841 As \*(UA is a mail user agent,
4842 it provides only basic SMTP services.
4843 If it fails to contact its upstream SMTP server,
4844 it will not make further attempts to transfer the message
4845 at a later time,
4846 and it does not leave other information about this condition
4847 than an error message on the terminal
4848 and a `dead.letter' file.
4849 This is usually not a problem if the SMTP server
4850 is located in the same local network
4851 as the computer on which \*(UA is run.
4852 However, care should be taken when using a remote server of an ISP;
4853 it might be better to set up a local SMTP server then
4854 which just acts as a proxy.
4856 \*(UA immediately contacts the SMTP server (or
4857 .IR \%/usr/lib/sendmail )
4858 even when operating in
4859 .I disconnected
4860 mode.
4861 It would not make much sense for \*(UA to defer outgoing mail
4862 since SMTP servers usually provide
4863 much more elaborated delay handling
4864 than \*(UA could perform as a client.
4865 Thus the recommended setup for sending mail in
4866 .I disconnected
4867 mode is to configure a local SMTP server
4868 such that it sends outgoing mail
4869 as soon as an external network connection is available again,
4870 i.\|e. to advise it to do that from a network startup script.
4872 The junk mail filter follows the concepts developed by
4873 Paul Graham in his articles,
4874 ``A Plan for Spam'', August 2002,
4875 \%<http://www.paulgraham.com/spam.html>,
4876 and ``Better Bayesian Filtering'', January 2003,
4877 \%<http://www.paulgraham.com/better.html>.
4878 Chained tokens are due to a paper by
4879 Jonathan A. Zdziarski,
4880 ``Advanced Language Classification using Chained Tokens'',
4881 February 2004,
4882 \%<http://www.nuclearelephant.com/papers/chained.html>.
4884 A \fImail\fR command appeared in Version 1 AT&T Unix.
4885 Berkeley Mail was written in 1978 by Kurt Shoens.
4886 This man page is derived from
4887 from The Mail Reference Manual
4888 originally written by Kurt Shoens.
4889 \fIHeirloom Mailx\fR enhancements are maintained and documented
4890 by Gunnar Ritter.
4891 \fIS-nail\fR enhancements are maintained and documented
4892 by Steffen "Daode" Nurpmeso.
4894 Portions of this text are reprinted and reproduced in electronic form
4895 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
4896 \(em Operating System Interface (POSIX), The Open Group Base
4897 Specifications Issue 6, Copyright \(co 2001-2003 by the Institute of
4898 Electrical and Electronics Engineers, Inc and The Open Group. In the
4899 event of any discrepancy between this version and the original IEEE and
4900 The Open Group Standard, the original IEEE and The Open Group Standard
4901 is the referee document. The original Standard can be obtained online at
4902 \%http://www.opengroup.org/unix/online.html\ .
4903 Redistribution of this material is permitted so long as this notice remains
4904 intact.