diff --git a/usr.bin/mail/mail.1 b/usr.bin/mail/mail.1 index d44c24c3d9d2..c6fd55241bf9 100644 --- a/usr.bin/mail/mail.1 +++ b/usr.bin/mail/mail.1 @@ -1,4 +1,4 @@ -.\" $NetBSD: mail.1,v 1.31 2006/09/19 18:01:00 christos Exp $ +.\" $NetBSD: mail.1,v 1.32 2006/09/19 18:52:02 wiz Exp $ .\" .\" Copyright (c) 1980, 1990, 1993 .\" The Regents of the University of California. All rights reserved. @@ -39,18 +39,18 @@ .Nd send and receive mail .Sh SYNOPSIS .Nm -.Op Fl BEiInv -.Op Fl s Ar subject -.Op Fl c Ar cc-addr +.Op Fl BEIinv .Op Fl b Ar bcc-addr +.Op Fl c Ar cc-addr +.Op Fl s Ar subject .Ar to-addr ... .Op Ar sendmail-flags .Nm -.Op Fl EiInNv +.Op Fl EIiNnv .Fl f .Op Ar name .Nm -.Op Fl EiInNv +.Op Fl EIiNnv .Op Fl u Ar user .Sh DESCRIPTION .Nm @@ -60,19 +60,32 @@ a command syntax reminiscent of with lines replaced by messages. .Pp .Bl -tag -width flag -.It Fl v -Verbose mode. -The details of -delivery are displayed on the user's terminal. +.It Fl B +Suppress the +.Dq To: +line on outgoing mail. +On most systems, this will +result in the line +.Dq To: undisclosed recipients:; . +.It Fl b +Send blind carbon copies to +.Ar list . +List should be a comma-separated list of names. +.It Fl c +Send carbon copies to +.Ar list +of users. .It Fl E Don't send messages with an empty body. This is useful for piping errors from cron scripts. -.It Fl i -Ignore tty interrupt signals. -This is -particularly useful when using +.It Fl f +Read in the contents of your +.Ar mbox +(or the specified file) +for processing; when you +.Ic quit , .Nm -on noisy phone lines. +writes undeleted messages back to this file. .It Fl I Forces mail to run in interactive mode even when input isn't a terminal. @@ -80,56 +93,43 @@ In particular, the .Sq Ic \&~ special character when sending mail is only active in interactive mode. +.It Fl i +Ignore tty interrupt signals. +This is particularly useful when using +.Nm +on noisy phone lines. +.It Fl N +Inhibits the initial display of message headers +when reading mail or editing a mail folder. .It Fl n Inhibits reading .Pa /etc/mail.rc upon startup. -.It Fl N -Inhibits the initial display of message headers -when reading mail or editing a mail folder. .It Fl s Specify subject on command line (only the first argument after the .Fl s flag is used as a subject; be careful to quote subjects containing spaces.) -.It Fl c -Send carbon copies to -.Ar list -of users. -.It Fl b -Send blind carbon copies to -.Ar list . -List should be a comma-separated list of names. -.It Fl B -Suppress the "To:" line on outgoing mail. On most systems, this will -result in the line "To: undisclosed recepients:;". -.It Fl f -Read in the contents of your -.Ar mbox -(or the specified file) -for processing; when you -.Ar quit , -.Nm -writes undeleted messages back to this file. .It Fl u Is equivalent to: .Pp .Dl mail -f /var/mail/user +.It Fl v +Verbose mode. +The details of delivery are displayed on the user's terminal. .El .Ss Sending mail To send a message to one or more people, .Nm can be invoked with arguments which are the names of people to whom the mail will be sent. -You are then expected to type in -your message, followed -by an +You are then expected to type in your message, followed by an .Sq Li control\-D at the beginning of a line. .Pp -Any flags following the list of recipients, with arguments will be passed -directly to +Any flags following the list of recipients, with arguments, will +be passed directly to .Xr sendmail 1 . For example to change your .Dv From @@ -138,16 +138,15 @@ address to you can specify: .Dl mail recipient -f somebody@somewhere.net The section below -.Ar Replying to or originating mail , +.Sx Replying to or originating mail , describes some features of .Nm available to help you compose your letter. .Ss Reading mail In normal usage .Nm -is given no arguments and checks your mail out of the -post office, then -prints out a one line header of each message found. +is given no arguments and checks your mail out of the post office, +then prints out a one line header of each message found. The current message is initially the first message (numbered 1) and can be printed using the .Ic print @@ -159,8 +158,7 @@ with the commands .Ql Ic \&+ and .Ql Ic \&\- -moving backwards and forwards, and -simple numbers. +moving backwards and forwards, and simple numbers. .Ss Disposing of mail After examining a message you can .Ic delete @@ -198,8 +196,7 @@ The special name .Ql Li \&* addresses all messages, and .Ql Li \&$ -addresses -the last message; thus the command +addresses the last message; thus the command .Ic top which prints the first few lines of a message could be used in .Dq Li top \&* @@ -207,8 +204,7 @@ to print the first few lines of all messages. .Ss Replying to or originating mail You can use the .Ic reply -command to -set up a response to a message, sending it back to the +command to set up a response to a message, sending it back to the person who it was from. Text you then type in, up to an end-of-file, defines the contents of the message. @@ -225,10 +221,9 @@ of the current message into the response right shifting it by a tabstop .Em indentprefix variable, below). Other escapes will set up subject fields, add and delete recipients -to the message and allow you to escape to an editor to revise the +to the message, and allow you to escape to an editor to revise the message or to a shell to run some commands. -(These options -are given in the summary below.) +(These options are given in the summary below.) .Ss Ending a mail processing session You can end a .Nm @@ -301,14 +296,12 @@ entirety \- the first command which matches the typed prefix is used. For commands which take message lists as arguments, if no message list is given, then the next message forward which satisfies the command's requirements is used. -If there are no messages forward of -the current message, the search proceeds backwards, and if there are no -good messages at all, +If there are no messages forward of the current message, the search +proceeds backwards, and if there are no good messages at all, .Nm types .Dq Li \&No applicable messages -and -aborts the command. +and aborts the command. .Bl -tag -width delete .It Ic \&\- Print out the preceding message. @@ -341,14 +334,13 @@ Like but also prints out ignored header fields. See also .Ic print , -.Ic ignore +.Ic ignore , and .Ic retain . .It Ic Reply .Pq Ic R Reply to originator. -Does not reply to other -recipients of the original message. +Does not reply to other recipients of the original message. .It Ic Type .Pq Ic T Identical to the @@ -357,8 +349,7 @@ command. .It Ic alias .Pq Ic a With no arguments, prints out all currently-defined aliases. -With one -argument, prints out that alias. +With one argument, prints out that alias. With more than one argument, creates a new alias or changes an old one. .It Ic alternates @@ -384,8 +375,7 @@ names is displayed. .It Ic chdir .Pq Ic c Changes the user's working directory to that specified, if given. -If -no directory is given, then changes to the user's login directory. +If no directory is given, then changes to the user's login directory. .It Ic copy .Pq Ic co The @@ -433,31 +423,33 @@ List the names of the folders in your folder directory. The .Ic folder command switches to a new mail file or folder. -With no -arguments, it tells you which file you are currently reading. +With no arguments, it tells you which file you are currently reading. If you give it an argument, it will write out changes (such as deletions) you have made in the current file and read in the new file. -Some special conventions are recognized for -the name. -# means the previous file, % means your system -mailbox, %user means user's system mailbox, \*[Am] means -your +Some special conventions are recognized for the name. +.Sq # +means the previous file, +.Sq % +means your system mailbox, +.Dq %user +means user's system mailbox, +.Sq \*[Am] +means your .Ar mbox file, and -\&+\&folder means a file in your folder -directory. +.Dq +folder +means a file in your folder directory. .It Ic from .Pq Ic f Takes a list of messages and prints their message headers. .It Ic headers .Pq Ic h Lists the current range of headers, which is an 18\-message group. -If -a +If a .Ql \&+ -argument is given, then the next 18\-message group is printed, and if -a +argument is given, then the next 18\-message group is printed, and +if a .Ql \&\- argument is given, the previous 18\-message group is printed. .It Ic help @@ -467,9 +459,8 @@ A synonym for .Pf ( Ic 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 +Takes a message list and marks each message therein to be saved in +the user's system mailbox instead of in .Ar mbox . Does not override the .Ic delete @@ -479,8 +470,7 @@ Add the list of header fields named to the .Ar ignored list . Header fields in the ignore list are not printed on your terminal when you print a message. -This -command is very handy for suppression of certain machine-generated +This command is very handy for suppression of certain machine-generated header fields. The .Ic Type @@ -494,7 +484,7 @@ is being read. The new messages are added to the end of the message list, and the current message is reset to be the first new mail message. This does not renumber the existing message list, nor does -does it cause any changes made so far to be saved. +it cause any changes made so far to be saved. If .Ic ignore is executed with no arguments, it lists the current set of @@ -507,8 +497,7 @@ mail to those people. Indicate that a list of messages be sent to .Ic mbox in your home directory when you quit. -This is the default -action for messages if you do +This is the default action for messages if you do .Em not have the .Ic hold @@ -540,19 +529,16 @@ file in his login directory, preserving all messages marked with .Ic hold or .Ic preserve -or never referenced -in his system mailbox, and removing all other messages from his system -mailbox. +or never referenced in his system mailbox, and removing all other +messages from his system mailbox. If new mail has arrived during the session, the message .Dq Li "You have new mail" is given. -If given while editing a -mailbox file with the +If given while editing a mailbox file with the .Fl f flag, 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 +A return to the Shell is effected, unless the rewrite of edit file +fails, in which case the user can escape with the .Ic exit command. .It Ic reply @@ -587,14 +573,13 @@ count and character count is echoed on the user's terminal. .It Ic set .Pq Ic se With no arguments, prints all variable values. -Otherwise, sets -option. +Otherwise, sets option. Arguments are of the form .Ar option=value (no space before or after =) or .Ar option . -Quotation marks may be placed around any part of the assignment statement to -quote blanks or tabs, i.e. +Quotation marks may be placed around any part of the assignment +statement to quote blanks or tabs, i.e. .Dq Li "set indentprefix=\*q-\*[Gt]\*q" .It Ic saveignore .Ic Saveignore @@ -611,7 +596,7 @@ saving a message by .Ic save or when automatically saving to .Ar mbox . -.pl +1 +.\" .pl +1 .It Ic saveretain .Ic Saveretain is to @@ -644,12 +629,10 @@ message. .It Ic source The .Ic source -command reads -commands from a file. +command reads commands from a file. .It Ic top Takes a message list and prints the top few lines of each. -The number of -lines printed is controlled by the variable +The number of lines printed is controlled by the variable .Ic toplines and defaults to five. .It Ic type @@ -660,8 +643,7 @@ A synonym for Takes a list of names defined by .Ic alias commands and discards the remembered groups of users. -The group names -no longer have any significance. +The group names no longer have any significance. .It Ic undelete .Pq Ic u Takes a message list and marks each message as @@ -686,7 +668,7 @@ Similar to except that .Em only the message body -.Pf ( Em without +.Em ( without the header) is saved. Extremely useful for such tasks as sending and receiving source program text over the message system. @@ -700,7 +682,7 @@ presents message headers in windowfuls as described under the .Ic headers command. You can move -.Nm Ns 's +.Nm Ns Ap s attention forward to the next window with the .Ic \&z command. @@ -708,11 +690,9 @@ Also, you can move to the previous window by using .Ic \&z\&\- . .El .Ss Tilde/Escapes -Here is a summary of the tilde escapes, -which are used when composing messages to perform -special functions. -Tilde escapes are only recognized at the beginning -of lines. +Here is a summary of the tilde escapes, which are used when composing +messages to perform special functions. +Tilde escapes are only recognized at the beginning of lines. The name .Dq Em tilde\ escape is somewhat of a misnomer since the actual escape character can be set @@ -727,7 +707,9 @@ Inserts the autograph string from the sign= option into the message. Inserts the autograph string from the Sign= option into the message. .It Ic \&~b Ns Ar name ... Add the given names to the list of carbon copy recipients but do not make -the names visible in the Cc: line ("blind" carbon copy). +the names visible in the Cc: line +.Dq ( blind +carbon copy). .It Ic \&~c Ns Ar name ... Add the given names to the list of carbon copy recipients. .It Ic \&~d @@ -736,9 +718,8 @@ Read the file from your home directory into the message. .It Ic \&~e Invoke the text editor on the message collected so far. -After the -editing session is finished, you may continue appending text to the -message. +After the editing session is finished, you may continue appending +text to the message. .It Ic \&~f Ns Ar messages Read the named messages into the message being sent. If no messages are specified, read in the current message. @@ -747,7 +728,6 @@ Message headers currently being ignored (by the or .Ic retain command) are not included. -.sp .It Ic \&~F Ns Ar messages Identical to .Ic \&~f , @@ -762,8 +742,7 @@ Inserts the value of the named option into the text of the message. Read the named messages into the message being sent, indented by a tab or by the value of .Ar indentprefix . -If no messages are specified, -read the current message. +If no messages are specified, read the current message. Message headers currently being ignored (by the .Ic ignore or @@ -787,7 +766,8 @@ Exits as with \&~q, except the message is not saved in dead.letter. .It Ic \&~r Ns Ar filename .It Ic \&~\*[Lt] Ns Ar filename Reads the named file into the message. -If the argument begins with !, +If the argument begins with +.Sq \&! , the rest of the string is taken as an arbitrary system command and is executed, with the standard output inserted into the message. .It Ic \&~s Ns Ar string @@ -797,19 +777,16 @@ Add the given names to the direct recipient list. .It Ic \&~\&v Invoke an alternative editor (defined by the .Ev VISUAL -option) on the -message collected so far. -Usually, the alternative editor will be a -screen editor. +option) on the message collected so far. +Usually, the alternative editor will be a screen editor. After you quit the editor, you may resume appending text to the end of your message. .It Ic \&~w Ns Ar filename Write the message onto the named file. .It Ic \&~\&| Ns Ar command Pipe the message through the command as a filter. -If the command gives -no output or terminates abnormally, retain the original text of the -message. +If the command gives no output or terminates abnormally, retain +the original text of the message. The command .Xr fmt 1 is often used as @@ -820,8 +797,7 @@ Execute the given mail command. Not all commands, however, are allowed. .It Ic \&~~ Ns Ar string Insert the string of text in the message prefaced by a single ~. -If -you have changed the escape character, then you should double +If you have changed the escape character, then you should double that character in order to send it. .El .Ss Mail Options @@ -845,12 +821,10 @@ This should always be set (perhaps in Causes .Nm to prompt you for the subject of each message you send. -If -you respond with simply a newline, no subject field will be sent. -.sp +If you respond with simply a newline, no subject field will be sent. .It Ar askcc -Causes you to be prompted for additional carbon copy recipients at the -end of each message. +Causes you to be prompted for additional carbon copy recipients at +the end of each message. Responding with a newline indicates your satisfaction with the current list. .It Ar autoinc @@ -860,8 +834,8 @@ Setting this is similar to issuing the command at each prompt, except that the current message is not reset when new mail arrives. .It Ar askbcc -Causes you to be prompted for additional blind carbon copy recipients at the -end of each message. +Causes you to be prompted for additional blind carbon copy recipients +at the end of each message. Responding with a newline indicates your satisfaction with the current list. .It Ar autoprint @@ -900,7 +874,7 @@ is .Ar ignoreeof which makes .Nm -refuse to accept a control-d as the end of a message. +refuse to accept a control-D as the end of a message. .Ar Ignoreeof also applies to .Nm @@ -908,8 +882,7 @@ command mode. .It Ar metoo Usually, when a group is expanded that contains the sender, the sender is removed from the expansion. -Setting this option causes the sender -to be included in the group. +Setting this option causes the sender to be included in the group. .It Ar noheader Setting the option .Ar noheader @@ -936,26 +909,46 @@ commands. .It Ar quiet Suppresses the printing of the version when first invoked. .It Ar searchheaders -If this option is set, then a message-list specifier in the form ``/x:y'' -will expand to all messages containing the substring ``y'' in the header -field ``x''. +If this option is set, then a message-list specifier in the form +.Dq /x:y +will expand to all messages containing the substring +.Dq y +in the header field +.Dq x . The string search is case insensitive. -If ``x'' is omitted, it will default to the ``Subject'' header field. -The form ``/to:y'' is a special case, and will expand -to all messages containing the substring ``y'' in the ``To'', ``Cc'' -or ``Bcc'' header fields. -The check for "to" is case sensitive, so that -``/To:y'' can be used to limit the search for ``y'' to just -the ``To:'' field. +If +.Dq x +is omitted, it will default to the +.Dq Subject +header field. +The form +.Dq /to:y +is a special case, and will expand +to all messages containing the substring +.Dq y +in the +.Dq To , +.Dq Cc , +or +.Dq Bcc +header fields. +The check for +.Dq to +is case sensitive, so that +.Dq /To:y +can be used to limit the search for +.Dq y +to just the +.Dq To: +field. .It Ar verbose Setting the option .Ar verbose is the same as using the .Fl v flag on the command line. -When mail runs in verbose mode, -the actual delivery of messages is displayed on the user's -terminal. +When mail runs in verbose mode, the actual delivery of messages is +displayed on the user's terminal. .El .Ss Option String Values .Bl -tag -width Va @@ -987,15 +980,13 @@ Pathname of the shell to use in the command and the .Ic \&~! escape. -A default shell is used if this option is -not defined. +A default shell is used if this option is not defined. .It Ev VISUAL Pathname of the text editor to use in the .Ic visual command and .Ic \&~v escape. -.sp .It Va crt The valued option .Va crt @@ -1005,17 +996,19 @@ be before is used to read it. If .Va crt -is set without a value, -then the height of the terminal screen stored in the system -is used to compute the threshold (see +is set without a value, then the height of the terminal screen +stored in the system is used to compute the threshold (see .Xr stty 1 ) . .It Ar escape If defined, the first character of this option gives the character to -use in the place of ~ to denote escapes. +use in the place of +.Sq ~ +to denote escapes. .It Ar folder The name of the directory to use for storing folders of messages. -If this name begins with a `/', +If this name begins with a +.Sq / , .Nm considers it to be an absolute pathname; otherwise, the folder directory is found relative to your home directory. @@ -1032,8 +1025,11 @@ If defined, gives the pathname of the file used to record all outgoing mail. If not defined, then outgoing mail is not so saved. .It Ar indentprefix -String used by the ``~m'' tilde escape for indenting messages, in place of -the normal tab character (^I). +String used by the +.Dq ~m +tilde escape for indenting messages, in place of +the normal tab character +.Pq Sq ^I . Be sure to quote the value if it contains spaces or tabs. .It Ar toplines @@ -1089,8 +1085,7 @@ This man page is derived from originally written by Kurt Shoens. .Sh BUGS There are some flags that are not documented here. -Most are -not useful to the general user. +Most are not useful to the general user. .Pp Usually, .Nm