Improve sendmail(1) argument processing..
[s-mailx.git] / nail.1
blob397aa615472d4e4ebef64f010df851a0b9e1b4a3
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 .\"--MKMAN-START--
39 .ds UU S-NAIL
40 .ds uu S-nail
41 .ds UA \\fIS-nail\\fR
42 .ds ua \\fIs-nail\\fR
43 .ds ba \\fBs-nail\\fR
44 .ds UR s-nail.rc
45 .\"--MKMAN-END--
46 .\" If not ~/.mailrc, it breaks POSIX compatibility.  And adjust main.c.
47 .ds ur ~/.mailrc
48 .\"
49 .\" ##  --  >8  --  8<  --  ##
50 .\"
51 .TH "\*(UU" 1 "2012-10-05" "\*(uu" "User Commands"
52 .SH NAME
53 \*(UA \- send and receive Internet mail
54 .SH SYNOPSIS
55 .PD 0
56 .HP
57 .ad l
58 \*(ba [\fB\-BDdEFintv~\fR]
59 [\fB\-A\fI\ account\fR]
60 [\fB\-a\fI\ attachment\fR]
61 [\fB\-b\fI\ bcc-addr\fR] [\fB\-c\fI\ cc-addr\fR]
62 [\fB\-O\fI\ mta-option [\fB\-O\fI mta-option-argument]\fR]
63 [\fB\-q\fI\ quote-file\fR]
64 [\fB\-r\fI\ from-addr\fR]
65 [\fB\-S\fI\ variable\fR[\fB=\fIvalue\fR]]
66 [\fB\-s\fI\ subject\fR]
67 \fIto-addr\fR .\ .\ .
68 .HP
69 .ad l
70 \*(ba [\fB\-BDdEeHIiNnRv~\fR]
71 [\fB\-A\fI\ account\fR]
72 [\fB\-S\fI\ variable\fR[\fB=\fIvalue\fR]]
73 [\fB\-T\fI\ name\fR]
74 \fB\-f\fR [\fIfile\fR]
75 .HP
76 .ad l
77 \*(ba [\fB\-BDdEeiNnRv~\fR]
78 [\fB\-A\fI\ account\fR]
79 [\fB\-S\fI\ variable\fR[\fB=\fIvalue\fR]]
80 [\fB\-u\fI\ user\fR]
81 .br
82 .PD
83 .ad b
84 .SH DESCRIPTION
85 \*(UA is an intelligent mail processing system, which has a command syntax
86 reminiscent of
87 .IR ed (1)
88 with lines replaced by messages.
89 It is based on Heirloom mailx, that is based on Berkeley Mail 8.1,
90 is intended to provide the functionality of the POSIX
91 .B mailx
92 command,
93 and offers extensions for IDNA, MIME, IMAP, POP3, SMTP, and S/MIME.
94 \*(UA provides enhanced features for interactive use, such as caching
95 and disconnected operation for IMAP, message threading, scoring, and
96 filtering.
97 It is also usable as a mail batch language, both for sending and
98 receiving mail.
99 .PP
100 The following options are accepted:
103 .BI \-A \ name
104 Executes an 
105 .I account
106 command (see below) for \fIname\fR after the startup files have been
107 read.
109 .BI \-a \ file
110 Attach the given file to the message.
112 .B \-B
113 Make standard input and standard output line-buffered.
115 .BI \-b \ address
116 Send blind carbon copies to the given list of addresses.
117 \fISending mail\fR below goes into more detail on that.
119 .BI \-c \ address
120 Send carbon copies to the given list of addresses.
122 .B \-D
123 Start in
124 .I disconnected
125 mode; see the description for the
126 .I disconnected
127 variable option.
129 .B \-d
130 Enables debugging messages and disables the actual delivery of messages.
131 Unlike
132 .IR \-v ,
133 this option is intended for \*(UA development only.
135 .B \-E
136 If an outgoing message does not contain any text in its first or only
137 message part, do not send but discard it silently,
138 effectively setting the
139 .I skipemptybody
140 variable at program startup.
141 This is useful for sending messages from scripts started by
142 .IR cron (8).
144 .B \-e
145 Just check if mail is present in the system mailbox.
146 If yes, return an exit status of zero, a non-zero value otherwise.
148 .B \-F
149 Save the message to send in a file named after the local part of the
150 first recipient's address.
152 \fB\-f\fR [\fIfile\fR]
153 Read in the contents of the user's mbox (or the specified file)
154 for processing;
155 when \*(UA is quit, it writes undeleted messages back to this file.
156 The string \fIfile\fR is handled as described for the
157 .I folder
158 command below.
159 Note that \fIfile\fR is not a direct argument to the \fB-f\fR option,
160 but instead taken from the command line after option processing has been
161 completed.
163 .B \-H
164 Print header summaries for all messages and exit.
166 .B \-I
167 Shows the `Newsgroup:' or `Article-Id:' fields in the header summary.
168 Only applicable in combination with
169 .IR \-f .
171 .B \-i
172 Ignore tty interrupt signals.
173 This is particularly useful when using \*(UA on noisy phone lines.
175 .B \-N
176 Inhibits the initial display of message headers when reading mail
177 or editing a mail folder.
179 .B \-n
180 Inhibits reading \*(UR upon startup.
181 This option should be activated for \*(UA scripts that are invoked on
182 more than one machine, because the contents of that file may differ
183 between them.
185 .BI \-O \ option
186 Pass the given option through to the mail-transfer-agent (MTA).
187 This option has no effect when SMTP is used for sending mail.
188 E.g., to specify the hop count to an old \fIsendmail(1)\fR, use
189 `\fI-O-h -Onumber\fR', which will be passed as `\fI-h number\fR'.
191 .BI \-q \ file
192 Start the message with the contents of the specified file.
193 May be given in send mode only.
195 .B \-R
196 Opens any folders read-only.
198 .BI \-r \ address
199 Sets the
200 .I From
201 address. Overrides any
202 .I from
203 variable specified in environment or startup files.
204 Tilde escapes are disabled.
205 The \fI\-r\fI address\fR options are passed to the mail transfer agent
206 unless SMTP is used.
207 This option exists for compatibility only; it is recommended to set the
208 .I from
209 variable directly instead.
211 \fB\-S\fI\ variable\fR[\fB=\fIvalue\fR]
212 Sets the internal option
213 .I variable
214 and, in case of a string option, assigns \fIvalue\fR to it.
215 These assignments become active immediately,
216 but also cannot be overwritten by resource file content.
218 .BI \-s \ subject
219 Specify subject on command line (only the first argument after the
220 .I \-s
221 flag is used as a subject; be careful to quote subjects containing spaces).
223 .BI \-T \ name
224 Writes the `Message-Id:' and `Article-Id:' header fields of each message
225 read in the file
226 .IR name .
227 Implies
228 .IR \-I .
229 Compressed files are handled as described for the \fIfolder\fR command
230 below.
232 .B \-t
233 The message to be sent is expected to contain a message header with
234 `To:', `Cc:', or `Bcc:' fields giving its recipients and `Subject:'
235 giving the subject of the message.
236 Recipients and subject specified on the command line are ignored.
238 .BI \-u \ user
239 Reads the mailbox of the given user name.
241 .B \-V
242 Print \*(UA's version and exit.
244 .B \-v
245 Verbose mode.
246 The details of delivery are displayed on the user's terminal.
248 .B \-~
249 Enable tilde escapes even if not in interactive mode.
251 .SS "Sending mail"
252 To send a message to one or more people, \*(UA can be invoked with
253 arguments which are the names of people to whom the mail will be sent.
254 These names may be \fIalias\fRes, plain addresses or full address
255 specifications including user names and comments, in which case care
256 for proper quoting may be necessary.
257 If this manual refers to a \fIlist of addresses\fR,
258 then \*(UA expects a comma-separated list of such names.
259 The section \fIRecipient address specifications\fR below explains the
260 interpretation of names in more detail.
261 The user is then expected to type in his message, followed by an
262 `control-D' at the beginning of a line.
263 The section \fIReplying to or originating mail\fI, describes some
264 features of \*(UA available to help when composing letters.
265 .SS "Reading mail"
266 In normal usage \*(UA is given no arguments and checks the user's mail
267 out of the post office, then prints out a one line header of each
268 message found.
269 The current message is initially the first message (numbered 1) and can
270 be printed using the print command which can be abbreviated `p').
271 The user can move among the messages much as he moves between lines in
272 .IR ed (1),
273 with the commands `+' and `\-' moving backwards and forwards,
274 and simple numbers.
275 .SS "Disposing of mail"
276 After examining a message the user can delete `d') the message or reply
277 `r') to it.
278 Deletion causes the \*(UA program to forget about the message.
279 This is not irreversible;
280 the message can be undeleted `u') by giving its number,
281 or the \*(UA session can be aborted by giving the exit `x') command.
282 Deleted messages will, however, usually disappear never to be seen
283 again.
284 .SS "Specifying messages"
285 Commands such as print and delete can be given a list of message numbers
286 as arguments to apply to a number of messages at once.
287 Thus `\fIdelete 1 2\fR' deletes messages 1 and 2, while
288 `\fIdelete 1-5\fR' deletes messages 1 through 5.
289 In sorted or threaded mode (see the
290 .I sort
292 .I thread
293 commands),
294 `\fIdelete 1-5\fR' deletes the messages that are located between (and
295 including) messages 1 through 5 in the sorted/threaded order, as shown
296 in the header summary.
297 The following special message names exist:
299 .B :n
300 All new messages.
302 .B :o
303 All old messages (any not in state read or new).
305 .B :u
306 All unread messages.
308 .B :d
309 All deleted messages (for the
310 .I undelete
311 command).
313 .B :r
314 All read messages.
316 .B :f
317 All `flagged' messages.
319 .B :a
320 All answered messages
321 (cf. the
322 .I markanswered
323 variable).
325 .B :t
326 All messages marked as draft.
328 .B :k
329 All `killed' messages.
331 .B :j
332 All messages classified as junk.
334 .B .
335 The current message.
337 .B ;
338 The message that was previously the current message.
340 .B ,
341 The parent message of the current message,
342 that is the message with the Message-ID
343 given in the `In-Reply-To:' field
344 or the last entry of the `References:' field
345 of the current message.
347 .B \-
348 The next previous undeleted message,
349 or the next previous deleted message for the
350 .I undelete
351 command.
352 In sorted/threaded mode,
353 the next previous such message in the sorted/threaded order.
355 .B +
356 The next undeleted message,
357 or the next deleted message for the
358 .I undelete
359 command.
360 In sorted/threaded mode,
361 the next such message in the sorted/threaded order.
363 .B ^
364 The first undeleted message,
365 or the first deleted message
366 for the
367 .I undelete
368 command.
369 In sorted/threaded mode,
370 the first such message in the sorted/threaded order.
372 .B $
373 The last message.
374 In sorted/threaded mode,
375 the last message in the sorted/threaded order.
377 .BI & x
378 In threaded mode,
379 selects the message addressed with
380 .IR x ,
381 where
382 .I x
383 is any other message specification,
384 and all messages from the thread that begins at it.
385 Otherwise, it is identical to
386 .IR x .
388 .I x
389 is omitted,
390 the thread beginning with the current message is selected.
392 .B *
393 All messages.
395 .B `
396 All messages that were included in the message list
397 for the previous command.
399 .BI / string
400 All messages that contain
401 .I string
402 in the subject field (case ignored).
403 See also the
404 .I searchheaders
405 variable.
407 .I string
408 is empty,
409 the string from the previous specification of that type is used again.
411 .I address
412 All messages from
413 .IR address .
414 By default, this is a case-sensitive search
415 for the complete email address.
416 If the
417 .I allnet
418 variable is set,
419 only the local part of the addresses is evaluated for the comparison.
420 Otherwise if the
421 .I showname
422 variable is set,
423 a case-sensitive search for the complete real name
424 of a sender is performed.
425 The IMAP-style
426 .BI (from\  address)
427 expression can be used instead
428 if substring matches are desired.
430 .BI ( criterion )
431 All messages that satisfy the given IMAP-style SEARCH
432 .IR criterion .
433 This addressing mode is available with all types of folders;
434 for folders not located on IMAP servers,
435 or for servers unable to execute the SEARCH command,
436 \*(UA will perform the search locally.
437 Strings must be enclosed by double quotes `"' in their entirety
438 if they contain white space or parentheses;
439 within the quotes,
440 only backslash `\e' is recognized as an escape character.
441 All string searches are case-insensitive.
442 When the description indicates
443 that the `envelope' representation of an address field is used,
444 this means that the search string is checked against
445 both a list constructed as
448 \fB("\fIreal name\fB" "\fIsource-route\fB" "\fIlocal-part\fB" "\fIdomain-part\fB")\fR
451 for each address,
452 and the addresses without real names
453 from the respective header field.
454 Criteria can be nested using parentheses.
456 \fB(\fIcriterion1 criterion2\fR .\|.\|. \fIcriterionN\fB)\fR
457 All messages that satisfy all of the given criteria.
459 .BI (or " criterion1 criterion2" )
460 All messages that satisfy either
461 .I criterion1
463 .IR criterion2 ,
464 or both.
465 To connect more than two criteria using `or',
466 (or) specifications have to be nested using additional parentheses,
467 as with `(or\ a\ (or\ b\ c))';
468 `(or\ a\ b\ c)' means ((a or b) and c).
469 For a simple `or' operation of independent criteria
470 on the lowest nesting level,
471 it is possible to achieve similar effects by using
472 three separate criteria, as with
473 `(a)\ (b)\ (c)'.
475 .BI (not " criterion" )
476 All messages that do not satisfy
477 .IR criterion .
479 .BI (bcc " string" )
480 All messages that contain
481 .I string
482 in the `envelope' representation of the
483 .I Bcc:
484 field.
486 .BI (cc " string" )
487 All messages that contain
488 .I string
489 in the `envelope' representation of the
490 .I Cc:
491 field.
493 .BI (from " string" )
494 All messages that contain
495 .I string
496 in the `envelope' representation of the
497 .I From:
498 field.
500 .BI (subject " string" )
501 All messages that contain
502 .I string
503 in the
504 .I Subject:
505 field.
507 .BI (to " string" )
508 All messages that contain
509 .I string
510 in the `envelope' representation of the
511 .I To:
512 field.
514 .BI (header " name string" )
515 All messages that contain
516 .I string
517 in the specified
518 .I Name:
519 field.
521 .BI (body " string" )
522 All messages that contain
523 .I string
524 in their body.
526 .BI (text " string" )
527 All messages that contain
528 .I string
529 in their header or body.
531 .BI (larger " size" )
532 All messages that are larger than
533 .I size
534 (in bytes).
536 .BI (smaller " size" )
537 All messages that are smaller than
538 .I size
539 (in bytes).
541 .BI (before " date" )
542 All messages that were received before
543 .IR date ;
544 .I date
545 must be in the form
546 \fId\fR[\fId\fR]\fB-\fImon\fB-\fIyyyy\fR,
547 where \fId\fR[\fId\fR] is the day of the month
548 as one or two digits,
549 .I mon
550 is the name of the month\(emone of
551 `Jan', `Feb', `Mar',
552 `Apr', `May', `Jun',
553 `Jul', `Aug', `Sep',
554 `Oct', `Nov', or `Dec',
556 .I yyyy
557 is the year as four digits;
558 e.\|g. "30-Aug-2004".
560 .BI (on " date" )
561 All messages that were received on the specified date.
563 .BI (since " date" )
564 All messages that were received since the specified date.
566 .BI (sentbefore " date" )
567 All messages that were sent on the specified date.
569 .BI (senton " date" )
570 All messages that were sent on the specified date.
572 .BI (sentsince " date" )
573 All messages that were sent since the specified date.
575 .B ()
576 The same criterion as for the previous search.
577 This specification cannot be used as part of another criterion.
578 If the previous command line contained more than one independent criterion,
579 the last of those criteria is used.
581 A practical method to read a set of messages
582 is to issue a
583 .I from
584 command with the search criteria first
585 to check for appropriate messages,
586 and to read each single message then by typing `\fB`\fR' repeatedly.
587 .SS "Replying to or originating mail"
589 .I reply
590 command can be used
591 to set up a response to a message,
592 sending it back to the person who it was from.
593 Text the user types in then,
594 up to an end-of-file,
595 defines the contents of the message.
596 While the user is composing a message,
597 \*(UA treats lines beginning with the character `~' specially.
598 For instance, typing `~m' (alone on a line)
599 will place a copy of the current message into the response
600 right shifting it by a tabstop
601 (see
602 .I indentprefix
603 variable, below).
604 Other escapes will set up subject fields,
605 add and delete recipients to the message,
606 attach files to it
607 and allow the user to escape to an editor
608 to revise the message
609 or to a shell to run some commands.
610 (These options are given in the summary below.)
611 .SS "Ending a mail processing session"
612 The user can end a \*(UA session
613 with the quit (`q') command.
614 Messages which have been examined
615 go to the user's mbox file
616 unless they have been deleted
617 in which case they are discarded.
618 Unexamined messages go back
619 to the post office.
620 (See the \-f option above).
621 .SS "Personal and systemwide distribution lists"
622 It is also possible to create
623 a personal distribution lists so that,
624 for instance, the user can send mail
625 to `\fIcohorts\fR' and have it go
626 to a group of people.
627 Such lists can be defined by placing a line like
630         \fBalias\fI cohorts bill ozalp jkf mark kridle@ucbcory\fR
633 in the file \*(ur in the user's home directory.
634 The currently defined list of such aliases can be displayed with the alias
635 command in \*(UA.
636 System wide distribution lists can be created by editing /etc/aliases, see
637 \fIaliases(5)\fR and \fIsendmail(1)\fR;
638 these are kept in a different syntax and are used by the MTA, not \*(UA.
639 In mail the user sends, personal aliases will be expanded in mail sent to
640 others so that they will be able to reply to the recipients.
641 System wide aliases are not expanded when the mail is sent,
642 but any reply returned to the machine will have the system wide alias
643 expanded as all mail goes through \fIsendmail(1)\fR.
644 .SS "Recipient address specifications"
645 When an address is used to name a recipient
646 (in any of To, Cc, or Bcc),
647 names of local mail folders
648 and pipes to external commands
649 can also be specified;
650 the message text is then written to them.
651 The rules are: Any name which starts with a
652 .RB ` | '
653 character specifies a pipe,
654 the command string following the `|' is executed
655 and the message is sent to its standard input;
656 any other name which contains a
657 .RB ` @ '
658 character is treated as a mail address;
659 any other name which starts with a
660 .RB ` + '
661 character specifies a folder name;
662 any other name which contains a
663 .RB ` / '
664 character
665 but no
666 .RB ` ! '
668 .RB ` % '
669 character before also specifies a folder name;
670 what remains is treated as a mail address.
671 Compressed folders are handled as described for the
672 .I folder
673 command below.
674 .SS "Network mail (Internet / ARPA, UUCP, Berknet)"
676 .IR mailaddr (7)
677 for a description of network addresses.
678 \*(UA has a number of options which can be set in the \*(ur file
679 to alter its behavior;
680 thus `\fIset askcc\fR' enables the askcc feature.
681 (These options are summarized below).
682 .SS "MIME types"
683 For any outgoing attachment,
684 \*(UA tries to determine the content type.
685 It does this by reading MIME type files
686 whose lines have the following syntax:
689         \fItype\fB/\fIsubtype      extension \fR[\fIextension \fR.\ .\ .]\fR
692 where type/subtype are strings describing the file contents,
693 and extension is the part of a filename starting after the last dot.
694 Any line not immediately beginning with an ASCII alphabetical character is
695 ignored by \*(UA.
696 If there is a match with the extension of the file to attach,
697 the given type/subtype pair is used.
698 Otherwise, or if the filename has no extension,
699 the content types text/plain or application/octet-stream are used,
700 the first for text or international text files,
701 the second for any file that contains formatting characters
702 other than newlines and horizontal tabulators.
703 .SS "Character sets"
704 \*(UA normally detects the character set of the terminal
705 using the LC_CTYPE locale setting.
706 If the locale cannot be used appropriately,
707 the \fIttycharset\fR variable should be set
708 to provide an explicit value.
709 When reading messages,
710 their text is converted to the terminal character set if possible.
711 Unprintable characters and illegal byte sequences are detected
712 and replaced by Unicode substitute characters or question marks
713 unless the
714 .I print-all-chars
715 is set at initialization time.
717 The character set for outgoing messages
718 is not necessarily the same
719 as the one used on the terminal.
720 If an outgoing text message
721 contains characters not representable in US-ASCII,
722 the character set being used
723 must be declared within its header.
724 Permissible values can be declared
725 using the \fIsendcharsets\fR variable,
726 separated by commas;
727 \*(UA tries each of the values in order
728 and uses the first appropriate one.
729 If the message contains characters that cannot be represented
730 in any of the given character sets,
731 the message will not be sent,
732 and its text will be saved to the `dead.letter' file.
733 Messages that contain NUL bytes are not converted.
735 Outgoing attachments are converted if they are plain text.
736 If the
737 .I sendcharsets
738 variable contains more than one character set name,
740 .I ~@
741 tilde escape will ask for the character sets for individual attachments
742 if it is invoked without arguments.
744 Best results are usually achieved
745 when \*(UA is run in a UTF-8 locale
746 on a UTF-8 capable terminal.
747 In this setup,
748 characters from various countries can be displayed,
749 while it is still possible to use more simple
750 character sets for sending
751 to retain maximum compatibility with older mail clients.
752 .SS "Commands"
753 Each command is typed on a line by itself,
754 and may take arguments following the command word.
755 The command need not be typed in its entirety \(en
756 the first command which matches the typed prefix is used.
757 For commands which take message lists as arguments,
758 if no message list is given,
759 then the next message forward which satisfies
760 the command's requirements is used.
761 If there are no messages forward of the current message,
762 the search proceeds backwards,
763 and if there are no good messages at all,
764 \*(UA types `\fIapplicable messages\fR' and aborts the command.
765 If the command begins with a \fI#\fR sign,
766 the line is ignored.
768 The arguments to commands can be quoted, using the following methods:
769 .IP \(bu
770 An argument can be enclosed between paired double-quotes
771 "\|" or single-quotes '\|'; any white space, shell
772 word expansion, or backslash characters within the quotes
773 are treated literally as part of the argument.
774 A double-quote will be treated literally within
775 single-quotes and vice versa. These special properties of
776 the quote marks occur only when they are paired at the
777 beginning and end of the argument.
778 .IP \(bu
779 A backslash outside of the enclosing quotes is discarded
780 and the following character is treated literally as part of
781 the argument.
782 .IP \(bu
783 An unquoted backslash at the end of a command line is
784 discarded and the next line continues the command.
786 Filenames, where expected, are subjected to the following
787 transformations, in sequence:
788 .IP \(bu
789 If the filename begins with an unquoted plus sign, and
791 .I folder
792 variable is defined,
793 the plus sign will be replaced by the value of the
794 .I folder
795 variable followed by a slash. If the
796 .I folder
797 variable is
798 unset or is set to null, the filename will be unchanged.
799 .IP \(bu
800 Shell word expansions are applied to the filename.
801 If more than a single pathname results
802 from this expansion and the command is expecting one
803 file, an error results.
805 The following commands are provided:
807 .B \-
808 Print out the preceding message.
809 If given a numeric argument n,
810 goes to the n'th previous message and prints it.
812 .B ?
813 Prints a brief summary of commands.
815 .B !
816 Executes the shell (see
817 .IR sh (1)
819 .IR csh (1))
820 command which follows.
822 .B |
823 A synonym for the \fIpipe\fR command.
825 .B account
826 (ac) Creates, selects or lists
827 an email account.
828 An account is formed by a group of commands,
829 primarily of those to set variables.
830 With two arguments,
831 of which the second is a `{',
832 the first argument gives an account name,
833 and the following lines create a group of commands for that account
834 until a line containing a single `}' appears.
835 With one argument,
836 the previously created group of commands
837 for the account name is executed,
838 and a
839 .I folder
840 command is executed for the system mailbox or inbox
841 of that account.
842 Without arguments,
843 the list of accounts and their contents are printed.
844 As an example,
847     \fBaccount\fI myisp\fR \fB{\fR
848         set folder=imaps://mylogin@imap.myisp.example
849         set record=+Sent
850         set from="myname@myisp.example (My Name)"
851         set smtp=smtp.myisp.example
852     \fB}\fR
855 creates an account named `myisp'
856 which can later be selected by specifying `account myisp'.
858 .B alias
859 (a) With no arguments,
860 prints out all currently-defined aliases.
861 With one argument, prints out that alias.
862 With more than one argument,
863 creates a new alias or changes an old one.
865 .B alternates
866 (alt) The alternates command is useful
867 if the user has accounts on several machines.
868 It can be used to inform \*(UA
869 that the listed addresses all belong to the invoking user.
870 When he replies to messages,
871 \*(UA will not send a copy of the message
872 to any of the addresses
873 listed on the alternates list.
874 If the alternates command is given
875 with no argument,
876 the current set of alternate names is displayed.
878 .B answered
879 (ans) Takes a message list and marks each message
880 as a having been answered.
881 This mark has no technical meaning in the mail system;
882 it just causes messages to be marked in the header summary,
883 and makes them specially addressable.
885 .B cache
886 Only applicable to cached IMAP mailboxes;
887 takes a message list and reads the specified messages
888 into the IMAP cache.
890 .B call
891 Calls a macro (see the
892 .I define
893 command).
895 .B cd
896 Same as chdir.
898 .B certsave
899 Only applicable to S/MIME signed messages.
900 Takes a message list and a file name
901 and saves the certificates contained within the message signatures
902 to the named file in both human-readable and PEM format.
903 The certificates can later be used to send encrypted messages
904 to the messages' originators by setting the
905 .I smime-encrypt-user@host
906 variable.
908 .B chdir
909 (ch) Changes the user's working directory to that specified,
910 if given.
911 If no directory is given,
912 then changes to the user's login directory.
914 .B classify
915 (cl) Takes a list of messages and
916 examines their contents for characteristics of junk mail
917 using Bayesian filtering.
918 Messages considered to be junk are then marked as such.
919 The junk mail database is not changed.
921 .B collapse
922 (coll)
923 Only applicable to threaded mode.
924 Takes a message list
925 and makes all replies to these messages invisible
926 in header summaries,
927 unless they are in state `new'.
929 .B connect
930 (conn) If operating in disconnected mode on an IMAP mailbox,
931 switch to online mode and connect to the mail server
932 while retaining the mailbox status.
933 See the description of the
934 .I disconnected
935 variable for more information.
937 .B copy
938 (c) The copy command does the same thing that
939 .I save
940 does,
941 except that it does not mark the messages
942 it is used on for deletion when the user quits.
943 Compressed files and IMAP mailboxes are handled as described for the
944 .I folder
945 command.
947 .B Copy
948 (C) Similar to
949 .IR copy ,
950 but saves the messages in a file named after the local part
951 of the sender address of the first message.
953 .B decrypt
954 (dec) For unencrypted messages,
955 this command is identical to
956 .IR copy .
957 Encrypted messages are first decrypted, if possible,
958 and then copied.
960 .B Decrypt
961 (Dec) Similar to
962 .IR decrypt ,
963 but saves the messages in a file named after the local part
964 of the sender address of the first message.
966 .B define
967 (def) Defines a macro.
968 A macro definition is a sequence of commands in the following form:
971     \fBdefine\fR \fIname\fB {\fR
972         \fIcommand1\fR
973         \fIcommand2\fR
974         .\|.\|.
975         \fIcommandN\fR
976     \fB}\fR
979 Once defined, a macro can be explicitly invoked using the
980 .I call
981 command,
982 or can be implicitly invoked by setting the
983 .I folder-hook
985 .I folder-hook-fullname
986 variables.
988 .B defines
989 Prints the currently defined macros including their contents.
991 .B delete
992 (d) Takes a list of messages as argument
993 and marks them all as deleted.
994 Deleted messages will not be saved in mbox,
995 nor will they be available for most other commands.
997 .B discard
998 Same as ignore.
1000 .B disconnect
1001 (disco) If operating in online mode on an IMAP mailbox,
1002 switch to disconnected mode while retaining the mailbox status.
1003 See the description of the
1004 .I disconnected
1005 variable for more information.
1006 A list of messages may optionally be given as argument;
1007 the respective messages are then read into the cache
1008 before the connection is closed.
1009 Thus `disco *' makes the entire current mailbox
1010 available for disconnected use.
1012 .BR dp \ or \ dt
1013 Deletes the current message
1014 and prints the next message.
1015 If there is no next message,
1016 \*(UA says `\fIat EOF\fR'.
1018 .B draft
1019 Takes a message list and marks each message
1020 as a draft.
1021 This mark has no technical meaning in the mail system;
1022 it just causes messages to be marked in the header summary,
1023 and makes them specially addressable.
1025 .B echo
1026 Echoes its arguments,
1027 resolving special names
1028 as documented for the folder command.
1029 The escape sequences
1030 `\fB\ea\fR',
1031 `\fB\eb\fR',
1032 `\fB\ec\fR',
1033 `\fB\ef\fR',
1034 `\fB\en\fR',
1035 `\fB\er\fR',
1036 `\fB\et\fR',
1037 `\fB\ev\fR',
1038 `\fB\e\e\fR', and
1039 `\fB\e0\fInum\fR'
1040 are interpreted
1041 as with the
1042 .IR echo (1)
1043 command.
1045 .B edit
1046 (e) Takes a list of messages
1047 and points the text editor
1048 at each one in turn.
1049 Modified contents are discarded
1050 unless the
1051 .I writebackedited
1052 variable is set.
1054 .B else
1055 Marks the end of the then-part
1056 of an if statement
1057 and the beginning of the part
1058 to take effect if the condition
1059 of the if statement is false.
1061 .B endif
1062 Marks the end of an if statement.
1064 .B exit
1065 (ex or x) Effects an immediate return to the Shell
1066 without modifying the user's system mailbox,
1067 his mbox file,
1068 or his edit file in \-f.
1070 .B file
1071 (fi) The same as folder.
1073 .B flag
1074 (fl) Takes a message list
1075 and marks the messages as `flagged' for urgent/special attention.
1076 This mark has no technical meaning in the mail system;
1077 it just causes messages to be highlighted in the header summary,
1078 and makes them specially addressable.
1080 .B folders
1081 With no arguments,
1082 list the names of the folders in the folder directory.
1083 With an existing folder as an argument,
1084 lists then names of folders below the named folder;
1085 e.\|g. the command `folders @'
1086 lists the folders on the base level of the current IMAP server.
1087 See also the
1088 .I imap-list-depth
1089 variable.
1091 .B folder
1092 (fold) The folder command switches
1093 to a new mail file or folder.
1094 With no arguments, it tells the user
1095 which file he is currently reading.
1096 If an argument is given,
1097 it will write out changes
1098 (such as deletions) the user has made
1099 in the current file and read in
1100 the new file.
1101 Some special conventions are recognized for the name.
1102 \fB#\fR means the previous file,
1103 \fB%\fR means the invoking user's system mailbox,
1104 \fB%\fIuser\fR means \fIuser's\fR system mailbox,
1105 \fB&\fR means the invoking user's mbox file,
1106 and \fB+\fIfile\fI means a \fIfile\fR in the folder directory.
1107 \fB%:\fIfilespec\fR expands to the same value as \fIfilespec\fR,
1108 but the file is handled as a system mailbox
1109 e.\ g. by the mbox and save commands.
1110 If the name matches one of the strings defined with the
1111 .I shortcut
1112 command,
1113 it is replaced by its long form and expanded.
1114 If the name ends with \fB.gz\fR or \fB.bz2\fR,
1115 it is treated as compressed with
1116 .IR gzip (1)
1118 .IR bzip2 (1),
1119 respectively.
1120 Likewise, if \fIname\fR does not exist,
1121 but either \fIname\fB.gz\fR or \fIname\fB.bz2\fR exists,
1122 the compressed file is used.
1123 If \fIname\fR refers to a directory
1124 with the subdirectories `tmp', `new', and `cur',
1125 it is treated as a folder in
1126 .I maildir
1127 format.
1128 A name of the form
1131        \fIprotocol\fB://\fR[\fIuser\fB@\fR]\fIhost\fR[\fB:\fIport\fR][\fB/\fIfile\fR]
1134 is taken as an Internet mailbox specification.
1135 The supported protocols are currently
1136 .B imap
1137 (IMAP v4r1),
1138 .B imaps
1139 (IMAP with SSL/TLS encryption),
1140 .B pop3
1141 (POP3),
1143 .B pop3s
1144 (POP3 with SSL/TLS encryption).
1146 .I user
1147 contains special characters, in particular `/' or `%',
1148 they must be escaped in URL notation,
1149 as `%2F' or `%25'.
1150 The optional
1151 .I file
1152 part applies to IMAP only;
1153 if it is omitted,
1154 the default `INBOX' is used.
1155 If \*(UA is connected to an IMAP server,
1156 a name of the form \fB@\fImailbox\fR
1157 refers to the \fImailbox\fR on that server.
1158 If the `folder' variable refers to an IMAP account,
1159 the special name `%' selects the `INBOX' on that account.
1161 .B Followup
1162 (F) Similar to
1163 .IR Respond ,
1164 but saves the message in a file
1165 named after the local part of the first recipient's address.
1167 .B followup
1168 (fo) Similar to
1169 .IR respond ,
1170 but saves the message in a file
1171 named after the local part of the first recipient's address.
1173 .B followupall
1174 Similar to
1175 .IR followup ,
1176 but responds to all recipients regardless of the
1177 .I flipr
1179 .I Replyall
1180 variables.
1182 .B followupsender
1183 Similar to
1184 .IR Followup ,
1185 but responds to the sender only regardless of the
1186 .I flipr
1188 .I Replyall
1189 variables.
1191 .B forward
1192 (fwd)
1193 Takes a message and the address of a recipient
1194 and forwards the message to him.
1195 The text of the original message is included in the new one,
1196 with the value of the
1197 .I fwdheading
1198 variable printed before.
1200 .I fwdignore
1202 .I fwdretain
1203 commands specify which header fields are included in the new message.
1204 Only the first part of a multipart message is included unless the
1205 .I forward-as-attachment
1206 option is set.
1208 .B Forward
1209 (Fwd)
1210 Similar to
1211 .IR forward ,
1212 but saves the message in a file named after
1213 the local part of the recipient's address.
1215 .B from
1216 (f) Takes a list of messages
1217 and prints their message headers,
1218 piped through the pager if the output does not fit on the screen.
1220 .B fwdignore
1221 Specifies which header fields are to be ignored with the
1222 .I forward
1223 command.
1224 This command has no effect when the
1225 .I forward-as-attachment
1226 option is set.
1228 .B fwdretain
1229 Specifies which header fields are to be retained with the
1230 .I forward
1231 command.
1232 .I fwdretain
1233 overrides
1234 .IR fwdignore .
1235 This command has no effect when the
1236 .I forward-as-attachment
1237 option is set.
1239 .B good
1240 (go) Takes a list of messages
1241 and marks all of them as not being junk mail.
1242 Data from these messages is then inserted
1243 into the junk mail database for future classification.
1245 .B headers
1246 (h) Lists the current range of headers,
1247 which is an 18-message group.
1248 If a `+' argument is given,
1249 then the next 18-message group is printed,
1250 and if a `\-' argument is given,
1251 the previous 18-message group is printed.
1253 .B help
1254 A synonym for ?.
1256 .B hold
1257 (ho, also preserve) Takes a message list
1258 and marks each message therein to be saved
1259 in the user's system mailbox
1260 instead of in mbox.
1261 Does not override the delete command.
1262 \*(UA deviates from the POSIX standard with this command,
1263 as a `next' command issued after `hold'
1264 will display the following message,
1265 not the current one.
1267 .B if
1268 Commands in \*(UA's startup files
1269 can be executed conditionally
1270 depending on whether the user is sending
1271 or receiving mail with the if command.
1272 For example:
1275     \fBif \fIreceive\fR
1276         \fIcommands .\ .\ .\fR
1277     \fBendif\fR
1280 An else form is also available:
1283     \fBif \fIreceive\fR
1284         \fIcommands .\ .\ .\fR
1285     \fBelse\fR
1286         \fIcommands .\ .\ .\fR
1287     \fBendif\fR
1290 Note that the only allowed conditions are
1291 .BR receive ,
1292 .BR send ,
1294 .B term
1295 (execute command if standard input is a tty).
1297 .B ignore
1298 Add the list of header fields named to the ignored list.
1299 Header fields in the ignore list are not printed
1300 on the terminal when a message is printed.
1301 This command is very handy for suppression
1302 of certain machine-generated header fields.
1303 The Type and Print commands can be used
1304 to print a message in its entirety,
1305 including ignored fields.
1306 If ignore is executed with no arguments,
1307 it lists the current set of ignored fields.
1309 .B imap
1310 Sends command strings directly to the current IMAP server.
1311 \*(UA operates always in IMAP \fIselected state\fR
1312 on the current mailbox;
1313 commands that change this
1314 will produce undesirable results
1315 and should be avoided.
1316 Useful IMAP commands are:
1319 .B create
1320 Takes the name of an IMAP mailbox as an argument
1321 and creates it.
1323 .B getquotaroot
1324 .\" RFC 2087
1325 Takes the name of an IMAP mailbox as an argument
1326 and prints the quotas that apply to the mailbox.
1327 Not all IMAP servers support this command.
1329 .B namespace
1330 .\" RFC 2342
1331 Takes no arguments and prints the Personal Namespaces,
1332 the Other User's Namespaces,
1333 and the Shared Namespaces.
1334 Each namespace type is printed in parentheses;
1335 if there are multiple namespaces of the same type,
1336 inner parentheses separate them.
1337 For each namespace,
1338 a namespace prefix and a hierarchy separator is listed.
1339 Not all IMAP servers support this command.
1342 .B inc
1343 Same as
1344 .IR newmail .
1346 .B junk
1347 (j) Takes a list of messages
1348 and marks all of them as junk mail.
1349 Data from these messages is then inserted
1350 into the junk mail database for future classification.
1352 .B kill
1353 (k) Takes a list of messages and `kills' them.
1354 Killed messages are not printed in header summaries,
1355 and are ignored by the
1356 .I next
1357 command.
1359 .I kill
1360 command also sets the score of the messages to negative infinity,
1361 so that subsequent
1362 .I score
1363 commands will not unkill them again.
1364 Killing is only effective for the current session on a folder;
1365 when it is quit, all messages are automatically unkilled.
1367 .B list
1368 Prints the names of all available commands.
1370 .B Mail
1371 (M) Similar to
1372 .IR mail ,
1373 but saves the message in a file
1374 named after the local part of the first recipient's address.
1376 .B mail
1377 (m) Takes as arguments the usual recipient addresses,
1378 or asks on standard input if none were given;
1379 then collects remain mail content and sends it out.
1381 .B mbox
1382 Indicate that a list of messages be sent
1383 to mbox in the user's home directory when
1384 \*(UA is quit.
1385 This is the default action for messages
1386 if unless the
1387 .I hold
1388 option is set.
1389 \*(UA deviates from the POSIX standard with this command,
1390 as a `next' command issued after `mbox'
1391 will display the following message,
1392 not the current one.
1394 .B move
1395 (mv) Acts like
1396 .IR copy ,
1397 but marks the messages for deletion
1398 if they were transferred successfully.
1400 .B Move
1401 (Mv) Similar to
1402 .IR move ,
1403 but moves the messages to a file named after the local part
1404 of the sender address of the first message.
1406 .B newmail
1407 Checks for new mail in the current folder
1408 without committing any changes before.
1409 If new mail is present, a message is printed.
1410 If the
1411 .I header
1412 variable is set,
1413 the headers of each new message are also printed.
1415 .B next
1416 (n) like + or CR) Goes to the next message
1417 in sequence and types it.
1418 With an argument list, types the next matching message.
1420 .B New
1421 Same as
1422 .IR unread .
1424 .B new
1425 Same as
1426 .IR unread .
1428 .B online
1429 Same as
1430 .IR connect .
1432 .B noop
1433 If the current folder is located on an IMAP or POP3 server,
1434 a NOOP command is sent.
1435 Otherwise, no operation is performed.
1437 .B Pipe
1438 (Pi) Like
1439 .I pipe
1440 but also
1441 pipes ignored header fields
1442 and all parts of MIME
1443 .I multipart/alternative
1444 messages.
1446 .B pipe
1447 (pi) Takes a message list and a shell command
1448 and pipes the messages through the command.
1449 Without an argument,
1450 the current message is piped
1451 through the command given by the \fIcmd\fR variable.
1452 If the \fI page\fR variable is set,
1453 every message is followed by a formfeed character.
1455 .B preserve
1456 (pre) A synonym for
1457 .IR hold .
1459 .B Print
1460 (P) Like
1461 .I print
1462 but also
1463 prints out ignored header fields
1464 and all parts of MIME
1465 .I multipart/alternative
1466 messages.
1467 See also
1468 .IR print ,
1469 .IR ignore ,
1471 .IR retain .
1473 .B print
1474 (p) Takes a message list and types out each message
1475 on the user's terminal.
1476 If the message is a MIME multipart message,
1477 all parts with a content type of `text' or `message' are shown,
1478 the other are hidden except for their headers.
1479 Messages are decrypted and converted to the terminal character set
1480 if necessary.
1482 .B probability
1483 (prob) For each word given as argument,
1484 the contents of its junk mail database entry are printed.
1486 .B quit
1487 (q) Terminates the session, saving all undeleted,
1488 unsaved messages in the user's mbox file in his login directory,
1489 preserving all messages marked with hold or preserve
1490 or never referenced in his system mailbox,
1491 and removing all other messages from his system mailbox.
1492 If new mail has arrived during the session,
1493 the message `\fIYou have new mail\fR' is given.
1494 If given while editing a mailbox file with the \-f flag,
1495 then the edit file is rewritten.
1496 A return to the Shell is effected,
1497 unless the rewrite of edit file fails,
1498 in which case the user can escape
1499 with the exit command.
1501 .B redirect
1502 (red) Same as
1503 .IR resend .
1505 .B Redirect
1506 (Red) Same as
1507 .IR Resend .
1509 .B remove
1510 (rem) Removes the named folders.
1511 The user is asked for confirmation
1512 in interactive mode.
1514 .B rename
1515 (ren) Takes the name of an existing folder
1516 and the name for the new folder
1517 and renames the first to the second one.
1518 Both folders must be of the same type
1519 and must be located on the current server for IMAP.
1521 .B Reply
1522 (R) Reply to originator.
1523 Does not reply to other recipients
1524 of the original message.
1526 .BR reply
1527 (r) Takes a message list and sends mail
1528 to the sender and all recipients of the specified message.
1529 The default message must not be deleted.
1531 .B replyall
1532 Similar to
1533 .IR reply ,
1534 but responds to all recipients regardless of the
1535 .I flipr
1537 .I Replyall
1538 variables.
1540 .B replysender
1541 Similar to
1542 .IR Reply ,
1543 but responds to the sender only regardless of the
1544 .I flipr
1546 .I Replyall
1547 variables.
1549 .B Resend
1550 Like
1551 .IR resend ,
1552 but does not add any header lines.
1553 This is not a way to hide the sender's identity,
1554 but useful for sending a message again
1555 to the same recipients.
1557 .B resend
1558 Takes a list of messages and a user name
1559 and sends each message to the named user.
1560 `Resent-From:' and related header fields are prepended
1561 to the new copy of the message.
1563 .B Respond
1564 Same as
1565 .IR Reply .
1567 .B respond
1568 Same as
1569 .IR reply .
1571 .B respondall
1572 Same as
1573 .IR replyall .
1575 .B respondsender
1576 Same as
1577 .IR replysender .
1579 .B retain
1580 Add the list of header fields named to the retained list.
1581 Only the header fields in the retain list are shown
1582 on the terminal when a message is printed.
1583 All other header fields are suppressed.
1584 The Type and Print commands can be used
1585 to print a message in its entirety.
1586 If retain is executed with no arguments,
1587 it lists the current set of retained fields.
1589 .B Save
1591 Similar to
1592 .IR save ,
1593 but saves the messages
1594 in a file named after the local part
1595 of the sender of the first message
1596 instead of taking a filename argument.
1598 .B save
1599 (s) Takes a message list and a filename
1600 and appends each message
1601 in turn to the end of the file.
1602 If no filename is given,
1603 the mbox file is used.
1604 The filename in quotes,
1605 followed by the line count and character count
1606 is echoed on the user's terminal.
1607 If editing a system mailbox,
1608 the messages are marked for deletion.
1609 Compressed files and IMAP mailboxes are handled as described for the
1610 .I \-f
1611 command line option above.
1613 .B savediscard
1614 Same as saveignore.
1616 .B saveignore
1617 Saveignore is to save what ignore is to print and type.
1618 Header fields thus marked are filtered out
1619 when saving a message by save
1620 or when automatically saving to mbox.
1621 This command should only be applied to header fields
1622 that do not contain information needed to decode the message,
1623 as MIME content fields do.
1624 If saving messages on an IMAP account,
1625 ignoring fields makes it impossible
1626 to copy the data directly on the server,
1627 thus operation usually becomes much slower.
1629 .B saveretain
1630 Saveretain is to save what retain is to print and type.
1631 Header fields thus marked are the only ones
1632 saved with a message when saving by save
1633 or when automatically saving to mbox.
1634 Saveretain overrides saveignore.
1635 The use of this command is strongly discouraged
1636 since it may strip header fields
1637 that are needed to decode the message correctly.
1639 .B score
1640 (sc) Takes a message list and a floating point number
1641 and adds the number to the score of each given message.
1642 All messages start at score 0 when a folder is opened.
1643 When the score of a message becomes negative, it is `killed'
1644 with the effects described for the
1645 .I kill
1646 command;
1647 otherwise if it was negative before and becomes positive,
1648 it is `unkilled'.
1649 Scores only refer to the currently opened instance of a folder.
1651 .B set
1652 (se) With no arguments, prints all variable values,
1653 piped through the pager if the output does not fit on the screen.
1654 Otherwise, sets option.
1655 Arguments are of the form option=value
1656 (no space before or after =)
1657 or option.
1658 Quotation marks may be placed around any part of the
1659 assignment statement to quote blanks
1660 or tabs, i.\|e. `\fIset indentprefix="\->"\fR'.
1661 If an argument begins with
1662 .BR no ,
1663 as in `\fBset no\fIsave\fR',
1664 the effect is the same as invoking the
1665 .I unset
1666 command with the remaining part of the variable
1667 (`\fIunset \fIsave\fR').
1669 .B seen
1670 Takes a message list and marks all messages as having been read.
1672 .B shell
1673 (sh) Invokes an interactive version of the shell.
1675 .B shortcut
1676 Defines a shortcut name and its string for expansion,
1677 as described for the
1678 .I folder
1679 command.
1680 With no arguments,
1681 a list of defined shortcuts is printed.
1683 .B show
1684 (Sh) Like
1685 .IR print ,
1686 but performs neither MIME decoding nor decryption
1687 so that the raw message text is shown.
1689 .B size
1690 Takes a message list and prints out
1691 the size in characters of each message.
1693 .B sort
1694 Create a sorted representation of the current folder,
1695 and change the
1696 .I next
1697 command and the addressing modes
1698 such that they refer to messages in the sorted order.
1699 Message numbers are the same as in regular mode.
1700 If the
1701 .I header
1702 variable is set,
1703 a header summary in the new order is also printed.
1704 Possible sorting criteria are:
1707 .B date
1708 Sort the messages by their `Date:' field,
1709 that is by the time they were sent.
1711 .B from
1712 Sort messages by the value of their `From:' field,
1713 that is by the address of the sender.
1714 If the
1715 .I showname
1716 variable is set,
1717 the sender's real name (if any) is used.
1719 .B size
1720 Sort the messages by their size.
1722 .B score
1723 Sort the messages by their score.
1725 .B status
1726 Sort the messages by their message status
1727 (new, read, old, etc.).
1729 .B subject
1730 Sort the messages by their subject.
1732 .B thread
1733 Create a threaded order,
1734 as with the
1735 .I thread
1736 command.
1738 .B to
1739 Sort messages by the value of their `To:' field,
1740 that is by the address of the recipient.
1741 If the
1742 .I showname
1743 variable is set,
1744 the recipient's real name (if any) is used.
1747 If no argument is given,
1748 the current sorting criterion is printed.
1750 .B source
1751 The source command reads commands from a file.
1753 .B thread
1754 (th) Create a threaded representation of the current folder,
1755 i.\|e. indent messages that are replies to other messages
1756 in the header display,
1757 and change the
1758 .I next
1759 command and the addressing modes
1760 such that they refer to messages in the threaded order.
1761 Message numbers are the same as in unthreaded mode.
1762 If the
1763 .I header
1764 variable is set,
1765 a header summary in threaded order is also printed.
1767 .B top
1768 Takes a message list and prints the top few lines of each.
1769 The number of lines printed is controlled
1770 by the variable toplines
1771 and defaults to five.
1773 .B touch
1774 Takes a message list
1775 and marks the messages for saving in the
1776 .I mbox
1777 file.
1778 \*(UA deviates from the POSIX standard with this command,
1779 as a `next' command issued after `mbox'
1780 will display the following message,
1781 not the current one.
1783 .B Type
1784 (T) Identical to the Print command.
1786 .B type
1787 (t) A synonym for print.
1789 .B unalias
1790 Takes a list of names defined by alias commands
1791 and discards the remembered groups of users.
1792 The group names no longer have any significance.
1794 .B unanswered
1795 Takes a message list and marks each message
1796 as not having been answered.
1798 .B uncollapse
1799 (unc)
1800 Only applicable to threaded mode.
1801 Takes a message list
1802 and makes the message and all replies to it visible
1803 in header summaries again.
1804 When a message becomes the current message,
1805 it is automatically made visible.
1806 Also when a message with collapsed replies is printed,
1807 all of these are automatically uncollapsed.
1809 .B undef
1810 Undefines each of the named macros.
1811 It is not an error to use a name that does not belong to
1812 one of the currently defined macros.
1814 .B undelete
1815 (u) Takes a message list and marks each message as not being deleted.
1817 .B undraft
1818 Takes a message list and marks each message
1819 as a draft.
1821 .B unflag
1822 Takes a message list and marks each message as not being `flagged'.
1824 .B unfwdignore
1825 Removes the header field names
1826 from the list of ignored fields for the
1827 .I forward
1828 command.
1830 .B unfwdretain
1831 Removes the header field names
1832 from the list of retained fields for the
1833 .I forward
1834 command.
1836 .B ungood
1837 Takes a message list and undoes the effect of a
1838 .I good
1839 command that was previously applied on exactly these messages.
1841 .B unignore
1842 Removes the header field names
1843 from the list of ignored fields.
1845 .B unjunk
1846 Takes a message list and undoes the effect of a
1847 .I junk
1848 command that was previously applied on exactly these messages.
1850 .B unkill
1851 Takes a message list and `unkills' each message.
1852 Also sets the score of the messages to 0.
1854 .B Unread
1855 Same as
1856 .IR unread .
1858 .B unread
1859 (U) Takes a message list and marks each message
1860 as not having been read.
1862 .B unretain
1863 Removes the header field names
1864 from the list of retained fields.
1866 .B unsaveignore
1867 Removes the header field names
1868 from the list of ignored fields for saving.
1870 .B unsaveretain
1871 Removes the header field names
1872 from the list of retained fields for saving.
1874 .B unset
1875 Takes a list of option names and discards their remembered
1876 values;
1877 the inverse of set.
1879 .B unshortcut
1880 Deletes the shortcut names given as arguments.
1882 .B unsort
1883 Disable sorted or threaded mode (see the
1884 .I sort
1886 .I thread
1887 commands), return to normal message order
1888 and,
1889 if the
1890 .I header
1891 variable is set,
1892 print a header summary.
1894 .B unthread
1895 (unth) Same as
1896 .IR unsort .
1898 .B verify
1899 (verif)
1900 Takes a message list and verifies each message.
1901 If a message is not an S/MIME signed message,
1902 verification will fail for it.
1903 The verification process checks
1904 if the message was signed using a valid certificate,
1905 if the message sender's email address matches
1906 one of those contained within the certificate,
1907 and if the message content has been altered.
1909 .B visual
1910 (v) Takes a message list and invokes the display editor
1911 on each message.
1912 Modified contents are discarded
1913 unless the
1914 .I writebackedited
1915 variable is set.
1917 .B write
1918 (w) For conventional messages the body without all headers is written.
1919 The output is decrypted and converted to its native format as necessary.
1920 If the output file exists, the text is appended.
1921 If a message is in MIME multipart format its first part is written to
1922 the specified file as for conventional messages,
1923 and the user is asked for a filename to save each other part.
1924 For convience saving of each part may be skipped by giving an empty value;
1925 the same result can also be achieved by writing it to '/dev/null'.
1926 For the second and subsequent parts a leading '|' character causes the
1927 part to be piped to the remainder of the user input interpreted as
1928 a shell command;
1929 otherwise the user input is expanded as usually for folders,
1930 e.g., tilde expansion is performed.
1931 In non-interactive mode, only the parts of the multipart message
1932 that have a filename given in the part header are written,
1933 the others are discarded.
1934 The original message is never marked for deletion in the originating
1935 mail folder.
1936 For attachments,
1937 the contents of the destination file are overwritten if the file
1938 previously existed.
1939 No special handling of compressed files is performed.
1941 .B xit
1942 (x) A synonym for exit.
1944 .B z
1945 \*(UA presents message headers in windowfuls
1946 as described under the headers command.
1947 The z command scrolls to the next window of messages.
1948 If an argument is given,
1949 it specifies the window to use.
1950 A number prefixed by `+' or `\-' indicates
1951 that the window is calculated in relation
1952 to the current position.
1953 A number without a prefix specifies an
1954 absolute window number,
1955 and a `$' lets \*(UA scroll
1956 to the last window of messages.
1958 .B Z
1959 Similar to
1960 .IR z ,
1961 but scrolls to the next or previous window
1962 that contains at least one new or `flagged' message.
1963 .SS "Tilde escapes"
1964 Here is a summary of the tilde escapes,
1965 which are used when composing
1966 messages to perform special functions.
1967 Tilde escapes are only recognized
1968 at the beginning of lines.
1969 The name `\fItilde escape\fR' is somewhat of a misnomer
1970 since the actual escape character can be set
1971 by the option escape.
1973 .BI ~! command
1974 Execute the indicated shell command,
1975 then return to the message.
1977 .B ~.
1978 Same effect as typing the end-of-file character.
1980 .BI ~< filename
1981 Identical to ~r.
1983 .BI ~<! command
1984 Command is executed using the shell.
1985 Its standard output is inserted into the message.
1987 \fB~@\fR [\fIfilename\fR .\ .\ . ]
1988 With no arguments, edit the attachment list.
1989 First, the user can edit all existing attachment data.
1990 If an attachment's file name is left empty,
1991 that attachment is deleted from the list.
1992 When the end of the attachment list is reached,
1993 \*(UA will ask for further attachments,
1994 until an empty file name is given.
1995 If \fIfilename\fP arguments are specified,
1996 all of them are appended to the end of the attachment list.
1997 Filenames which contain white space
1998 can only be specified
1999 with the first method (no \fIfilename\fP arguments).
2001 .B ~A
2002 Inserts the string contained in the
2003 .I Sign
2004 variable
2005 (same as `~i Sign').
2006 The escape sequences `\fB\et\fR' (tabulator) and `\fB\en\fR' (newline)
2007 are understood.
2009 .B ~a
2010 Inserts the string contained in the
2011 .B sign
2012 variable
2013 (same as `~i sign').
2014 The escape sequences `\fB\et\fR' (tabulator) and `\fB\en\fR' (newline)
2015 are understood.
2017 .BI ~b "name .\ .\ ."
2018 Add the given names to the list of carbon copy recipients
2019 but do not make the names visible in the Cc: line
2020 (`blind' carbon copy).
2022 .BI ~c "name .\ .\ ."
2023 Add the given names to the list of carbon copy recipients.
2025 .B ~d
2026 Read the file `dead.letter' from the user's home directory
2027 into the message.
2029 .B ~e
2030 Invoke the text editor on the message collected so far.
2031 After the editing session is finished,
2032 the user may continue appending text
2033 to the message.
2035 .BI ~f messages
2036 Read the named messages into the message being sent.
2037 If no messages are specified,
2038 read in the current message.
2039 Message headers currently being ignored
2040 (by the ignore or retain command)
2041 are not included.
2042 For MIME multipart messages,
2043 only the first printable part is included.
2045 .BI ~F messages
2046 Identical to ~f, except all message headers and
2047 all MIME parts are included.
2049 .B ~h
2050 Edit the message header fields
2051 `To:', `Cc:', `Bcc:', and `Subject:'
2052 by typing each one in turn
2053 and allowing the user to append text
2054 to the end or modify the field
2055 by using the current terminal erase and kill characters.
2057 .B ~H
2058 Edit the message header fields
2059 `From:', `Reply-To:', `Sender:', and `Organization:'
2060 in the same manner as described for
2061 .IR ~h .
2062 The default values for these fields originate from the
2063 .IR from ,
2064 .IR replyto ,
2066 .I ORGANIZATION
2067 variables.
2068 If this tilde command has been used,
2069 changing the variables has no effect on the current message anymore.
2071 .BI ~i variable
2072 Insert the value of the specified variable
2073 into the message adding a newline character at the end.
2074 If the variable is unset or empty,
2075 the message remains unaltered.
2076 The escape sequences `\fB\et\fR' (tabulator) and `\fB\en\fR' (newline)
2077 are understood.
2079 .BI ~m messages
2080 Read the named messages into the message being sent,
2081 indented by a tab or by the value of indentprefix.
2082 If no messages are specified,
2083 read the current message.
2084 Message headers currently being ignored
2085 (by the ignore or retain command)
2086 are not included.
2087 For MIME multipart messages,
2088 only the first printable part is included.
2090 .BI ~M messages
2091 Identical to ~m, except all message headers and
2092 all MIME parts are included.
2094 .B ~p
2095 Print out the message collected so far,
2096 prefaced by the message header fields
2097 and followed by the attachment list, if any.
2098 If the message text is longer than the screen size,
2099 it is piped through the pager.
2101 .B ~q
2102 Abort the message being sent,
2103 copying the message to
2104 `dead.letter' in the user's home directory
2105 if save is set.
2107 .BI ~r filename
2108 Read the named file into the message.
2110 .BI ~s string
2111 Cause the named string to become the current subject field.
2113 .BI ~t "name .\ .\ ."
2114 Add the given names to the direct recipient list.
2116 .B ~v
2117 Invoke an alternate editor
2118 (defined by the VISUAL option)
2119 on the message collected so far.
2120 Usually, the alternate editor
2121 will be a screen editor.
2122 After the editor is quit,
2123 the user may resume appending text
2124 to the end of the message.
2126 .BI ~w filename
2127 Write the message onto the named file.
2128 If the file exists,
2129 the message is appended to it.
2131 .B ~x
2132 Same as ~q,
2133 except that the message is not saved to the `dead.letter' file.
2135 .BI ~| command
2136 Pipe the message through the command as a filter.
2137 If the command gives no output or terminates abnormally,
2138 retain the original text of the message.
2139 The command
2140 .IR fmt (1)
2141 is often used
2142 as command to rejustify the message.
2144 .BI ~: \*(ua-command
2145 Execute the given \*(UA command.
2146 Not all commands, however, are allowed.
2148 .BI ~_ \*(ua-command
2149 Identical to ~:.
2151 .BI ~~ string
2152 Insert the string of text in the message
2153 prefaced by a single ~.
2154 If the escape character has been changed,
2155 that character must be doubled
2156 in order to send it at the beginning of a line.
2157 .SS "Variable options"
2158 Options are controlled via set and unset commands,
2159 see their entries for a syntax description.
2160 An option is also set
2161 if it is passed to \*(UA
2162 as part of the environment
2163 (this is not restricted to specific variables as in the POSIX standard).
2164 A value given in a startup file overrides
2165 a value imported from the environment.
2166 Options may be either binary,
2167 in which case it is only significant
2168 to see whether they are set or not;
2169 or string, in which case the actual value is of interest.
2170 .SS "Binary options"
2172 The binary options include the following:
2174 .B add-file-recipients
2175 When file or pipe recipients have been specified,
2176 mention them in the corresponding address fields of the message instead of
2177 silently stripping them from their recipient list.
2178 By default such addressees are not mentioned.
2180 .B allnet
2181 Causes only the local part to be evaluated
2182 when comparing addresses.
2184 .B append
2185 Causes messages saved in mbox to be appended to the end
2186 rather than prepended.
2187 This should always be set.
2189 .BR ask \ or \ asksub
2190 Causes \*(UA to prompt for the subject
2191 of each message sent.
2192 If the user responds with simply a newline,
2193 no subject field will be sent.
2195 .B askatend
2196 Causes the prompts for `Cc:' and `Bcc:' lists
2197 to appear after the message has been edited.
2199 .B askattach
2200 If set, \*(UA asks for files to attach at the end of each message.
2201 Responding with a newline indicates not to include an attachment.
2203 .B askcc
2204 Causes the user to be prompted
2205 for additional carbon copy recipients
2206 (at the end of each message if
2207 .I askatend
2209 .I bsdcompat
2210 is set).
2211 Responding with a newline
2212 indicates the user's satisfaction with the current list.
2214 .B askbcc
2215 Causes the user to be prompted
2216 for additional blind carbon copy recipients
2217 (at the end of each message if
2218 .I askatend
2220 .I bsdcompat
2221 is set).
2222 Responding with a newline
2223 indicates the user's satisfaction with the current list.
2225 .B asksign
2226 Causes the user to be prompted
2227 if the message is to be signed
2228 at the end of each message.
2230 .I smime-sign
2231 variable is ignored when this variable is set.
2233 .B autocollapse
2234 Causes threads to be collapsed automatically when
2235 threaded mode is entered
2236 (see the
2237 .I collapse
2238 command).
2240 .B autoinc
2241 Same as
2242 .IR newmail .
2244 .B autoprint
2245 Causes the delete command to behave like dp \-
2246 thus, after deleting a message,
2247 the next one will be typed automatically.
2249 .B autothread
2250 Causes threaded mode (see the
2251 .I thread
2252 command) to be entered automatically
2253 when a folder is opened.
2255 .B bang
2256 Enables the substitution of `\fB!\fR'
2257 by the contents of the last command line
2258 in shell escapes.
2260 .B bsdannounce
2261 Causes automatic display of a header summary after executing a
2262 .I folder
2263 command.
2265 .B bsdcompat
2266 Sets some cosmetical features to traditional BSD style;
2267 has the same affect as setting `askatend' and
2268 all other variables prefixed with `bsd',
2269 setting prompt to `&\ ', and changing the default pager to
2270 .IR more .
2272 .B bsdflags
2273 Changes the letters printed in the first column of a header summary
2274 to traditional BSD style.
2276 .B bsdheadline
2277 Changes the display of columns in a header summary
2278 to traditional BSD style.
2280 .B bsdmsgs
2281 Changes some informational messages
2282 to traditional BSD style.
2284 .B bsdorder
2285 Causes the `Subject:' field to appear
2286 immediately after the `To:' field
2287 in message headers and with the
2288 .I ~h
2289 tilde command.
2291 .B bsdset
2292 Changes the output format of the
2293 .I set
2294 command to traditional BSD style.
2296 .B chained-junk-tokens
2297 Normally, the Bayesian junk mail filter bases its classifications
2298 on single word tokens extracted from messages.
2299 If this option is set,
2300 adjacent words are combined to pairs,
2301 which are then used as additional tokens.
2302 This usually improves the accuracy of the filter,
2303 but also increases the junk mail database
2304 five- to tenfold.
2306 .B datefield
2307 The date in a header summary
2308 is normally the date of the mailbox `From\ ' line of the message.
2309 If this variable is set,
2310 the date as given in the `Date:' header field is used,
2311 converted to local time.
2313 .B debug
2314 Prints debugging messages and disables the actual delivery of messages.
2315 Unlike
2316 .IR verbose ,
2317 this option is intended for \*(UA development only.
2319 .B disconnected
2320 When an IMAP mailbox is selected and this variable is set,
2321 no connection to the server is initiated.
2322 Instead, data is obtained from the local cache (see
2323 .IR imap-cache ).
2324 Mailboxes that are not present in the cache
2325 and messages that have not yet entirely been fetched from the server
2326 are not available;
2327 to fetch all messages in a mailbox at once,
2328 the command `copy * /dev/null' can be used
2329 while still in
2330 .I online
2331 mode.
2332 Changes that are made to IMAP mailboxes in disconnected mode
2333 are queued and committed later
2334 when a connection to that server is opened in online mode.
2335 This procedure is not completely reliable
2336 since it cannot be guaranteed that the IMAP unique identifiers (UIDs)
2337 on the server still match the ones in the cache at that time.
2338 Data is saved to `dead.letter' when this problem occurs.
2340 \fBdisconnected-\fIuser\fB@\fIhost\fR
2341 The specified account is handled as described for the
2342 .I disconnected
2343 variable above,
2344 but other accounts are not affected.
2346 .B dot
2347 The binary option dot causes \*(UA to interpret
2348 a period alone on a line
2349 as the terminator of a message the user is sending.
2351 .B editheaders
2352 When a message is edited while being composed,
2353 its header is included in the editable text.
2354 `To:', `Cc:', `Bcc:', `Subject:', `From:', `Reply-To:', `Sender:',
2355 and 'Organization:'
2356 fields are accepted within the header,
2357 other fields are ignored.
2359 .B emptybox
2360 If set, an empty mailbox file is not removed.
2361 This may improve the interoperability with other mail user agents
2362 when using a common folder directory.
2364 .B emptystart
2365 If the mailbox is empty,
2366 \*(UA normally prints \fI`No mail for user'\fR
2367 and exits immediately.
2368 If this option is set,
2369 \*(UA starts even with an empty mailbox.
2371 .B flipr
2372 Exchanges the
2373 .I Respond
2374 with the
2375 .I respond
2376 commands and vice-versa.
2378 .B forward-as-attachment
2379 Original messages are normally sent as inline text with the
2380 .I forward
2381 command,
2382 and only the first part of a multipart message is included.
2383 With this option,
2384 messages are sent as MIME
2385 .I message/rfc822
2386 attachments,
2387 and all of their parts are included.
2389 .I fwdignore
2391 .I fwdretain
2392 options are ignored when the
2393 .I forward-as-attachment
2394 option is set.
2396 .B fullnames
2397 When replying to a message,
2398 \*(UA normally removes the comment parts of email addresses,
2399 which by convention contain the full names of the recipients.
2400 If this variable is set,
2401 such stripping is not performed,
2402 and comments are retained.
2404 .B header
2405 Causes the header summary to be written at startup
2406 and after commands that affect the number of messages
2407 or the order of messages in the current folder;
2408 enabled by default.
2410 .B hold
2411 This option is used to hold messages
2412 in the system mailbox by default.
2414 .B idna-disable
2415 Unless this is set domain names that fail to pass their content test are
2416 handed over to the IDNA (internationalized domain names for applications)
2417 converter, and, in case the encoding succeeds,
2418 are replaced with the converted version.
2419 Because the domain names are expected to be in locale encoding,
2420 a locale which uses the UTF-8 charset is required to represent all
2421 possible international domain names.
2422 (Note that the \fIttycharset\fR option does not affect IDNA encoding.)
2424 .B idna-strict-checks
2425 If this is set (and \fIidna-disable\fR is not),
2426 then the IDNA-conversion is enforced to apply stricter error checking in
2427 respect to the content of domain names.
2428 Also, a successfully encoded (and thus normalized) domain name is
2429 converted back to the locale version, so that special TLD (top-level
2430 domain) checks can be performed on it;
2431 e.g., the \fI.no\fR TLD does not allow the Euro currency symbol,
2432 but only this strict check will catch this error.
2434 .B ignore
2435 Causes interrupt signals from the terminal
2436 to be ignored and echoed as @'s.
2438 .B ignoreeof
2439 An option related to dot is ignoreeof
2440 which makes \*(UA refuse to
2441 accept a control-d as the end of a message.
2442 Ignoreeof also applies to \*(UA command mode.
2444 .B imap-use-starttls
2445 Causes \*(UA to issue a STARTTLS command
2446 to make an unencrypted IMAP session SSL/TLS encrypted.
2447 This functionality is not supported by all servers,
2448 and is not used if the session is already encrypted by the IMAPS method.
2450 \fBimap-use-starttls-\fIuser\fB@\fIhost\fR
2451 Activates
2452 .I imap-use-starttls
2453 for a specific account.
2455 .B keep
2456 This option causes \*(UA to truncate the user's system mailbox
2457 instead of deleting it when it is empty.
2458 This should always be set,
2459 since it prevents malicious users
2460 from creating fake mail folders
2461 in a world-writable spool directory.
2463 .B keepsave
2464 When a message is saved,
2465 it is usually discarded
2466 from the originating folder
2467 when \*(UA is quit.
2468 Setting this option
2469 causes all saved message to be retained.
2471 .B markanswered
2472 When a message is replied to
2473 and this variable is set,
2474 it is marked as having been answered.
2475 This mark has no technical meaning in the mail system;
2476 it just causes messages to be marked in the header summary,
2477 and makes them specially addressable.
2479 .B metoo
2480 Usually, when a group is expanded
2481 that contains the sender,
2482 the sender is removed from the expansion.
2483 Setting this option causes
2484 the sender to be included in the group.
2486 .B newmail
2487 Checks for new mail in the current folder
2488 each time the prompt is printed.
2489 For IMAP mailboxes,
2490 the server is then polled for new mail,
2491 which may result in delayed operation
2492 if the connection to the server is slow.
2494 .I maildir
2495 folder must be re-scanned to determine
2496 if new mail has arrived.
2498 If this variable is set to the special value
2499 .BR nopoll ,
2500 an IMAP server is not actively asked for new mail,
2501 but new mail may still be detected and announced
2502 with any other IMAP command that is sent to the server.
2504 .I maildir
2505 folder is not scanned then.
2507 In any case,
2508 the IMAP server may send notifications about messages
2509 that have been deleted on the server
2510 by another process or client.
2511 In this case, `Expunged \fIn\fR messages' is printed
2512 regardless of this variable,
2513 and message numbers may have changed.
2515 .B noheader
2516 Setting the option noheader is the same
2517 as giving the \-N flag on the command line.
2519 .B outfolder
2520 Causes the filename given in the
2521 .I record
2522 variable
2523 and the sender-based filenames for the
2524 .I Copy
2526 .I Save
2527 commands
2528 to be interpreted relative to the directory given in the
2529 .I folder
2530 variable rather than to the current directory
2531 unless it is an absolute pathname.
2533 .B page
2534 If set, each message the \fIpipe\fR command prints out
2535 is followed by a formfeed character.
2537 .B piperaw
2538 Send messages to the
2539 .I pipe
2540 command without performing MIME and character set conversions.
2542 .B pop3-use-apop
2543 If this variable is set,
2544 the APOP authentication method is used
2545 when a connection to a POP3 server is initiated.
2546 The advantage of this method over the usual USER/PASS authentication is
2547 that the password is not sent over the network in clear text.
2548 The connection fails
2549 if the server does not support the APOP command.
2551 \fBpop3-use-apop-\fIuser\fB@\fIhost\fR
2552 Enables
2553 .I pop3-use-apop
2554 for a specific account.
2556 .B pop3-use-starttls
2557 Causes \*(UA to issue a STLS command
2558 to make an unencrypted POP3 session SSL/TLS encrypted.
2559 This functionality is not supported by all servers,
2560 and is not used if the session is already encrypted by the POP3S method.
2562 \fBpop3-use-starttls-\fIuser\fB@\fIhost\fR
2563 Activates
2564 .I pop3-use-starttls
2565 for a specific account.
2567 .B print-all-chars
2568 This option causes all characters to be considered printable.
2569 It is only effective if given in a startup file.
2570 With this option set,
2571 some character sequences in messages
2572 may put the user's terminal in an undefined state
2573 when printed;
2574 it should only be used as a last resort
2575 if no working system locale can be found.
2577 .B print-alternatives
2578 When a MIME message part of type
2579 .I multipart/alternative
2580 is displayed and it contains a subpart of type
2581 .IR text/plain ,
2582 other parts are normally discarded.
2583 Setting this variable causes all subparts to be displayed,
2584 just as if the surrounding part was of type
2585 .IR multipart/mixed .
2587 .B quiet
2588 Suppresses the printing of the version when first invoked.
2590 .B recipients-in-cc
2591 On group replies, specify only the sender of the original mail
2592 in \fI`To:'\fR and mention it's other recipients in the secondary
2593 \fI`Cc:'\fR.
2595 .B record-resent
2596 If both this variable and the
2597 .I record
2598 variable are set,
2600 .I resend
2602 .I Resend
2603 commands save messages to the
2604 .I record
2605 folder as it is normally only done for newly composed messages.
2607 .B reply-in-same-charset
2608 If this variable is set,
2609 \*(UA first tries to use the same character set
2610 of the original message for replies.
2611 If this fails,
2613 .I sendcharsets
2614 variable is evaluated as usual.
2616 .B Replyall
2617 Reverses the sense of reply and Reply commands.
2619 .B rfc822-no-body-from_
2620 By default \*(UA shows a so-called "From " line when a message contains
2621 another message via the message/rfc822 MIME mechanism.
2622 This may be misleading since it intransparently adds content on the
2623 one hand,
2624 and also silently maps any missing information from the envelope mail
2625 onto the embedded one on the other.
2626 If this value is set then no "From " line is shown for embedded
2627 message/rfc822 mail messages.
2629 .B rfc822-show-all
2630 Messages or MIME message parts that embed entire mail message via the
2631 message/rfc822 MIME mechanism do not print/show/quote headers of the
2632 embedded message but after filtering them through the normal mechanism.
2633 If this value is set then an embedded mail is treated as a unity.
2635 .B save
2636 When the user aborts a message
2637 with two RUBOUT (interrupt characters)
2638 \*(UA copies the partial letter
2639 to the file `dead.letter' in the home directory.
2640 This option is set by default.
2642 .B searchheaders
2643 If this option is set, then
2644 a message-list specifier in the form `\fI/x:y\fR'
2645 will expand to all messages containing
2646 the substring `\fIy\fR' in the header field `\fIx\fR'.
2647 The string search is case insensitive.
2649 .B sendwait
2650 When sending a message,
2651 wait until the mail transfer agent exits
2652 before accepting further commands.
2653 If the mail transfer agent returns a non-zero exit status,
2654 the exit status of \*(ua will also be non-zero.
2656 .B showlast
2657 Setting this option causes \*(UA to start at the
2658 last message instead of the first one when opening a mail folder.
2660 .B showname
2661 Causes \*(UA
2662 to use the sender's real name instead of the plain address
2663 in the header field summary and in message specifications.
2665 .B showto
2666 Causes the recipient of the message to be shown in the header summary
2667 if the message was sent by the user.
2669 .B skipemptybody
2670 If an outgoing message does not contain any text
2671 in its first or only message part,
2672 do not send it but discard it silently
2673 (see also the
2674 .I \-E
2675 option).
2677 .B smime-force-encryption
2678 Causes \*(UA
2679 to refuse sending unencrypted messages.
2681 .B smime-sign
2682 If this variable is set,
2683 outgoing messages are S/MIME signed with the user's private key.
2684 Signing a message enables a recipient to verify
2685 that the sender used a valid certificate,
2686 that the email addresses in the certificate
2687 match those in the message header,
2688 and that the message content has not been altered.
2689 It does not change the message text,
2690 and people will be able to read the message as usual.
2692 .B smime-no-default-ca
2693 Do not load the default CA locations
2694 when verifying S/MIME signed messages.
2695 Only applicable if S/MIME support is built using OpenSSL.
2697 .B smtp-use-starttls
2698 Causes \*(UA to issue a STARTTLS command
2699 to make an SMTP session SSL/TLS encrypted.
2700 Not all servers support this command;
2701 because of common implementation defects,
2702 it cannot be automatically determined
2703 whether a server supports it or not.
2705 .B ssl-no-default-ca
2706 Do not load the default CA locations
2707 to verify SSL/TLS server certificates.
2708 Only applicable if SSL/TLS support is built using OpenSSL.
2710 .B ssl-v2-allow
2711 Accept SSLv2 connections.
2712 These are normally not allowed
2713 because this protocol version is insecure.
2715 .B verbose
2716 Setting the option verbose is the same
2717 as using the \-v flag on the command line.
2718 When \*(UA runs in verbose mode,
2719 details of the actual message delivery
2720 and protocol conversations for IMAP, POP3, and SMTP,
2721 as well as of other internal processes,
2722 are displayed on the user's terminal,
2723 This is sometimes useful to debug problems.
2724 \*(UA prints all data that is sent to remote servers in clear texts,
2725 including passwords,
2726 so care should be taken that no unauthorized option
2727 can view the screen if this option is enabled.
2729 .B writebackedited
2730 If this variable is set,
2731 messages modified using the
2732 .I edit
2734 .I visual
2735 commands are written back to the current folder when it is quit.
2736 This is only possible for writable folders in
2737 .I mbox
2738 format.
2739 Setting this variable also disables
2740 MIME decoding and decryption for the editing commands.
2741 .SS "String Options"
2743 The string options include the following:
2745 .B attrlist
2746 A sequence of characters to print in the `attribute'
2747 column of a header summary,
2748 each for one type of messages in the following order:
2749 new,
2750 unread but old,
2751 new but read,
2752 read and old,
2753 saved,
2754 preserved,
2755 mboxed,
2756 flagged,
2757 answered,
2758 draft,
2759 killed,
2760 start of a collapsed thread,
2761 collapsed,
2762 classified as junk.
2763 The default is `NUROSPMFATK+\-J',
2764 or `NU\ \ *HMFATK+\-J' if
2765 .I bsdflags
2766 or the
2767 .I SYSV3
2768 environment variable
2769 are set.
2771 .B autobcc
2772 Specifies a list of recipients to which
2773 a blind carbon copy of each outgoing message
2774 will be sent automatically.
2776 .B autocc
2777 Specifies a list of recipients to which
2778 a carbon copy of each outgoing message
2779 will be sent automatically.
2781 .B autosort
2782 Causes sorted mode (see the
2783 .I sort
2784 command) to be entered automatically
2785 with the value of this option as sorting method
2786 when a folder is opened.
2788 .B cmd
2789 The default value for the \fIpipe\fR command.
2791 .B crt
2792 The valued option crt is used as a threshold
2793 to determine how long a message must be
2794 before PAGER is used to read it.
2795 If crt is set without a value,
2796 then the height of the terminal screen stored in the system
2797 is used to compute the threshold (see
2798 .IR stty (1)).
2800 .B DEAD
2801 The name of the file to use
2802 for saving aborted messages.
2803 This defaults to `dead.letter'
2804 in the user's home directory.
2806 .B EDITOR
2807 Pathname of the text editor to use
2808 in the edit command and ~e escape.
2809 If not defined,
2810 then a default editor is used.
2812 .B encoding
2813 The default MIME encoding to use
2814 in outgoing text messages and message parts.
2815 Valid values are \fI8bit\fR or \fIquoted-printable\fR.
2816 The default is \fI8bit\fR.
2817 In case the mail transfer system
2818 is not ESMTP compliant,
2819 \fIquoted-printable\fR should be used instead.
2820 If there is no need to encode a message,
2821 \fI7bit\fR transfer mode is used,
2822 without regard to the value of this variable.
2823 Binary data is always encoded in \fIbase64\fR mode.
2825 .B escape
2826 If defined, the first character of this option
2827 gives the character to use in the place of ~ to denote escapes.
2829 .B folder
2830 The name of the directory to use
2831 for storing folders of messages.
2832 All folder names that begin with `+'
2833 refer to files below that directory.
2834 If the directory name begins with a `/',
2835 \*(UA considers it to be an absolute pathname;
2836 otherwise, the folder directory is found
2837 relative to the user's home directory.
2839 The directory name may also refer to an IMAP account;
2840 any names that begin with `+'
2841 then refer to IMAP mailboxes on that account.
2842 An IMAP folder is normally given in the form
2845     imaps://mylogin@imap.myisp.example
2848 In this case,
2849 the `+' and `@' prefixes for folder names
2850 have the same effect
2851 (see the
2852 .I folder
2853 command).
2855 Some IMAP servers do not accept the creation of mailboxes
2856 in the hierarchy base;
2857 they require that they are created as subfolders of `INBOX'.
2858 With such servers,
2859 a folder name of the form
2862     imaps://mylogin@imap.myisp.example/INBOX.\&
2865 should be used
2866 (the last character is the server's hierarchy delimiter).
2867 Folder names prefixed by `+' will then refer to folders below `INBOX',
2868 while folder names prefixed by `@'
2869 refer to folders below the hierarchy base.
2870 See the
2871 .I imap namespace
2872 command for a method to detect the appropriate prefix and delimiter.
2874 .B folder-hook
2875 When a folder is opened and this variable is set,
2876 the macro corresponding to the value of this variable is executed.
2877 The macro is also invoked when new mail arrives,
2878 but message lists for commands executed from the macro
2879 only include newly arrived messages then.
2881 \fBfolder-hook-\fIfullname\fR
2882 When a folder named
2883 .I fullname
2884 is opened,
2885 the macro corresponding to the value of this variable is executed.
2886 Unlike other folder specifications,
2887 the fully expanded name of a folder, without metacharacters,
2888 is used to avoid ambiguities.
2889 The macro specified with
2890 .I folder-hook
2891 is not executed if this variable is effective for a folder
2892 (unless it is explicitly invoked within the called macro).
2894 .B from
2895 The address (or a list of addresses)
2896 to put into the \fI`From:'\fR field of the message header.
2897 If replying to a message,
2898 these addresses are handled as if they were in the alternates list.
2899 .\" If this variable is set,
2900 .\" a \fI`Sender:'\fR field containing the user's name
2901 .\" is also generated,
2902 .\" unless the variable \fIsmtp\fR is set
2903 .\" and its value differs from \fIlocalhost\fR.
2904 If the machine's hostname is not valid at the Internet
2905 (for example at a dialup machine),
2906 either this variable or
2907 .I hostname
2908 have to be set or \*(UA will not generate Message-ID header fields
2909 but leave that task up to a (obviously present) local Mail Transfer
2910 Agent (MTA).
2912 .I from
2913 contains more than one address,
2915 .I sender
2916 variable must also be set.
2918 .B fwdheading
2919 The string to print before the text of a message
2920 with the
2921 .I forward
2922 command
2923 (unless the
2924 .I forward-as-attachment
2925 variable is set).
2926 Defaults to ``-------- Original Message --------'' if unset.
2927 If it is set to the empty string,
2928 no heading is printed.
2930 .B headline
2931 A format string to use for the header summary,
2932 similar to
2933 .I printf
2934 formats.
2935 A `%' character introduces a format specifier.
2936 It may be followed by a number indicating the field width.
2937 If the field is a number,
2938 the width may be negative,
2939 which indicates that it is to be left-aligned.
2940 Valid format specifiers are:
2942 .in +4m
2944 l4fB l.
2945 %a      Message attributes.
2946 %c      The score of the message.
2947 %d      The date when the message was received.
2948 %e      The indenting level in threaded mode.
2949 %f      The address of the message sender.
2950 %i      The message thread structure.
2951 %l      The number of lines of the message.
2952 %m      Message number.
2953 %o      The number of octets (bytes) in the message.
2954 %s      Message subject (if any).
2955 %S      Message subject (if any) in double quotes.
2956 %t      The position in threaded/sorted order.
2957 %>      A `>' for the current message, otherwise ` '.
2958 %<      A `<' for the current message, otherwise ` '.
2959 %%      A `%' character.
2961 .in -4m
2963 The default is `%>\&%a\&%m\ %18f\ %16d\ %4l/%\-5o\ %i%s',
2964 or `%>\&%a\&%m\ %20f\ \ %16d\ %3l/%\-5o\ %i%S' if
2965 .I bsdcompat
2966 is set.
2968 .B hostname
2969 Use this string as hostname
2970 when expanding local addresses instead of the value obtained from
2971 .IR uname (2)
2973 .IR getaddrinfo (3).
2974 Note that this must be set explicitly to become used for the
2975 generation of Message-ID fields.
2977 .B imap-auth
2978 Sets the IMAP authentication method.
2979 Valid values are `login' for the usual password-based authentication
2980 (the default),
2981 `cram-md5', which is a password-based authentication
2982 that does not send the password over the network in clear text,
2983 and `gssapi' for GSSAPI-based authentication.
2985 \fBimap-auth-\fIuser\fB@\fIhost\fR
2986 Sets the IMAP authentication method for a specific account.
2988 .B imap-cache
2989 Enables caching of IMAP mailboxes.
2990 The value of this variable must point to a directory
2991 that is either existent or can be created by \*(UA.
2992 All contents of the cache can be deleted by \*(UA
2993 at any time;
2994 it is not safe to make assumptions about them.
2996 .B imap-keepalive
2997 IMAP servers may close the connection
2998 after a period of inactivity;
2999 the standard requires this to be at least 30 minutes,
3000 but practical experience may vary.
3001 Setting this variable to a numeric
3002 .I value
3003 greater than 0
3004 causes a NOOP command to be sent each
3005 .I value
3006 seconds if no other operation is performed.
3008 .B imap-list-depth
3009 When retrieving the list of folders on an IMAP server, the
3010 .I folders
3011 command stops after it has reached a certain depth
3012 to avoid possible infinite loops.
3013 The value of this variable sets the maximum depth allowed.
3014 The default is 2.
3015 If the folder separator on the current IMAP server is a slash `/',
3016 this variable has no effect,
3017 and the
3018 .I folders
3019 command does not descend to subfolders.
3021 .B indentprefix
3022 String used by the `\fI~m\fR' and `\fI~M\fR' tilde escapes
3023 and by the \fIquote\fR option
3024 for indenting messages,
3025 in place of the normal tab character (^I).
3026 Be sure to quote the value
3027 if it contains spaces or tabs.
3029 .B junkdb
3030 The location of the junk mail database.
3031 The string is treated like a folder name,
3032 as described for the
3033 .I folder
3034 command.
3036 The files in the junk mail database are normally stored in
3037 .IR compress (1)
3038 format for saving space.
3039 If processing time is considered more important,
3040 .IR uncompress (1)
3041 can be used to store them in plain form.
3042 \*(UA will then work using the uncompressed files.
3044 .B LISTER
3045 Pathname of the directory lister
3046 to use in the
3047 .I folders
3048 command
3049 when operating on local mailboxes.
3050 Default is /bin/ls.
3052 .B MAIL
3053 Is used as the user's mailbox, if set.
3054 Otherwise, a system-dependent default is used.
3055 Can be a
3056 \fIprotocol\fB://\fR
3057 string (see the
3058 .I folder
3059 command for more information).
3061 .B MBOX
3062 The name of the mbox file.
3063 It can be the name of a folder.
3064 The default is `\fImbox\fR' in the user's home directory.
3066 .B NAIL_EXTRA_RC
3067 The name of an optional startup file to be read after \*(ur.
3068 This variable is ignored if it is imported from the environment;
3069 it has an effect only if it is set in \*(UR or \*(ur to allow bypassing the
3070 configuration with e. g. `MAILRC=/dev/null'.
3071 Use this file for commands that are not understood by other \*(UA
3072 implementations.
3074 .B NAIL_HEAD
3075 A string to put at the beginning of each new message.
3076 The escape sequences `\fB\et\fR' (tabulator) and `\fB\en\fR' (newline)
3077 are understood.
3079 .B NAIL_TAIL
3080 A string to put at the end of each new message.
3081 The escape sequences `\fB\et\fR' (tabulator) and `\fB\en\fR' (newline)
3082 are understood.
3084 .B maximum-unencoded-line-length
3085 Messages that contain lines longer than the value of this variable
3086 are encoded in quoted-printable
3087 even if they contain only ASCII characters.
3088 The maximum effective value is 950.
3089 If set to 0,
3090 all ASCII text messages are encoded in quoted-printable.
3091 S/MIME signed messages are always encoded
3092 in quoted-printable regardless of the value of this variable.
3094 .B newfolders
3095 If this variable has the value
3096 .BR maildir ,
3097 newly created local folders will be in
3098 .I maildir
3099 format.
3101 .B nss-config-dir
3102 A directory that contains the files
3103 .RI cert N .db
3104 to retrieve certificates,
3105 .RI key N .db
3106 to retrieve private keys,
3107 and secmod.db,
3108 where
3109 .I N
3110 is a digit.
3111 These are usually taken from Mozilla installations,
3112 so an appropriate value might be
3113 `~/.mozilla/firefox/default.clm'.
3114 \*(UA opens these files read-only
3115 and does not modify them.
3116 However, if the files are modified by Mozilla
3117 while \*(UA is running,
3118 it will print a `Bad database' message.
3119 It may be necessary to create copies of these files
3120 that are exclusively used by \*(UA then.
3121 Only applicable if S/MIME and SSL/TLS support is built using
3122 Network Security Services (NSS).
3124 .B ORGANIZATION
3125 The value to put into the \fI`Organization:'\fR field of the message header.
3127 .B PAGER
3128 Pathname of the program to use
3129 in the more command
3130 or when crt variable is set.
3131 The default paginator
3132 .IR pg (1)
3133 or, in BSD compatibility mode,
3134 .IR more (1)
3135 is used
3136 if this option is not defined.
3138 \fBpassword-\fIuser\fB@\fIhost\fR
3139 Set the password for
3140 .I user
3141 when connecting to
3142 .IR host .
3143 If no such variable is defined for a host,
3144 the user will be asked for a password on standard input.
3145 Specifying passwords in a startup file
3146 is generally a security risk,
3147 the file should be readable
3148 by the invoking user only.
3150 .BI pipe- content/subcontent
3151 When a MIME message part of
3152 .I content/subcontent
3153 type is displayed or it is replied to,
3154 its text is filtered through the value of this variable
3155 interpreted as a shell command.
3156 Special care must be taken when using such commands
3157 as mail viruses may be distributed by this method;
3158 if messages of type
3159 .I application/x-sh
3160 were filtered through the shell, for example,
3161 a message sender could easily execute arbitrary code
3162 on the system \*(UA is running on.
3164 .B pop3-keepalive
3165 POP3 servers may close the connection
3166 after a period of inactivity;
3167 the standard requires this to be at least 10 minutes,
3168 but practical experience may vary.
3169 Setting this variable to a numeric
3170 .I value
3171 greater than 0
3172 causes a NOOP command to be sent each
3173 .I value
3174 seconds if no other operation is performed.
3176 .B prompt
3177 The string printed when a command is accepted.
3178 Defaults to `\fB?\ \fR',
3179 or to `\fB&\ \fR' if the
3180 .I bsdcompat
3181 variable is set.
3183 .B quote
3184 If set, \*(UA starts a replying message with the original message
3185 prefixed by the value of the variable \fIindentprefix\fR.
3186 Normally, a heading consisting of `Fromheaderfield wrote:' is printed
3187 before the quotation.
3188 If the string \fInoheading\fR is assigned to the \fIquote\fR variable,
3189 this heading is omitted.
3190 If the string \fIheaders\fR is assigned,
3191 the headers selected by the ignore/retain commands
3192 are printed above the message body,
3193 thus \fIquote\fR acts like an automatic ~m command then.
3194 If the string \fIallheaders\fR is assigned,
3195 all headers are printed above the message body,
3196 and all MIME parts are included,
3197 thus \fIquote\fR acts like an automatic ~M command then.
3199 .B quote-fold
3200 If set in addition to \fIindentprefix\fR, \*(UA interprets this
3201 number as the maximum line length of the quotation when replying to a
3202 message.
3203 Setting this turns on a more fancy quotation algorithm in that leading
3204 quotation characters are compressed and overlong lines are folded to
3205 \fIquote-fold\fR characters each, breaking at whitespace as necessary
3206 and starting the follow lines with fillers to pad up to the last
3207 quotation markers width.
3208 The value of \fIquote-fold\fR can't be smaller than the length of
3209 \fIindentprefix\fR plus some additional pad.  It is automatically
3210 adjusted to the minimum as necessary.
3212 .B record
3213 If defined, gives the pathname of the folder
3214 used to record all outgoing mail.
3215 If not defined,
3216 then outgoing mail is not so saved.
3217 When saving to this folder fails,
3218 the message is not sent
3219 but saved to the `dead.letter' file instead.
3221 .B replyto
3222 A list of addresses to put into the \fI`Reply-To:'\fR field
3223 of the message header.
3224 If replying to a message, such addresses are handled
3225 as if they were in the alternates list.
3227 .B screen
3228 When \*(UA initially prints the message headers,
3229 it determines the number to print
3230 by looking at the speed of the terminal.
3231 The faster the terminal, the more it prints.
3232 This option overrides this calculation
3233 and specifies how many message headers
3234 are printed.
3235 This number is also used
3236 for scrolling with the z command.
3238 .B sendcharsets
3239 A comma-separated list of character set names
3240 that can be used in Internet mail.
3241 When a message that contains characters not representable in US-ASCII
3242 is prepared for sending,
3243 \*(UA tries to convert its text
3244 to each of the given character sets in order
3245 and uses the first appropriate one.
3246 The default is `utf-8'.
3248 Character sets assigned to this variable should be ordered
3249 in ascending complexity.
3250 That is, the list should start with e.\|g.
3251 `iso-8859-1' for compatibility with older mail clients,
3252 might contain some other language-specific character sets,
3253 and should end with `utf-8'
3254 to handle messages that combine texts in multiple languages.
3256 .B sender
3257 An address that is put into the `Sender:' field
3258 of outgoing messages.
3259 This field needs not normally be present.
3260 It is, however, required
3261 if the `From:' field contains more than one address.
3262 It can also be used to indicate that a message
3263 was sent on behalf of somebody other;
3264 in this case, `From:' should contain the address
3265 of the person that took responsibility for the message,
3266 and `Sender:' should contain the address
3267 of the person that actually sent the message.
3269 .I sender
3270 address is handled as if it were in the
3271 .I alternates
3272 list.
3274 .B sendmail
3275 To use an alternate mail delivery system,
3276 set this option to the full pathname of the program to use.
3278 .B SHELL
3279 Pathname of the shell to use
3280 in the ! command and the ~! escape.
3281 A default shell is used
3282 if this option is not defined.
3284 .B Sign
3285 A string for use with the
3286 .I ~A
3287 command.
3289 .B sign
3290 A string for use with the
3291 .I ~a
3292 command.
3294 .B signature
3295 Must correspond to the name of a readable file if set.
3296 The file's content is then appended to each singlepart message
3297 and to the first part of each multipart message.
3298 Be warned that there is no possibility
3299 to edit the signature for an individual message.
3301 .B smime-ca-dir
3302 Specifies a directory with CA certificates for verification
3303 of S/MIME signed messages.
3304 The format is the same as described in
3305 .IR SSL_CTX_load_verify_locations (3).
3306 Only applicable if S/MIME support is built using OpenSSL.
3308 .B smime-ca-file
3309 Specifies a file with CA certificates for verification
3310 of S/MIME signed messages.
3311 The format is the same as described in
3312 .IR SSL_CTX_load_verify_locations (3).
3313 Only applicable if S/MIME support is built using OpenSSL.
3315 \fBsmime-cipher-\fIuser@host\fR
3316 Specifies a cipher to use when generating S/MIME encrypted messages
3318 .IR user@host .
3319 Valid ciphers are
3320 .B rc2-40
3321 (RC2 with 40 bits),
3322 .B rc2-64
3323 (RC2 with 64 bits),
3324 .B des
3325 (DES, 56 bits)
3327 .B des-ede3
3328 (3DES, 112/168 bits).
3329 The default is 3DES.
3330 It is not recommended to use the other ciphers
3331 unless a recipient's client is actually unable to handle 3DES
3332 since they are comparatively weak;
3333 but even so, the recipient should upgrade his software in preference.
3335 .B smime-crl-file
3336 Specifies a file that contains a CRL in PEM format
3337 to use when verifying S/MIME messages.
3338 Only applicable if S/MIME support is built using OpenSSL.
3340 .B smime-crl-dir
3341 Specifies a directory that contains files with CRLs in PEM format
3342 to use when verifying S/MIME messages.
3343 Only applicable if S/MIME support is built using OpenSSL.
3345 \fBsmime-encrypt-\fIuser@host\fR
3346 If this variable is set,
3347 messages to
3348 .I user@host
3349 are encrypted before sending.
3350 If S/MIME support is built using OpenSSL,
3351 the value of the variable must be set to the name of a file
3352 that contains a certificate in PEM format.
3353 If S/MIME support is built using NSS,
3354 the value of this variable is ignored,
3355 but if multiple certificates for
3356 .I user@host
3357 are available, the
3358 .I smime-nickname-user@host
3359 variable should be set.
3360 Otherwise a certificate for the recipient
3361 is automatically retrieved from the certificate database,
3362 if possible.
3364 If a message is sent to multiple recipients,
3365 each of them for whom a corresponding variable is set
3366 will receive an individually encrypted message;
3367 other recipients will continue to receive the message in plain text
3368 unless the
3369 .I smime-force-encryption
3370 variable is set.
3371 It is recommended to sign encrypted messages,
3372 i.\|e. to also set the
3373 .I smime-sign
3374 variable.
3376 \fBsmime-nickname-\fIuser@host\fR
3377 Specifies the nickname of a certificate
3378 to be used when encrypting messages for
3379 .I user@host .
3380 Only applicable if S/MIME support is built using NSS.
3382 .B smime-sign-cert
3383 Points to a file in PEM format
3384 that contains the user's private key
3385 as well as his certificate.
3386 Both are used with S/MIME
3387 for signing and decrypting messages.
3388 Only applicable if S/MIME support is built using OpenSSL.
3390 \fBsmime-sign-cert-\fIuser@host\fR
3391 Overrides
3392 .I smime-sign-cert
3393 for the specific addresses.
3394 When signing messages and the value of the
3395 .I from
3396 variable is set
3398 .IR user@host ,
3399 the specific file is used.
3400 When decrypting messages,
3401 their recipient fields (To: and Cc:) are searched for addresses
3402 for which such a variable is set.
3403 \*(UA always uses the first address that matches,
3404 so if the same message is sent to more than one
3405 of the user's addresses using different encryption keys,
3406 decryption might fail.
3407 Only applicable if S/MIME support is built using OpenSSL.
3409 .B smime-sign-include-certs
3410 If used, this must be set to a comma-separated list of files,
3411 each of which containing a single certificate in PEM format
3412 to be included in the S/MIME message in addition to the
3413 .IR smime-sign-cert
3414 certificate.
3415 This is most useful for long certificate chains if it is
3416 desired to aid the receiving party's verification process.
3417 Only applicable if S/MIME support is built using OpenSSL.
3419 \fBsmime-sign-include-certs-\fIuser@host\fR
3420 Overrides
3421 .I smime-sign-include-certs
3422 for the specific addresses.
3423 Refer to the discussion of \fBsmime-sign-cert-\fIuser@host\fR
3424 for more on this topic.
3426 .B smime-sign-nickname
3427 Specifies that the named certificate be used for signing mail.
3428 If this variable is not set,
3429 but a single certificate matching the current
3430 .I from
3431 address is found in the database,
3432 that one is used automatically.
3433 Only applicable if S/MIME support is built using NSS.
3435 \fBsmime-sign-nickname-\fIuser@host\fR
3436 Overrides
3437 .I smime-sign-nickname
3438 for a specific address.
3439 Only applicable if S/MIME support is built using NSS.
3441 .B smtp
3442 Normally, \*(UA invokes \fIsendmail(1)\fR directly to transfer messages.
3443 If the \fIsmtp\fR variable is set, a SMTP connection to the server
3444 specified by the value of this variable is used instead.
3445 If the SMTP server does not use the standard port,
3446 a value of \fIserver:port\fR can be given,
3447 with \fIport\fR as a name or as a number.
3449 There are two possible methods to get SSL/TLS encrypted SMTP sessions:
3450 First, the STARTTLS command can be used to encrypt a session
3451 after it has been initiated,
3452 but before any user-related data has been sent; see
3453 .I \%smtp-use-starttls
3454 above.
3455 Second, some servers accept sessions that are encrypted
3456 from their beginning on. This mode is configured by assigning
3457 \fBsmtps://\fIserver\fR[\fB:\fIport\fR]
3458 to the
3459 .I smtp
3460 variable.
3462 The SMTP transfer is executed in a child process;
3463 unless either the
3464 .I sendwait
3465 or the
3466 .I verbose
3467 variable is set,
3468 this process runs asynchronously.
3469 If it receives a TERM signal,
3470 it will abort and save the message to the `dead.letter' file.
3472 .B smtp-auth
3473 Sets the SMTP authentication method.
3474 If set to `login',
3475 or if unset and smtp-auth-user is set,
3476 AUTH LOGIN is used.
3477 If set to `cram-md5',
3478 AUTH CRAM-MD5 is used;
3479 if set to `plain',
3480 AUTH PLAIN is used.
3481 Otherwise,
3482 no SMTP authentication is performed.
3484 \fBsmtp-auth-\fIuser\fB@\fIhost\fR
3485 Overrides
3486 .I smtp-auth
3487 for specific values of sender addresses,
3488 depending on the
3489 .I from
3490 variable.
3492 .B smtp-auth-password
3493 Sets the global password for SMTP AUTH.
3494 Both user and password have to be given
3495 for AUTH LOGIN and AUTH CRAM-MD5.
3497 \fBsmtp-auth-password-\fIuser\fB@\fIhost\fR
3498 Overrides
3499 .I smtp-auth-password
3500 for specific values of sender addresses,
3501 depending on the
3502 .I from
3503 variable.
3505 .B smtp-auth-user
3506 Sets the global user name for SMTP AUTH.
3507 Both user and password have to be given
3508 for AUTH LOGIN and AUTH CRAM-MD5.
3510 If this variable is set but neither
3511 .I smtp-auth-password
3512 or a matching
3513 .I smtp-auth-password-user@host
3514 can be found,
3515 \*(UA will as for a password on the user's terminal.
3517 \fBsmtp-auth-user-\fIuser\fB@\fIhost\fR
3518 Overrides
3519 .I smtp-auth-user
3520 for specific values of sender addresses,
3521 depending on the
3522 .I from
3523 variable.
3525 .B ssl-ca-dir
3526 Specifies a directory with CA certificates for verification
3527 of SSL/TLS server certificates.
3529 .IR SSL_CTX_load_verify_locations (3)
3530 for more information.
3531 Only applicable if SSL/TLS support is built using OpenSSL.
3533 .B ssl-ca-file
3534 Specifies a file with CA certificates for verification
3535 of SSL/TLS server certificates.
3537 .IR SSL_CTX_load_verify_locations (3)
3538 for more information.
3539 Only applicable if SSL/TLS support is built using OpenSSL.
3541 .B ssl-cert
3542 Sets the file name 
3543 for a SSL/TLS client certificate
3544 required by some servers.
3545 Only applicable if SSL/TLS support is built using OpenSSL.
3547 \fBssl-cert-\fIuser\fB@\fIhost\fR
3548 Sets an account-specific file name
3549 for a SSL/TLS client certificate
3550 required by some servers.
3551 Overrides
3552 .I ssl-cert
3553 for the specified account.
3554 Only applicable if SSL/TLS support is built using OpenSSL.
3556 .B ssl-cipher-list
3557 Specifies a list of ciphers for SSL/TLS connections.
3558 See ciphers(1) for more information.
3559 Only applicable if SSL/TLS support is built using OpenSSL.
3561 .B ssl-crl-file
3562 Specifies a file that contains a CRL in PEM format
3563 to use when verifying SSL/TLS server certificates.
3564 Only applicable if SSL/TLS support is built using OpenSSL.
3566 .B ssl-crl-dir
3567 Specifies a directory that contains files with CRLs in PEM format
3568 to use when verifying SSL/TLS server certificates.
3569 Only applicable if SSL/TLS support is built using OpenSSL.
3571 .B ssl-key
3572 Sets the file name
3573 for the private key of a SSL/TLS client certificate.
3574 If unset, the name of the certificate file is used.
3575 The file is expected to be in PEM format.
3576 Only applicable if SSL/TLS support is built using OpenSSL.
3578 \fBssl-key-\fIuser\fB@\fIhost\fR
3579 Sets an account-specific file name
3580 for the private key of a SSL/TLS client certificate.
3581 Overrides
3582 .I ssl-key
3583 for the specified account.
3584 Only applicable if SSL/TLS support is built using OpenSSL.
3586 .B ssl-method
3587 Selects a SSL/TLS protocol version;
3588 valid values are `ssl2', `ssl3', and `tls1'.
3589 If unset, the method is selected automatically,
3590 if possible.
3592 \fBssl-method-\fIuser\fB@\fIhost\fR
3593 Overrides
3594 .I ssl-method
3595 for a specific account.
3597 .B ssl-rand-egd
3598 Gives the pathname to an entropy daemon socket,
3600 .IR RAND_egd (3).
3602 .B ssl-rand-file
3603 Gives the pathname to a file with entropy data,
3605 .IR RAND_load_file (3).
3606 If the file is a regular file writable by the invoking user,
3607 new data is written to it after it has been loaded.
3608 Only applicable if SSL/TLS support is built using OpenSSL.
3610 .B ssl-verify
3611 Sets the action to be performed if an error occurs
3612 during SSL/TLS server certificate validation.
3613 Valid values are
3614 `strict' (fail and close connection immediately),
3615 `ask' (ask whether to continue on standard input),
3616 `warn' (print a warning and continue),
3617 `ignore' (do not perform validation).
3618 The default is `ask'.
3620 \fBssl-verify-\fIuser\fB@\fIhost\fR
3621 Overrides
3622 .I ssl-verify
3623 for a specific account.
3625 .B stealthmua
3626 If only set without a value assigned, then this option inhibits the
3627 generation of the \fI`Message-Id:'\fR and \fI`User-Agent:'\fR
3628 header fields that include obvious references to \*(UA.
3629 There are two pitfalls associated with this:
3630 First, the message id of outgoing messages is not known anymore.
3631 Second, an expert may still use the remaining information in the header
3632 to track down the originating mail user agent.
3633 If set to the value `noagent', then the mentioned \fI`Message-Id:'\fR
3634 suppression doesn't occur.
3636 .B toplines
3637 If defined, gives the number of lines
3638 of a message to be printed out
3639 with the top command;
3640 normally, the first five
3641 lines are printed.
3643 .B ttycharset
3644 The character set of the terminal \*(UA operates on.
3645 There is normally no need to set this variable
3646 since \*(UA can determine this automatically
3647 by looking at the LC_CTYPE locale setting;
3648 if this succeeds, the value is assigned at startup
3649 and will be displayed by the \fIset\fP command.
3650 Note that this is not necessarily a character set name
3651 that can be used in Internet messages.
3653 .B VISUAL
3654 Pathname of the text editor to use
3655 in the visual command and ~v escape.
3656 .SH ENVIRONMENT VARIABLES
3657 Besides the variables described above, \*(UA uses
3658 the following environment strings:
3660 .B HOME
3661 The user's home directory.
3663 \fBLANG\fR, \fBLC_ALL\fR, \fBLC_COLLATE\fR, \fBLC_CTYPE\fR, \fBLC_MESSAGES\fR
3665 .IR locale (7).
3667 .B MAILRC
3668 Is used as a startup file instead of \*(ur if set.
3669 When \*(UA scripts are invoked on behalf of other users,
3670 this variable should be set to `/dev/null' to avoid side-effects from
3671 reading their configuration files.
3673 .B NAILRC
3674 If this variable is set and
3675 .I MAILRC
3676 is not set,
3677 it is read as startup file.
3679 .B SYSV3
3680 Changes the letters printed in the first column of a header summary.
3682 .B TMPDIR
3683 Used as directory for temporary files instead of /tmp, if set.
3684 .SH FILES
3686 \*(ur
3687 File giving initial commands.
3689 \*(UR
3690 System wide initialization file.
3692 ~/.mime.types
3693 Personal MIME types.
3695 /etc/mime.types
3696 System wide MIME types.
3697 .SH EXAMPLES
3698 .SS "Getting started"
3699 The \*(UA
3700 command has two distinct usages, according to whether one
3701 wants to send or receive mail.
3702 Sending mail is simple: to send a
3703 message to a user whose email address is, say,
3704 <bill@host.example>,
3705 use the shell
3706 command:
3709     $ \*(ba\fI bill@host.example\fR
3712 then type your message.
3713 \*(UA will prompt you for a message
3714 .I subject 
3715 first;
3716 after that, lines typed by you form the body of the message.
3717 When you reach the end of the message, type
3718 an EOT (control\-d) at the beginning of a line, which will cause
3719 \*(UA to echo `EOT' and return you to the shell.
3721 If, while you are composing the message
3722 you decide that you do not wish to send it after all, you can
3723 abort the letter with a \s-2RUBOUT\s0.  Typing a single \s-2RUBOUT\s0
3724 causes \*(UA
3725 to print `(Interrupt -- one more to kill letter)'.
3726 Typing a second
3727 \s-2RUBOUT\s0 causes \*(UA
3728 to save your partial letter on the file `dead.letter'
3729 in your home directory and abort the letter.
3730 Once you have
3731 sent mail to someone, there is no way to undo the act, so be
3732 careful.
3734 If you want to send the same message to several other people,
3735 you can list their email addresses on the command line.
3736 Thus,
3739     $ \*(ba\fI sam@workstation.example bob@server.example\fR
3740     Subject: Fees
3741     Tuition fees are due next Friday.  Don't forget!
3742     <Control\-d>
3743     EOT
3744     $
3747 will send the reminder to \fI<sam@workstation.example>\fR.
3749 \fI<bob@server.example>\fR.
3751 To read your mail, simply type
3754     $ \*(ba
3757 \*(UA
3758 will respond by typing its version number and date and then listing
3759 the messages you have waiting.
3760 Then it will type a prompt and await your command.
3761 The messages are assigned numbers starting with 1\(emyou
3762 refer to the messages with these numbers.
3763 \*(UA keeps track of which messages are
3764 .I new
3765 (have been sent since you last read your mail) and
3766 .I read
3767 (have been read by you).  New messages have an
3768 .B N
3769 next to them in the header listing and old, but unread messages have
3771 .B U
3772 next to them.
3773 \*(UA keeps track of new/old and read/unread messages by putting a
3774 header field called
3775 .I Status
3776 into your messages.
3778 To look at a specific message, use the
3779 .I type
3780 command, which may be abbreviated to simply \fIt\fR.
3781 For example, if you had the following messages:
3784     O 1 drfoo@myhost.example Wed Sep  1 19:52  18/631 "Fees"
3785     O 2 sam@friends.example  Thu Sep  2 00:08  30/895
3788 you could examine the first message by giving the command:
3791     \fBtype\fR 1
3794 which might cause \*(UA to respond with, for example:
3797     Message  1:
3798     From drfoo@myhost.example Wed Sep  1 19:52:25 2004
3799     Subject: Fees
3800     Status: R
3802     Tuition fees are due next Wednesday.  Don't forget!
3806 Many \*(UA
3807 commands that operate on messages take a message number as an
3808 argument like the
3809 .I type
3810 command.
3811 For these commands, there is a notion of a current message.
3812 When you enter the \*(UA
3813 program, the current message is initially the first
3814 (or the first recent) one.
3815 Thus, you can often omit the message number and use, for example,
3818     \fBt\fR
3821 to type the current message.
3822 As a further shorthand, you can type a message
3823 by simply giving its message number.
3824 Hence,
3827     1
3830 would type the first message.
3832 Frequently, it is useful to read the messages in your mailbox in order,
3833 one after another.
3834 You can read the next message in \*(UA
3835 by simply typing a newline.
3836 As a special case, you can type a newline as your first command to
3837 \*(UA to type the first message.
3839 If, after typing a message, you wish to immediately send a reply,
3840 you can do so with the
3841 .I reply
3842 command.
3843 This command,
3844 like
3845 .IR type ,
3846 takes a message number as an argument.
3847 \*(UA
3848 then begins a message addressed to the user who sent you the message.
3849 You may then type in your letter in reply, followed by a <control-d>
3850 at the beginning of a line, as before.
3852 Note that \*(UA
3853 copies the subject header from the original message.
3854 This is useful in that correspondence
3855 about a particular matter will tend to retain the same subject heading,
3856 making it easy to recognize.
3857 If there are other header fields in the message,
3858 like `Cc:',
3859 the information found will also be used.
3861 Sometimes you will receive a message that has been sent to
3862 several people and wish to reply only
3863 to the person who sent it.
3864 .I Reply
3865 with a capital
3866 .I R
3867 replies to a message, but sends a copy to the sender only.
3869 If you wish, while reading your mail, to send a message to someone,
3870 but not as a reply to one of your messages, you can send the message
3871 directly with the
3872 .I mail
3873 command, which takes as arguments the names of the recipients you wish
3874 to send to.
3875 For example, to send a message to <frank@machine.example>,
3876 you would do:
3879     \fBmail\fI frank@machine.example\fR
3882 To delete a message from the mail folder,
3883 you can use the
3884 .I delete
3885 command.
3886 In addition to not saving deleted messages,
3887 \*(UA will not let you type them, either.
3888 The effect is to make the message disappear
3889 altogether, along with its number.
3891 Many features of \*(UA can be tailored to your liking with the
3892 .I set
3893 command.
3895 .I set
3896 command has two forms, depending on whether you are setting a
3897 .I binary
3898 option or a
3899 .I valued
3900 option.
3901 Binary options are either on or off.  For example, the
3902 .I askcc
3903 option informs \*(UA
3904 that each time you send a message, you want it to prompt you for
3905 a `Cc:' header,
3906 to be included in the message.
3907 To set the
3908 .I askcc
3909 option, you would type
3912     \fBset\fR askcc
3915 Valued options are values which \*(UA uses to adapt to your tastes.
3916 For example, the
3917 .I record
3918 option tells \*(UA
3919 where to save messages sent by you,
3920 and is specified by
3923     \fBset\fR record=Sent
3926 for example.
3927 Note that no spaces are allowed in \fI"set record=Sent"\fR.
3929 \*(UA includes a simple facility for maintaining groups of messages
3930 together in folders.
3931 To use the folder facility, you must tell \*(UA
3932 where you wish to keep your folders.
3933 Each folder of messages will be a single file.
3934 For convenience, all of your folders are kept in
3935 a single directory of your choosing.
3936 To tell \*(UA where your folder directory is, put a line of the form
3939     \fBset folder=\fIletters\fR
3942 in your \*(ur file.
3943 If, as in the example above,
3944 your folder directory does not begin with a `/',
3945 \*(UA will assume that your folder directory is to be found starting
3946 from your home directory.
3948 Anywhere a file name is expected, you can use a folder name, preceded
3949 with `+'.
3950 For example, to put a message into a folder with the
3951 .I save
3952 command, you can use:
3955     \fBsave +\fIclasswork\fR
3958 to save the current message in the
3959 .I classwork
3960 folder.
3961 If the
3962 .I classwork
3963 folder does not yet exist, it will be created.
3964 Note that messages which are saved with the
3965 .I save
3966 command are automatically removed from your system mailbox.
3968 In order to make a copy of a message in a folder without causing
3969 that message to be removed from your system mailbox, use the
3970 .I copy
3971 command, which is identical in all other respects to the
3972 .I save
3973 command.
3976 .I folder
3977 command
3978 can be used to direct \*(UA to the contents of a different folder.
3979 For example,
3982     \fBfolder +\fIclasswork\fR
3985 directs \*(UA to read the contents of the
3986 .I classwork
3987 folder.
3988 All of the commands that you can use on your system
3989 mailbox are also applicable to folders, including
3990 .IR type ,
3991 .IR delete ,
3993 .IR reply .
3994 To inquire which folder you are currently editing, use simply:
3997     \fBfolder\fR
4000 To list your current set of folders, use the
4001 .I folders
4002 command.
4004 Finally, the
4005 .I help
4006 command is available to print out a brief summary of the most important
4007 \*(UA commands.
4009 While typing in a message to be sent to others, it is often
4010 useful to be able to invoke the text editor on the partial message,
4011 print the message, execute a shell command, or do some other
4012 auxiliary function. 
4013 \*(UA provides these capabilities through \fI"tilde escapes"\fR,
4014 which consist of a tilde (~) at the beginning of a line, followed by
4015 a single character which indicates the function to be performed.
4016 For example, to print the text of the message so far, use:
4019     \fB~p\fR
4022 which will print a line of dashes, the recipients of your message, and
4023 the text of the message so far.
4024 A list of the most important tilde escapes is available with `~?'.
4025 .SS "IMAP or POP3 client setup"
4026 First you need the following data from your ISP:
4027 the host name of the IMAP or POP3 server,
4028 user name and password for this server,
4029 and a notice whether the server uses SSL/TLS encryption.
4030 Assuming the host name is `server.myisp.example'
4031 and your user name for that server is `mylogin',
4032 you can refer to this account using the
4033 .I folder
4034 command or
4035 .I \-f
4036 command line option with
4039     \fBimaps://\fImylogin\fB@\fIserver.myisp.example\fR
4042 (This string is not necessarily the same as your Internet mail address.)
4043 You can replace `imaps://' with `imap://'
4044 if the server does not support SSL/TLS.
4045 (If SSL/TLS support is built using NSS, the
4046 .I nss-config-dir
4047 variable must be set before a connection can be initiated,
4048 see above).
4049 Use `pop3s://' or `pop3://' if the server does not offer IMAP.
4050 You should use IMAP if you can, though;
4051 first because it requires fewer network operations than POP3
4052 to get the contents of the mailbox
4053 and is thus faster;
4054 and second because message attributes
4055 are maintained by the IMAP server,
4056 so you can easily distinguish new and old messages
4057 each time you connect.
4058 Even if the server does not accept IMAPS or POP3S connections,
4059 it is possible that it supports the STARTTLS method
4060 to make a session SSL/TLS encrypted
4061 after the initial connection has been performed,
4062 but before authentication begins.
4063 The only reliable method to see if this works is to try it; enter one of
4066     \fBset imap-use-starttls\fR
4067     \fBset pop3-use-starttls\fR
4070 before you initiate the connection.
4072 As you probably want messages to be deleted from this account
4073 after saving them,
4074 prefix it with `\fI%:\fR'.
4076 .I shortcut
4077 command can be used to avoid typing that many characters
4078 every time you want to connect:
4081     \fBshortcut \fImyisp\fB \fB%:imaps://\fImylogin\fB@\fIserver.myisp.example\fR
4084 You might want to put this string into a startup file.
4085 As the
4086 .I shortcut
4087 command is specific to this implementation of \*(UA and will confuse other
4088 implementations, it should not be used in \*(ur, instead, put
4091     \fBset NAIL_EXTRA_RC=.\*(uarc
4094 in \*(ur and create a file ~/.\*(uarc containing the
4095 .I shortcut
4096 command above.
4097 You can then access your remote mailbox by invoking
4098 `\*(ua \-f \fImyisp\fR' on the command line,
4099 or by executing `fi \fImyisp\fR' within \*(UA.
4101 If you want to use more than one IMAP mailbox on a server,
4102 or if you want to use the IMAP server for mail storage too,
4104 .I account
4105 command
4106 (which is also \*(UA-\fRspecific)
4107 is more appropriate than the
4108 .I shortcut
4109 command.
4110 You can put the following in
4111 .IR ~/.\*(uarc :
4114     \fBaccount \fImyisp \fB{\fR
4115         \fBset folder=imaps://\fImylogin\fB@\fIserver.myisp.example\fR
4116         \fBset record=+\fISent \fBMBOX=+\fImbox \fBoutfolder\fR
4117     \fB}\fR
4120 and can then access incoming mail for this account by invoking
4121 `\*(ua \-A \fImyisp\fR' on the command line,
4122 or by executing `ac \fImyisp\fR' within \*(UA.
4123 After that,
4124 a command like `copy \fI1\fR +\fIotherfolder\fR'
4125 will refer to \fIotherfolder\fR on the IMAP server.
4126 In particular,
4127 `fi &' will change to the
4128 .I mbox
4129 folder,
4131 `fi +Sent' will show your recorded sent mail,
4132 with both folders located on the IMAP server.
4134 \*(UA will ask you for a password string
4135 each time you connect to a remote account.
4136 If you can reasonably trust the security
4137 of your workstation,
4138 you can give this password in the startup file as
4141     \fBset password-\fImylogin\fB@\fIserver.myisp.example\fB="\fISECRET\fB"\fR
4144 You should change the permissions of this file to 0600, see
4145 .IR chmod (1).
4147 \*(UA supports different authentication methods for both IMAP and POP3.
4148 If Kerberos is used at your location,
4149 you can try to activate GSSAPI-based authentication by
4152     \fBset imap-auth=gssapi\fR
4155 The advantage of this method is that
4156 \*(UA does not need to know your password at all,
4157 nor needs to send sensitive data over the network.
4158 Otherwise, the options
4161     \fBset imap-auth=cram-md5\fR
4162     \fBset pop3-use-apop\fR
4165 for IMAP and POP3, respectively,
4166 offer authentication methods
4167 that avoid to send the password in clear text over the network,
4168 which is especially important if SSL/TLS cannot be used.
4169 If the server does not offer any of these authentication methods,
4170 conventional user/password based authentication must be used.
4171 It is sometimes helpful to set the
4172 .I verbose
4173 option when authentication problems occur.
4174 \*(UA will display all data sent to the server in clear text on the
4175 screen with this option,
4176 including passwords.
4177 You should thus take care that no unauthorized person
4178 can look at your terminal when this option is set.
4180 If you regularly use the same workstation
4181 to access IMAP accounts,
4182 you can greatly enhance performance
4183 by enabling local caching of IMAP messages.
4184 For any message that has been fully or partially fetched from the server,
4185 a local copy is made and is used when the message is accessed again,
4186 so most data is transferred over the network once only.
4187 To enable the IMAP cache,
4188 select a local directory name and put
4191     \fBset imap-cache=\fI~/localdirectory\fR
4194 in the startup file.
4195 All files within that directory
4196 can be overwritten or deleted by \*(UA at any time,
4197 so you should not use the directory to store other information.
4199 Once the cache contains some messages,
4200 it is not strictly necessary anymore
4201 to open a connection to the IMAP server
4202 to access them.
4203 When \*(UA is invoked with the \fI\-D\fR option,
4204 or when the
4205 .I disconnected
4206 variable is set,
4207 only cached data is used
4208 for any folder you open.
4209 Messages that have not yet been completely cached
4210 are not available then,
4211 but all other messages can be handled
4212 as usual.
4213 Changes made to IMAP mailboxes in
4214 .I disconnected
4215 mode are committed to the IMAP server
4216 next time it is used in
4217 .I online
4218 mode.
4219 Synchronizing the local status
4220 with the status on the server
4221 is thus partially within your responsibility;
4222 if you forget to initiate a connection to the server again
4223 before you leave your location,
4224 changes made on one workstation
4225 are not available on others.
4226 Also if you alter IMAP mailboxes from a workstation
4227 while uncommitted changes are still pending on another,
4228 the latter data may become invalid.
4229 The same might also happen because of internal server status changes.
4230 You should thus carefully evaluate this feature in your environment
4231 before you rely on it.
4233 Many servers will close the connection
4234 after a short period of inactivity. Use one of
4237     \fBset pop3-keepalive=\fI30\fR
4238     \fBset imap-keepalive=\fI240\fR
4241 to send a keepalive message each 30 seconds for POP3,
4242 or each 4 minutes for IMAP.
4244 If you encounter problems connecting to a SSL/TLS server,
4245 try the
4246 .I ssl-rand-egd
4248 .I ssl-rand-file
4249 variables (see the OpenSSL FAQ for more information)
4250 or specify the protocol version with
4251 .IR ssl-method .
4252 Contact your ISP
4253 if you need a client certificate
4254 or if verification of the server certificate fails.
4255 If the failed certificate is indeed valid,
4256 fetch its CA certificate by executing the shell command
4259     $ \fBopenssl s_client </dev/null \-showcerts \-connect \e
4260         \fIserver.myisp.example\fB:\fIimaps\fB 2>&1 | tee \fIlog\fR
4263 (see
4264 .IR s_client (1))
4265 and put it into the file specified with
4266 .IR ssl-ca-file .
4267 The data you need is located at the end of the certificate chain
4268 within (and including) the `BEGIN CERTIFICATE'
4269 and `END CERTIFICATE' lines.
4270 Note that the example above is \fIinsecure\fR!
4271 One should use the `-verify' and `-CAfile' options of
4272 .IR s_client (1)
4273 to be "on the safe side" regarding the fetched certificates.
4274 .SS "Creating a score file or message filter"
4275 The scoring commands are best separated
4276 from other configuration for clarity,
4277 and are mostly \*(UA specific.
4278 It is thus recommended to put them in a separate file
4279 that is sourced from your NAIL_EXTRA_RC as follows:
4282     \fBsource\fI ~/.scores\fR
4285 The \fI.scores\fR file could then look as follows:
4288     \fBdefine\fR \fIlist\fR {
4289         \fBscore\fR (subject "important discussion") +10
4290         \fBscore\fR (subject "annoying discussion") \-10
4291         \fBscore\fR (from "nicefellow@goodnet") +15
4292         \fBscore\fR (from "badguy@poornet") \-5
4293         \fBmove\fR (header x-spam-flag "+++++") \fI+junk\fR
4294     }
4295     \fBset folder-hook-\fRimap://user@host/public.list=\fIlist\fR
4298 In this scheme,
4299 you would see any mail from `nicefellow@goodnet',
4300 even if the surrounding discussion is annoying;
4301 but you normally would not see mail from `badguy@poornet',
4302 unless he participates in the important discussion.
4303 Messages that are marked with five or more plus characters
4304 in their `X-Spam-Flag' field
4305 (inserted by some server-side filtering software)
4306 are moved to the folder `junk' in the
4307 .I folder
4308 directory.
4310 Be aware that all criteria in (\|) lead to substring matches,
4311 so you would also score messages
4312 from e.\|g. `notsobadguy@poornetmakers' negative here.
4313 It is possible to select addresses exactly using \fI"address"\fR
4314 message specifications,
4315 but these cannot be executed remotely 
4316 and will thus cause all headers
4317 to be downloaded from IMAP servers while looking for matches.
4319 When searching messages on an IMAP server,
4320 best performance is usually achieved
4321 by sending as many criteria as possible
4322 in one large (\|) specification,
4323 because each single such specification
4324 will result in a separate network operation.
4325 .SS "Activating the Bayesian filter"
4326 The Bayesian junk mail filter works
4327 by examining the words contained in messages.
4328 You decide yourself what a good and what a bad message is.
4329 Thus the resulting filter is your very personal one;
4330 once it is correctly set up,
4331 it will filter only messages similar to those
4332 previously specified by you.
4334 To use the Bayesian filter,
4335 a location for the junk mail database must be defined first:
4338     \fBset junkdb=\fI~/.junkdb\fR
4341 The junk mail database does not contain
4342 actual words extracted from messages,
4343 but hashed representations of them.
4344 A foreign person who can read the database
4345 could only examine the frequency of previously known words
4346 in your mail.
4348 If you have sufficient disk space (several 10\ MB) available,
4349 it is recommended that you set the
4350 .I chained-junk-tokens
4351 option.
4352 The filter will then also consider two-word tokens,
4353 improving its accuracy.
4355 A set of good messages and junk messages must now be available;
4356 it is also possible to use the incoming new messages for this purpose,
4357 although it will of course take some time
4358 until the filter becomes useful then.
4359 Do not underestimate the amount of statistical data needed;
4360 some hundred messages are typically necessary
4361 to get satisfactory results,
4362 and many thousand messages for best operation.
4363 You have to pass the good messages to the
4364 .I good
4365 command,
4366 and the junk messages to the
4367 .I junk
4368 command.
4369 If you ever accidentally mark a good message as junk or vice-versa,
4370 call the
4371 .I ungood
4373 .I unjunk
4374 command to correct this.
4376 Once a reasonable amount of statistics has been collected,
4377 new messages can be classified automatically.
4379 .I classify
4380 command marks all messages that the filter considers to be junk,
4381 but it does not perform any action on them by default.
4382 It is recommended that you move these messages into a separate
4383 folder just for the case that false positives occur,
4384 or to pass them to the
4385 .I junk
4386 command later again to further improve the junk mail database.
4387 To automatically move incoming junk messages
4388 every time the inbox is opened,
4389 put lines like the following into your
4390 .I .scores
4391 file (or whatever name you gave to the file in the last example):
4394     \fBdefine\fR \fIjunkfilter\fR {
4395         \fBclassify (smaller \fI20000\fB) :n\fR
4396         \fBmove :j\fR \fI+junk\fR
4397     }
4398     \fBset folder-hook-\fRimap://user@host/INBOX=\fIjunkfilter\fR
4401 If you set the
4402 .I verbose
4403 option before running the
4404 .I classify
4405 command,
4406 \*(UA prints the words it uses for calculating the junk status
4407 along with their statistical probabilities.
4408 This can help you to find out
4409 why some messages are not classified
4410 as you would like them to be.
4411 To see the statistical probability of a given word,
4412 use the
4413 .I probability
4414 command.
4416 If a junk message was not recognized as such,
4417 use the
4418 .I junk
4419 command to correct this.
4420 Also if you encounter a false positive
4421 (a good message that was wrongly classified as junk),
4422 pass it to the
4423 .I good
4424 command.
4426 Since the
4427 .I classify
4428 command must examine the entire text
4429 of all new messages in the respective folder,
4430 this will also cause all of them to be downloaded from the IMAP server.
4431 You should thus restrict the size of messages for automatic filtering.
4432 If server-based filtering is also available,
4433 you might try if that works for you first.
4434 .SS "Reading HTML mail"
4435 You need either the
4436 .I w3m
4438 .I lynx
4439 utility
4440 or another command-line web browser
4441 that can write plain text to standard output.
4444     \fBset pipe-text/html=\fR"w3m -dump -T text/html"
4450     \fBset pipe-text/html=\fR"lynx -dump -force_html /dev/stdin"
4453 will then cause HTML message parts to be converted into a more friendly form.
4454 .SS "Viewing PDF attachments"
4455 Most PDF viewers do not accept input directly from a pipe.
4456 It is thus necessary to store the attachment in a temporary file, as with
4459     \fBset pipe-application/pdf=\fR"cat >/tmp/\*(ua$$.pdf; \e
4460         acroread /tmp/\*(ua$$.pdf; rm /tmp/\*(ua$$.pdf"
4463 Note that security defects are discovered in PDF viewers
4464 from time to time.
4465 Automatical command execution like this
4466 can compromise your system security,
4467 in particular if you stay not always informed
4468 about such issues.
4469 .SS "Signed and encrypted messages with S/MIME"
4470 S/MIME provides two central mechanisms:
4471 message signing and message encryption.
4472 A signed message contains some data in addition
4473 to the regular text.
4474 The data can be used to verify
4475 that the message was sent using a valid certificate,
4476 that the sender's address in the message header
4477 matches that in the certificate,
4478 and that the message text has not been altered.
4479 Signing a message does not change its regular text;
4480 it can be read regardless of whether the recipient's software
4481 is able to handle S/MIME.
4482 It is thus usually possible to sign all outgoing messages
4483 if so desired.
4484 Encryption, in contrast,
4485 makes the message text invisible for all people except those who have
4486 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 more(1),
4711 newaliases(1),
4712 openssl(1),
4713 pg(1),
4714 sendmail(1)
4715 vacation(1),
4716 ssl(3),
4717 aliases(5),
4718 locale(7),
4719 mailaddr(7)
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
4763     $ tr \-d '\e015' <input | \*(ua .\ .\ .
4766 or fix the tools that generate them.
4768 Limitations with IMAP mailboxes are:
4769 It is not possible to edit messages,
4770 but it is possible to append them.
4771 Thus to edit a message,
4772 create a local copy of it,
4773 edit it, append it,
4774 and delete the original.
4775 The line count for the header display
4776 is only appropriate if the entire message has been downloaded
4777 from the server.
4778 The marking of messages as `new' is performed by the IMAP server;
4779 use of the
4780 .I exit
4781 command instead of
4782 .I quit
4783 will not cause it to be reset,
4784 and if the
4785 .IR autoinc / newmail
4786 variables are unset,
4787 messages that arrived during a session
4788 will not be in state `new' anymore
4789 when the folder is opened again.
4790 Also if commands queued in disconnected mode are committed,
4791 the IMAP server will delete the `new' flag
4792 for all messages in the changed folder,
4793 and new messages will appear as unread
4794 when it is selected for viewing later.
4795 The `flagged', `answered', and `draft' attributes are usually permanent,
4796 but some IMAP servers are known to drop them without notification.
4797 .\" This is why \*(UA does not even check if storing them succeeds.
4798 Message numbers may change with IMAP
4799 every time before the prompt is printed
4800 if \*(UA is notified by the server
4801 that messages have been deleted
4802 by some other client or process.
4803 In this case, `Expunged \fIn\fR messages' is printed,
4804 and message numbers may have changed.
4806 Limitations with POP3 mailboxes are:
4807 It is not possible to edit messages,
4808 they can only be copied and deleted.
4809 The line count for the header display
4810 is only appropriate if the entire message has been downloaded
4811 from the server.
4812 The status field of a message is maintained by the server
4813 between connections;
4814 some servers do not update it at all,
4815 and with a server that does,
4816 the `exit' command will not cause the message status to be reset.
4817 The `newmail' command and the `newmail' variable
4818 have no effect.
4819 It is not possible to rename or to remove POP3 mailboxes.
4821 If a
4822 .SM RUBOUT
4823 (interrupt) is typed while an IMAP or POP3 operation is in progress,
4824 \*(UA will wait until the operation can be safely aborted,
4825 and will then return to the command loop
4826 and print the prompt again.
4827 When a second
4828 .I RUBOUT
4829 is typed while \*(UA is waiting for the operation to complete,
4830 the operation itself will be cancelled.
4831 In this case,
4832 data that has not been fetched yet
4833 will have to be fetched
4834 before the next command can be performed.
4835 If the cancelled operation
4836 was using an SSL/TLS encrypted channel,
4837 an error in the SSL transport will very likely result,
4838 and the connection is no longer usable.
4840 As \*(UA is a mail user agent,
4841 it provides only basic SMTP services.
4842 If it fails to contact its upstream SMTP server,
4843 it will not make further attempts to transfer the message
4844 at a later time,
4845 and it does not leave other information about this condition
4846 than an error message on the terminal
4847 and a `dead.letter' file.
4848 This is usually not a problem if the SMTP server
4849 is located in the same local network
4850 as the computer on which \*(UA is run.
4851 However, care should be taken when using a remote server of an ISP;
4852 it might be better to set up a local SMTP server then
4853 which just acts as a proxy.
4855 \*(UA immediately contacts the SMTP server (or \fIsendmail(1)\fR)
4856 even when operating in
4857 .I disconnected
4858 mode.
4859 It would not make much sense for \*(UA to defer outgoing mail
4860 since SMTP servers usually provide
4861 much more elaborated delay handling
4862 than \*(UA could perform as a client.
4863 Thus the recommended setup for sending mail in
4864 .I disconnected
4865 mode is to configure a local SMTP server
4866 such that it sends outgoing mail
4867 as soon as an external network connection is available again,
4868 i.\|e. to advise it to do that from a network startup script.
4870 The junk mail filter follows the concepts developed by
4871 Paul Graham in his articles,
4872 ``A Plan for Spam'', August 2002,
4873 \%<http://www.paulgraham.com/spam.html>,
4874 and ``Better Bayesian Filtering'', January 2003,
4875 \%<http://www.paulgraham.com/better.html>.
4876 Chained tokens are due to a paper by
4877 Jonathan A. Zdziarski,
4878 ``Advanced Language Classification using Chained Tokens'',
4879 February 2004,
4880 \%<http://www.nuclearelephant.com/papers/chained.html>.
4882 A \fImail\fR command appeared in Version 1 AT&T Unix.
4883 Berkeley Mail was written in 1978 by Kurt Shoens.
4884 This man page is derived from
4885 from The Mail Reference Manual
4886 originally written by Kurt Shoens.
4887 \fIHeirloom Mailx\fR enhancements are maintained and documented
4888 by Gunnar Ritter.
4889 \fIS-nail\fR enhancements are maintained and documented
4890 by Steffen "Daode" Nurpmeso.
4892 Portions of this text are reprinted and reproduced in electronic form
4893 from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology
4894 \(em Operating System Interface (POSIX), The Open Group Base
4895 Specifications Issue 6, Copyright \(co 2001-2003 by the Institute of
4896 Electrical and Electronics Engineers, Inc and The Open Group. In the
4897 event of any discrepancy between this version and the original IEEE and
4898 The Open Group Standard, the original IEEE and The Open Group Standard
4899 is the referee document. The original Standard can be obtained online at
4900 \%<http://www.opengroup.org/unix/online.html>.
4901 Redistribution of this material is permitted so long as this notice remains
4902 intact.