.\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. .\" Copyright (c) 2000 .\" Gunnar Ritter. All rights reserved. .\" Copyright (c) 2012 - 2015 Steffen (Daode) Nurpmeso . .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions .\" are met: .\" 1. Redistributions of source code must retain the above copyright .\" notice, this list of conditions and the following disclaimer. .\" 2. Redistributions in binary form must reproduce the above copyright .\" notice, this list of conditions and the following disclaimer in the .\" documentation and/or other materials provided with the distribution. .\" 3. All advertising materials mentioning features or use of this software .\" must display the following acknowledgement: .\" This product includes software developed by the University of .\" California, Berkeley and its contributors. .\" This product includes software developed by Gunnar Ritter .\" and his contributors. .\" 4. Neither the name of the University nor the names of its contributors .\" may be used to endorse or promote products derived from this software .\" without specific prior written permission. .\" .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS 'AS IS' AND .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" .\"@ S-nail(1): v14.8.16 / 2017-01-27 .Dd Jan 27, 2017 .ds VV \\%v14.8.16 .ds UU \\%S-NAIL .ds UA \\%S-nail .ds ua \\%s-nail .ds VV \\%v14.8.16 .ds UR \\%s-nail.rc .ds ur \\%~/.mailrc .ds OB [Obsolete] .ds OP [Option] .ds IN [v15-compat] .ds OU [no v15-compat] .ds ID [v15 behaviour may differ] .ds BY (Binary) .ds RO (Read-only) .Dt "\*(UU" 1 .Os .\" Uncomment for mandoc(1) compat.: .\".ds mx-toc-name TABLE OF CONTENTS .Mx -enable -preprocessed .Mx -anchor-spass Sh "NAME" 1 .Mx -anchor-spass Sh "SYNOPSIS" 2 .Mx -anchor-spass Sh "\*[mx-toc-name]" 3 .Mx -anchor-spass Sh "DESCRIPTION" 4 .Mx -anchor-spass Sh "COMMANDS" 5 .Mx -anchor-spass Sh "TILDE ESCAPES" 6 .Mx -anchor-spass Sh "VARIABLE OPTIONS" 7 .Mx -anchor-spass Sh "ENVIRONMENT" 8 .Mx -anchor-spass Sh "FILES" 9 .Mx -anchor-spass Sh "EXAMPLES" 10 .Mx -anchor-spass Sh "FAQ" 11 .Mx -anchor-spass Sh "SEE ALSO" 12 .Mx -anchor-spass Sh "HISTORY" 13 .Mx -anchor-spass Sh "AUTHORS" 14 .Mx -anchor-spass Sh "CAVEATS" 15 .Mx -anchor-spass Sh "BUGS" 16 .Mx -anchor-spass Ss "Options" 4 .Mx -anchor-spass Ss "A starter" 4 .Mx -anchor-spass Ss "Sending mail" 4 .Mx -anchor-spass Ss "Reading mail" 4 .Mx -anchor-spass Ss "Viewing HTML mail and MIME attachments" 4 .Mx -anchor-spass Ss "Mailing lists" 4 .Mx -anchor-spass Ss "Resource files" 4 .Mx -anchor-spass Ss "Character sets" 4 .Mx -anchor-spass Ss "Message states" 4 .Mx -anchor-spass Ss "Specifying messages" 4 .Mx -anchor-spass Ss "On URL syntax and credential lookup" 4 .Mx -anchor-spass Ss "Command line editor" 4 .Mx -anchor-spass Ss "Coloured message display" 4 .Mx -anchor-spass Ss "Initial Settings" 7 .Mx -anchor-spass Ss "Binary options" 7 .Mx -anchor-spass Ss "Value options" 7 .Mx -anchor-spass Ss "The mime.types files" 9 .Mx -anchor-spass Ss "The .netrc file" 9 .Mx -anchor-spass Ss "An example configuration" 10 .Mx -anchor-spass Ss "Signed and encrypted messages with S/MIME" 10 .Mx -anchor-spass Ss "Using CRLs with S/MIME or SSL/TLS" 10 .Mx -anchor-spass Ss "Handling spam" 10 .Mx -anchor-spass Ss "\*(UA shortly hangs on startup" 11 .Mx -anchor-spass Ss "I can't login to Google mail a.k.a. GMail" 11 .Mx -anchor-spass Fl "A" .Mx -anchor-spass Fl "a" .Mx -anchor-spass Fl "B" .Mx -anchor-spass Fl "b" .Mx -anchor-spass Fl "c" .Mx -anchor-spass Fl "D" .Mx -anchor-spass Fl "d" .Mx -anchor-spass Fl "E" .Mx -anchor-spass Fl "e" .Mx -anchor-spass Fl "F" .Mx -anchor-spass Fl "f" .Mx -anchor-spass Fl "H" .Mx -anchor-spass Fl "h" .Mx -anchor-spass Fl "i" .Mx -anchor-spass Fl "L" .Mx -anchor-spass Fl "N" .Mx -anchor-spass Fl "n" .Mx -anchor-spass Fl "q" .Mx -anchor-spass Fl "R" .Mx -anchor-spass Fl "r" .Mx -anchor-spass Fl "S" .Mx -anchor-spass Fl "s" .Mx -anchor-spass Fl "t" .Mx -anchor-spass Fl "u" .Mx -anchor-spass Fl "V" .Mx -anchor-spass Fl "v" .Mx -anchor-spass Fl "X" .Mx -anchor-spass Fl "~" .Mx -anchor-spass Fl "#" .Mx -anchor-spass Fl "." .Mx -anchor-spass Pa "\*(UR" .Mx -anchor-spass Pa "\*(ur" .Mx -anchor-spass Ic "#" .Mx -anchor-spass Ic "~" .Mx -anchor-spass Ic "-" .Mx -anchor-spass Ic "=" .Mx -anchor-spass Ic "?" .Mx -anchor-spass Ic "!" .Mx -anchor-spass Ic "|" .Mx -anchor-spass Ic "account" .Mx -anchor-spass Ic "alias" .Mx -anchor-spass Ic "alternates" .Mx -anchor-spass Ic "answered" .Mx -anchor-spass Ic "cache" .Mx -anchor-spass Ic "call" .Mx -anchor-spass Ic "cd" .Mx -anchor-spass Ic "certsave" .Mx -anchor-spass Ic "chdir" .Mx -anchor-spass Ic "collapse" .Mx -anchor-spass Ic "connect" .Mx -anchor-spass Ic "Copy" .Mx -anchor-spass Ic "copy" .Mx -anchor-spass Ic "cwd" .Mx -anchor-spass Ic "Decrypt" .Mx -anchor-spass Ic "decrypt" .Mx -anchor-spass Ic "define" .Mx -anchor-spass Ic "delete" .Mx -anchor-spass Ic "discard" .Mx -anchor-spass Ic "disconnect" .Mx -anchor-spass Ic "dp" .Mx -anchor-spass Ic "dt" .Mx -anchor-spass Ic "draft" .Mx -anchor-spass Ic "echo" .Mx -anchor-spass Ic "edit" .Mx -anchor-spass Ic "elif" .Mx -anchor-spass Ic "else" .Mx -anchor-spass Ic "endif" .Mx -anchor-spass Ic "errors" .Mx -anchor-spass Ic "exit" .Mx -anchor-spass Ic "features" .Mx -anchor-spass Ic "File" .Mx -anchor-spass Ic "file" .Mx -anchor-spass Ic "flag" .Mx -anchor-spass Ic "folder" .Mx -anchor-spass Ic "folders" .Mx -anchor-spass Ic "Followup" .Mx -anchor-spass Ic "followup" .Mx -anchor-spass Ic "followupall" .Mx -anchor-spass Ic "followupsender" .Mx -anchor-spass Ic "Forward" .Mx -anchor-spass Ic "forward" .Mx -anchor-spass Ic "from" .Mx -anchor-spass Ic "Fwd" .Mx -anchor-spass Ic "fwd" .Mx -anchor-spass Ic "fwdignore" .Mx -anchor-spass Ic "fwdretain" .Mx -anchor-spass Ic "ghost" .Mx -anchor-spass Ic "headers" .Mx -anchor-spass Ic "help" .Mx -anchor-spass Ic "history" .Mx -anchor-spass Ic "hold" .Mx -anchor-spass Ic "if" .Mx -anchor-spass Ic "ignore" .Mx -anchor-spass Ic "imap" .Mx -anchor-spass Ic "imapcodec" .Mx -anchor-spass Ic "inc" .Mx -anchor-spass Ic "list" .Mx -anchor-spass Ic "localopts" .Mx -anchor-spass Ic "Lreply" .Mx -anchor-spass Ic "Mail" .Mx -anchor-spass Ic "mail" .Mx -anchor-spass Ic "mbox" .Mx -anchor-spass Ic "mimetype" .Mx -anchor-spass Ic "mlist" .Mx -anchor-spass Ic "mlsubscribe" .Mx -anchor-spass Ic "Move" .Mx -anchor-spass Ic "move" .Mx -anchor-spass Ic "More" .Mx -anchor-spass Ic "more" .Mx -anchor-spass Ic "netrc" .Mx -anchor-spass Ic "newmail" .Mx -anchor-spass Ic "next" .Mx -anchor-spass Ic "New" .Mx -anchor-spass Ic "new" .Mx -anchor-spass Ic "noop" .Mx -anchor-spass Ic "Page" .Mx -anchor-spass Ic "page" .Mx -anchor-spass Ic "Pipe" .Mx -anchor-spass Ic "pipe" .Mx -anchor-spass Ic "preserve" .Mx -anchor-spass Ic "Print" .Mx -anchor-spass Ic "print" .Mx -anchor-spass Ic "quit" .Mx -anchor-spass Ic "redirect" .Mx -anchor-spass Ic "Redirect" .Mx -anchor-spass Ic "remove" .Mx -anchor-spass Ic "rename" .Mx -anchor-spass Ic "Reply" .Mx -anchor-spass Ic "reply" .Mx -anchor-spass Ic "replyall" .Mx -anchor-spass Ic "replysender" .Mx -anchor-spass Ic "Resend" .Mx -anchor-spass Ic "resend" .Mx -anchor-spass Ic "Respond" .Mx -anchor-spass Ic "respond" .Mx -anchor-spass Ic "respondall" .Mx -anchor-spass Ic "respondsender" .Mx -anchor-spass Ic "retain" .Mx -anchor-spass Ic "Save" .Mx -anchor-spass Ic "save" .Mx -anchor-spass Ic "savediscard" .Mx -anchor-spass Ic "saveignore" .Mx -anchor-spass Ic "saveretain" .Mx -anchor-spass Ic "seen" .Mx -anchor-spass Ic "set" .Mx -anchor-spass Ic "setenv" .Mx -anchor-spass Ic "shell" .Mx -anchor-spass Ic "shortcut" .Mx -anchor-spass Ic "show" .Mx -anchor-spass Ic "size" .Mx -anchor-spass Ic "sort" .Mx -anchor-spass Ic "source" .Mx -anchor-spass Ic "source_if" .Mx -anchor-spass Ic "spamclear" .Mx -anchor-spass Ic "spamforget" .Mx -anchor-spass Ic "spamham" .Mx -anchor-spass Ic "spamrate" .Mx -anchor-spass Ic "spamset" .Mx -anchor-spass Ic "spamspam" .Mx -anchor-spass Ic "thread" .Mx -anchor-spass Ic "top" .Mx -anchor-spass Ic "touch" .Mx -anchor-spass Ic "Type" .Mx -anchor-spass Ic "type" .Mx -anchor-spass Ic "unaccount" .Mx -anchor-spass Ic "unalias" .Mx -anchor-spass Ic "unanswered" .Mx -anchor-spass Ic "uncollapse" .Mx -anchor-spass Ic "undefine" .Mx -anchor-spass Ic "undelete" .Mx -anchor-spass Ic "undraft" .Mx -anchor-spass Ic "unflag" .Mx -anchor-spass Ic "unfwdignore" .Mx -anchor-spass Ic "unfwdretain" .Mx -anchor-spass Ic "unghost" .Mx -anchor-spass Ic "unignore" .Mx -anchor-spass Ic "unmimetype" .Mx -anchor-spass Ic "unmlist" .Mx -anchor-spass Ic "unmlsubscribe" .Mx -anchor-spass Ic "Unread" .Mx -anchor-spass Ic "unread" .Mx -anchor-spass Ic "unretain" .Mx -anchor-spass Ic "unsaveignore" .Mx -anchor-spass Ic "unsaveretain" .Mx -anchor-spass Ic "unset" .Mx -anchor-spass Ic "unsetenv" .Mx -anchor-spass Ic "unshortcut" .Mx -anchor-spass Ic "unsort" .Mx -anchor-spass Ic "unthread" .Mx -anchor-spass Ic "urlcodec" .Mx -anchor-spass Ic "varedit" .Mx -anchor-spass Ic "varshow" .Mx -anchor-spass Ic "verify" .Mx -anchor-spass Ic "visual" .Mx -anchor-spass Ic "write" .Mx -anchor-spass Ic "xit" .Mx -anchor-spass Ic "z" .Mx -anchor-spass Ic "Z" .Mx -anchor-spass Ic "~~" .Mx -anchor-spass Ic "~!" .Mx -anchor-spass Ic "~." .Mx -anchor-spass Ic "~:" .Mx -anchor-spass Ic "~?" .Mx -anchor-spass Ic "~<" .Mx -anchor-spass Ic "~' # But... try it in an isolated dry-run mode first $ LC_ALL=C MAILRC=/dev/null \e \*(ua -n -d -vv -Sfrom="me " \e -s Subject -. "(Lovely) Bob " .Ed .Pp The user is then expected to type in the message contents. In this compose mode \*(UA treats lines beginning with the character .Ql ~ special \(en these are so-called .Sx "TILDE ESCAPES" which can be used to read in files, process shell commands, add and edit attachments and more; e.g., the tilde escape .Ql Ic ~e will start the text editor to revise the message in it's current state, .Ql Ic ~h allows editing of the message recipients and .Ql Ic ~? gives an overview of available tilde escapes. Typing control-D .Ql ^D at the beginning of an empty line leaves compose mode and causes the message to be send, whereas typing control-C .Ql ^C twice will abort the current letter (saving its contents in the file denoted by .Ev DEAD unless .Pf no Va save is set.) .Pp A number of options can be used to alter default behavior; e.g., .Ic set Ns ting (also via .Fl S ) .Va editalong will automatically startup a text editor when compose mode is entered, .Va askcc will cause the user to be prompted actively for carbon-copy recipients and the .Va dot option will allow leaving compose mode by writing a line consisting solely of a dot .Pf ( Ql \&. ) . .Pp Very important, though, is to define which .Sx "Character sets" may be used when sending messages, usually by setting the option .Va sendcharsets accordingly, having read the section .Sx "The mime.types files" to understand how the MIME-type of outgoing attachments is classified and the knowledge that messages are sent asynchronously unless .Va sendwait is set: only with it MTA delivery errors will be recognizable. .Pp Setting .Va from is often necessary (e.g., in conjunction with .Va smtp ) or desirable, you may want to do some dry-run tests before you go. Saving a copy of the sent messages in a .Va record may also be desirable \(en as for most mailbox file targets some special conventions are recognized, see the .Ic file command for more on that. The section .Sx "On URL syntax and credential lookup" will spread some light on the .Ql USER@HOST variable chains as well as on using URLs for accessing protocol-specific resources, like .Va smtp , and .Sx EXAMPLES contains an example configuration for sending messages via some of the well-known public mail providers; note it also gives a compact overview on how to setup a secure SSL/TLS environment. .Pp Message recipients (as specified on the command line or defined in .Ql To: , .Ql Cc: or .Ql Bcc: ) may not only be email addressees but can also be names of mailboxes and even complete shell command pipe specifications. Proper quoting may be necessary, e.g., to embed whitespace characters. (Recall that \*(UA deals with mail standards, therefore those define the rules with which content is interpreted.) If the variable .Va expandaddr is not set then only network addresses (see .Xr mailaddr 7 for a description of mail addresses) and plain user names (including MTA aliases) may be used, other types will be filtered out, giving a warning message. .Pp If the variable .Va expandaddr is set then extended recipient addresses will optionally be accepted: Any name which starts with a vertical bar .Ql | character specifies a command pipe \(en the command string following the .Ql | is executed and the message is sent to its standard input; Likewise, any name that starts with the character slash .Ql / or the character sequence dot slash .Ql ./ is treated as a file, regardless of the remaining content. Any other name which contains an at sign .Ql @ character is treated as a network address; Any other name which starts with a plus sign .Ql + character specifies a mailbox name; Any other name which contains a slash .Ql / character but no exclamation mark .Ql \&! or percent sign .Ql % character before also specifies a mailbox name; What remains is treated as a network address. .Bd -literal -offset indent $ echo bla | \*(ua -Sexpandaddr -s test ./mbox.mbox $ echo bla | \*(ua -Sexpandaddr -s test '|cat >> ./mbox.mbox' $ echo safe | LC_ALL=C MAILRC=/dev/null \e \*(ua -n -Sv15-compat -Ssendwait -Snosave \e -Sexpandaddr=fail,-all,+addr -s test \e -. bob@home.net .Ed .Pp It is possible to create personal distribution lists via the .Ic alias command, so that, for instance, the user can send mail to .Ql cohorts and have it go to a group of people: .Pp .Dl alias cohorts bill jkf mark kridle@ucbcory ~/mail/cohorts.mbox .Pp Please note that this mechanism has nothing in common with the system wide aliases that may be used by the local MTA (mail-transfer-agent), which are subject to the .Ql name constraint of .Va expandaddr and are often tracked in a file .Pa /etc/aliases (and documented in .Xr aliases 5 and .Xr sendmail 1 ) . Personal aliases will be expanded by \*(UA before the message is sent, and are thus a convenient alternative to specifying each addressee by itself. .Pp To avoid environmental noise scripts should .Dq detach \*(ua from any configuration files and create a script-local environment, either by pointing the .Ev MAILRC variable to a custom configuration file, or by using the .Fl S command line option to specify options: .Bd -literal -offset indent $ env LC_ALL=C MAILRC=/dev/null password=NOTSECRET \e \*(ua -n -Sv15-compat -Ssendwait -Snosave \e -Sexpandaddr=fail,-all,+addr \e -S 'smtp=smtps://mylogin@some.host:465' -Ssmtp-auth=login \e -S 'from=scriptreply@domain' \e -s 'subject' -a attachment_file \e -. "Recipient 1 " recipient2@domain \e < content_file .Ed .Ss "Reading mail" When invoked without addressees \*(UA enters interactive mode in which mails may be read. When used like that the user's system mailbox (see the command .Ic file for an in-depth description of the different mailbox types that exist) is read in and a one line header of each message therein is displayed. The visual style of this summary of .Ic headers can be adjusted through the variable .Va headline and the possible sorting criterion via .Va autosort . Scrolling through .Va screen Ns fuls of .Ic headers can be performed with the command .Ic z . If the initially opened mailbox is empty \*(UA will instead exit immediately (after displaying a message) unless the variable .Va emptystart is found to be set. .Pp At the .Va prompt the command .Ic list will give a listing of all available commands and .Ic help will give a summary of some common ones. If the \*(OPal documentation strings are available one can type .Ql ?X and see the actual expansion of .Ql X and what it's purpose is, i.e., commands can be abbreviated (note that POSIX defines some abbreviations, so that the alphabetical order of commands doesn't necessarily relate to the abbreviations; it is possible to define overwrites with the .Ic ghost command, however). .Pp Messages are given numbers (starting at 1) which uniquely identify messages; the current message \(en the .Dq dot \(en will either be the first new message, or the first unread message, or the first message of the mailbox; the option .Va showlast will instead cause usage of the last message for this purpose. .Pp Messages can be printed with the .Ic print command, or short: .Ql p . By default the current message .Pf ( Dq dot ) is printed, but like with most other commands it is possible to give a fancy message specification (see .Sx "Specifying messages" ) , e.g., .Ql p:u will display all unread messages, .Ql p. will print the .Dq dot , .Ql p 1 5 will print the messages 1 and 5, .Ql p 1-5 will print the messages 1 through 5, and .Ql p- and .Ql p+ will print the last and the next message, respectively. .Pp In the default setup all header fields of a message will be printed, but this can be changed: either by blacklisting a list of fields via .Ic ignore , or by whitelisting only a given list with the .Ic retain command, e.g., .Ql Ic \:retain Ns \0date from to cc subject . In order to print all header fields of a message regardless of currently active ignore or retain lists, use the command .Ic Print . The variable .Va crt controls whether and when \*(UA will use the configured .Ev PAGER for printing instead of directly writing to the terminal (generally speaking). .Pp Dependent upon the configuration a .Sx "Command line editor" aims at making user experience with the many .Sx COMMANDS a bit nicer. When reading the system mailbox or when .Fl f (or .Ic file ) specified a mailbox explicitly prefixed with the special .Ql %: modifier then messages which have been read will be moved to the user's .Ev MBOX file automatically when the mailbox is left, either by changing the active mailbox or by quitting \*(UA (also see .Sx "Message states" ) . .Pp After examining a message the user can also .Ic delete Ql d the message, .Ic reply Ql r to the sender and all recipients or .Ic Reply Ql R exclusively to the sender. Messages can also be .Ic forward Ns ed (shorter alias is .Ic fwd Ns ). Note that when replying to or forwarding a message recipient addresses will be stripped from comments and names unless the option .Va fullnames is set. Deletion causes \*(UA to forget about the message; This is not irreversible, though, one can .Ic undelete Ql u the message by giving its number, or the \*(UA session can be ended by giving the .Ic exit Ql x command. .Pp To end a mail processing session one may either issue .Ic quit Ql q to cause a full program exit, which possibly includes automatic moving of read messages to .Ev MBOX as well as updating the \*(OPal command line editor history file, or use the command .Ic exit Ql x instead in order to prevent any of these actions. .Ss "Viewing HTML mail and MIME attachments" Messages which are HTML-only get more and more common and of course many messages come bundled with a bouquet of MIME attachments. Whereas \*(UA \*(OPally supports a simple HTML-to-text converter to deal with HTML messages (see .Sx "The mime.types files" ) , it normally can't deal with any of these itself, but instead programs need to become registered to deal with specific MIME types or file extensions. These programs may either prepare plain text versions of their input in order to enable \*(UA to display the content on the terminal, or display the content themselves, for example in a graphical window. The latter type of programs by default .Dq blocks \*(UA until the external viewer has terminated, but asynchronous side-by-side execution is also possible, in which case \*(UA will continue to display the message and remain responsive. .Pp To install an external handler program for a specific MIME type set an according .Va pipe-TYPE/SUBTYPE variable. To define a handler for a specific file extension set the respective .Va pipe-EXTENSION variable \(en these handlers take precedence. The variable .Va mime-counter-evidence can be set to improve dealing with faulty MIME part declarations as are often seen in real-life messages. E.g., to display a HTML message inline (that is, converted to a more fancy plain text representation than the builtin converter is capable to produce) with either of the text-mode browsers .Xr lynx 1 or .Xr elinks 1 , teach \*(UA about MathML documents and make it display them as plain text and to open PDF attachments in an external PDF viewer, asynchronously: .Bd -literal -offset indent if $features !@ HTML-FILTER #set pipe-text/html="elinks -force-html -dump 1" set pipe-text/html="lynx -stdin -dump -force_html" # Display HTML as plain text instead #set pipe-text/html=@ endif mimetype '@ application/mathml+xml mathml' set pipe-application/pdf="@&set -C;\e : > \e"${TMPDIR}/${NAIL_FILENAME_GENERATED}\e"; \e trap \e"rm -f \e\e\e"${TMPDIR}/${NAIL_FILENAME_GENERATED}\e\e\e"\e" \e EXIT INT QUIT PIPE TERM;\e set +C;\e cat > \e"${TMPDIR}/${NAIL_FILENAME_GENERATED}\e"; \e xpdf \e"${TMPDIR}/${NAIL_FILENAME_GENERATED}\e"" .Ed .Pp Note: special care must be taken when using such commands as mail viruses may be distributed by this method: if messages of type .Ql application/x-sh or files with the extension .Ql .sh were blindly filtered through the shell, for example, a message sender could easily execute arbitrary code on the system \*(UA is running on. For more on MIME, also in respect to sending of messages, see the section .Sx "The mime.types files" and the command .Ic mimetype . .Ss "Mailing lists" \*(UA offers some support to ease handling of mailing lists. The command .Ic mlist promotes all given arguments to known mailing lists, and .Ic mlsubscribe sets their subscription attribute, creating them first as necessary. (On the other hand .Ic unmlsubscribe doesn't .Ic unmlist automatically, but only resets the subscription attribute.) Using the commands without arguments will print out (a subset of) all currently defined mailing lists. The .Va headline format .Ql \&%T can be used to mark out messages with configured list addresses in the header display. .Pp \*(OPally mailing lists may also be specified as regular expressions, which allows matching of many addresses with a single expression. However, all fully qualified list addresses are matched via a fast dictionary, whereas expressions are placed in (a) list(s) which is (are) matched sequentially. .Bd -literal -offset indent set followup-to followup-to-honour=ask-yes reply-to-honour=ask-yes mlist a1@b1.c1 a2@b2.c2 .*@lists.c3$ mlsubscribe a4@b4.c4 exact@lists.c3 .Ed .Pp The variable .Va followup-to-honour will ensure that a .Ql Mail-\:Followup-\:To: header is honoured when the message is being replied to (via .Ic reply and .Ic Lreply ) and .Va followup-to controls whether this header is created when sending mails; it will be created automatically for a couple of reasons, too, like when the special .Dq mailing list specific respond command .Ic Lreply is used, when .Ic reply is used to respond to a message with its .Ql Mail-Followup-To: being honoured etc. .Pp A difference in between the handling of known and subscribed lists is that the address of the sender is usually not part of a generated .Ql Mail-Followup-To: when addressing the latter, whereas it is for the former kind of lists. Usually because there are exceptions: say, if multiple lists are addressed and not all of them are subscribed lists. .Pp For convenience \*(UA will, temporarily, automatically add a list address that is presented in the .Ql List-To: header of a message that is being responded to to the list of known mailing lists. Shall that header have existed \*(UA will instead, dependend on the variable .Va reply-to-honour , use an also set .Ql Reply-To: for this purpose in order to accept a list administrators' wish that is supposed to have been manifested like that (but only if it provides a single address which resides on the same domain as what is stated in .Ql List-To: ) . .Ss "Resource files" Upon startup \*(UA reads in several resource files: .Bl -tag -width ".It Pa _AIL_EXTRA_R_" .Mx .It Pa \*(UR System wide initialization file. Reading of this file can be suppressed, either by using the .Fl n command line option, or by setting the environment variable .Ev NAIL_NO_SYSTEM_RC . .Mx .It Pa \*(ur File giving initial commands. A different file can be chosen by setting the environment variable .Ev MAILRC . .It Va NAIL_EXTRA_RC Can be used to define an optional startup file to be read after .Pa \*(ur . This variable is only honoured in certain circumstances (see its documentation for more). .El .Pp The content of these files is interpreted as follows: .Pp .Bl -bullet -compact .It A lines' leading whitespace is ignored. .It An empty line is ignored. .It If the line (content) starts with the number sign .Ql # then it is a comment-command \(en a real command! \(en and also ignored. This command is the only form of comment that is understood. .It A line can be .Dq continued on the next line if the newline character is .Dq escaped by preceding it with the backslash character .Ql \e . Note that any leading whitespace of follow lines is removed: If whitespace is desired it must be placed before the backslash. For example: .Bd -literal -offset indent # This line is a comment command. And y\e es, it is really continued here. set debug \e verbose .Ed .El .Ss "Character sets" \*(OP \*(UA detects the character set of the terminal by using mechanisms that are controlled by the .Ev LC_CTYPE locale setting (the manual for .Xr setlocale 3 should give an overview); the \*(UA internal variable .Va ttycharset will be set to the detected terminal character set accordingly and will thus show up in the output of the commands .Ic set and .Ic varshow . .Pp However, a user supplied .Va ttycharset value is not overwritten by this detection mechanism: this .Dq feature must be used if the detection doesn't work properly, and it may be used to adjust the name of the locale character set. E.g., on BSD systems one may use a locale with the character set ISO8859-1, which is not a valid name for this character set; to be on the safe side, one may set .Va ttycharset to the correct name, which is ISO-8859-1. .Pp Note that changing the value doesn't mean much beside that, since several aspects of the real character set are implied by the locale environment of the system, and that stays unaffected by the content of an overwritten .Va ttycharset variable. (This is mostly an issue when interactively using \*(UA, though. It is actually possible to send mail in a completely .Dq faked locale environment.) .Pp If no character set conversion capabilities have been compiled into \*(UA (i.e., no .Xr iconv 3 library has been found), then .Va ttycharset will be the only supported character set, it is simply assumed that it can be used to exchange 8-bit messages, and the rest of this section does not apply; it may however still be necessary to explicitly set it if automatic detection fails, since in that case it defaults to the mentioned ISO-8859-1. .Pp When reading messages, their text is converted into .Va ttycharset as necessary in order to display them on the users terminal. Unprintable characters and invalid byte sequences are detected and replaced by proper substitution characters (unless the variable .Va print-all-chars was set once \*(UA was started). Also see .Va charset-unknown-8bit to deal with another hairy aspect of message interpretation. .Pp When sending messages all their parts and attachments are classified. Whereas no character set conversion is performed on those parts which appear to be binary data, the character set being used must be declared within the MIME header of an outgoing text part if it contains characters that do not conform to the set of characters that are allowed by the email standards. Permissible values for character sets can be declared using the .Va sendcharsets variable, and .Va charset-8bit , which defines a catch-all last-resort fallback character set that is implicitly appended to the list of character-sets in .Va sendcharsets . .Pp When replying to a message and the variable .Va reply-in-same-charset is set then the character set of the message being replied to is tried first. And it is also possible to make \*(UA work even more closely related to the current locale setting automatically by using the variable .Va sendcharsets-else-ttycharset , please see there for more information. .Pp All the specified character sets are tried in order unless the conversion of the part or attachment succeeds. If none of the tried (8-bit) character sets is capable to represent the content of the part or attachment, then the message will not be sent and its text will be saved to .Ev DEAD . In general, if the message .Dq Cannot convert from a to b appears, either some characters are not appropriate for the currently selected (terminal) character set, or the needed conversion is not supported by the system. In the first case, it is necessary to set an appropriate .Ev LC_CTYPE locale and/or the variable .Va ttycharset . .Pp The best results are usually achieved when \*(UA is run in a UTF-8 locale on a UTF-8 capable terminal, in which case the full Unicode spectrum of characters is available. In this setup characters from various countries can be displayed, while it is still possible to use more simple character sets for sending to retain maximum compatibility with older mail clients. .Ss "Message states" \*(UA differentiates in between several different message states; the current state will be reflected in the header display if .Va headline is configured to do so. In \*(UA message states are inspected when leaving a mailbox and may cause messages to be automatically moved to the special .Ev MBOX mailbox \(en because this may be irritating to users which are used to .Dq more modern mail-user-agents, the default global .Pa \*(UR sets the .Va hold and .Va keepsave variables in order to suppress this behaviour. .Bl -tag -width ".It Ql _reserved" .It Ql new Message has neither been viewed nor moved to any other state. Such messages are retained even in the system mailbox. .It Ql unread Message has neither been viewed nor moved to any other state, but the message was present already when the mailbox has been opened last: Such messages are retained even in the system mailbox. .It Ql read The message has been processed by one of the following commands: .Ic ~f , .Ic ~m , .Ic ~F , .Ic ~M , .Ic copy , .Ic mbox , .Ic next , .Ic pipe , .Ic print , .Ic Print , .Ic top , .Ic type , .Ic Type , .Ic undelete . The .Ic delete , .Ic dp , and .Ic dt commands may also cause the next message to be marked as read, depending on the value of the .Va autoprint variable. Except when the .Ic exit command is used, messages that are in the system mailbox or in mailboxes which were opened with the special .Ql %: prefix and are in .Ql read state when the mailbox is left will be saved in .Ev MBOX unless the option .Va hold it set. .It Ql deleted The message has been processed by one of the following commands: .Ic delete , .Ic dp , .Ic dt . Only .Ic undelete can be used to access such messages. .It Ql preserved The message has been processed by a .Ic preserve command and it will be retained in its current location. .It Ql saved The message has been processed by one of the following commands: .Ic save or .Ic write . Unless when the .Ic exit command is used, messages that are in the system mailbox or in mailboxes which were opened with the special .Ql %: prefix and are in .Ql saved state when the mailbox is left will be deleted; they will be saved in .Ev MBOX when the option .Va keepsave is set. .El .Ss "Specifying messages" Commands such as .Ic print and .Ic delete can be given a list of message numbers as arguments to apply to a number of messages at once. Thus .Ql delete 1 2 deletes messages 1 and 2, whereas .Ql delete 1-5 will delete the messages 1 through 5. In sorted or threaded mode (see the .Ic sort command), .Ql delete 1-5 will delete the messages that are located between (and including) messages 1 through 5 in the sorted/threaded order, as shown in the header summary. Multiple colon modifiers can be joined into one, e.g., .Ql :du . The following special message names exist: .Bl -tag -width ".It Ar _n_u" .It Ar :n All .Ql new messages. .It Ar :o All old messages (any not in state .Ql read or .Ql new ) . .It Ar :u All .Ql unread messages. .It Ar :d All .Ql deleted messages (for the .Ic undelete command). .It Ar :r All .Ql read messages. .It Ar :f All .Ic flag Ns ged messages. .It Ar :a All answered messages (cf. the .Va markanswered variable). .It Ar :t All messages marked as draft. .It Ar :s \*(OP All messages classified as spam. .It Ar :S \*(OP All messages with unsure spam classification. .It Ar \&. The current message, the so-called .Dq dot . .It Ar \&; The message that was previously the current message. .It Ar \&, The parent message of the current message, that is the message with the Message-ID given in the .Ql In-Reply-To: field or the last entry of the .Ql References: field of the current message. .It Ar - The next previous undeleted message, or the next previous deleted message for the .Ic undelete command. In sorted/threaded mode, the next previous such message in the sorted/threaded order. .It Ar + The next undeleted message, or the next deleted message for the .Ic undelete command. In sorted/threaded mode, the next such message in the sorted/threaded order. .It Ar ^ The first undeleted message, or the first deleted message for the .Ic undelete command. In sorted/threaded mode, the first such message in the sorted/threaded order. .It Ar $ The last message. In sorted/threaded mode, the last message in the sorted/threaded order. .It Ar & Ns Ar x In threaded mode, selects the message addressed with .Ar x , where .Ar x is any other message specification, and all messages from the thread that begins at it. Otherwise it is identical to .Ar x . If .Ar x is omitted, the thread beginning with the current message is selected. .It Ar * All messages. .It Ar ` All messages that were included in the message list for the previous command. .It Ar / Ns Ar string All messages that contain .Ar string in the subject field (case ignored). See also the .Va searchheaders variable. If .Ar string is empty, the string from the previous specification of that type is used again. .It Xo Op Ar @ Ns Ar name-list Ns .Ar @ Ns Ar expr .Xc All messages that contain the given case-insensitive search .Ar expr Ns ession; if the \*(OPal regular expression (see .Xr re_format 7 ) support is available .Ar expr will be interpreted as one if any of the .Dq magical regular expression characters is seen. If the optional .Ar @ Ns Ar name-list part is missing, the search is restricted to the subject field body, but otherwise .Ar name-list specifies a comma-separated list of header fields to search, as in .Pp .Dl '@to,from,cc@Someone i ought to know' .Pp In order to search for a string that includes a .Ql @ (commercial at) character the .Ar name-list is effectively non-optional, but may be given as the empty string. Some special header fields may be abbreviated: .Ql f , .Ql t , .Ql c , .Ql b and .Ql s will match .Ql From , .Ql To , .Ql Cc , .Ql Bcc and .Ql Subject , respectively and case-insensitively. The special names .Ql header or .Ql < can be used to search in (all of) the header(s) of the message, and the special names .Ql body or .Ql > and .Ql text or .Ql = can be used to perform full text searches \(en whereas the former searches only the body, the latter also searches the message header. .Pp This message specification performs full text comparison, but even with regular expression support it is almost impossible to write a search expression that savely matches only a specific address domain. To request that the content of the header is treated as a list of addresses, and to strip those down to the plain email address which the search expression is to be matched against, prefix the header name (abbreviation) with a tilde .Ql ~ : .Pp .Dl '@~f@@a\e.safe\e.domain\e.match$' .It Ar address A case-insensitive .Dq any substring matches search against the .Ql From: header, which will match addresses (too) even if .Va showname is set (and POSIX says .Dq any address as shown in a header summary shall be matchable in this form ) ; However, if the .Va allnet variable is set, only the local part of the address is evaluated for the comparison, not ignoring case, and the setting of .Va showname is completely ignored. For finer control and match boundaries use the .Ql @ search expression; the \*(OPal IMAP-style .Ql (from address) expression can also be used if substring matches are desired. .El .Pp \*(OP IMAP-style SEARCH expressions may also be used. This addressing mode is available with all types of folders; \*(UA will perform the search locally as necessary. Strings must be enclosed by double quotes .Ql \&" in their entirety if they contain white space or parentheses; within the quotes, only backslash .Ql \e is recognized as an escape character. All string searches are case-insensitive. When the description indicates that the .Dq envelope representation of an address field is used, this means that the search string is checked against both a list constructed as .Bd -literal -offset indent (\*qname\*q \*qsource\*q \*qlocal-part\*q \*qdomain-part\*q) .Ed .Pp for each address, and the addresses without real names from the respective header field. These search expressions can be nested using parentheses, see below for examples. .Pp .Bl -tag -compact -width ".It Ar _n_u" .It Ar ( criterion ) All messages that satisfy the given .Ar criterion . .It Ar ( criterion1 criterion2 ... criterionN ) All messages that satisfy all of the given criteria. .It Ar ( or criterion1 criterion2 ) All messages that satisfy either .Ar criterion1 or .Ar criterion2 , or both. To connect more than two criteria using .Ql or specifications have to be nested using additional parentheses, as with .Ql (or a (or b c)) , since .Ql (or a b c) really means .Ql ((a or b) and c) . For a simple .Ql or operation of independent criteria on the lowest nesting level, it is possible to achieve similar effects by using three separate criteria, as with .Ql (a) (b) (c) . .It Ar ( not criterion ) All messages that do not satisfy .Ar criterion . .It Ar ( bcc \*q Ns Ar string Ns Ar \*q ) All messages that contain .Ar string in the envelope representation of the .Ql Bcc: field. .It Ar ( cc \*q Ns Ar string Ns Ar \*q ) All messages that contain .Ar string in the envelope representation of the .Ql Cc: field. .It Ar ( from \*q Ns Ar string Ns Ar \*q ) All messages that contain .Ar string in the envelope representation of the .Ql From: field. .It Ar ( subject \*q Ns Ar string Ns Ar \*q ) All messages that contain .Ar string in the .Ql Subject: field. .It Ar ( to \*q Ns Ar string Ns Ar \*q ) All messages that contain .Ar string in the envelope representation of the .Ql To: field. .It Ar ( header name \*q Ns Ar string Ns Ar \*q ) All messages that contain .Ar string in the specified .Ql Name: field. .It Ar ( body \*q Ns Ar string Ns Ar \*q ) All messages that contain .Ar string in their body. .It Ar ( text \*q Ns Ar string Ns Ar \*q ) All messages that contain .Ar string in their header or body. .It Ar ( larger size ) All messages that are larger than .Ar size (in bytes). .It Ar ( smaller size ) All messages that are smaller than .Ar size (in bytes). .It Ar ( before date ) All messages that were received before .Ar date , which must be in the form .Ql d[d]-mon-yyyy , where .Ql d denotes the day of the month as one or two digits, .Ql mon is the name of the month \(en one of .Ql Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec , and .Ql yyyy is the year as four digits, e.g., .Ql 28-Dec-2012 . .It Ar ( on date ) All messages that were received on the specified date. .It Ar ( since date ) All messages that were received since the specified date. .It Ar ( sentbefore date ) All messages that were sent on the specified date. .It Ar ( senton date ) All messages that were sent on the specified date. .It Ar ( sentsince date ) All messages that were sent since the specified date. .It Ar () The same criterion as for the previous search. This specification cannot be used as part of another criterion. If the previous command line contained more than one independent criterion then the last of those criteria is used. .El .Ss "On URL syntax and credential lookup" \*(IN For accessing protocol-specific resources, like POP3 mailboxes, usage of compact and standardized Uniform Resource Locators (URL, RFC 1738) has become omnipresent. \*(UA expects and understands URLs in the following form; parts in brackets .Ql [] denote optional parts, optional either because there also exist other ways to define the information in question or because support of the part is protocol-specific \(en e.g., .Ql /path is used by the IMAP protocol but not by POP3. .Pp .Dl PROTOCOL://[USER[:PASSWORD]@]server[:port][/path] .Pp If .Ql USER and .Ql PASSWORD are specified as part of an URL they must be given in URL percent encoded (RFC 3986) form \(en the command .Ic urlcodec can be used to perform the encoding and show the encoded value. (This doesn't really conform to any standard, but for one it isn't used for any data exchange over the internet, and second it's easier for users to simply call .Ic urlcodec on a string and use that instead of having to deal with several different standards.) On the other hand, values given in variable names are expected not to be URL percent encoded. .Pp Many variable options of \*(UA exist in multiple versions, called variable chains for the rest of this document: the plain .Ql variable as well as .Ql variable-HOST and .Ql variable-USER@HOST . Here .Ql HOST indeed means .Ql server:port if a .Ql port had been specified in the respective URL, otherwise it refers to the plain .Ql server . Also, .Ql USER isn't truly the .Ql USER that had been found when doing the user chain lookup as is described below, i.e., this .Ql USER will never be in URL percent encoded form, whether it came from an URL or not. .Pp For example, whether an hypothetical URL .Ql smtp://hey%3Ayou@our.house had been given that includes a user, or whether the URL was .Ql smtp://our.house and the user had been found differently, to lookup the variable chain .Va smtp-use-starttls \*(UA first looks for whether .Ql smtp-\:use-\:starttls-\:hey:you@our.house is defined, then whether .Ql smtp-\:use-\:starttls-\:our.house exists before finally ending up looking at the plain variable itself. .Pp \*(UA obeys the following logic scheme when dealing with the necessary credential informations of an account: .Bl -bullet .It If no .Ql USER has been given in the URL the variables .Va user-HOST and .Va user are looked up; if no such variable(s) can be found then \*(UA will, when enforced by the \*(OPal variables .Va netrc-lookup-HOST or .Va netrc-lookup , search the users .Pa .netrc file for a .Ql HOST specific entry which provides a .Ql login name: this lookup will only succeed if unambiguous (one possible matching entry for .Ql HOST ) . .Pp If there is still no .Ql USER then \*(UA will fall back to the user who is supposed to run \*(UA: either the name that has been given with the .Fl u command line option (or, equivalently, but with less precedence, the environment variable .Ev USER ) , or the .Dq current user. The identity of this user has been fixated during \*(UA startup and is known to be a valid user on the current host. .It Authentication: unless otherwise noted this will lookup the .Va PROTOCOL-auth-USER@HOST , PROTOCOL-auth-HOST , PROTOCOL-auth variable chain, falling back to a protocol-specific default should this have no success. .It If no .Ql PASSWORD has been given in the URL \(en it should be noted once that specifying the password in the URL is only syntactic sugar for the user, it'll never be part of an URL that \*(UA uses itself \(en, then if the .Ql USER has been found through the \*(OPal .Pa .netrc file lookup then that may have already provided the password, too. Otherwise the variable chain .Va password-USER@HOST , password-HOST , password is looked up. .Pp \*(OP Then if any of the variables of the chain .Va agent-shell-lookup-USER@HOST , agent-shell-lookup-HOST , \ agent-shell-lookup is set the shell command specified therein is run and the output (less newline characters) will be used as the password. It is perfectly valid for such an agent to simply not return any data, in which case the password lookup is continued somewhere else; Any command failure is treated as a hard error, however. .Pp The next variable chain that is inspected is the \*(OPal .Va netrc-lookup-USER@HOST , netrc-lookup-HOST , netrc-lookup , but this time looking only for the password (multiple user accounts for a single machine may exist as well as a fallback entry without user but with a password). .Pp If at that point there is still no password available, but the (protocols') chosen authentication type requires a password, then in interactive mode the user will be prompted on the terminal. .El .Pp .Sy Note: S/MIME verification works relative to the values found in the .Ql From: (or .Ql Sender: ) header field(s), which means that the values of .Va smime-sign , smime-sign-cert , smime-sign-include-certs and .Va smime-sign-message-digest will not be looked up using the .Ql USER and .Ql HOST chains from above but instead use the corresponding values from the message that is being worked on. In unusual cases multiple and different .Ql USER and .Ql HOST combinations may therefore be involved \(en on the other hand those unusual cases become possible. The usual case is as short as: .Pp .Dl set smtp=smtp://USER:PASS@HOST smtp-use-starttls \e .Dl \ \ \ \ smime-sign smime-sign-cert=+smime.pair .Pp The section .Sx EXAMPLES contains complete example configurations. .Ss "Command line editor" \*(OP \*(UA can be configured to support a command line editor and command history lists which are saved in between sessions. One may link against fully-fledged external libraries .Pf ( Xr readline 6 , .Xr editline 3 Ns ) or use \*(UA's own command line editor NCL (Nail-Command-Line) instead, which should work in all environments which comply to the ISO C standard (ISO/IEC 9899:1990/Amendment 1:1995). When an external library is used, interactive behaviour of \*(UA relies on that library and may not correspond one-to-one to what is described in this manual. .Pp Regardless of the actually used command line editor .Ic history entries will be created for lines entered in command mode only, and creation of such an entry can be forcefully suppressed by starting the line with a space character. Note that .Ic history handling is by itself an optional feature and may therefore not be available. For more information see the documentation of the options .Va emptystart , .Va history-gabby , .Va history-gabby-persist , .Va line-editor-disable , .Va NAIL_HISTFILE and .Va NAIL_HISTSIZE . .Pp The builtin \*(UA command line editor supports the following operations; the notation .Ql ^-character stands for the combination of the .Dq Control key plus the mentioned character, e.g., .Ql ^A means .Dq hold down control key and press the A key : .Pp .Bl -tag -compact -width "Ql _M" .It Ql ^A Go to the start of the line. .It Ql ^B Move the cursor backward one character. .It Ql ^D Forward delete the character under the cursor; quits \*(UA if used on the empty line unless the .Va ignoreeof option is set. .It Ql ^E Go to the end of the line. .It Ql ^F Move the cursor forward one character. .It Ql ^G Cancel current operation, full reset. If there is an active history search or tabulator expansion then this command will first reset that, reverting to the former line content; thus a second reset is needed for a full reset in this case. In all cases \*(UA will reset a possibly used multibyte character input state machine. .It Ql ^H The same as .Dq backspace : backward delete one character. .It Ql ^I \*(OP The same as .Dq horizontal tabulator : try to expand the word before the cursor. (Note this is not .Dq tabulator-completion as is known from the .Xr sh 1 but really means the usual \*(UA expansion, as documented for .Ic file , yet it involves shell expansion as a last step, too.) .It Ql ^J The same as .Dq ENTER : complete this line of input. .It Ql ^K Delete all characters from the cursor to the end of the line. .It Ql ^L Repaint the line. .It Ql ^N \*(OP Go to the next history entry. .It Ql ^O Execute the command .Ic dp . .It Ql ^P \*(OP Go to the previous history entry. .It Ql ^R \*(OP Complete the current line from (the remaining older) history entries. .It Ql ^U The same as .Ql ^A followed by .Ql ^K . .It Ql ^W Delete the characters from the one preceding the cursor to the preceding word boundary. .It Ql ^X Move the cursor forward one word boundary. .It Ql ^Y Move the cursor backward one word boundary. .El .Pp If problems with commands that are based upon rightwise movement are encountered, adjustments of the option .Va line-editor-cursor-right may solve the problem, as documented for it. .Pp If the terminal produces key sequences which are compatible with .Xr xterm 1 then the left and right cursor keys will map to .Ql ^B and .Ql ^F , respectively, the up and down cursor keys will map to .Ql ^P and .Ql ^N , and the Home/End/PgUp/PgDown keys will call the .Ic z command with the respective arguments .Ql 0 , .Ql $ , .Ql - and .Ql + (i.e., perform scrolling through the header summary list). .Ss "Coloured message display" \*(OP \*(UA can be configured to support coloured message display, realized by emitting ANSI colour escape sequences. Colours are only used when the .Ev TERM environment variable is set and either the terminal type can be found in .Va colour-terms or its name includes the string .Ql color . .Pp On top of that the binary option .Va colour-pager defines whether these colour sequences are also generated when the output of a command needs to go through the .Ev PAGER (also see .Va crt Ns ) \(en this is not enabled by default because different pager programs need different command line switches or other configuration in order to support those colour sequences, please see the option for more details. .Pp To forcefully disable all colour support, set .Va colour-disable . .Pp Colours can be configured through font attributes .Pf ( Ql ft= \(en .Ql bold , .Ql invers and .Ql underline ) , foreground .Pf ( Ql fg= ) and background .Pf ( Ql bg= ) colours .Pf ( Ql black , .Ql blue , .Ql green , .Ql red , .Ql brown , .Ql magenta , .Ql cyan and .Ql white ) . Multiple specifications can be joined in a comma separated list, as in .Pp .Dl set colour-msginfo="ft=bold,fg=magenta,bg=cyan" .Pp Options to be set are .Va colour-msginfo , .Va colour-partinfo , .Va colour-from_ , .Va colour-header and .Va colour-uheader , as well as .Va colour-user-headers , which is a list of headers to be colourized via .Va colour-uheader instead of the default .Va colour-header . .Sh COMMANDS Each command is typed on a line by itself, and may take arguments following the command word. The command need not be typed in its entirety \(en the first command which matches the typed prefix is used. (The command .Ic list prints a sorted list of available commands, and the command .Ic help (or .Ic \&? ) , when given an argument, will show a documentation string for the expansion, as in .Ql ?unc ; documentation strings are however \*(OPal.) .Pp For commands which take message lists as arguments, the next message forward that satisfies the command's requirements will be used shall no explicit message list have been passed. If there are no messages forward of the current message, the search proceeds backwards, and if there are no good messages at all, \*(UA types .Dq no applicable messages and aborts the command. The arguments to commands can be quoted, using the following methods: .Pp .Bl -bullet -compact -offset indent .It An argument can be enclosed between paired double-quotes .Ql """argument""" or single-quotes .Ql 'argument' ; any white space, shell word expansion, or backslash characters (except as described next) within the quotes are treated literally as part of the argument. A double-quote will be treated literally within single-quotes and vice versa. Inside such a quoted string the actually used quote character can be used nonetheless by escaping it with a backslash .Ql \e , as in .Ql """y\e""ou""" . .It An argument that is not enclosed in quotes, as above, can usually still contain space characters if those spaces are backslash-escaped. .It A backslash outside of the enclosing quotes is discarded and the following character is treated literally as part of the argument. .It An unquoted backslash at the end of a command line is discarded and the next line continues the command. .El .Pp Filenames, where expected, are subsequently subjected to the following transformations, in sequence: .Pp .Bl -bullet -compact -offset indent .It If the filename begins with an unquoted plus sign, and the .Va folder variable is defined, the plus sign will be replaced by the value of the .Va folder variable followed by a slash. If the .Va folder variable is unset or is set to null, the filename will be unchanged. .It Shell word expansions are applied to the filename. .Sy Compatibility note: on the long run support for complete shell word expansion will be replaced by an internally implemented restricted expansion mechanism in order to circumvent possible security impacts through shell expansion. Expect that a growing number of program parts only support this restricted syntax: .Pp Meta expansions are applied to the filename: leading tilde characters .Pf ( Ql ~/ ) will be replaced by the expansion of .Ev HOME , and any occurrence of .Ql $VARIABLE (or .Ql ${VARIABLE} ) will be replaced by the expansion of the variable, if possible; \*(UA internal as well as environmental (shell) variables can be accessed through this mechanism. In order to include a raw .Ql $ character precede it with a backslash .Ql \e , to include a backslash double it. If more than a single pathname results from this expansion and the command is expecting one file, an error results. .Pp Note that in interactive display context, in order to allow simple value acceptance (typing .Dq ENTER ) , backslash quoting is performed automatically as necessary, e.g., a file .Ql diet\e is \ecurd.txt will be displayed as .Ql diet\e\e is \e\ecurd.txt . .El .Pp The following commands are available: .Bl -tag -width ".Ic _ccount" .Mx .It Ic # The comment-command causes the entire line to be ignored. .Sy Note: this really is a normal command which' purpose is to discard its arguments, not a .Dq comment-start indicating special character, which means that, e.g., trailing comments on a line are not possible. .Mx .It Ic ~ Interprets the remainder of the word as a macro name and passes it through to the .Ic call command; e.g., .Ql ~ Ns Ar mymacro is a shorter synonym for .Ql call Ar mymacro . .Mx .It Ic - Print out the preceding message. If given a numeric argument n, goes to the n'th previous message and prints it. .Mx .It Ic = Show the current message number (the .Dq dot ) . .Mx .It Ic \&? Prints a brief summary of commands. \*(OP Given an argument a synopsis for the command in question is printed instead; commands can be abbreviated in general and this command can be used to see the full expansion of an abbreviation including the synopsis, try, e.g., .Ql ?h , .Ql ?hel and .Ql ?help and see how the display changes. .Mx .It Ic \&! Executes the .Ev SHELL (see .Xr sh 1 Ns ) command which follows. .Mx .It Ic \&| A synonym for the .Ic pipe command. .Mx .It Ic account (ac) Creates, selects or lists (an) account(s). An account is a group of commands and variable settings which together usually arrange the environment for the purpose of creating a system login. Without any argument a listing of all defined accounts and their content is printed. A specific account can be activated by giving solely its name, resulting in the system mailbox or inbox of that account to be activated as via an explicit use of the command .Ic file . The two argument form is identical to defining a macro as via .Ic define . For example: .Bd -literal -offset indent account myisp { set folder=imaps://mylogin@imap.myisp.example set record=+Sent set from="myname@myisp.example (My Name)" set smtp=smtp://mylogin@smtp.myisp.example } .Ed .Pp creates an account named .Ql myisp which can later be selected by specifying .Ql account myisp . The special account .Ql null (case-insensitive) always exists. .Ic localopts can be used to localize account settings \(en different to normal macros the settings will be reverted once the account is switched off. Accounts can be deleted via .Ic unaccount . .Mx .It Ic alias (a) With no arguments, prints out all currently-defined aliases. With one argument, prints out that alias. With more than one argument, creates a new alias or appends to an existing one. .Ic unalias can be used to delete aliases. .Mx .It Ic alternates (alt) Manage a list of alternate addresses / names of the active user, members of which will be removed from recipient lists when replying to messages (and the .Va metoo variable is not set). If arguments are given the set of alternate names is replaced by them, without arguments the current set is displayed. .Mx .It Ic answered Takes a message list and marks each message as having been answered. This mark has no technical meaning in the mail system; it just causes messages to be marked in the header summary, and makes them specially addressable. .Mx .It Ic cache \*(OP Only applicable to cached IMAP mailboxes; takes a message list and reads the specified messages into the IMAP cache. .Mx .It Ic call Calls a macro that has been created via .Ic define . .Mx .It Ic cd (ch) Change the working directory to .Ev HOME or the given argument. Synonym for .Ic chdir . .Mx .It Ic certsave \*(OP Only applicable to S/MIME signed messages. Takes a message list and a file name and saves the certificates contained within the message signatures to the named file in both human-readable and PEM format. The certificates can later be used to send encrypted messages to the respective message senders by setting .Va smime-encrypt-USER@HOST variables. .Mx .It Ic chdir (ch) Change the working directory to .Ev HOME or the given argument. Synonym for .Ic cd . .Mx .It Ic collapse Only applicable to threaded mode. Takes a message list and makes all replies to these messages invisible in header summaries, unless they are in state .Ql new . .Mx .It Ic connect \*(OP If operating in disconnected mode on an IMAP mailbox, switch to online mode and connect to the mail server while retaining the mailbox status. See the description of the .Va disconnected variable for more information. .Mx .It Ic Copy (C) Copy messages to files whose names are derived from the author of the respective message and don't mark them as being saved; otherwise identical to .Ic Save . .Mx .It Ic copy (c) Copy messages to the named file and don't mark them as being saved; otherwise identical to .Ic save . .Mx .It Ic cwd Print the current working directory. .Mx .It Ic Decrypt \*(OP For unencrypted messages this command is identical to .Ic Copy ; Encrypted messages are first decrypted, if possible, and then copied. .Mx .It Ic decrypt \*(OP For unencrypted messages this command is identical to .Ic copy ; Encrypted messages are first decrypted, if possible, and then copied. .Mx .It Ic define Without arguments the current list of macros, including their content, is printed, but otherwise a macro is defined. A macro definition is a sequence of commands in the following form: .Bd -literal -offset indent define name { command1 command2 ... commandN } .Ed .Pp A defined macro can be invoked explicitly by using the .Ic call or .Ic ~ commands, or implicitly by setting the .Va folder-hook or .Va folder-hook-FOLDER variables. Note that interpretation of .Ic localopts depends on how (i.e., .Dq as what : normal macro, folder hook, account switch) the macro is invoked. Macros can be deleted via .Ic undefine . .Mx .It Ic delete (d) Marks the given message list as .Ql deleted . Deleted messages will neither be saved in .Ev MBOX nor will they be available for most other commands. .Mx .It Ic discard (di) Identical to .Ic ignore . Also see .Ic retain . .Mx .It Ic disconnect \*(OP (disco) If operating in online mode on an IMAP mailbox, switch to disconnected mode while retaining the mailbox status. See the description of the .Va disconnected variable for more. A list of messages may optionally be given as argument; the respective messages are then read into the cache before the connection is closed. Thus `disco *' makes the entire mailbox available for disconnected use. .Mx .Mx .It Ic dp , dt Deletes the current message and prints the next message. If there is no next message, \*(UA says .Dq at EOF . .Mx .It Ic draft Takes a message list and marks each given message as a draft. This mark has no technical meaning in the mail system; it just causes messages to be marked in the header summary, and makes them specially addressable. .Mx .It Ic echo (ec) Echoes its arguments, resolving special names as documented for the command .Ic file . The escape sequences .Ql \ea , .Ql \eb , .Ql \ec , .Ql \ef , .Ql \en , .Ql \er , .Ql \et , .Ql \ev , .Ql \e\e and .Ql \e0octal-num are interpreted just as they are by .Xr printf 1 (proper quoting provided). .Mx .It Ic edit (e) Point the text editor (as defined in .Ev EDITOR ) at each message from the given list in turn. Modified contents are discarded unless the .Va writebackedited variable is set. .Mx .It Ic elif Part of the .Ic if Ns / Ns Ic elif Ns / Ns Ic else Ns / Ns Ic endif conditional \(em if the condition of a preceeding .Ic if was false, check the following condition and execute the following block if it evaluates true. .Mx .It Ic else (el) Part of the .Ic if Ns / Ns Ic elif Ns / Ns Ic else Ns / Ns Ic endif conditional \(em if none of the conditions of the preceeding .Ic if and .Ic elif commands was true, the .Ic else block is executed. .Mx .It Ic endif (en) Marks the end of an .Ic if Ns / Ns Ic elif Ns / Ns Ic else Ns / Ns Ic endif conditional execution block. .Mx .It Ic errors \*(OP Since \*(UA uses the console as a user interface it can happen that messages scroll by too fast to become recognized. Optionally an error message ring queue is available which stores duplicates of any error message and notifies the user in interactive sessions whenever a new error has occurred. The queue is finite: if its maximum size is reached any new message replaces the eldest. The command .Ic errors can be used to manage this message queue: if given .Ar show or no argument the queue will be displayed and cleared, .Ar clear will only clear all messages from the queue. .Mx .It Ic exit (ex or x) Exit from \*(UA without changing the active mailbox and skip any saving of messages in .Ev MBOX as well as a possibly tracked command line editor history file. .Mx .It Ic features Print the list of features that have been compiled into \*(UA. .Mx .It Ic File (Fi) Like .Ic file , but open the mailbox readonly. .Mx .It Ic file (fi) The file command switches to a new mailbox. Without arguments it prints the complete state of the current mailbox. If an argument is given, it will write out changes (such as deletions) the user has made and open a new mailbox. Some special conventions are recognized for the .Ar name argument: .Pp .Bl -tag -compact -offset indent -width ".Ar %:__lespec" .It Ar # (number sign) means the previous file, .It Ar % (percent sign) means the invoking user's system mailbox, which either is the (itself expandable) .Va inbox if that is set (\*(ID and non-empty), the standardized absolute pathname indicated by .Ev MAIL if that is set, or a builtin compile-time default otherwise. (\*(OB For IMAP folders only, and only if .Va inbox is not set, the value of .Va folder is inspected and used if found.) .It Ar %user means the system mailbox of .Ar user (and never the value of .Va inbox nor .Va folder , regardless of their actual setting), .It Ar & (ampersand) means the invoking user's .Ev MBOX file and .It Ar +file means a .Ar file in the .Va folder directory. .It Ar %:filespec expands to the same value as .Ar filespec , but the file is handled as a system mailbox by, e.g., the .Ic mbox and .Ic save commands, meaning that messages that have been read in the current session will be moved to the .Ev MBOX mailbox instead of simply being flagged as read. .El .Pp If the name matches one of the strings defined with the command .Ic shortcut , it is replaced by its long form and expanded. If the name ends with .Ql .gz , .Ql .bz2 or .Ql .xz it is treated as being compressed with .Xr gzip 1 , .Xr bzip2 1 or .Xr xz 1 , respectively, and transparently handled through an intermediate (un)compression step (using a temporary file) with the according facility, sufficient support provided. Likewise, if the named file doesn't exist, but a file with one of the mentioned compression extensions does, then the name is automatically expanded and the compressed file is used. .Pp Otherwise, if the name ends with an extension for which .Va file-hook-load-EXTENSION and .Va file-hook-save-EXTENSION variables are set, then the given hooks will be used to load and save .Dq name , and \*(UA will work with an intermediate temporary file. .Pp MBOX files (flat file-based mailboxes) are generally locked during file operations in order to avoid inconsistencies against concurrent modifications. Mailbox files which \*(UA treats as system mailboxes will also be protected by so-called dotlock files, the traditional way of mail spool file locking: for any file .Ql a a lock file .Ql a.lock will be created for the duration of the synchronization \(em as necessary a privilege-separated dotlock child process will be used to accommodate for necessary privilege adjustments in order to create the dotlock file in the same directory and with the same user and group identities as the file of interest. .Pp If .Ar name refers to a directory with the subdirectories .Ql tmp , .Ql new and .Ql cur , then it is treated as a folder in .Dq Maildir format. A name of the form .Pp .Dl \*(IN protocol://[user[:password]@]host[:port][/path] .Dl \*(OU protocol://[user@]host[:port][/path] .Pp is taken as an Internet mailbox specification. The \*(OPally supported protocols are .Ar pop3 (POP3) and .Ar pop3s (POP3 with SSL/TLS encrypted transport). The .Ar [/path] part is valid only for IMAP. Also see the section .Sx "On URL syntax and credential lookup" . .Pp \*(OU If .Ar user contains special characters, in particular .Ql / or .Ql % , they must be escaped in URL notation \(en the command .Ic urlcodec can be used to show the necessary conversion. .Pp The optional `path' part applies to IMAP only; if it is omitted, the default `INBOX' is used. (IMAP paths undergo inspections and possible transformations before use (and the command .Ic imapcodec can be used to manually apply them to any given argument). Hierarchy delimiters are normalized, a step which is configurable via the .Va imap-delim variable chain, but defaults to the first seen delimiter otherwise. \*(UA supports internationalised IMAP names, and en- and decodes the names from and to the .Va ttycharset as necessary and possible. If \*(UA is connected to an IMAP server, a name of the form `@mailbox' refers to the `mailbox' on that server, but otherwise a `@' prefix has no special meaning. .Mx .It Ic flag Takes a message list and marks the messages as .Ic flag Ns ged for urgent/special attention. This mark has no technical meaning in the mail system; it just causes messages to be highlighted in the header summary, and makes them specially addressable. .Mx .It Ic folder (fold) The same as .Ic file . .Mx .It Ic folders With no arguments, list the names of the folders in the folder directory. With an existing folder as an argument, lists the names of folders below the named folder; e.\|g. the command `folders @' lists the folders on the base level of the current IMAP server. See also the variable .Va imap-list-depth . .Mx .It Ic Followup (F) Similar to .Ic Respond , but saves the message in a file named after the local part of the first recipient's address (instead of in .Va record Ns ). .Mx .It Ic followup (fo) Similar to .Ic respond , but saves the message in a file named after the local part of the first recipient's address (instead of in .Va record Ns ). .Mx .It Ic followupall Similar to .Ic followup , but responds to all recipients regardless of the .Va flipr variable. .Mx .It Ic followupsender Similar to .Ic Followup , but responds to the sender only regardless of the .Va flipr variable. .Mx .It Ic Forward Alias for .Ic Fwd . .Mx .It Ic forward Alias for .Ic fwd . .Mx .It Ic from (f) Takes a list of messages and prints their message headers (which qualifies this command as \*(UAs search facility). .Mx .It Ic Fwd Similar to .Ic fwd , but saves the message in a file named after the local part of the recipient's address (instead of in .Va record Ns ). .Mx .It Ic fwd Takes a message and the address of a recipient and forwards the message to him. The text of the original message is included in the new one, with the value of the .Va fwdheading variable printed before. The .Ic fwdignore and .Ic fwdretain commands specify which header fields are included in the new message. Only the first part of a multipart message is included unless the .Va forward-as-attachment option is set. Unless the option .Va fullnames is set recipient addresses will be stripped from comments, names etc. .Mx .It Ic fwdignore Specifies which header fields are to be ignored with the command .Ic fwd . This command has no effect when the .Va forward-as-attachment option is set. .Mx .It Ic fwdretain Specifies which header fields are to be retained with the command .Ic fwd . .Ic fwdretain overrides .Ic fwdignore . This command has no effect when the .Va forward-as-attachment option is set. .Mx .It Ic ghost Define or list command aliases, so-called ghosts. Without arguments a list of all currently known aliases is printed. With one argument the expansion of the given alias is shown. With two or more arguments a command alias is defined or updated: the first argument is the name under which the remaining command line should be accessible, the content of which can be just about anything. A ghost can be used everywhere a normal command can be used, but always takes precedence; any arguments that are given to the command alias are joined onto the alias content, and the resulting string forms the command line that is, in effect, executed. Also see .Ic unghost . .Bd -literal -offset indent ? gh xx `ghost': no such alias: "xx" ? gh xx echo hello, ? gh xx ghost xx "echo hello," ? xx hello, ? xx world hello, world .Ed .Mx .It Ic headers (h) Show the current group of headers, the size of which depends on the variable .Va screen . If a message-specification is given the group of headers containing the first message therein is shown and the message at the top of the screen becomes the new .Dq dot . .Mx .It Ic help (hel) A synonym for .Ic \&? . .Mx .It Ic history \*(OP Either .Ar show or .Ar clear the list of history entries; a decimal .Ar NUMBER argument selects and shows the respective history entry \(en press .Dq ENTER to accept it, and the history entry will become the new history top. The default mode if no arguments are given is .Ar show . .Mx .It Ic hold (ho, also .Ic preserve ) Takes a message list and marks each message therein to be saved in the user's system mailbox instead of in .Ev MBOX . Does not override the .Ic delete command. \*(UA deviates from the POSIX standard with this command, because a .Ic next command issued after .Ic hold will display the following message, not the current one. .Mx .It Ic if (i) Part of the nestable .Ic if Ns / Ns Ic elif Ns / Ns Ic else Ns / Ns Ic endif conditional execution construct \(em if the given condition is true then the encapsulated block is executed. POSIX only supports the conditions .Ql [Rr]eceive , .Ql [Ss]end and .Ql [Tt]erm (execute if standard input is a tty), all remaining conditions are non-portable extensions; note that falsely specified conditions cause the execution of the entire conditional construct until the (matching) closing .Ic endif command to be suppressed. The syntax of the nestable .Ic if conditional execution construct requires that each condition and syntax element is surrounded by whitespace. .Bd -literal -offset indent if receive commands ... else commands ... endif .Ed .Pp Another condition can be any boolean value (see the section .Sx "Value options" for booleans) to mark an enwrapped block as .Dq never execute or .Dq always execute . It is possible to check a variable for existence or compare its expansion against a user given value or another variable via the .Ql $ .Pf ( Dq variable next ) conditional trigger character. The available comparison operators are .Ql < (less than), .Ql <= (less than or equal to), .Ql == (equal), .Ql != (not equal), .Ql >= (greater than or equal to), .Ql > (greater than), .Ql =@ (is substring of) and .Ql !@ (is not substring of). The values of the left and right hand side are treated as strings and are compared 8-bit byte-wise, ignoring case according to the rules of the US-ASCII encoding (therefore, dependend on the active locale, possibly producing false results for strings in the locale encoding). Except for the substring checks the comparison will instead be performed arithmetically if both, the user given value as well as the variable content, can be parsed as numbers (integers). An unset variable is treated as the empty string. .Pp When the \*(OPal regular expression support is available, the additional test cases .Ql =~ and .Ql !~ can be used. They treat the right hand side as a regular expression that is matched case-insensitively and according to the active .Ev LC_CTYPE locale, meaning that strings in the locale encoding should be matched correctly. .Pp Conditions can be joined via AND-OR lists (where the AND operator is .Ql && and the OR operator is .Ql || ) , which have equal precedence and will be evaluated with left associativity, thus using the same syntax that is known for the .Xr sh 1 . It is also possible to form groups of conditions and lists by enclosing them in pairs of brackets .Ql [\ \&.\&.\&.\ ] , which may be interlocked within each other, and also be joined via AND-OR lists. .Pp The results of individual conditions and entire groups may be modified via unary operators: the unary operator .Ql \&! will reverse the result. .Bd -literal -offset indent if $debug echo *debug* is set endif if $ttycharset == "UTF-8" echo *ttycharset* is set to UTF-8, case-insensitively endif set t1=one t2=one if $t1 == $t2 echo These two variables are equal endif if $version-major >= 15 echo Running a new version.. if $features =@ "regex" if $TERM =~ "^xterm\&.*" echo ..in an X terminal endif endif if [ [ true ] && [ [ $debug ] || [ $verbose ] ] ] echo Noisy, noisy endif if true && $debug || $verbose echo Left associativity, as is known from the shell endif if ! ! true && ! [ ! $debug && ! $verbose ] echo Unary operator support endif endif .Ed .Mx .It Ic ignore Without arguments the list of ignored header fields is printed, otherwise the given list of header fields is added to the ignore list: Header fields in the ignore list are not printed on the terminal when a message is printed. To print a message in its entirety, use the commands .Ic Type or .Ic Print . Also see .Ic discard and .Ic retain . .Mx .It Ic imap \*(OP Sends command strings directly to the current IMAP server. \*(UA operates always in IMAP `selected state' on the current mailbox; commands that change this will produce undesirable results and should be avoided. Useful IMAP commands are: .Bl -tag -offset indent -width ".Ic getquotearoot" .It create Takes the name of an IMAP mailbox as an argument and creates it. .It getquotaroot (RFC 2087) Takes the name of an IMAP mailbox as an argument and prints the quotas that apply to the mailbox. Not all IMAP servers support this command. .It namespace (RFC 2342) Takes no arguments and prints the Personal Namespaces, the Other User's Namespaces and the Shared Namespaces. Each namespace type is printed in parentheses; if there are multiple namespaces of the same type, inner parentheses separate them. For each namespace a prefix and a hierarchy separator is listed. Not all IMAP servers support this command. .El .Mx .It Ic imapcodec \*(OP Perform IMAP path transformations on all the given strings. The first argument specifies the operation: .Ar enc[ode] normalizes hierarchy delimiters (see .Va imap-delim ) and converts the strings from the locale .Va ttycharset to the internationalised variant used by IMAP, .Ar dec[code] does the reverse operation. Errors are indicated by prepending the output with the string .Ql ERROR . .Mx .It Ic inc Same as .Ic newmail . .Mx .It Ic list Prints the names of all available commands, alphabetically sorted. .Mx .It Ic localopts This command can be used to localize changes to variables, meaning that their state will be reverted to the former one once the covered scope is left. It can only be used inside of macro definition blocks introduced by .Ic account or .Ic define , and is interpreted as a boolean (see .Sx "Value options" ) ; the .Dq covered scope of an account is left once it is switched off again. .Bd -literal -offset indent define temporary_settings { set global_option1 localopts on set local_option1 set local_option2 localopts off set global_option2 } .Ed .Pp .Sy Note that this setting .Dq stacks up : i.e., if .Ql macro1 enables change localization and calls .Ql macro2 , which explicitly resets localization, then any value changes within .Ql macro2 will still be reverted by .Ql macro1 ! .Mx .It Ic Lreply Reply to messages that come in via known .Pf ( Ic mlist ) or subscribed .Pf ( Ic mlsubscribe ) mailing lists, or pretend to do so (see .Sx "Mailing lists" ) : on top of the usual .Ic reply functionality this will actively resort and even remove message recipients in order to generate a message that is supposed to be send to a mailing list. For example it will also implicitly generate a .Ql Mail-Followup-To: header if that seems useful, regardless of the setting of the variable .Va followup-to . .Mx .It Ic Mail Similar to .Ic mail , but saves the message in a file named after the local part of the first recipient's address (instead of in .Va record Ns ). .Mx .It Ic mail (m) Takes a (list of) recipient address(es) as (an) argument(s), or asks on standard input if none were given; then collects the remaining mail content and sends it out. .Mx .It Ic mbox (mb) The given message list is to be sent to .Ev MBOX when \*(UA is quit; this is the default action unless the .Va hold option is set. \*(ID This command can only be used in a system mailbox (see .Ic file ) . .Mx .It Ic mimetype Without any arguments the content of the MIME type cache will displayed. Otherwise each argument defines a complete MIME type specification of a type that shall be added (prepended) to the cache. In any event MIME type sources are loaded first as necessary \(en .Va mimetypes-load-control can be used to fine-tune which sources are actually loaded. Refer to the section on .Sx "The mime.types files" for more on MIME type specifications and this topic in general. MIME type unregistration and cache resets can be triggered with .Ic unmimetype . .Mx .It Ic mlist Without arguments the list of all currently defined mailing lists (and their attributes, if any) is printed. Otherwise all given arguments (which need not be quoted except for whitespace) will be added and henceforth be recognized as mailing lists. Mailing lists may be removed via the command .Ic unmlist . .Pp If the \*(OPal regular expression support is available then mailing lists may also be specified as regular expressions (see .Xr re_format 7 for more on those). .Mx .It Ic mlsubscribe Without arguments the list of all currently defined mailing lists which have a subscription attribute is printed. Otherwise this attribute will be set for all given mailing lists, newly creating them as necessary (as via .Ic mlist ) . Subscription attributes may be removed via the command .Ic unmlsubscribe . Also see .Va followup-to . .Mx .It Ic Move Similar to .Ic move , but moves the messages to a file named after the local part of the sender address of the first message (instead of in .Va record Ns ). .Mx .It Ic move Acts like .Ic copy but marks the messages for deletion if they were transferred successfully. .Mx .It Ic More Like .Ic more , but also prints ignored header fields and all MIME parts. Identical to .Ic Page . .Mx .It Ic more Invokes the .Ev PAGER on the given messages, even in non-interactive mode and as long as the standard output is a terminal. Identical to .Ic page . .Mx .It Ic netrc \*(OP Either .Pf ( Ar show or) .Ar clear the current .Pa .netrc cache, loading the file first as necessary in the former case. Note that \*(UA will try to read the file only once, use .Ql Ic netrc Ns \:\0\:clear to unlock the next attempt. See .Va netrc-lookup and the section .Sx "On URL syntax and credential lookup" ; the section .Sx "The .netrc file" documents the file format in detail. .Mx .It Ic newmail Checks for new mail in the current folder without committing any changes before. If new mail is present, a message is printed. If the .Va header variable is set, the headers of each new message are also printed. .Mx .It Ic next (n) (like .Ql + or .Dq ENTER ) Goes to the next message in sequence and types it. With an argument list, types the next matching message. .Mx .It Ic New Same as .Ic Unread . .Mx .It Ic new Same as .Ic unread . .Mx .It Ic noop If the current folder is accessed via a network connection, a .Dq NOOP command is sent, otherwise no operation is performed. .Mx .It Ic Page Like .Ic page , but also prints ignored header fields and all MIME parts. Identical to .Ic More . .Mx .It Ic page Invokes the .Ev PAGER on the given messages, even in non-interactive mode and as long as the standard output is a terminal. Identical to .Ic more . .Mx .It Ic Pipe Like .Ic pipe but also pipes ignored header fields and all parts of MIME .Ql multipart/alternative messages. .Mx .It Ic pipe (pi) Takes a message list and a shell command and pipes the messages through the command. Without an argument the current message is piped through the command given by the .Va cmd variable. If the .Va page variable is set, every message is followed by a formfeed character. .Mx .It Ic preserve (pre) A synonym for .Ic hold . .Mx .It Ic Print (P) Like .Ic print but also prints out ignored header fields and all parts of MIME .Ql multipart/alternative messages. See also .Ic print , .Ic ignore and .Ic retain . .Mx .It Ic print (p) Takes a message list and types out each message on the user's terminal. For MIME multipart messages, all parts with a content type of .Ql text or .Ql message are shown, the other are hidden except for their headers. Messages are decrypted and converted to the terminal character set if necessary. .Mx .It Ic quit (q) Terminates the session, saving all undeleted, unsaved messages in the current .Ev MBOX , preserving all messages marked with .Ic hold or .Ic preserve or never referenced in the system mailbox, and removing all other messages from the system mailbox. If new mail has arrived during the session, the message .Dq You have new mail will be shown. If given while editing a mailbox file with the command line flag .Fl f , then the edit file is rewritten. A return to the shell is effected, unless the rewrite of edit file fails, in which case the user can escape with the exit command. .Mx .It Ic redirect Same as .Ic resend . .Mx .It Ic Redirect Same as .Ic Resend . .Mx .It Ic remove Removes the named folders. The user is asked for confirmation in interactive mode. .Mx .It Ic rename Takes the name of an existing folder and the name for the new folder and renames the first to the second one. Both folders must be of the same type and must be located on the current server for IMAP. .Mx .It Ic Reply (R) Reply to originator. Does not reply to other recipients of the original message. .Va flipr will exchange this command with .Ic reply . Unless the option .Va fullnames is set the recipient address will be stripped from comments, names etc. .Mx .It Ic reply (r) Take a message and group-responds to it by addressing the sender and all recipients. .Va followup-to , .Va followup-to-honour , .Va reply-to-honour as well as .Va recipients-in-cc influence response behaviour. The command .Ic Lreply offers special support for replying to mailing lists. Unless the option .Va fullnames is set recipient addresses will be stripped from comments, names etc. If .Va flipr is set the commands .Ic Reply and .Ic reply are exchanged. .Mx .It Ic replyall Similar to .Ic reply , but initiates a group-reply regardless of the value of .Va flipr . .Mx .It Ic replysender Similar to .Ic Reply , but responds to the sender only regardless of the value of .Va flipr . .Mx .It Ic Resend Like .Ic resend , but does not add any header lines. This is not a way to hide the sender's identity, but useful for sending a message again to the same recipients. .Mx .It Ic resend Takes a list of messages and a user name and sends each message to the named user. .Ql Resent-From: and related header fields are prepended to the new copy of the message. .Mx .It Ic Respond Same as .Ic Reply . .Mx .It Ic respond Same as .Ic reply . .Mx .It Ic respondall Same as .Ic replyall . .Mx .It Ic respondsender Same as .Ic replysender . .Mx .It Ic retain (ret) Without arguments the list of retained header fields is printed, otherwise the given list of header fields is added to the retain list: Header fields in the retain list are shown on the terminal when a message is printed, all other header fields are suppressed. To print a message in its entirety, use the commands .Ic Type or .Ic Print . Also see .Ic discard and .Ic ignore ; .Ic retain takes precedence over the mentioned. .Mx .It Ic Save (S) Similar to .Ic save, but saves the messages in a file named after the local part of the sender of the first message instead of (in .Va record and) taking a filename argument. .Mx .It Ic save (s) Takes a message list and a filename and appends each message in turn to the end of the file. If no filename is given, the .Ev MBOX file is used. The filename in quotes, followed by the generated character count is echoed on the user's terminal. If editing a system mailbox the messages are marked for deletion. Compressed files and IMAP mailboxes are handled as described for the .Fl f command line option above. .Mx .It Ic savediscard Same as .Ic saveignore . .Mx .It Ic saveignore Is to .Ic save what .Ic ignore is to .Ic print and .Ic type . Header fields thus marked are filtered out when saving a message by .Ic save or when automatically saving to .Ev MBOX . This command should only be applied to header fields that do not contain information needed to decode the message, as MIME content fields do. If saving messages on an IMAP account ignoring fields makes it impossible to copy the data directly on the server, thus operation usually becomes much slower. .Mx .It Ic saveretain Is to .Ic save what .Ic retain is to .Ic print and .Ic type . Header fields thus marked are the only ones saved with a message when saving by .Ic save or when automatically saving to .Ev MBOX . .Ic saveretain overrides .Ic saveignore . The use of this command is strongly discouraged since it may strip header fields that are needed to decode the message correctly. .Mx .It Ic seen Takes a message list and marks all messages as having been read. .Mx .It Ic set (se) Without arguments this command prints all options and, for non-binary options, values that are currently known to \*(UA. Setting any of the options .Va bsdcompat or .Va bsdset changes the output format to BSD style, otherwise a properly quoted listing is produced. If .Va debug is set or .Va verbose has been set twice then the listing is modified to mark out assembled variables. .Pp Otherwise modifies (set and unsets) the given options. Arguments are of the form .Ql option=value (no space before or after .Ql = ) , or plain .Ql option if there is no value. Quotation marks may be placed around any part of the assignment statement to quote blanks or tabs, e.g., .Pp .Dl set indentprefix="->" .Pp If an argument begins with .Ql no , as in .Ql set nosave , the effect is the same as invoking the .Ic unset command with the remaining part of the variable .Pf ( Ql unset save ) . .Mx .It Ic setenv Identical to .Ic set except that the options are also exported into the program environment; since this task requires native host support the command will always report error if that is not available (but still act like .Ic set in this case). This operation is a no-op unless all resource files have been loaded. Also see .Ic unsetenv . .Mx .It Ic shell (sh) Invokes an interactive version of the shell. .Mx .It Ic shortcut Without arguments the list of all currently defined shortcuts is printed. Otherwise all given arguments (which need not be quoted except for whitespace) are treated as pairs of shortcuts and their expansions, creating new or changing already existing shortcuts, as necessary. Shortcuts may be removed via the command .Ic unshortcut . The expansion strings should be in the syntax that has been described for the .Ic file command. .Mx .It Ic show Like .Ic print , but performs neither MIME decoding nor decryption, so that the raw message text is shown. .Mx .It Ic size (si) Print the size in characters of each message of the given message-list. .Mx .It Ic sort Create a sorted representation of the current folder, and change the .Ic next command and the addressing modes such that they refer to messages in the sorted order. Message numbers are the same as in regular mode. If the .Va header variable is set, a header summary in the new order is also printed. Possible sorting criteria are: .Pp .Bl -tag -compact -offset indent -width "subject" .It date Sort the messages by their .Ql Date: field, that is by the time they were sent. .It from Sort messages by the value of their .Ql From: field, that is by the address of the sender. If the .Va showname variable is set, the sender's real name (if any) is used. .It size Sort the messages by their size. .It spam \*(OP Sort the message by their spam score, as has been classified by .Ic spamrate . .It status Sort the messages by their message status. .It subject Sort the messages by their subject. .It thread Create a threaded display. .It to Sort messages by the value of their .Ql To: field, that is by the address of the recipient. If the .Va showname variable is set, the recipient's real name (if any) is used. .El .Pp If no argument is given, the current sorting criterion is printed. .Mx .It Ic source (so) The source command reads commands from a file. .Mx .It Ic source_if The difference to .Ic source is that this command will not generate an error if the given file argument cannot be opened successfully. This can matter in, e.g., resource files, since loading of those is stopped when an error is encountered. .Mx .It Ic spamclear \*(OP Takes a list of messages and clears their .Ql is-spam flag. .Mx .It Ic spamforget \*(OP Takes a list of messages and causes the .Va spam-interface to forget it has ever used them to train its Bayesian filter. Unless otherwise noted the .Ql is-spam flag of the message is inspected to chose whether a message shall be forgotten to be .Dq ham or .Dq spam . .Mx .It Ic spamham \*(OP Takes a list of messages and informs the Bayesian filter of the .Va spam-interface that they are .Dq ham . This also clears the .Ql is-spam flag of the messages in question. .Mx .It Ic spamrate \*(OP Takes a list of messages and rates them using the configured .Va spam-interface , without modifying the messages, but setting their .Ql is-spam flag as appropriate; because the spam rating headers are lost the rate will be forgotten once the mailbox is left. Refer to the manual section .Sx "Handling spam" for the complete picture of spam handling in \*(UA. .Mx .It Ic spamset \*(OP Takes a list of messages and sets their .Ql is-spam flag. .Mx .It Ic spamspam \*(OP Takes a list of messages and informs the Bayesian filter of the .Va spam-interface that they are .Dq spam . This also sets the .Ql is-spam flag of the messages in question. .Mx .It Ic thread \*(OB The same as .Ql sort thread (consider using a .Ql ghost as necessary). Create a threaded representation of the current folder, i.\|e. indent messages that are replies to other messages in the header display and change the .Ic next command and the addressing modes such that they refer to messages in the threaded order. Message numbers are the same as in unthreaded mode. If the .Va header variable is set, a header summary in threaded order is also printed. .Mx .It Ic top (to) Takes a message list and prints the top few lines of each. The number of lines printed is controlled by the variable .Va toplines and defaults to five. .Mx .It Ic touch (tou) Takes a message list and marks the messages for saving in .Ev MBOX . \*(UA deviates from the POSIX standard with this command, as a following .Ic next command will display the following message instead of the current one. .Mx .It Ic Type (T) Identical to the .Ic Print command. .Mx .It Ic type (t) A synonym for .Ic print . .Mx .It Ic unaccount Delete all given accounts. An error message is printed if a given account is not defined. The special name .Ql * will discard all existing accounts. .Mx .It Ic unalias (una) Takes a list of names defined by alias commands and discards the remembered groups of users. The special name .Ql * will discard all existing aliases. .Mx .It Ic unanswered Takes a message list and marks each message as not having been answered. .Mx .It Ic uncollapse Only applicable to threaded mode. Takes a message list and makes the message and all replies to it visible in header summaries again. When a message becomes the current message, it is automatically made visible. Also when a message with collapsed replies is printed, all of these are automatically uncollapsed. .Mx .It Ic undefine Undefine all given macros. An error message is printed if a given macro is not defined. The special name .Ql * will discard all existing macros. .Mx .It Ic undelete (u) Takes a message list and marks each message as not being deleted. .Mx .It Ic undraft Takes a message list and .Pf un Ic draft Ns s each message. .Mx .It Ic unflag Takes a message list and marks each message as not being .Ic flag Ns ged . .Mx .It Ic unfwdignore Removes the header field names from the list of ignored fields for the .Ic forward command. The special name .Ql * will remove all fields. .Mx .It Ic unfwdretain Removes the header field names from the list of retained fields for the .Ic forward command. The special name .Ql * will remove all fields. .Mx .It Ic unghost Remove all the given command .Ic ghost Ns s Ns . The special name .Ql * will remove all ghosts. .Mx .It Ic unignore Removes the header field names from the list of ignored fields. The special name .Ql * will remove all fields. .Mx .It Ic unmimetype Delete all given MIME types, e.g., .Ql unmimetype text/plain will remove all registered specifications for the MIME type .Ql text/plain . The special name .Ql * will discard all existing MIME types, just as will .Ql reset , but which also reenables cache initialization via .Va mimetypes-load-control . .Mx .It Ic unmlist Forget about all the given mailing lists. The special name .Ql * will remove all lists. Also see .Ic mlist . .Mx .It Ic unmlsubscribe Remove the subscription attribute from all given mailing lists. The special name .Ql * will clear the attribute from all lists which have it set. Also see .Ic mlsubscribe . .Mx .It Ic Unread Same as .Ic unread . .Mx .It Ic unread Takes a message list and marks each message as not having been read. .Mx .It Ic unretain Removes the header field names from the list of retained fields. The special name .Ql * will remove all fields. .Mx .It Ic unsaveignore Removes the header field names from the list of ignored fields for saving. The special name .Ql * will remove all fields. .Mx .It Ic unsaveretain Removes the header field names from the list of retained fields for saving. The special name .Ql * will remove all fields. .Mx .It Ic unset (uns) Takes a list of option names and discards their remembered values; the inverse of .Ic set . .Mx .It Ic unsetenv Identical to .Ic unset except that the options are also removed from the program environment; since this task requires native host support the command will always report error if that is not available (but still act like .Ic unset Ns ). This operation is a no-op unless all resource files have been loaded. Also see .Ic setenv . .Mx .It Ic unshortcut Deletes the shortcut names given as arguments. The special name .Ql * will remove all shortcuts. .Mx .It Ic unsort Disable sorted or threaded mode (see the .Ic sort and .Ic thread commands), return to normal message order and, if the .Va header variable is set, print a header summary. .Mx .It Ic unthread \*(OB Same as .Ic unsort . .Mx .It Ic urlcodec Perform URL percent codec operations, rather according to RFC 3986, on all given strings. This is character set agnostic and thus locale dependent, and it may decode bytes which are invalid in the current locale, unless the input solely consists of characters in the portable character set, see .Sx "Character sets" . The first argument specifies the operation: .Ar enc[ode] or .Ar dec[code] perform plain URL percent en- and decoding, respectively. .Ar p[ath]enc[ode] and .Ar p[ath]dec[ode] perform a slightly modified operation which should be better for pathnames: it doesn't allow a tilde .Ql ~ , and will neither accept hyphen .Ql - nor dot .Ql \&. as an initial character. .Mx .It Ic varedit Edit the values of or create the given variable(s) in the .Ev EDITOR . Binary variables cannot be edited. .Mx .It Ic varshow Show informations about all the given options. \*(UA knows about a finite set of known builtin variables that are subdivided further in binary and value variants; they may have special properties, like .Dq read-only (setting may not be changed) and .Dq virtual , meaning that the value is generated on-the-fly as necessary. Beside those known variables an infinite number of unknown, so-called .Dq assembled variables, which are expected to be able to store values, may exist. .Bd -literal -offset indent ? set foo=bar nobar ? varshow sendwait version-major foo bar "sendwait": (73) binary: set=1 (ENVIRON=0) "version-major": (192) value, read-only, virtual:\e set=1 (ENVIRON=0) value<14> "foo": (assembled) set=1 (ENVIRON=0) value "bar": (assembled) set=0 (ENVIRON=0) value .Ed .Mx .It Ic verify \*(OP Takes a message list and verifies each message. If a message is not a S/MIME signed message, verification will fail for it. The verification process checks if the message was signed using a valid certificate, if the message sender's email address matches one of those contained within the certificate, and if the message content has been altered. .Mx .It Ic visual (v) Takes a message list and invokes the display editor on each message. Modified contents are discarded unless the .Va writebackedited variable is set. .Mx .It Ic write (w) For conventional messages the body without all headers is written. The original message is never marked for deletion in the originating mail folder. The output is decrypted and converted to its native format as necessary. If the output file exists, the text is appended. If a message is in MIME multipart format its first part is written to the specified file as for conventional messages, handling of the remains depends on the execution mode. No special handling of compressed files is performed. .Pp In interactive mode the user is consecutively asked for the filenames of the processed parts. For convience saving of each part may be skipped by giving an empty value, the same result as writing it to .Pa /dev/null . Shell piping the part content by specifying a leading vertical bar .Ql | character for the filename is supported. Other user input is expanded as usually for folders, e.g., tilde expansion is performed, and contents of the destination file are overwritten if the file previously existed. .Pp \*(ID In non-interactive mode any part which does not specify a filename is ignored, and suspicious parts of filenames of the remaining parts are URL percent encoded (as via .Ic urlcodec ) to prevent injection of malicious character sequences, resulting in a filename that will be written into the current directory. Existing files won't be overwritten, instead the part number or a dot are appended after a number sign .Ql # to the name until file creation succeeds (or fails due to other reasons). .Mx .It Ic xit (x) A synonym for .Ic exit . .Mx .It Ic z \*(UA presents message headers in .Va screen Ns fuls as described under the .Ic headers command. Without arguments this command scrolls to the next window of messages, likewise if the argument is .Ql + . An argument of .Ql - scrolls to the last, .Ql ^ scrolls to the first, and .Ql $ to the last .Va \&\&screen of messages. A number argument prefixed by .Ql + or .Ql \- indicates that the window is calculated in relation to the current position, and a number without a prefix specifies an absolute position. .Mx .It Ic Z Similar to .Ic z , but scrolls to the next or previous window that contains at least one .Ql new or .Ic flag Ns ged message. .El .Sh "TILDE ESCAPES" Here is a summary of the tilde escapes, which are used to perform special functions when composing messages. Tilde escapes are only recognized at the beginning of lines. The name .Dq tilde escape is somewhat of a misnomer since the actual escape character can be changed by adjusting the option .Va escape . .Bl -tag -width ".Ic __ filename" .Mx .It Ic ~~ Ar string Insert the string of text in the message prefaced by a single .Ql ~ . (If the escape character has been changed, that character must be doubled in order to send it at the beginning of a line.) .Mx .It Ic ~! Ar command Execute the indicated shell .Ar command , then return to the message. .Mx .It Ic ~. Same effect as typing the end-of-file character. .Mx .It Ic ~: Ar \*(UA-command Ns \0or Ic ~_ Ar \*(UA-command Execute the given \*(UA command. Not all commands, however, are allowed. .Mx .It Ic ~? Write a summary of command escapes. .Mx .It Ic ~< Ar filename Identical to .Ic ~r . .Mx .It Ic ~ .pass $ gpg -e .pass $ eval `gpg-agent --daemon \e --pinentry-program=/usr/bin/pinentry-curses \e --max-cache-ttl 99999 --default-cache-ttl 99999` $ echo 'set agent-shell-lookup="gpg -d .pass.gpg"' \e >> \*(ur .Ed .Pp A couple of environment variables will be set for the agent: .Pp .Bl -tag -compact -width ".It Ev _AIL_TMPDIR[337]" .It Ev NAIL_TMPDIR The temporary directory that \*(UA uses. Usually identical to .Ev TMPDIR , but guaranteed to be set and usable by child processes; to ensure the latter condition for .Ev TMPDIR also, it'll be set. .It Ev NAIL_USER The user .Pf ( Ql USER ) for which the password is looked up. .It Ev NAIL_USER_ENC The URL percent-encoded variant of .Ev NAIL_USER . .It Ev NAIL_HOST The plain machine hostname of the user account. .It Ev NAIL_HOST_PORT The .Ql HOST (hostname possibly including port) of the user account. .El .Mx .It Va attrlist A sequence of characters to print in the .Ql attribute column of the .Va headline as shown in the header display; each for one type of messages (see .Sx "Message states" ) , with the default being .Ql NUROSPMFAT+\-$~ or .Ql NU\ \ *HMFAT+\-$~ if .Va bsdflags or the .Ev SYSV3 environment variable are set, in the following order: .Pp .Bl -tag -compact -offset indent -width ".It Ql _" .It Ql N new. .It Ql U unread but old. .It Ql R new but read. .It Ql O read and old. .It Ql S saved. .It Ql P preserved. .It Ql M mboxed. .It Ql F flagged. .It Ql A answered. .It Ql T draft. .It Ql + start of a collapsed thread. .It Ql - collapsed. .It Ql $ classified as spam. .It Ql ~ classified as possible spam. .El .Mx .It Va autobcc Specifies a list of recipients to which a blind carbon copy of each outgoing message will be sent automatically. .Mx .It Va autocc Specifies a list of recipients to which a carbon copy of each outgoing message will be sent automatically. .Mx .It Va autosort Causes sorted mode (see the .Ic sort command) to be entered automatically with the value of this option as sorting method when a folder is opened. .Mx .It Va charset-7bit The value that should appear in the .Ql charset= parameter of .Ql Content-Type: MIME header fields when no character set conversion of the message data was performed. This defaults to US-ASCII, and the chosen character set should be US-ASCII compatible. .Mx .It Va charset-8bit \*(OP The default 8-bit character set that is used as an implicit last member of the variable .Va sendcharsets . This defaults to UTF-8. If no character set conversion capabilities are available in \*(UA then the only supported character set is .Va ttycharset . Refer to the section .Sx "Character sets" for the complete picture of character set conversion in \*(UA. .Mx .It Va charset-unknown-8bit \*(OP RFC 1428 specifies conditions when internet mail gateways shall .Dq upgrade the content of a mail message by using a character set with the name .Ql unknown-8bit . Because of the unclassified nature of this character set \*(UA will not be capable to convert this character set to any other character set. If this variable is set any message part which uses the character set .Ql unknown-8bit is assumed to really be in the character set given in the value, otherwise the (final) value of .Va charset-8bit is used for this purpose. .Mx .It Va cmd The default value for the .Ic pipe command. .Mx .It Va colour-from_ \*(OP The colour specification for so-called .Ql From_ lines. See the section .Sx "Coloured message display" for the format of the value. .Mx .It Va colour-header \*(OP The colour specification for header lines. .Mx .It Va colour-msginfo \*(OP The colour specification for the introductional message info line. .Mx .It Va colour-partinfo \*(OP The colour specification for MIME part info lines. .Mx .It Va colour-terms \*(OP A comma-separated list of .Ev TERM Ns inals for which coloured message display can be used. Entries only need to be added if the string .Dq color isn't part of the terminal name itself; the default value is .Pp .Dl cons25,linux,rxvt,rxvt-unicode,\:screen,\:sun,\:vt100,\:vt220,\:\ wsvt25,\:xterm .Mx .It Va colour-uheader \*(OP The colour specification for those header lines that have been placed in the .Va colour-user-headers list. See the section .Sx "Coloured message display" . .Mx .It Va colour-user-headers A comma separated list of (case-insensitive) header names which should be colourized with the alternative .Va colour-uheader colours. The default value is .Ql from,subject . .Mx .It Va crt In a(n interactive) terminal session, then if this valued option is set it'll be used as a threshold to determine how many lines the given output has to span before it will be displayed via the configured .Ev PAGER ; Usage of the .Ev PAGER can be forced by setting this to the value .Ql 0 , setting it without a value will deduce the current height of the terminal screen to compute the treshold (see .Ev LINES and .Xr stty 1 ) . .Mx .It Va datefield The date in a header summary is normally the date of the mailbox .Ql From_ line of the message. If this variable is set, then the date as given in the .Ql Date: field is used, converted to local time. It is possible to control the display of the date by assigning a value, in which case the .Xr strftime 3 function will be used to format the date accordingly. Please read your system manual for the available formats. Note that the .Ql %n format should not be used, because \*(UA doesn't take embedded newlines into account when calculating how many lines fit onto the screen. .Mx .It Va datefield-markout-older This option, when set in addition to .Va datefield , is used to display .Dq older messages (concept is rather comparable to the .Fl \&\&l option of the POSIX utility .Xr ls 1 ) . The content interpretation is identical to .Va datefield . .Mx .It Va encoding Suggestion for the MIME encoding to use in outgoing text messages and message parts. Valid values are the default .Ql quoted-printable , .Ql 8bit and .Ql base64 . .Ql 8bit may cause problems when transferring mail messages over channels that are not ESMTP (RFC 1869) compliant. If there is no need to encode a message, .Ql 7bit transfer mode is always used regardless of this variable. Binary data is always encoded as .Ql base64 . .Mx .It Va escape If defined, the first character of this option gives the character to use in place of .Ql ~ to denote .Sx "TILDE ESCAPES" . .Mx .It Va expandaddr If not set then file and command pipeline targets are not allowed, and any such address will be filtered out, giving a warning message. If set without a value then all possible recipient address specifications will be accepted \(en see the section .Sx "Sending mail" for more on this. To accept them, but only in interactive mode, or when tilde commands were enabled explicitly by using one of the command line options .Fl ~ or .Fl # , set this to the (case-insensitive) value .Ql restrict (note right now this is actually like setting .Ql restrict,-all,+name,+addr ) . .Pp In fact the value is interpreted as a comma-separated list of values. If it contains .Ql fail then the existence of disallowed specifications is treated as a hard send error instead of only filtering them out. The remaining values specify whether a specific type of recipient address specification is allowed (optionally indicated by a plus sign .Ql + prefix) or disallowed (prefixed with a hyphen .Ql - ) . The value .Ql all addresses all possible address specifications, .Ql file file targets, .Ql pipe command pipeline targets, .Ql name plain user names and (MTA) aliases (\*(OB .Ql noalias may be used as an alternative syntax to .Ql -name ) and .Ql addr network addresses. These kind of values are interpreted in the given order, so that .Ql restrict,\:fail,\:+file,\:-all,\:+addr will cause hard errors for any non-network address recipient address unless \*(UA is in interactive mode or has been started with the .Fl ~ or .Fl # command line option; in the latter case(s) any address may be used, then. .Mx .It Va expandargv Unless this variable is set additional mail-transfer-agent (MTA) arguments from the command line, as can be given after a .Ql -- separator, are ignored due to safety reasons. However, if set to the special value .Ql fail , then the presence of additional MTA arguments is treated as a hard error that causes \*(UA to exit with failure status. A lesser strict variant is the otherwise identical .Ql restrict , which does accept such arguments in interactive mode, or if tilde commands were enabled explicitly by using one of the command line options .Fl ~ or .Fl # . .Mx .It Va features \*(RO Information on the features compiled into \*(UA \(en the content of this variable is identical to the output of the command .Ic features . .Mx .Mx .It Va file-hook-load-EXTENSION , file-hook-save-EXTENSION It is possible to install file hooks which will be used by the .Ic file command in order to be able to transparently handle (through an intermediate temporary file) files with specific .Ql EXTENSION Ns s: the variable values can include shell snippets and are expected to write data to standard output / read data from standard input, respectively. \*(ID The variables may not be changed while there is a mailbox attendant. .Bd -literal -offset indent set file-hook-load-xy='echo >&2 XY-LOAD; gzip -cd' \e file-hook-save-xy='echo >&2 XY-SAVE; gzip -c' \e record=+null-sent.xy .Ed .Mx .It Va folder The name of the directory to use for storing folders of messages. All folder names that begin with .Ql + refer to files below it. The same special conventions as documented for the .Ic file command may be used when specifying a new value for .Va \&\&folder , but be aware that the expansion is fully performed immediately. E.g., if the expanded name refers to an IMAP account, all names that begin with `+' refer to IMAP mailboxes below the .Va folder target box. .Pp Note: for IMAP it makes a difference whether .Va \&\&folder ends with a directory separator solidus or not in respect to the automatic append of `INBOX' strings. Ssome IMAP servers do not accept the creation of mailboxes in the hierarchy base, but require that they are created as subfolders of `INBOX' \(en with such servers a folder name of the form .Pp .Dl imaps://mylogin@imap.myisp.example/INBOX. .Pp should be used (the last character is the server's hierarchy delimiter). Folder names prefixed by `+' will then refer to folders below `INBOX', while folder names prefixed by `@' refer to folders below the hierarchy base. See the .Ic imap namespace command for a method to detect the appropriate prefix and delimiter. .Mx .It Va folder-hook When a folder is opened and this variable is set, the macro corresponding to the value of this variable is executed. The macro is also invoked when new mail arrives, but message lists for commands executed from the macro only include newly arrived messages then. If .Ic localopts are activated in a folder hook, then the covered settings will be reverted once the folder is left again. .Mx .It Va folder-hook-FOLDER Overrides .Va folder-hook for a folder named .Ql FOLDER . Unlike other folder specifications, the fully expanded name of a folder, without metacharacters, is used to avoid ambiguities. However, if the mailbox resides under .Va folder then the usual .Ql + specification is tried in addition, e.g., if .Va \&\&folder is .Dq mail (and thus relative to the user's home directory) then .Pa /home/usr1/mail/sent will be tried as .Ql folder-hook-/home/usr1/mail/sent first, but then followed by .Ql folder-hook-+sent . .Mx .It Va followup-to-honour Controls whether a .Ql Mail-Followup-To: header is honoured when group-replying to a message via .Ic reply or .Ic Lreply . This is a quadoption; if set without a value it defaults to .Dq yes . Also see .Va followup-to and the commands .Ic mlist and .Ic mlsubscribe . .Mx .It Va from The address (or a list of addresses) to put into the .Ql From: field of the message header, quoting RFC 5322: the author(s) of the message, that is, the mailbox(es) of the person(s) or system(s) responsible for the writing of the message. If replying to messages these addresses are handled as if they were in the .Ic alternates list. If the machine's hostname is not valid at the Internet (for example at a dialup machine) then either this variable or .Va hostname (\*(IN and with .Va smtp .Va smtp-hostname adds even more fine-tuning capabilities), have to be set. If .Va \&\&from contains more than one address, setting the .Va sender variable is required (according to the standard RFC 5322). .Mx .It Va fwdheading The string to print before the text of a message with the .Ic forward command (unless the .Va forward-as-attachment variable is set). Defaults to .Dq -------- Original Message -------- if unset; No heading is printed if it is set to the empty string. .Mx .It Va headline A format string to use for the header summary, similar to .Xr printf 3 formats. A percent character .Ql % introduces a format specifier that may be followed by a number indicating the field width; If the (possibly implicitly implied) field width is negative, the field is to be left-aligned. Valid format specifiers are: .Pp .Bl -tag -compact -offset indent -width "_%%_" .It Ql %% A plain percent character. .It Ql %> A space character but for the current message, for which it expands to .Ql > . .It Ql %< A space character but for the current message, for which it expands to .Ql < . .It Ql %$ \*(OP The spam score of the message, as has been classified via the command .Ic spamrate . Prints only a replacement character if there is no spam support. .It Ql %a Message attribute character (status flag); the actual content can be adjusted by setting .Va attrlist . .It Ql %d The date when the message was received. .It Ql %e The indenting level in threaded mode. .It Ql %f The address of the message sender. .It Ql %i The message thread structure. (Note that this format doesn't support a field width.) .It Ql %l The number of lines of the message. .It Ql %m Message number. .It Ql %o The number of octets (bytes) in the message. .It Ql %s Message subject (if any). .It Ql %S Message subject (if any) in double quotes. .It Ql \&%T Message recipient flags: is the addressee of the message a known or subscribed mailing list \(en see .Ic mlist and .Ic mlsubscribe . .It Ql %t The position in threaded/sorted order. .El .Pp The default is .Ql %>\&%a\&%m\ %-18f\ %16d\ %4l/%\-5o\ %i%-s , or .Ql %>\&%a\&%m\ %20-f\ \ %16d\ %3l/%\-5o\ %i%-S if .Va bsdcompat is set. Also see .Va attrlist and .Va headline-bidi . .Mx .It Va headline-bidi Bidirectional text requires special treatment when displaying headers, because numbers (in dates or for file sizes etc.) will not affect the current text direction, in effect resulting in ugly line layouts when arabic or other right-to-left text is to be displayed. On the other hand only a minority of terminals is capable to correctly handle direction changes, so that user interaction is necessary for acceptable results. Note that extended host system support is required nonetheless, e.g., detection of the terminal character set is one precondition; and this feature only works in an Unicode (i.e., UTF-8) locale. .Pp In general setting this variable will cause \*(UA to encapsulate text fields that may occur when printing .Va headline (and some other fields, like dynamic expansions in .Va prompt ) with special Unicode control sequences; it is possible to fine-tune the terminal support level by assigning a value: no value (or any value other than .Ql 1 , .Ql 2 and .Ql 3 ) will make \*(UA assume that the terminal is capable to properly deal with Unicode version 6.3, in which case text is embedded in a pair of U+2068 (FIRST STRONG ISOLATE) and U+2069 (POP DIRECTIONAL ISOLATE) characters. In addition no space on the line is reserved for these characters. .Pp Weaker support is chosen by using the value .Ql 1 (Unicode 6.3, but reserve the room of two spaces for writing the control sequences onto the line). The values .Ql 2 and .Ql 3 select Unicode 1.1 support (U+200E, LEFT-TO-RIGHT MARK); the latter again reserves room for two spaces in addition. .Mx .It Va hostname Use this string as hostname when expanding local addresses instead of the value obtained from .Xr uname 3 and .Xr getaddrinfo 3 , i.e., in .Ql Message-ID: and .Ql From: fields. Note that when .Va smtp transport is not used then it is normally the responsibility of the MTA to create these fields, \*(IN in conjunction with .Va smtp however .Va smtp-hostname also influences the results; you should produce some test messages with the desired combination of .Va \&\&hostname , and/or .Va from , .Va sender etc. first. .Mx Va imap-auth .It Va imap-auth-USER@HOST , imap-auth \*(OP Sets the IMAP authentication method. Valid values are `login' for the usual password-based authentication (the default), `cram-md5', which is a password-based authentication that does not send the password over the network in clear text, and `gssapi' for GSS-API based authentication. .Mx .It Va imap-cache \*(OP Enables caching of IMAP mailboxes. The value of this variable must point to a directory that is either existent or can be created by \*(UA. All contents of the cache can be deleted by \*(UA at any time; it is not safe to make assumptions about them. .Mx Va imap-delim .It Va imap-delim-USER@HOST , imap-delim-HOST , imap-delim \*(OP The hierarchy separator used by the IMAP server. Whenever an IMAP path is specified it will undergo normalization. One of the normalization steps is the squeeze and adjustment of hierarchy separators. If this variable is set, any occurrence of any character of the given value that exists in the path will be replaced by the first member of the value; an empty value will cause the default to be used, it is .Ql /. . If not set, we will reuse the first hierarchy separator character that is discovered in a user-given mailbox name. .Mx Va imap-keepalive .It Va imap-keepalive-USER@HOST , imap-keepalive-HOST , imap-keepalive \*(OP IMAP servers may close the connection after a period of inactivity; the standard requires this to be at least 30 minutes, but practical experience may vary. Setting this variable to a numeric `value' greater than 0 causes a `NOOP' command to be sent each `value' seconds if no other operation is performed. .Mx .It Va imap-list-depth \*(OP When retrieving the list of folders on an IMAP server, the .Ic folders command stops after it has reached a certain depth to avoid possible infinite loops. The value of this variable sets the maximum depth allowed. The default is 2. If the folder separator on the current IMAP server is a slash `/', this variable has no effect and the .Ic folders command does not descend to subfolders. .Mx .It Va inbox If this is set it will be used for expansions of .Ql % , see .Ic file for more. \*(ID IMAP users may set this to the empty string to force bypassing the special handling of .Va folder . The value supports a subset of filename expansions itself. .Mx .It Va indentprefix String used by the .Ic ~m , ~M and .Ic ~R .Sx "TILDE ESCAPES" and by the .Va quote option for indenting messages, in place of the normal tabulator character .Ql ^I , which is the default. Be sure to quote the value if it contains spaces or tabs. .Mx .It Va line-editor-cursor-right \*(OP If the builtin command line editor is used, actions which are based on rightwise movement may not work on some terminals. If you encounter such problems, set this variable to the terminal control sequence that is necessary to move the cursor one column to the right. The default is .Ql \e033[C , which should work for most terminals. Less often occur .Ql \e033OC and .Ql \e014 . Note that .Dq Escape and other control character have to be written as shell-style escape sequences, e.g., .Ql \e033 for (US-ASCII) .Dq Escape . .Mx .It Va mime-counter-evidence Normally the .Ql Content-Type: field is used to decide how to handle MIME parts. Some MUAs however don't use .Xr mime.types 5 or a similar mechanism to correctly classify content, but simply specify .Ql application/octet-stream , even for plain text attachments like .Ql text/diff . If this variable is set then \*(UA will try to classify such MIME message parts on its own, if possible, and through their file name. This variable can also be given a non-empty value, in which case the value is expected to be a number, actually a carrier of bits. Creating the bit-carrying number is a simple addition: .Bd -literal -offset indent ? !echo Value should be set to $((2 + 4)) Value should be set to 6 .Ed .Pp .Bl -bullet -compact .It If bit two is set (2) then the detected .Qd real content-type will be carried along with the message and be used for deciding which .Va pipe-TYPE/SUBTYPE is responsible for the MIME part, shall that question arise; when displaying such a MIME part the part-info will indicate the overridden content-type by showing a plus-sign .Ql + . .It If bit three is set (4) then the counter-evidence is always produced and a positive result will be used as the MIME type, even forcefully overriding the parts given MIME type. .El .Mx .It Va mimetypes-load-control This option can be used to control which of the .Xr mime.types 5 databases are loaded by \*(UA, as furtherly described in the section .Sx "The mime.types files" . If the letter .Ql u is part of the option value, then the user's personal .Pa ~/.mime.types file will be loaded (if it exists); likewise the letter .Ql s controls loading of the system wide .Pa /etc/mime.types ; the user file is loaded first, letter matching is case-insensitive. If this option is not set \*(UA will try to load both files instead. Incorporation of the \*(UA-builtin MIME types cannot be suppressed, but they will be matched last. .Pp More sources can be specified by using a different syntax: if the value string contains an equals sign .Ql = then it is instead parsed as a comma-separated list of the described letters plus .Ql f=FILENAME pairs; the given filenames will be expanded and loaded, and their content may use the extended syntax that is described in the section .Sx "The mime.types files" . .Mx .It Va NAIL_EXTRA_RC The name of an optional startup file to be read after .Pa \*(ur . This variable has an effect only if it is set in .Pa \*(UR or .Pa \&\&\*(ur , it is not imported from the environment in order to honour .Ql MAILRC=/dev/null Ns / .Fl n invocations. Use this file for commands that are not understood by other POSIX .Xr mailx 1 implementations. .Mx .It Va NAIL_HEAD A string to put at the beginning of each new message. The escape sequences tabulator .Ql \et and newline .Ql \en are understood. .Mx .It Va NAIL_HISTFILE \*(OP If a command line editor is available then this can be set to name the (expandable) path of the location of a permanent history file. .Mx .It Va NAIL_HISTSIZE \*(OP If a command line editor is available this value restricts the amount of history entries that are saved into a set and valid .Va NAIL_HISTFILE . A value of less than 0 disables this feature; note that loading and incorporation of .Va NAIL_HISTFILE upon program startup can also be suppressed by doing this. An unset or invalid value, or 0, causes a default value to be used. Dependent on the available command line editor this will also define the number of history entries in memory; it is also editor-specific whether runtime updates of this value will be honoured. .Mx .It Va NAIL_TAIL A string to put at the end of each new message. The escape sequences tabulator .Ql \et and newline .Ql \en are understood. .Mx .It Va newfolders If this variable has the value .Ql maildir , newly created local folders will be in Maildir format. .Mx .It Va newmail Checks for new mail in the current folder each time the prompt is printed. For IMAP mailboxes the server is then polled for new mail, which may result in delayed operation if the connection to the server is slow. A Maildir folder must be re-scanned to determine if new mail has arrived. .Pp If this variable is set to the special value .Dq nopoll an IMAP server is not actively asked for new mail, but new mail may still be detected and announced with any other IMAP command that is sent to the server. In either case the IMAP server may send notifications about messages that have been deleted on the server by another process or client. In this case, .Dq Expunged X messages is printed regardless of this variable, and message numbers may have changed. .Pp If this variable is set to the special value .Ql nopoll then a Maildir folder will not be rescanned completely, but only timestamp changes are detected. .Mx .It Va ORGANIZATION The value to put into the .Ql Organization: field of the message header. .Mx Va password .It Va password-USER@HOST , password-HOST , password \*(IN Variable chain that sets a password, which is used in case none has been given in the protocol and account-specific URL; as a last resort \*(UA will ask for a password on the user's terminal if the authentication method requires a password. Specifying passwords in a startup file is generally a security risk; the file should be readable by the invoking user only. .It Va password-USER@HOST \*(OU (see the chain above for \*(IN) Set the password for .Ql USER when connecting to .Ql HOST . If no such variable is defined for a host, the user will be asked for a password on standard input. Specifying passwords in a startup file is generally a security risk; the file should be readable by the invoking user only. .Mx .It Va pipe-TYPE/SUBTYPE When a MIME message part of type .Ql TYPE/SUBTYPE (normalized to lowercase) is displayed or quoted, its text is filtered through the value of this variable interpreted as a shell command. The special value .Ql @ can be used to force interpretation of the message part as plain text, e.g., .Ql set pipe-application/pgp-signature=@ will henceforth treat signatures as plain text and display them "as is". (The same can also be achieved, in a more useful context, by using the .Ic mimetype command in conjunction with a type marker.) .Pp Also, if a shell command is prefixed with .Ql @ , then the command will only be used to prepare the MIME message part if the message is displayed by itself, but not when multiple messages are displayed at once. .Pp Finally, if a shell command is prefixed with .Ql @& , then, in addition to what has been described for the plain .Ql @ shell command prefix, the command will be run asynchronously, i.e., without blocking \*(UA, which may be a handy way to display a, e.g., PDF file while also continuing to read the mail message. Some information about the MIME part to be displayed is embedded into the environment of the shell command: .Pp .Bl -tag -compact -width ".It Ev _AIL__ILENAME__ENERATED" .Mx .It Ev NAIL_TMPDIR The temporary directory that \*(UA uses. Usually identical to .Ev TMPDIR , but guaranteed to be set and usable by child processes; to ensure the latter condition for .Ev \&\&TMPDIR also, it'll be set. .Mx .It Ev NAIL_FILENAME The filename, if any is set, the empty string otherwise. .Mx .It Ev NAIL_FILENAME_GENERATED A random string. .Mx .It Ev NAIL_CONTENT The MIME content-type of the part, if known, the empty string otherwise. .Mx .It Ev NAIL_CONTENT_EVIDENCE If .Va mime-counter-evidence includes the carry-around-bit (2), then this will be set to the detected MIME content-type; not only then identical to .Ev \&\&NAIL_CONTENT otherwise. .El .Mx .It Va pipe-EXTENSION This is identical to .Va pipe-TYPE/SUBTYPE except that .Ql EXTENSION (normalized to lowercase using character mappings of the ASCII charset) names a file extension, e.g., .Ql xhtml . Handlers registered using this method take precedence. .Mx Va pop3-keepalive .It Va pop3-keepalive-USER@HOST , pop3-keepalive-HOST , pop3-keepalive \*(OP POP3 servers close the connection after a period of inactivity; the standard requires this to be at least 10 minutes, but practical experience may vary. Setting this variable to a numeric value greater than .Ql 0 causes a .Ql NOOP command to be sent each value seconds if no other operation is performed. .Mx .It Va prompt The string printed when a command is accepted. Prompting may be prevented by either setting this to the null string or by setting .Pf no Va prompt . The same XSI escape sequences that are understood by the .Ic echo command may be used within .Va \&\&prompt . .Pp In addition, the following \*(UA specific additional sequences are understood: .Ql \e& , which expands to .Dq \&? unless .Va bsdcompat is set, in which case it expands to .Dq \&& ; note that .Ql \e&\0 is the default value of .Va \&\&prompt . .Ql \e? , which will expand to .Dq 1 if the last command failed and to .Dq 0 otherwise, .Ql \e$ , which will expand to the name of the currently active .Ic account , if any, and to the empty string otherwise, and .Ql \e@ , which will expand to the name of the currently active mailbox. (Note that the prompt buffer is size-limited, excess is cut off.) .Pp Even though .Va \&\&prompt checks for .Va headline-bidi to encapsulate the expansions of the .Ql \e$ and .Ql \e@ escape sequences as necessary to correctly display bidirectional text, this is not true for the final string that makes up .Va \&\&prompt as such, i.e., real BIDI handling is not supported. .Pp When a newer version of the .Xr editline 3 .Sx "Command line editor" is used, any escape sequence must itself be encapsulated with another escape character for usage with the .Va EL_PROMPT_ESC mechanism: \*(UA configures the control character .Ql \e01 for this. .Mx .It Va quote If set, \*(UA starts a replying message with the original message prefixed by the value of the variable .Va indentprefix . Normally, a heading consisting of .Dq Fromheaderfield wrote: is printed before the quotation. If the string .Ql noheading is assigned to the .Va \&\"e variable, this heading is omitted. If the string .Ql headers is assigned, the headers selected by the .Ic ignore Ns / Ns Ic retain commands are printed above the message body, thus .Va \&\"e acts like an automatic .Pf ` Ic ~m Ns ' .Sx "TILDE ESCAPES" command, then. If the string .Ql allheaders is assigned, all headers are printed above the message body and all MIME parts are included, making .Va \&\"e act like an automatic .Pf ` Ic ~M Ns ' command; also see .Va quote-as-attachment . .Mx .It Va quote-fold \*(OP Can be set in addition to .Va indentprefix . Setting this turns on a more fancy quotation algorithm in that leading quotation characters are compressed and overlong lines are folded. .Va \&\"e-fold can be set to either one or two (space separated) numeric values, which are interpreted as the maximum (goal) and the minimum line length, respectively, in a spirit rather equal to the .Xr fmt 1 program, but line-, not paragraph-based. If not set explicitly the minimum will reflect the goal algorithmically. The goal can't be smaller than the length of .Va indentprefix plus some additional pad. Necessary adjustments take place silently. .Mx .It Va record If defined, gives the pathname of the folder used to record all outgoing mail. If not defined, then outgoing mail is not saved. When saving to this folder fails the message is not sent, but instead saved to .Ev DEAD . .Mx .It Va reply_strings Can be set to a comma-separated list of (case-insensitive according to ASCII rules) strings which shall be recognized in addition to the builtin strings as .Ql Subject: reply message indicators \(en builtin are .Ql Re: , which is mandated by RFC 5322, as well as the german .Ql Aw: . .Mx .It Va replyto A list of addresses to put into the .Ql Reply-To: field of the message header. Members of this list are handled as if they were in the .Ic alternates list. .Mx .It Va reply-to-honour Controls whether a .Ql Reply-To: header is honoured when replying to a message via .Ic reply or .Ic Lreply . This is a quadoption; if set without a value it defaults to .Dq yes . .Mx .It Va screen When \*(UA initially prints the message headers it determines the number to print by looking at the speed of the terminal. The faster the terminal, the more it prints. This option overrides this calculation and specifies how many message headers are printed. This number is also used for scrolling with the .Ic z command. .Mx .It Va sendcharsets \*(OP A comma-separated list of character set names that can be used in outgoing internet mail. The value of the variable .Va charset-8bit is automatically appended to this list of character-sets. If no character set conversion capabilities are compiled into \*(UA then the only supported charset is .Va ttycharset . Also see .Va sendcharsets-else-ttycharset and refer to the section .Sx "Character sets" for the complete picture of character set conversion in \*(UA. .Mx .It Va sender An address that is put into the .Ql Sender: field of outgoing messages, quoting RFC 5322: the mailbox of the agent responsible for the actual transmission of the message. This field should normally not be used unless the .Ql From: field contains more than one address, on which case it is required. The .Va \&\&sender address is handled as if it were in the .Ic alternates list. .Mx .It Va sendmail To use an alternate mail transport agent (MTA), set this option to the full pathname of the program to use. It may be necessary to set .Va sendmail-progname in addition. .Pp The MTA will be passed command line arguments from several possible sources: from the variable .Va sendmail-arguments if set, from the command line if given and the variable .Va expandargv allows their use. Argument processing of the MTA will be terminated with a .Ql -- separator. .Pp The otherwise occurring implicit usage of the following MTA command line arguments can be disabled by setting the boolean option .Va sendmail-no-default-arguments (which will also disable passing .Ql -- to the MTA): .Ql -i (for not treating a line with only a dot .Ql \&. character as the end of input), .Ql -m (shall the option .Va metoo be set) and .Ql -v (if the .Va verbose option is set); in conjunction with the .Fl r command line option \*(UA will also pass .Ql -f as well as .Ql -F . .Mx .It Va sendmail-arguments Arguments to pass through to the Mail-Transfer-Agent can be given via this option. The content of this variable will be split up in a vector of arguments which will be joined onto other possible MTA options: .Pp .Dl set sendmail-arguments='-t -X \&"/tmp/my log\&"' .Mx .It Va sendmail-no-default-arguments \*(BY Unless this option is set \*(UA will pass some well known standard command line options to the defined .Va sendmail program, see there for more. .Mx .It Va sendmail-progname Many systems use a so-called .Xr mailwrapper 8 environment to ensure compatibility with .Xr sendmail 1 . This works by inspecting the name that was used to invoke the mail delivery system. If this variable is set then the mailwrapper (the program that is actually executed when calling .Dq sendmail ) will treat its contents as that name. The default is .Ql sendmail . .Mx .It Va Sign A string for use with the .Ic ~A tilde escape. .Mx .It Va sign A string for use with the .Ic ~a tilde escape. .Mx .It Va signature Must correspond to the name of a readable file if set. The file's content is then appended to each singlepart message and to the first part of each multipart message. Be warned that there is no possibility to edit the signature for an individual message. .Mx .It Va smime-ca-dir \*(OP Specifies a directory with CA certificates in PEM (Privacy Enhanced Mail) format for verification of S/MIME signed messages. .Mx .It Va smime-ca-file \*(OP Specifies a file with CA certificates in PEM format for verification of S/MIME signed messages. .Mx Va smime-cipher .It Va smime-cipher-USER@HOST , smime-cipher \*(OP Specifies the cipher to use when generating S/MIME encrypted messages (for the specified account). RFC 5751 mandates a default of .Ql aes128 (AES-128 CBC). Possible values are (case-insensitive and) in decreasing cipher strength: .Ql aes256 (AES-256 CBC), .Ql aes192 (AES-192 CBC), .Ql aes128 (AES-128 CBC), .Ql des3 (DES EDE3 CBC, 168 bits; default if .Ql aes128 isn't available) and .Ql des (DES CBC, 56 bits). .Pp The actually available cipher algorithms depend on the cryptographic library that \*(UA uses. \*(OP Support for more cipher algorithms may be available through dynamic loading via, e.g., .Xr EVP_get_cipherbyname 3 (OpenSSL) if \*(UA has been compiled to support this. .Mx .It Va smime-crl-dir \*(OP Specifies a directory that contains files with CRLs in PEM format to use when verifying S/MIME messages. .Mx .It Va smime-crl-file \*(OP Specifies a file that contains a CRL in PEM format to use when verifying S/MIME messages. .Mx .It Va smime-encrypt-USER@HOST \*(OP If this variable is set, messages send to the given receiver are encrypted before sending. The value of the variable must be set to the name of a file that contains a certificate in PEM format. .Pp If a message is sent to multiple recipients, each of them for whom a corresponding variable is set will receive an individually encrypted message; other recipients will continue to receive the message in plain text unless the .Va smime-force-encryption variable is set. It is recommended to sign encrypted messages, i.e., to also set the .Va smime-sign variable. .Mx Va smime-sign-cert .It Va smime-sign-cert-USER@HOST , smime-sign-cert \*(OP Points to a file in PEM format. For the purpose of signing and decryption this file needs to contain the user's private key as well as his certificate. .Pp For message signing .Ql USER@HOST is always derived from the value of .Va from (or, if that contains multiple addresses, .Va sender ) . For the purpose of encryption the recipient's public encryption key (certificate) is expected; the command .Ic certsave can be used to save certificates of signed messages (the section .Sx "Signed and encrypted messages with S/MIME" gives some details). This mode of operation is usually driven by the specialized form. .Pp When decrypting messages the account is derived from the recipient fields .Pf ( Ql To: and .Ql Cc: ) of the message, which are searched for addresses for which such a variable is set. \*(UA always uses the first address that matches, so if the same message is sent to more than one of the user's addresses using different encryption keys, decryption might fail. .Mx Va smime-sign-include-certs .It Va smime-sign-include-certs-USER@HOST , smime-sign-include-certs \*(OP If used, this is supposed to a consist of a comma-separated list of files, each of which containing a single certificate in PEM format to be included in the S/MIME message in addition to the .Va smime-sign-cert certificate. This is most useful for long certificate chains if it is desired to aid the receiving party's verification process. Note that top level certificates may also be included in the chain but don't play a role for verification. Also see .Va smime-sign-cert . Remember that for this .Ql USER@HOST refers to the variable .Va from (or, if that contains multiple addresses, .Va sender ) . .Mx Va smime-sign-message-digest .It Va smime-sign-message-digest-USER@HOST , smime-sign-message-digest \*(OP Specifies the message digest to use when signing S/MIME messages. RFC 5751 mandates a default of .Ql sha1 . Possible values are (case-insensitive and) in decreasing cipher strength: .Ql sha512 , .Ql sha384 , .Ql sha256 , .Ql sha224 and .Ql md5 . .Pp The actually available message digest algorithms depend on the cryptographic library that \*(UA uses. \*(OP Support for more message digest algorithms may be available through dynamic loading via, e.g., .Xr EVP_get_digestbyname 3 (OpenSSL) if \*(UA has been compiled to support this. Remember that for this .Ql USER@HOST refers to the variable .Va from (or, if that contains multiple addresses, .Va sender ) . .Mx .It Va smtp \*(OP Normally \*(UA invokes the program defined via .Va sendmail to transfer messages, as described in .Sx "Sending mail" . Setting the .Va \&\&smtp variable will instead cause SMTP network connections be made to the server specified therein in order to directly submit the message. \*(UA knows about three different .Dq SMTP protocols : .Pp .Bl -bullet -compact .It The plain SMTP protocol (RFC 5321) that normally lives on the server port 25 and requires setting the .Va smtp-use-starttls variable to enter a SSL/TLS encrypted session state. Assign a value like \*(IN .Ql [smtp://][user[:password]@]server[:port] (\*(OU .Ql [smtp://]server[:port] ) to choose this protocol. .It Then the so-called SMTPS which is supposed to live on server port 465 and is automatically SSL/TLS secured. Unfortunately it never became a standardized protocol and may thus not be supported by your hosts network service database \(en in fact the port number has already been reassigned to other protocols! .Pp SMTPS is nonetheless a commonly offered protocol and thus can be chosen by assigning a value like \*(IN .Ql smtps://[user[:password]@]server[:port] (\*(OU .Ql smtps://server[:port] ) ; due to the mentioned problems it is usually necessary to explicitly specify the port as .Ql :465 , however. .It Finally there is the SUBMISSION protocol (RFC 6409), which usually lives on server port 587 and is practically identically to the SMTP protocol from \*(UAs point of view beside that; it requires setting the .Va smtp-use-starttls variable to enter a SSL/TLS secured session state. Assign a value like \*(IN .Ql submission://[user[:password]@]server[:port] (\*(OU .Ql submission://server[:port] ) . .El .Pp For more on credentials etc. please see .Sx "On URL syntax and credential lookup" . The SMTP transfer is executed in a child process, which runs asynchronously unless either the .Va sendwait or the .Va verbose variable is set. If it receives a TERM signal, it will abort and save the message to .Ev DEAD . .Mx Va smtp-auth .It Va smtp-auth-USER@HOST , smtp-auth-HOST , smtp-auth \*(OP Variable chain that sets the SMTP authentication method. Possible values are .Ql none (\*(OU default), .Ql plain (\*(IN default), .Ql login as well as the \*(OPal methods .Ql cram-md5 and .Ql gssapi . The .Ql none method doesn't need any user credentials, .Ql gssapi requires a user name and all other methods require a user name and a password. See \*(IN .Va smtp , .Va user and .Va password (\*(OU .Va smtp-auth-password and .Va smtp-auth-user ) . Note that .Va smtp-auth-HOST is \*(IN. \*(OU: Note for .Va smtp-auth-USER@HOST : may override dependend on sender address in the variable .Va from . .It Va smtp-auth-password \*(OP \*(OU Sets the global fallback password for SMTP authentication. If the authentication method requires a password, but neither .Va smtp-auth-password nor a matching .Va smtp-auth-password-USER@HOST can be found, \*(UA will ask for a password on the user's terminal. .It Va smtp-auth-password-USER@HOST \*(OU Overrides .Va smtp-auth-password for specific values of sender addresses, dependent upon the variable .Va from . .It Va smtp-auth-user \*(OP \*(OU Sets the global fallback user name for SMTP authentication. If the authentication method requires a user name, but neither .Va smtp-auth-user nor a matching .Va smtp-auth-user-USER@HOST can be found, \*(UA will ask for a user name on the user's terminal. .It Va smtp-auth-user-USER@HOST \*(OU Overrides .Va smtp-auth-user for specific values of sender addresses, dependent upon the variable .Va from . .Mx .It Va smtp-hostname \*(IN Normally \*(UA uses the variable .Va from to derive the necessary .Ql USER@HOST information to issue a .Ql MAIL FROM:<> SMTP command. Setting .Va smtp-hostname can be used to use the .Ql USER from the SMTP account .Pf ( Va smtp or the .Va user variable chain) and the .Ql HOST from the content of this variable (or, if that is the empty string, .Va hostname or the local hostname as a last resort). This often allows using an address that is itself valid but hosted by a provider other than which (in .Va from ) is about to send the message. Setting this variable also influences the generated .Ql Message-ID: . .Mx .It Va spam-interface \*(OP In order to use any of the spam-related commands (like, e.g., .Ic spamrate ) the desired spam interface must be defined by setting this variable. Please refer to the manual section .Sx "Handling spam" for the complete picture of spam handling in \*(UA. All or none of the following interfaces may be available: .Bl -tag -width ".It Ql _ilte_" .It Ql spamc Interaction with .Xr spamc 1 from the .Xr spamassassin 1 .Pf ( Lk http://spamassassin.apache.org SpamAssassin ) suite. Different to the generic filter interface \*(UA will automatically add the correct arguments for a given command and has the necessary knowledge to parse the program's output. A default value for .Va spamc-command will have been compiled into the \*(UA binary if .Xr spamc 1 has been found in .Ev PATH during compilation. Shall it be necessary to define a specific connection type (rather than using a configuration file for that), the variable .Va spamc-arguments can be used as in, e.g., .Ql -d server.example.com -p 783 . It is also possible to specify a per-user configuration via .Va spamc-user . Note that this interface doesn't inspect the .Ql is-spam flag of a message for the command .Ic spamforget . .It Ql spamd \*(UA will directly communicate with the .Xr spamassassin 1 daemon .Xr spamd 1 via a path-based .Xr unix 4 stream socket as specified in .Va spamd-socket . It is possible to specify a per-user configuration via .Va spamd-user . .It Ql filter generic spam filter support via freely configurable hooks. This interface is ment for programs like .Xr bogofilter 1 and .Xr sylfilter 1 and requires according behaviour in respect to the hooks' exit status for at least the command .Ic spamrate .Pf ( Ql 0 meaning a message is spam, .Ql 1 for non-spam, .Ql 2 for unsure and any other return value indicating a hard error); since the hooks can include shell code snippets diverting behaviour can be intercepted as necessary. The hooks are .Va spamfilter-ham , spamfilter-noham , spamfilter-nospam , \ spamfilter-rate and .Va spamfilter-spam ; the manual section .Sx "Handling spam" contains examples for some programs. The process environment of the hooks will have the variables .Ev NAIL_TMPDIR , TMPDIR and .Ev NAIL_FILENAME_GENERATED set. Note that spam score support for .Ic spamrate isn't supported unless the \*(OPtional regular expression support is available and the .Va spamfilter-rate-scanscore variable is set. .El .Mx .It Va spam-maxsize \*(OP Messages that exceed this size won't be passed through to the configured .Va spam-interface . The default is 420000 bytes. .Mx .It Va spamc-command \*(OP The path to the .Xr spamc 1 program for the .Ql spamc .Va spam-interface . Note that the path is not expanded, but used .Dq as is . A fallback path will have been compiled into the \*(UA binary if the executable had been found during compilation. .Mx .It Va spamc-arguments \*(OP Even though \*(UA deals with most arguments for the .Ql spamc .Va spam-interface automatically, it may at least sometimes be desirable to specifiy connection-related ones via this variable, e.g., .Ql -d server.example.com -p 783 . .Mx .It Va spamc-user \*(OP Specify a username for per-user configuration files for the .Ql spamc .Va spam-interface . If this is set to the empty string then \*(UA will use the name of the current .Va user . .Mx .It Va spamd-socket \*(OP Specify the path of the .Xr unix 4 domain socket on which .Xr spamd 1 listens for connections for the .Ql spamd .Va spam-interface . Note that the path is not expanded, but used .Dq as is . .Mx .It Va spamd-user \*(OP Specify a username for per-user configuration files for the .Ql spamd .Va spam-interface . If this is set to the empty string then \*(UA will use the name of the current .Va user . .Mx .Mx .Mx .Mx .Mx .It Va spamfilter-ham , spamfilter-noham , \ spamfilter-nospam , spamfilter-rate , spamfilter-spam \*(OP Command and argument hooks for the .Ql filter .Va spam-interface . The manual section .Sx "Handling spam" contains examples for some programs. .Mx .It Va spamfilter-rate-scanscore \*(OP Because of the generic nature of the .Ql filter .Va spam-interface spam scores are not supported for it by default, but if the \*(OPtional regular expression support is available then setting this variable can be used to overcome this restriction. It is interpreted as follows: first a number (digits) is parsed that must be followed by a semicolon .Ql \&; and a regular expression. Then the latter is used to parse the first output line of the .Va spamfilter-rate hook, and, in case the evaluation is successful, the group that has been specified via the number is interpreted as a floating point scan score. .Mx .It Va ssl-ca-dir \*(OP Specifies a directory with CA certificates in PEM (Pricacy Enhanced Mail) for verification of of SSL/TLS server certificates. See .Xr SSL_CTX_load_verify_locations 3 for more information. .Mx .It Va ssl-ca-file \*(OP Specifies a file with CA certificates in PEM format for verification of SSL/TLS server certificates. See .Xr SSL_CTX_load_verify_locations 3 for more information. .Mx Va ssl-cert .It Va ssl-cert-USER@HOST , ssl-cert-HOST , ssl-cert \*(OP Variable chain that sets the file name for a SSL/TLS client certificate required by some servers. This is a direct interface to the .Ql Certificate slot of the .Xr SSL_CONF_cmd 3 function of the OpenSSL library, if available. .Mx Va ssl-cipher-list .It Va ssl-cipher-list-USER@HOST , ssl-cipher-list-HOST , ssl-cipher-list \*(OP Specifies a list of ciphers for SSL/TLS connections. This is a direct interface to the .Ql CipherString slot of the .Xr SSL_CONF_cmd 3 function of the OpenSSL library, if available; see .Xr ciphers 1 for more information. By default \*(UA doesn't set a list of ciphers, which in effect will use a .Va ssl-protocol specific cipher (protocol standards ship with a list of acceptable ciphers), possibly cramped to what the actually used SSL/TLS library supports \(en the manual section .Sx "An example configuration" also contains a SSL/TLS use case. .Mx .It Va ssl-config-file \*(OP If this variable is set \*(UA will call .Xr CONF_modules_load_file 3 to allow OpenSSL to be configured according to the host system wide security settings. If a non-empty value is given then this will be used to specify the configuration file to be used instead of the global OpenSSL default; note that in this case it is an error if the file cannot be loaded. The application name will always be passed as .Dq \*(ua . .Mx .It Va ssl-crl-file \*(OP Specifies a file that contains a CRL in PEM format to use when verifying SSL/TLS server certificates. .Mx .It Va ssl-crl-dir \*(OP Specifies a directory that contains files with CRLs in PEM format to use when verifying SSL/TLS server certificates. .Mx Va ssl-key .It Va ssl-key-USER@HOST , ssl-key-HOST , ssl-key \*(OP Variable chain that sets the file name for the private key of a SSL/TLS client certificate. If unset, the name of the certificate file is used. The file is expected to be in PEM format. This is a direct interface to the .Ql PrivateKey slot of the .Xr SSL_CONF_cmd 3 function of the OpenSSL library, if available. .Mx Va ssl-method .It Va ssl-method-USER@HOST , ssl-method-HOST , ssl-method \*(OP \*(OB Please use the newer and more flexible .Va ssl-protocol instead: if both values are set, .Va ssl-protocol will take precedence! Can be set to the following values, the actually used .Va ssl-protocol specification to which it is mapped is shown in parenthesis: .Ql tls1.2 .Pf ( Ql -ALL, TLSv1.2 ) , .Ql tls1.1 .Pf ( Ql -ALL, TLSv1.1 ) , .Ql tls1 .Pf ( Ql -ALL, TLSv1 ) and .Ql ssl3 .Pf ( Ql -ALL, SSLv3 ) ; the special value .Ql auto is mapped to .Ql ALL, -SSLv2 and thus includes the SSLv3 protocol. Note that SSLv2 is no longer supported at all. .Mx Va ssl-protocol .It Va ssl-protocol-USER@HOST , ssl-protocol-HOST , ssl-protocol \*(OP Specify the used SSL/TLS protocol. This is a direct interface to the .Ql Protocol slot of the .Xr SSL_CONF_cmd 3 function of the OpenSSL library, if available; otherwise an \*(UA internal parser is used which understands the following subset of (case-insensitive) command strings: .Ql SSLv3 , .Ql TLSv1 , .Ql TLSv1.1 and .Ql TLSv1.2 , as well as the special value .Ql ALL . Multiple specifications may be given via a comma-separated list which ignores any whitespace. An optional .Ql + plus prefix will enable a protocol, a .Ql - minus prefix will disable it, so that .Ql -ALL, TLSv1.2 will enable only the TLSv1.2 protocol. .Pp It depends upon the used TLS/SSL library which protocols are actually supported and which protocols are used if .Va ssl-protocol is not set, but note that SSLv2 is no longer supported at all and actively disabled. Especially for older protocols explicitly securing .Va ssl-cipher-list may be worthwile, see .Sx "An example configuration" . .Mx .It Va ssl-rand-egd \*(OP Gives the pathname to an entropy daemon socket, see .Xr RAND_egd 3 . Not all SSL/TLS libraries support this. .Mx .It Va ssl-rand-file \*(OP Gives the pathname to a file with entropy data, see .Xr RAND_load_file 3 . If the file is a regular file writable by the invoking user, new data is written to it after it has been loaded. .Mx Va ssl-verify .It Va ssl-verify-USER@HOST , ssl-verify-HOST , ssl-verify \*(OP Variable chain that sets the action to be performed if an error occurs during SSL/TLS server certificate validation. Valid (case-insensitive) values are .Ql strict (fail and close connection immediately), .Ql ask (ask whether to continue on standard input), .Ql warn (print a warning and continue), .Ql ignore (do not perform validation). The default is .Ql ask . .Mx .It Va stealthmua If only set without an assigned value, then this option inhibits the generation of the .Ql Message-ID: and .Ql User-Agent: header fields that include obvious references to \*(UA. There are two pitfalls associated with this: First, the message id of outgoing messages is not known anymore. Second, an expert may still use the remaining information in the header to track down the originating mail user agent. If set to the value .Ql noagent , then the mentioned .Ql Message-ID: suppression doesn't occur. .Mx .It Va toplines If defined, gives the number of lines of a message to be printed out with the top command; normally, the first five lines are printed. .Mx .It Va ttycharset The character set of the terminal \*(UA operates on, and the one and only supported character set that \*(UA can use if no character set conversion capabilities have been compiled into it, in which case it defaults to ISO-8859-1 unless it can deduce a value from the .Ev LC_CTYPE locale environment. Refer to the section .Sx "Character sets" for the complete picture about character sets. .Mx Va user .It Va user-HOST , user \*(IN Variable chain that sets a global fallback user name, which is used in case none has been given in the protocol and account-specific URL. This variable defaults to the value of .Ev USER . .Mx .Mx .Mx .Mx .It Va version , version-major , version-minor , version-update \*(RO \*(UA version information: the first variable contains a string containing the complete version identification \(en this is identical to the output of the command .Ic version . The latter three contain only digits: the major, minor and update version numbers. .El .Sh ENVIRONMENT The term .Dq environment variable should be considered an indication that the following variables are either standardized as being vivid parts of process environments, or are commonly found in there. Unless otherwise explicitly noted they integrate into the normal variable handling, as documented above, from \*(UAs point of view. .Bl -tag -width ".It Ev _AILR_" .Mx .It Ev COLUMNS The user's preferred width in column positions for the terminal screen or window. Queried and used once on program startup. .Mx .It Ev DEAD The name of the file to use for saving aborted messages if .Va save is set; this defaults to .Pa dead.letter in the user's .Ev HOME directory. .Mx .It Ev EDITOR Pathname of the text editor to use in the .Ic edit command and .Ic ~e .Sx "TILDE ESCAPES" . A default editor is used if this value is not defined. .Mx .It Ev HOME The user's home directory. This variable is only used when it resides in the process environment. Use .Ic setenv to update the value at runtime. .Mx .Mx .Mx .Mx .Mx .It Ev LANG , LC_ALL , LC_COLLATE , LC_CTYPE , LC_MESSAGES See .Xr locale 7 and .Sx "Character sets" . .Mx .It Ev LINES The user's preferred number of lines on a page or the vertical screen or window size in lines. Queried and used once on program startup. .Mx .It Ev LISTER Pathname of the directory lister to use in the .Ic folders command when operating on local mailboxes. Default is .Xr ls 1 (path search through .Ev SHELL ) . .Mx .It Ev MBOX The name of the user's mbox file. Supports a logical subset of the special conventions that are documented for the .Ic file command and the .Va folder option. The fallback default is .Pa mbox in the user's .Ev HOME directory. .Mx .It Ev MAIL Is used as the user's primary system mailbox, unless .Va inbox is set, see .Ic file . This is assumed to be an absolute pathname. .Mx .It Ev MAILRC Is used as a startup file instead of .Pa \*(ur if set. When \*(UA scripts are invoked on behalf of other users, this variable should be set to .Pa /dev/null to avoid side-effects from reading their configuration files. This variable is only used when it resides in the process environment. .Mx .It Ev NAIL_NO_SYSTEM_RC If this variable is set then reading of .Pa \*(UR at startup is inhibited, i.e., the same effect is achieved as if \*(UA had been started up with the option .Fl n . This variable is only used when it resides in the process environment. .Mx .It Ev NETRC \*(IN \*(OP This variable overrides the default location of the user's .Pa .netrc file. .Mx .It Ev PAGER Pathname of the program to use in the more command or when the .Va crt variable is set. The default paginator is .Xr more 1 (path search through .Ev SHELL ) . .Mx .It Ev PATH A list of directories that is searched by the shell when looking for commands (as such only recognized in the process environment). .Mx .It Ev SHELL The shell to use for the commands .Ic \&! , .Ic shell , the .Ic ~! .Sx "TILDE ESCAPES" and when starting subprocesses. A default shell is used if this option is not defined. .Mx .It Ev SYSV3 Changes the letters printed in the first column of a header summary. .Mx .It Ev TERM \*(OP The terminal type for which output is to be prepared. .Mx .It Ev TMPDIR Used as directory for temporary files instead of .Pa /tmp , if set. This variable is only used when it resides in the process environment. Use .Ic setenv to update the value at runtime. .Mx .It Ev USER Force identification as the given user, i.e., identical to the .Fl u command line option. This variable is only used when it resides in the process environment. Use .Ic setenv to update the value at runtime, but note that doing so won't trigger any of those validation checks that were performed on program startup (again). .Mx .It Ev VISUAL Pathname of the text editor to use in the .Ic visual command and .Ic ~v .Sx "TILDE ESCAPES" . .El .Sh FILES .Bl -tag -width ".It Pa _etc/mime.type_" .It Pa \*(ur File giving initial commands. .It Pa \*(UR System wide initialization file. .Mx .It Pa ~/.mime.types Personal MIME types, see .Sx "The mime.types files" . .Mx .It Pa /etc/mime.types System wide MIME types, see .Sx "The mime.types files" . .Mx .It Pa ~/.netrc \*(IN \*(OP The default location of the users .Pa .netrc file \(en the section .Sx "The .netrc file" documents the file format. .El .Ss "The mime.types files" When sending messages \*(UA tries to determine the content type of all attachments. When displaying message content or attachments \*(UA uses the content type to decide whether it can directly display data or whether it needs to deal with content handlers, as can be defined via .Va pipe-TYPE/SUBTYPE (and .Va pipe-EXTENSION ) variables, to do so. .Pp It learns about MIME types and how to treat them by reading .Pa mime.types files, the loading of which can be controlled by setting the variable .Va mimetypes-load-control . (The command .Ic mimetype can also be used to deal with MIME types.) .Pa mime.types files have the following syntax: .Pp .Dl type/subtype extension [extension ...] .Pp where .Ql type/subtype are strings describing the file contents, and one or multiple .Ql extension Ns s, separated by whitespace, name the part of a filename starting after the last dot (of interest). Comments may be introduced anywhere on a line with a number sign .Ql # , causing the remaining line to be discarded. \*(UA also supports an extended, non-portable syntax in specially crafted files, which can be loaded via the alternative value syntax of .Va mimetypes-load-control and prepends an optional .Ql type-marker : .Pp .Dl [type-marker ]type/subtype extension [extension ...] .Pp The following type markers are supported: .Pp .Bl -tag -compact -offset indent -width ".It Ar _n_u" .It Ar @ Treat message parts with this content as plain text. .It Ar @t@ The same as plain .Ar @ . .It Ar @h@ Treat message parts with this content as HTML tagsoup. If the \*(OPal HTML-tagsoup-to-text converter is not available treat the content as plain text instead. .It Ar @H@ Likewise .Ar @h@ but instead of falling back to plain text require an explicit content handler to be defined. .El .Pp Further reading: for sending messages: .Va mime-allow-text-controls . For reading etc. messages: .Sx "Viewing HTML mail and MIME attachments" , .Va mime-counter-evidence , .Va pipe-TYPE/SUBTYPE , .Va pipe-EXTENSION . .Ss "The .netrc file" The .Pa .netrc file contains user credentials for machine accounts. The default location in the user's .Ev HOME directory may be overridden by the .Ev NETRC environment variable. The file consists of space, tabulator or newline separated tokens. \*(UA implements a parser that supports a superset of the original BSD syntax, but users should nonetheless be aware of portability glitches of that file format, shall their .Pa .netrc be usable across multiple programs and platforms: .Pp .Bl -bullet -compact .It BSD doesn't support single, but only double quotation marks, e.g., .Ql password="pass with spaces" . .It BSD (only?) supports escaping of single characters via a backslash (e.g., a space can be escaped via .Ql \e\0 ) , in- as well as outside of a quoted string. .It BSD doesn't require the final quotation mark of the final user input token. .It At least Hewlett-Packard seems to support a format which also allows tokens to be separated with commas \(en this format is not supported! .It Whereas other programs may require that the .Pa .netrc file is accessible by only the user if it contains a .Cd password token for any other .Cd login than .Dq anonymous , \*(UA will always require these strict permissions. .El .Pp Of the following list of supported tokens \*(UA only uses (and caches) .Cd machine , .Cd login and .Cd password : .Bl -tag -width password .It Cd machine Ar name The hostname of the entries' machine, lowercase-normalized by \*(UA before use. Any further file content, until either end-of-file or the occurrence of another .Cd machine or a .Cd default first-class token is bound (only related) to the machine .Ar name . .Pp As an extension that shouldn't be the cause of any worries \*(UA supports a single wildcard prefix for .Ar name : .Bd -literal -offset indent machine *.example.com login USER password PASS machine pop3.example.com login USER password PASS machine smtp.example.com login USER password PASS .Ed .Pp which would match .Ql xy.example.com as well as .Ql pop3.example.com , but neither .Ql example.com nor .Ql local.smtp.example.com . Note that in the example neither .Ql pop3.example.com nor .Ql smtp.example.com will be matched by the wildcard, since the exact matches take precedence (it is however faster to specify it the other way around). .It Cd default This is the same as .Cd machine except that it is a fallback entry that is used shall none of the specified machines match; only one default token may be specified, and it must be the last first-class token. .It Cd login Ar name The user name on the remote machine. .It Cd password Ar string The user's password on the remote machine. .It Cd account Ar string Supply an additional account password. This is merely for FTP purposes. .It Cd macdef Ar name Define a macro. A macro is defined with the specified .Ar name ; it is formed from all lines beginning with the next line and continuing until a blank line is (consecutive newline characters are) encountered. (Note that .Cd macdef entries cannot be utilized by multiple machines, too, but must be defined following the .Ic machine they are intended to be used with.) If a macro named .Ar init exists, it is automatically run as the last step of the login process. This is merely for FTP purposes. .El .Sh EXAMPLES .Ss "An example configuration" .Bd -literal -offset indent # This example assumes v15.0 compatibility mode set v15-compat # Where are the up-to-date SSL certificates? #set ssl-ca-dir=/etc/ssl/certs set ssl-ca-file=/etc/ssl/certs/ca-certificates.crt # (Since we manage up-to-date ones explicitly, don't use any, # possibly outdated, default certificates shipped with OpenSSL set ssl-no-default-ca # Don't use protocols olders than TLS v1.2. # Change this only when the remote server doesn't support it: # maybe use ssl-protocol-HOST (or -USER@HOST) syntax to define # such explicit exceptions, then set ssl-protocol="-ALL,+TLSv1.2" # Explicitly define the list of ciphers, which may improve security, # especially with protocols older than TLS v1.2. See ciphers(1). # Hint: it is important to include "@STRENGTH": only with it the # final list will be sorted by algorithm strength. # This is an example: in reality it is possibly best to only use # ssl-cipher-list-HOST (or -USER@HOST), as necessary, again.. set ssl-cipher-list="ALL:!aNULL:!MEDIUM:!LOW:\e !MD5:!RC4:!EXPORT:@STRENGTH" # Request strict transport security checks! set ssl-verify=strict # Essential setting: select allowed character sets set sendcharsets=utf-8,iso-8859-1 # A very kind option: when replying to a message, first try to # use the same encoding that the original poster used herself! set reply-in-same-charset # When replying to or forwarding a message the comment and name # parts of email addresses are removed unless this variable is set set fullnames # When sending messages, wait until the Mail-Transfer-Agent finishs. # Only like this you'll be able to see errors reported through the # exit status of the MTA (including the builtin SMTP one)! set sendwait # Only use builtin MIME types, no mime.types(5) files set mimetypes-load-control # Default directory where we act in (relative to $HOME) set folder=mail MBOX=+mbox.mbox record=+sent.mbox \e DEAD=+dead.mbox # Make "file mymbox" and "file myrec" go to.. shortcut mymbox %:+mbox.mbox myrec +sent.mbox # Not really optional, e.g., for S/MIME set from="Your Name " # It may be necessary to set hostname and/or smtp-hostname # if the "SERVER" of smtp and "domain" of from don't match. # The `urlcodec' command can be used to encode USER and PASS set smtp=(smtp[s]/submission)://[USER[:PASS]@]SERVER[:PORT] \e smtp-auth=login/plain... \e smtp-use-starttls # Never refuse to start into interactive mode, and more set emptystart \e colour-pager crt= followup-to followup-to-honour=ask-yes \e history-gabby mime-counter-evidence=6 \e prompt="\e033[31m?\e?[\e$ \e@]\e& \e033[0m" \e NAIL_HISTFILE=+.s-nailhist NAIL_HISTSIZE=-1 \e reply-to-honour=ask-yes # When `p'rinting messages, show only these headers # (use `P'rint for all headers and `S'how for raw message) retain date from to cc subject # Some mailing lists mlist @xyz-editor.xyz$ @xyzf.xyz$ mlsubscribe ^xfans@xfans.xyz$ # A real life example of a very huge free mail provider account XooglX { localopts yes set from="Your Name " # (The plain smtp:// proto is optional) set smtp=USER:PASS@smtp.gmXil.com smtp-use-starttls } # Here is a pretty large one which does not allow sending mails # if there is a domain name mismatch on the SMTP protocol level, # which would bite us if the value of from does not match, e.g., # for people who have a sXXXXeforge project and want to speak # with the mailing list under their project account (in from), # still sending the message through their normal mail provider account XandeX { localopts true set from="Your Name " set smtp=smtps://USER:PASS@smtp.yaXXex.ru:465 \e hostname=yaXXex.com smtp-hostname= } # Create some new commands so that, e.g., `ls /tmp' will.. ghost l !ls -aFtr ghost L !ls -aFt ghost ll !ls -aFltr ghost Ll !ls -aFlt ghost la !ls -aFr ghost La !ls -aF ghost lla !ls -aFlr ghost Lla !ls -aFl ghost lS !ls -aFrS ghost LS !ls -aFS ghost llS !ls -aFlrS ghost LlS !ls -aFlS # We don't support gpg(1) directly yet. But simple --clearsign'd # message parts can be dealt with as follows: define V { localopts yes set pipe-text/plain="set -C;\e : > \e"${TMPDIR}/${NAIL_FILENAME_GENERATED}\e" \e trap \e"rm -f \e\e\e"${TMPDIR}/${NAIL_FILENAME_GENERATED}\e\e\e"\e" \e EXIT INT QUIT PIPE TERM;\e set +C;\e cat > \e"${TMPDIR}/${NAIL_FILENAME_GENERATED}\e";\e < \e"${TMPDIR}/${NAIL_FILENAME_GENERATED}\e" awk \e -v TMPFILE=\e"${TMPDIR}/${NAIL_FILENAME_GENERATED}\e" '\e BEGIN {done=0}\e /^-----BEGIN PGP SIGNED MESSAGE-----/,/^$/ {\e if (done++ != 0)\e next;\e print \e"--- GPG --verify ---\e";\e system(\e"gpg --verify \e" TMPFILE \e" 2>&1\e");\e print \e"--- GPG --verify ---\e";\e print \e"\e";\e next;\e }\e /^-----BEGIN PGP SIGNATURE-----/,\e /^-----END PGP SIGNATURE-----/ {\e next;\e }\e {print}\e '" print } ghost V call V define RK { !printf 'Key IDs to gpg --recv-keys: ';\e read keyids;\e gpg --recv-keys ${keyids}; } ghost RK call RK .Ed .Pp When storing passwords in .Pa \*(ur appropriate permissions should be set on this file with .Ql $ chmod 0600 \*(ur . If the \*(OPal .Va netrc-lookup is available user credentials can be stored in the central .Pa .netrc file instead; e.g., here is a different version of the example account that sets up SMTP and POP3: .Bd -literal -offset indent account XandeX { localopts true set from="Your Name " set netrc-lookup #set agent-shell-lookup="gpg -d .pass.gpg" set smtp=smtps://smtp.yXXXXx.ru:465 \e smtp-hostname= hostname=yXXXXx.com set pop3-keepalive=240 pop3-no-apop-pop.yXXXXx.ru ghost xp fi pop3s://pop.yXXXXx.ru } .Ed .Pp and, in the .Pa .netrc file: .Bd -literal -offset indent machine *.yXXXXx.ru login USER password PASS .Ed .Pp If the also \*(OPal .Va agent-shell-lookup is available things could be diversified further by using encrypted password storage: for this, don't specify .Ql password PASS in the .Pa .netrc file and instead uncomment the line that defines agent lookup in the example .Ic account above, then create the encrypted password storage file .Pa .pass.gpg : .Bd -literal -offset indent $ echo PASS > .pass $ gpg -e .pass $ eval `gpg-agent --daemon \e --pinentry-program=/usr/bin/pinentry-curses \e --max-cache-ttl 99999 --default-cache-ttl 99999` .Ed .Pp This configuration should now work just fine (use the .Fl d command line option for a(n almost) dry-run): .Pp .Dl $ echo text | \*(ua -vv -AXandeX -s Subject some@where .Ss "Signed and encrypted messages with S/MIME" \*(OP S/MIME provides two central mechanisms: message signing and message encryption. A signed message contains some data in addition to the regular text. The data can be used to verify that the message was sent using a valid certificate, that the sender's address in the message header matches that in the certificate, and that the message text has not been altered. Signing a message does not change its regular text; it can be read regardless of whether the recipient's software is able to handle S/MIME. .Pp It is thus usually possible to sign all outgoing messages if so desired. Encryption, in contrast, makes the message text invisible for all people except those who have access to the secret decryption key. To encrypt a message, the specific recipient's public encryption key must be known. It is therefore not possible to send encrypted mail to people unless their key has been retrieved from either previous communication or public key directories. A message should always be signed before it is encrypted. Otherwise, it is still possible that the encrypted message text is altered. .Pp A central concept to S/MIME is that of the certification authority (CA). A CA is a trusted institution that issues certificates. For each of these certificates it can be verified that it really originates from the CA, provided that the CA's own certificate is previously known. A set of CA certificates is usually delivered with OpenSSL and installed on your system. If you trust the source of your OpenSSL software installation, this offers reasonable security for S/MIME on the Internet. (Otherwise set .Va ssl-no-default-ca and use .Va smime-ca-file and/or .Va smime-ca-dir . ) In general, a certificate cannot be more secure than the method its CA certificate has been retrieved with, though. Thus if you download a CA certificate from the Internet, you can only trust the messages you verify using that certificate as much as you trust the download process. .Pp The first thing you need for participating in S/MIME message exchange is your personal certificate, including a private key. The certificate contains public information, in particular your name and your email address(es), and the public key that is used by others to encrypt messages for you, and to verify signed messages they supposedly received from you. The certificate is included in each signed message you send. The private key must be kept secret. It is used to decrypt messages that were previously encrypted with your public key, and to sign messages. .Pp For personal use it is recommended that you get a S/MIME certificate from one of the major CAs on the Internet using your WWW browser. Many CAs offer such certificates for free. There is also .Lk https://www.CAcert.org which issues client and server certificates to members of their community for free; their root certificate .Pf ( Lk https://\:www.cacert.org/\:certs/\:root.crt ) is often not in the default set of trusted CA root certificates, though, which means you will have to download their root certificate separately and ensure it is part of our S/MIME certificate validation chain by including it in .Va smime-ca-dir or as a vivid member of the .Va smime-ca-file . But let's take a step-by-step tour on how to setup S/MIME with a certificate from CAcert.org despite this situation! .Pp First of all you will have to become a member of the CAcert.org community, simply by registrating yourself via the web interface. Once you are, create and verify all email addresses you want to be able to create signed and encrypted messages for/with using the corresponding entries of the web interface. Now ready to create S/MIME certificates, so let's create a new .Dq client certificate , ensure to include all email addresses that should be covered by the certificate in the following web form, and also to use your name as the .Dq common name . .Pp Create a private key and a certificate request on your local computer (please see the manual pages of the used commands for more in-depth knowledge on what the used arguments etc. do): .Pp .Dl openssl req -nodes -newkey rsa:4096 -keyout key.pem -out creq.pem .Pp Afterwards copy-and-paste the content of .Dq creq.pem into the certificate-request (CSR) field of the web form on the CAcert.org website (you may need to unfold some .Dq advanced options to see the corresponding text field). This last step will ensure that your private key (which never left your box) and the certificate belong together (through the public key that will find its way into the certificate via the certificate-request). You are now ready and can create your CAcert certified certificate. Download and store or copy-and-paste it as .Dq pub.crt . .Pp Yay. In order to use your new S/MIME setup you will have to create a combined private key/public key (certificate) file: .Pp .Dl cat key.pem pub.crt > ME@HERE.com.paired .Pp This is the file \*(UA will work with. If you have created your private key with a passphrase then \*(UA will ask you for it whenever a message is signed or decrypted. Set the following variables to henceforth use S/MIME (setting .Va smime-ca-file is of interest for verification only): .Bd -literal -offset indent set smime-ca-file=ALL-TRUSTED-ROOT-CERTS-HERE \e smime-sign-cert=ME@HERE.com.paired \e smime-sign-message-digest=SHA256 \e smime-sign .Ed .Pp From each signed message you send, the recipient can fetch your certificate and use it to send encrypted mail back to you. Accordingly if somebody sends you a signed message, you can do the same, and use the .Ic verify command to check the validity of the certificate. .Pp Options of interest for S/MIME signing: .Va smime-ca-dir , .Va smime-ca-file , .Va smime-crl-dir , .Va smime-crl-file , .Va smime-no-default-ca , .Va smime-sign , .Va smime-sign-cert , .Va smime-sign-include-certs and .Va smime-sign-message-digest . .Pp After it has been verified save the certificate via .Ic certsave and tell \*(UA that it should use it for encryption for further communication with that somebody: .Bd -literal -offset indent certsave FILENAME set smime-encrypt-USER@HOST=FILENAME \e smime-cipher-USER@HOST=AES256 .Ed .Pp Additional options of interest for S/MIME en- and decryption: .Va smime-cipher and .Va smime-encrypt-USER@HOST . .Pp You should carefully consider if you prefer to store encrypted messages in decrypted form. If you do, anybody who has access to your mail folders can read them, but if you do not, you might be unable to read them yourself later if you happen to lose your private key. The .Ic decrypt command saves messages in decrypted form, while the .Ic save , copy , and .Ic move commands leave them encrypted. .Pp Note that neither S/MIME signing nor encryption applies to message subjects or other header fields yet. Thus they may not contain sensitive information for encrypted messages, and cannot be trusted even if the message content has been verified. When sending signed messages, it is recommended to repeat any important header information in the message text. .Ss "Using CRLs with S/MIME or SSL/TLS" \*(OP Certification authorities (CAs) issue certificate revocation lists (CRLs) on a regular basis. These lists contain the serial numbers of certificates that have been declared invalid after they have been issued. Such usually happens because the private key for the certificate has been compromised, because the owner of the certificate has left the organization that is mentioned in the certificate, etc. To seriously use S/MIME or SSL/TLS verification, an up-to-date CRL is required for each trusted CA. There is otherwise no method to distinguish between valid and invalidated certificates. \*(UA currently offers no mechanism to fetch CRLs, nor to access them on the Internet, so you have to retrieve them by some external mechanism. .Pp \*(UA accepts CRLs in PEM format only; CRLs in DER format must be converted, like, e.\|g.: .Pp .Dl $ openssl crl \-inform DER \-in crl.der \-out crl.pem .Pp To tell \*(UA about the CRLs, a directory that contains all CRL files (and no other files) must be created. The .Va smime-crl-dir or .Va ssl-crl-dir variables, respectively, must then be set to point to that directory. After that, \*(UA requires a CRL to be present for each CA that is used to verify a certificate. .Ss "Handling spam" \*(OP \*(UA can make use of several spam interfaces for the purpose of identification of, and, in general, dealing with spam messages. A precondition of most commands in order to function is that the .Va spam-interface variable is set to one of the supported interfaces. Once messages have been identified as spam their (volatile) .Ql is-spam state can be prompted: the .Ql Ar :s and .Ql Ar :S message specifications will address respective messages and their .Va attrlist entries will be used when displaying the .Va headline in the header display. .Bl -bullet .It .Ic spamrate rates the given messages and sets their .Ql is-spam flag accordingly. If the spam interface offers spam scores those can also be displayed in the header display by including the .Ql %$ format in the .Va headline variable. .It .Ic spamham , .Ic spamspam and .Ic spamforget will interact with the Bayesian filter of the chosen interface and learn the given messages as .Dq ham or .Dq spam , respectively; the last command can be used to cause .Dq unlearning of messages; it adheres to their current .Ql is-spam state and thus reverts previous teachings. .It .Ic spamclear and .Ic spamset will simply set and clear, respectively, the mentioned volatile .Ql is-spam message flag, without any interface interaction. .El .Pp The .Xr spamassassin 1 based .Va spam-interface Ns s .Ql spamc and .Ql spamd require a running instance of the .Xr spamd 1 server in order to function, started with the option .Fl -allow-tell shall Bayesian filter learning be possible. .Ql spamd only works via a local path-based .Xr unix 4 socket, but otherwise the following will be equivalently fine: .Bd -literal -offset indent $ spamd -i localhost:2142 -i /tmp/.spamsock -d [-L] [-l] $ spamd --listen=localhost:2142 --listen=/tmp/.spamsock \e --daemonize [--local] [--allow-tell] .Ed .Pp Thereafter \*(UA can make use of these interfaces: .Bd -literal -offset indent $ \*(ua -Sspam-interface=spamd -Sspam-maxsize=500000 \e -Sspamd-socket=/tmp/.spamsock -Sspamd-user= $ \*(ua -Sspam-interface=spamc -Sspam-maxsize=500000 \e -Sspamc-command=/usr/local/bin/spamc \e -Sspamc-arguments="-U /tmp/.spamsock" -Sspamc-user= or $ \*(ua -Sspam-interface=spamc -Sspam-maxsize=500000 \e -Sspamc-command=/usr/local/bin/spamc \e -Sspamc-arguments="-d localhost -p 2142" -Sspamc-user= .Ed .Pp Using the generic filter approach allows usage of programs like .Xr bogofilter 1 and .Xr sylfilter 1 . Here is an example for the former, requiring it to be accessible via .Ev PATH : .Bd -literal -offset indent $ \*(ua -Sspam-interface=filter -Sspam-maxsize=500000 \e -Sspamfilter-ham="bogofilter -n" \e -Sspamfilter-noham="bogofilter -N" \e -Sspamfilter-nospam="bogofilter -S" \e -Sspamfilter-rate="bogofilter -TTu 2>/dev/null" \e -Sspamfilter-spam="bogofilter -s" \e -Sspamfilter-rate-scanscore="1;^(.+)$" .Ed .Pp Because messages must exist on local storage in order to be scored (or used for Bayesian filter training), it is possibly a good idea to perform the local spam check last: .Bd -literal -offset indent define spamdelhook { # Server side DCC spamset (header x-dcc-brand-metrics "bulk") # Server-side spamassassin(1) spamset (header x-spam-flag "YES") del :s # TODO we HAVE to be able to do `spamrate :u ! :sS' move :S +maybe-spam spamrate :u del :s move :S +maybe-spam } set folder-hook-FOLDER=spamdelhook .Ed .Pp See also the documentation for the variables .Va spam-interface , spam-maxsize , .Va spamc-command , spamc-arguments , spamc-user , .Va spamd-socket , spamd-user , .Va spamfilter-ham , spamfilter-noham , spamfilter-nospam , \ spamfilter-rate and .Va spamfilter-rate-scanscore . .Sh "FAQ" .Ss "\*(UA shortly hangs on startup" This can have two reasons, one is the necessity to wait for a file lock and can't be helped, the other being that \*(UA calls the function .Xr uname 2 in order to query the nodename of the box (sometimes the real one is needed instead of the one represented by the internal variable .Va hostname ) . You may have varying success by ensuring that the real hostname and .Ql localhost have entries in .Pa /etc/hosts , or, more generally, that the name service is properly setup \(en and does .Xr hostname 1 return what you'd expect? .Ss "I can't login to Google mail a.k.a. GMail" Since 2014 some free service providers classify programs as .Dq less secure unless they use a special authentification method (OAuth 2.0) which wasn't standardized for non-HTTP protocol authentication token query until August 2015 (RFC 7628). .Pp Different to Kerberos / GSSAPI, which is developed since the mid of the 1980s, where a user can easily create a local authentication ticket for her- and himself with the locally installed .Xr kinit 1 program, that protocol has no such local part but instead requires a world-wide-web query to create or fetch a token; since there is no local cache this query has to be performed whenever \*(UA is invoked from the command line (in interactive sessions situation may differ). .Pp \*(UA doesn't support OAuth. Because of this it is necessary to declare \*(UA a .Dq less secure app (on the providers account web page) in order to read and send mail. However, it also seems possible to take the following steps instead: .Pp .Bl -enum -compact .It give the provider the number of a mobile phone, .It enable .Dq 2-Step Verification , .It create an application specific password (16 characters), and .It use that special password instead of your real Google account password in S-nail (for more on that see the section .Sx "On URL syntax and credential lookup" ) . .El .Sh "SEE ALSO" .Xr bogofilter 1 , .Xr bzip2 1 , .Xr file 1 , .Xr fmt 1 , .Xr gpg 1 , .Xr gpg-agent 1 , .Xr gzip 1 , .Xr less 1 , .Xr more 1 , .Xr newaliases 1 , .Xr openssl 1 , .Xr postfix 1 , .Xr printf 1 , .Xr sendmail 1 , .Xr sh 1 , .Xr spamassassin 1 , .Xr spamc 1 , .Xr spamd 1 , .Xr sylfilter 1 , .Xr vacation 1 , .Xr xterm 1 , .Xr xz 1 , .Xr editline 3 , .Xr iconv 3 , .Xr readline 3 , .Xr setlocale 3 , .Xr ssl 3 , .Xr aliases 5 , .Xr locale 7 , .Xr mailaddr 7 , .Xr re_format 7 , .Xr exim 8 , .Xr mailwrapper 8 , .Xr sendmail 8 .Sh HISTORY A .Em mail command appeared in Version 1 AT&T Unix. Berkeley Mail was written in 1978 by Kurt Shoens. This man page is derived from from .Dq The Mail Reference Manual originally written by Kurt Shoens. .Dq Heirloom Mailx enhancements are maintained and documented by Gunnar Ritter. .Dq S-nail is maintained and documented by Steffen (Daode) Nurpmeso. .Pp Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technology \(en Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright \(co 2001-2003 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at .Lk http://www.opengroup.org/unix/online.html OpenGroup.org Redistribution of this material is permitted so long as this notice remains intact. .Sh AUTHORS .An "Kurt Shoens" , .An "Christos Zoulas" , .An "Gunnar Ritter" , .An "Steffen Nurpmeso" Aq Mt s-nail-users@lists.sourceforge.net (later .Mt s-mailx@sdaoden.eu ) . .Sh CAVEATS The character set conversion uses and relies upon the .Xr iconv 3 function. Its functionality differs widely between the various system environments \*(UA runs on. .Pp Limitations with IMAP mailboxes are: It is not possible to edit messages, but it is possible to append them. Thus to edit a message, create a local copy of it, edit it, append it, and delete the original. The line count for the header display is only appropriate if the entire message has been downloaded from the server. The marking of messages as `new' is performed by the IMAP server; use of the .Ic exit command instead of .Ic quit will not cause it to be reset, and if the .Va newmail variable is unset, messages that arrived during a session will not be in state `new' anymore when the folder is opened again. Also if commands queued in disconnected mode are committed, the IMAP server will delete the `new' flag for all messages in the changed folder, and new messages will appear as unread when it is selected for viewing later. The `flagged', `answered', and `draft' attributes are usually permanent, but some IMAP servers are known to drop them without notification. Message numbers may change with IMAP every time before the prompt is printed if \*(UA is notified by the server that messages have been deleted by some other client or process. In this case, `Expunged n messages' is printed, and message numbers may have changed. .Pp Limitations with POP3 mailboxes are: It is not possible to edit messages, they can only be copied and deleted. The line count for the header display is only appropriate if the entire message has been downloaded from the server. The status field of a message is maintained by the server between connections; some servers do not update it at all, and with a server that does, the .Ic exit command will not cause the message status to be reset. The .Ic newmail command and the .Va newmail variable have no effect. It is not possible to rename or to remove POP3 mailboxes. .Pp If a .Dq RUBOUT (interrupt, .Ql control-C ) is typed while an IMAP or POP3 operation is in progress, \*(UA will wait until the operation can be safely aborted, and will then return to the command loop and print the prompt again. When a second .Dq RUBOUT is typed while \*(UA is waiting for the operation to complete, the operation itself will be cancelled. In this case, data that has not been fetched yet will have to be fetched before the next command can be performed. If the cancelled operation was using an SSL/TLS encrypted channel, an error in the SSL transport will very likely result and render the connection unusable. .Pp As \*(UA is a mail user agent, it provides only basic SMTP services. If it fails to contact its upstream SMTP server, it will not make further attempts to transfer the message at a later time, and it does not leave other information about this condition than an error message on the terminal and an entry in .Ev DEAD . This is usually not a problem if the SMTP server is located in the same local network as the computer on which \*(UA is run. However, care should be taken when using a remote server of an ISP; it might be better to set up a local SMTP server then which just acts as a proxy. .Pp \*(UA immediately contacts the SMTP server (or .Xr sendmail 1 Ns ) even when operating in .Va disconnected mode. It would not make much sense for \*(UA to defer outgoing mail since SMTP servers usually provide much more elaborated delay handling than \*(UA could perform as a client. Thus the recommended setup for sending mail in .Va disconnected mode is to configure a local SMTP server such that it sends outgoing mail as soon as an external network connection is available again, i.e., to advise it to do that from a network startup script. .Sh BUGS IMAP support is very basic. Interrupting an IMAP operation can lead to endless iterations of the same operation. With IMAP, at least if the IMAP cache is used, if multiple .Ic connect and .Ic disconnect cycles happen without an intervening change of the active mailbox then \*(UA will at some time loose the ability to keep the local state up-to-date, meaning that, e.g., messages show up with false numbers, and including the possibility that messages are accessed via numbers that are no(t longer) valid, resulting in program crashes. The solution is to change the active mailbox before that happens :). Also see the file .Pa TODO from the distribution or the repository. After deleting some message of a POP3 mailbox the header summary falsely claims that there are no messages to display, you need to perform a scroll or dot movement to restore proper state. In threaded display a power user may encounter crashes very occasionally (this is may and very).