1.\" $NetBSD: mail.1,v 1.18 2001/04/04 09:38:32 wiz Exp $ 2.\" 3.\" Copyright (c) 1980, 1990, 1993 4.\" The Regents of the University of California. All rights reserved. 5.\" 6.\" Redistribution and use in source and binary forms, with or without 7.\" modification, are permitted provided that the following conditions 8.\" are met: 9.\" 1. Redistributions of source code must retain the above copyright 10.\" notice, this list of conditions and the following disclaimer. 11.\" 2. Redistributions in binary form must reproduce the above copyright 12.\" notice, this list of conditions and the following disclaimer in the 13.\" documentation and/or other materials provided with the distribution. 14.\" 3. All advertising materials mentioning features or use of this software 15.\" must display the following acknowledgement: 16.\" This product includes software developed by the University of 17.\" California, Berkeley and its contributors. 18.\" 4. Neither the name of the University nor the names of its contributors 19.\" may be used to endorse or promote products derived from this software 20.\" without specific prior written permission. 21.\" 22.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32.\" SUCH DAMAGE. 33.\" 34.\" @(#)mail.1 8.8 (Berkeley) 4/28/95 35.\" 36.Dd April 28, 1995 37.Dt MAIL 1 38.Os 39.Sh NAME 40.Nm mail , 41.Nm mailx , 42.Nm Mail 43.Nd send and receive mail 44.Sh SYNOPSIS 45.Nm 46.Op Fl EiInv 47.Op Fl s Ar subject 48.Op Fl c Ar cc-addr 49.Op Fl b Ar bcc-addr 50.Ar to-addr... 51.Nm "" 52.Op Fl EiInNv 53.Fl f 54.Op Ar name 55.Nm "" 56.Op Fl EiInNv 57.Op Fl u Ar user 58.Sh INTRODUCTION 59.Nm 60is an intelligent mail processing system, which has 61a command syntax reminiscent of 62.Xr \&ed 1 63with lines replaced by messages. 64.Pp 65.Bl -tag -width flag 66.It Fl v 67Verbose mode. 68The details of 69delivery are displayed on the user's terminal. 70.It Fl E 71Don't send messages with an empty body. This is useful 72for piping errors from cron scripts. 73.It Fl i 74Ignore tty interrupt signals. 75This is 76particularly useful when using 77.Nm 78on noisy phone lines. 79.It Fl I 80Forces mail to run in interactive mode even when 81input isn't a terminal. 82In particular, the 83.Sq Ic \&~ 84special 85character when sending mail is only active in interactive mode. 86.It Fl n 87Inhibits reading 88.Pa /etc/mail.rc 89upon startup. 90.It Fl N 91Inhibits the initial display of message headers 92when reading mail or editing a mail folder. 93.It Fl s 94Specify subject on command line 95(only the first argument after the 96.Fl s 97flag is used as a subject; be careful to quote subjects 98containing spaces.) 99.It Fl c 100Send carbon copies to 101.Ar list 102of users. 103.It Fl b 104Send blind carbon copies to 105.Ar list . 106List should be a comma-separated list of names. 107.It Fl f 108Read in the contents of your 109.Ar mbox 110(or the specified file) 111for processing; when you 112.Ar quit , 113.Nm 114writes undeleted messages back to this file. 115.It Fl u 116Is equivalent to: 117.Pp 118.Dl mail -f /var/mail/user 119.El 120.Ss Sending mail 121To send a message to one or more people, 122.Nm 123can be invoked with arguments which are the names of people to 124whom the mail will be sent. 125You are then expected to type in 126your message, followed 127by an 128.Sq Li control\-D 129at the beginning of a line. 130The section below 131.Ar Replying to or originating mail , 132describes some features of 133.Nm 134available to help you compose your letter. 135.Pp 136.Ss Reading mail 137In normal usage 138.Nm 139is given no arguments and checks your mail out of the 140post office, then 141prints out a one line header of each message found. 142The current message is initially the first message (numbered 1) 143and can be printed using the 144.Ic print 145command (which can be abbreviated 146.Ql Ic p ) . 147You can move among the messages much as you move between lines in 148.Xr \&ed 1 , 149with the commands 150.Ql Ic \&+ 151and 152.Ql Ic \&\- 153moving backwards and forwards, and 154simple numbers. 155.Pp 156.Ss Disposing of mail 157After examining a message you can 158.Ic delete 159.Pq Ql Ic d 160the message or 161.Ic reply 162.Pq Ql Ic r 163to it. 164Deletion causes the 165.Nm 166program to forget about the message. 167This is not irreversible; the message can be 168.Ic undeleted 169.Pq Ql Ic u 170by giving its number, or the 171.Nm 172session can be aborted by giving the 173.Ic exit 174.Pq Ql Ic x 175command. 176Deleted messages will, however, usually disappear never to be seen again. 177.Pp 178.Ss Specifying messages 179Commands such as 180.Ic print 181and 182.Ic delete 183can be given a list of message numbers as arguments to apply 184to a number of messages at once. 185Thus 186.Dq Li delete 1 2 187deletes messages 1 and 2, while 188.Dq Li delete 1\-5 189deletes messages 1 through 5. 190The special name 191.Ql Li \&* 192addresses all messages, and 193.Ql Li \&$ 194addresses 195the last message; thus the command 196.Ic top 197which prints the first few lines of a message could be used in 198.Dq Li top \&* 199to print the first few lines of all messages. 200.Pp 201.Ss Replying to or originating mail 202You can use the 203.Ic reply 204command to 205set up a response to a message, sending it back to the 206person who it was from. 207Text you then type in, up to an end-of-file, 208defines the contents of the message. 209While you are composing a message, 210.Nm 211treats lines beginning with the character 212.Ql Ic \&~ 213specially. 214For instance, typing 215.Ql Ic \&~m 216(alone on a line) will place a copy 217of the current message into the response right shifting it by a tabstop 218(see 219.Em indentprefix 220variable, below). 221Other escapes will set up subject fields, add and delete recipients 222to the message and allow you to escape to an editor to revise the 223message or to a shell to run some commands. 224(These options 225are given in the summary below.) 226.Pp 227.Ss Ending a mail processing session 228You can end a 229.Nm 230session with the 231.Ic quit 232.Pq Ql Ic q 233command. 234Messages which have been examined go to your 235.Ar mbox 236file unless they have been deleted in which case they are discarded. 237Unexamined messages go back to the post office. 238(See the 239.Fl f 240option above). 241.Pp 242.Ss Personal and systemwide distribution lists 243It is also possible to create a personal distribution lists so that, 244for instance, you can send mail to 245.Dq Li cohorts 246and have it go 247to a group of people. 248Such lists can be defined by placing a line like 249.Pp 250.Dl alias cohorts bill ozalp jkf mark kridle@ucbcory 251.Pp 252in the file 253.Pa \&.mailrc 254in your home directory. 255The current list of such aliases can be displayed with the 256.Ic alias 257command in 258.Nm "" . 259System wide distribution lists can be created by editing 260.Pa /etc/mail/aliases , 261see 262.Xr aliases 5 263and 264.Xr sendmail 8 ; 265these are kept in a different syntax. 266In mail you send, personal aliases will be expanded in mail sent 267to others so that they will be able to 268.Ic reply 269to the recipients. 270System wide 271.Ic aliases 272are not expanded when the mail is sent, 273but any reply returned to the machine will have the system wide 274alias expanded as all mail goes through 275.Xr sendmail 8 . 276.Pp 277.Ss Network mail (ARPA, UUCP, Berknet) 278See 279.Xr mailaddr 7 280for a description of network addresses. 281.Pp 282.Nm 283has a number of options which can be set in the 284.Pa .mailrc 285file to alter its behavior; thus 286.Dq Li set askcc 287enables the 288.Ar askcc 289feature. 290(These options are summarized below.) 291.Sh SUMMARY 292(Adapted from the `Mail Reference Manual') 293.Pp 294Each command is typed on a line by itself, and may take arguments 295following the command word. 296The command need not be typed in its 297entirety \- the first command which matches the typed prefix is used. 298For commands which take message lists as arguments, if no message 299list is given, then the next message forward which satisfies the 300command's requirements is used. 301If there are no messages forward of 302the current message, the search proceeds backwards, and if there are no 303good messages at all, 304.Nm 305types 306.Dq Li No applicable messages 307and 308aborts the command. 309.Bl -tag -width delete 310.It Ic \&\- 311Print out the preceding message. 312If given a numeric 313argument 314.Ar n , 315goes to the 316.Ar n Ns 'th 317previous message and prints it. 318.It Ic \&? 319Prints a brief summary of commands. 320.It Ic \&! 321Executes the shell 322(see 323.Xr sh 1 324and 325.Xr csh 1 ) 326command which follows. 327.It Ic Print 328.Pq Ic P 329Like 330.Ic print 331but also prints out ignored header fields. 332See also 333.Ic print , 334.Ic ignore 335and 336.Ic retain . 337.It Ic Reply 338.Pq Ic R 339Reply to originator. 340Does not reply to other 341recipients of the original message. 342.It Ic Type 343.Pq Ic T 344Identical to the 345.Ic Print 346command. 347.It Ic alias 348.Pq Ic a 349With no arguments, prints out all currently-defined aliases. 350With one 351argument, prints out that alias. 352With more than one argument, creates 353a new alias or changes an old one. 354.It Ic alternates 355.Pq Ic alt 356The 357.Ic alternates 358command is useful if you have accounts on several machines. 359It can be used to inform 360.Nm 361that the listed addresses are really you. 362When you 363.Ic reply 364to messages, 365.Nm 366will not send a copy of the message to any of the addresses 367listed on the 368.Ic alternates 369list. 370If the 371.Ic alternates 372command is given with no argument, the current set of alternative 373names is displayed. 374.It Ic chdir 375.Pq Ic c 376Changes the user's working directory to that specified, if given. 377If 378no directory is given, then changes to the user's login directory. 379.It Ic copy 380.Pq Ic co 381The 382.Ic copy 383command does the same thing that 384.Ic save 385does, except that it does not mark the messages it 386is used on for deletion when you quit. 387.It Ic delete 388.Pq Ic d 389Takes a list of messages as argument and marks them all as deleted. 390Deleted messages will not be saved in 391.Ar mbox , 392nor will they be available for most other commands. 393.It Ic dp 394(also 395.Ic dt ) 396Deletes the current message and prints the next message. 397If there is no next message, 398.Nm 399says 400.Dq Li "at EOF" . 401.It Ic edit 402.Pq Ic e 403Takes a list of messages and points the text editor at each one in 404turn. 405On return from the editor, the message is read back in. 406.It Ic exit 407.Pf ( Ic ex 408or 409.Ic x ) 410Effects an immediate return to the Shell without 411modifying the user's system mailbox, his 412.Ar mbox 413file, or his edit file in 414.Fl f . 415.It Ic file 416.Pq Ic fi 417The same as 418.Ic folder . 419.It Ic folders 420List the names of the folders in your folder directory. 421.It Ic folder 422.Pq Ic fo 423The 424.Ic folder 425command switches to a new mail file or folder. 426With no 427arguments, it tells you which file you are currently reading. 428If you give it an argument, it will write out changes (such 429as deletions) you have made in the current file and read in 430the new file. 431Some special conventions are recognized for 432the name. 433# means the previous file, % means your system 434mailbox, %user means user's system mailbox, & means 435your 436.Ar mbox 437file, and 438\&+\&folder means a file in your folder 439directory. 440.It Ic from 441.Pq Ic f 442Takes a list of messages and prints their message headers. 443.It Ic headers 444.Pq Ic h 445Lists the current range of headers, which is an 18\-message group. 446If 447a 448.Ql \&+ 449argument is given, then the next 18\-message group is printed, and if 450a 451.Ql \&\- 452argument is given, the previous 18\-message group is printed. 453.It Ic help 454A synonym for 455.Ic \&? 456.It Ic hold 457.Pf ( Ic ho , 458also 459.Ic preserve ) 460Takes a message list and marks each 461message therein to be saved in the 462user's system mailbox instead of in 463.Ar mbox . 464Does not override the 465.Ic delete 466command. 467.It Ic ignore 468Add the list of header fields named to the 469.Ar ignored list . 470Header fields in the ignore list are not printed 471on your terminal when you print a message. 472This 473command is very handy for suppression of certain machine-generated 474header fields. 475The 476.Ic Type 477and 478.Ic Print 479commands can be used to print a message in its entirety, including 480ignored fields. 481.It Ic inc 482Incorporate any new messages that have arrived while mail 483is being read. 484The new messages are added to the end of the message list, 485and the current message is reset to be the first new mail message. 486This does not renumber the existing message list, nor does 487does it cause any changes made so far to be saved. 488If 489.Ic ignore 490is executed with no arguments, it lists the current set of 491ignored fields. 492.It Ic mail 493.Pq Ic m 494Takes as argument login names and distribution group names and sends 495mail to those people. 496.It Ic mbox 497Indicate that a list of messages be sent to 498.Ic mbox 499in your home directory when you quit. 500This is the default 501action for messages if you do 502.Em not 503have the 504.Ic hold 505option set. 506.It Ic more 507.Pq Ic \mo 508Takes a message list and invokes the pager on that list. 509.It Ic next 510.Pf ( Ic n , 511like 512.Ic \&+ 513or 514.Tn CR ) 515Goes to the next message in sequence and types it. 516With an argument list, types the next matching message. 517.It Ic preserve 518.Pq Ic pre 519A synonym for 520.Ic hold . 521.It Ic print 522.Pq Ic p 523Takes a message list and types out each message on the user's terminal. 524.It Ic quit 525.Pq Ic q 526Terminates the session, saving all undeleted, unsaved messages in 527the user's 528.Ar mbox 529file in his login directory, preserving all messages marked with 530.Ic hold 531or 532.Ic preserve 533or never referenced 534in his system mailbox, and removing all other messages from his system 535mailbox. 536If new mail has arrived during the session, the message 537.Dq Li "You have new mail" 538is given. 539If given while editing a 540mailbox file with the 541.Fl f 542flag, then the edit file is rewritten. 543A return to the Shell is 544effected, unless the rewrite of edit file fails, in which case the user 545can escape with the 546.Ic exit 547command. 548.It Ic reply 549.Pq Ic r 550Takes a message list and sends mail to the sender and all 551recipients of the specified message. 552The default message must not be deleted. 553.It Ic respond 554A synonym for 555.Ic reply . 556.It Ic retain 557Add the list of header fields named to the 558.Ar retained list . 559Only the header fields in the retained list 560are shown on your terminal when you print a message. 561All other header fields are suppressed. 562The 563.Ic type 564and 565.Ic print 566commands can be used to print a message in its entirety. 567If 568.Ic retain 569is executed with no arguments, it lists the current set of 570retained fields. 571.It Ic save 572.Pq Ic s 573Takes a message list and a filename and appends each message in 574turn to the end of the file. 575The filename in quotes, followed by the line 576count and character count is echoed on the user's terminal. 577.It Ic set 578.Pq Ic se 579With no arguments, prints all variable values. 580Otherwise, sets 581option. 582Arguments are of the form 583.Ar option=value 584(no space before or after =) or 585.Ar option . 586Quotation marks may be placed around any part of the assignment statement to 587quote blanks or tabs, i.e. 588.Dq Li "set indentprefix=\*q->\*q" 589.It Ic saveignore 590.Ic Saveignore 591is to 592.Ic save 593what 594.Ic ignore 595is to 596.Ic print 597and 598.Ic type . 599Header fields thus marked are filtered out when 600saving a message by 601.Ic save 602or when automatically saving to 603.Ar mbox . 604.pl +1 605.It Ic saveretain 606.Ic Saveretain 607is to 608.Ic save 609what 610.Ic retain 611is to 612.Ic print 613and 614.Ic type . 615Header fields thus marked are the only ones saved 616with a message when saving by 617.Ic save 618or when automatically saving to 619.Ar mbox . 620.Ic Saveretain 621overrides 622.Ic saveignore . 623.It Ic shell 624.Pq Ic sh 625Invokes an interactive version of the shell. 626.It Ic size 627Takes a message list and prints out the size in characters of each 628message. 629.It Ic source 630The 631.Ic source 632command reads 633commands from a file. 634.It Ic top 635Takes a message list and prints the top few lines of each. 636The number of 637lines printed is controlled by the variable 638.Ic toplines 639and defaults to five. 640.It Ic type 641.Pq Ic t 642A synonym for 643.Ic print . 644.It Ic unalias 645Takes a list of names defined by 646.Ic alias 647commands and discards the remembered groups of users. 648The group names 649no longer have any significance. 650.It Ic undelete 651.Pq Ic u 652Takes a message list and marks each message as 653.Ic not 654being deleted. 655.It Ic unread 656.Pq Ic U 657Takes a message list and marks each message as 658.Em not 659having been read. 660.It Ic unset 661Takes a list of option names and discards their remembered values; 662the inverse of 663.Ic set . 664.It Ic visual 665.Pq Ic v 666Takes a message list and invokes the display editor on each message. 667.It Ic write 668.Pq Ic w 669Similar to 670.Ic save , 671except that 672.Em only 673the message body 674.Pf ( Em without 675the header) is saved. 676Extremely useful for such tasks as sending and receiving source 677program text over the message system. 678.It Ic xit 679.Pq Ic x 680A synonym for 681.Ic exit . 682.It Ic z 683.Nm 684presents message headers in windowfuls as described under the 685.Ic headers 686command. 687You can move 688.Nm "" Ns 's 689attention forward to the next window with the 690.Ic \&z 691command. 692Also, you can move to the previous window by using 693.Ic \&z\&\- . 694.El 695.Ss Tilde/Escapes 696.Pp 697Here is a summary of the tilde escapes, 698which are used when composing messages to perform 699special functions. 700Tilde escapes are only recognized at the beginning 701of lines. 702The name 703.Dq Em tilde\ escape 704is somewhat of a misnomer since the actual escape character can be set 705by the option 706.Ic escape . 707.Bl -tag -width Ds 708.It Ic \&~! Ns Ar command 709Execute the indicated shell command, then return to the message. 710.It Ic \&~a 711Inserts the autograph string from the sign= option into the message. 712.It Ic \&~A 713Inserts the autograph string from the Sign= option into the message. 714.It Ic \&~b Ns Ar name ... 715Add the given names to the list of carbon copy recipients but do not make 716the names visible in the Cc: line ("blind" carbon copy). 717.It Ic \&~c Ns Ar name ... 718Add the given names to the list of carbon copy recipients. 719.It Ic \&~d 720Read the file 721.Dq Pa dead.letter 722from your home directory into the message. 723.It Ic \&~e 724Invoke the text editor on the message collected so far. 725After the 726editing session is finished, you may continue appending text to the 727message. 728.It Ic \&~f Ns Ar messages 729Read the named messages into the message being sent. 730If no messages are specified, read in the current message. 731Message headers currently being ignored (by the 732.Ic ignore 733or 734.Ic retain 735command) are not included. 736.sp 737.It Ic \&~F Ns Ar messages 738Identical to 739.Ic \&~f , 740except all message headers are included. 741.It Ic \&~h 742Edit the message header fields by typing each one in turn and allowing 743the user to append text to the end or modify the field by using the 744current terminal erase and kill characters. 745.It Ic \&~i Ns Ar string 746Inserts the value of the named option into the text of the message. 747.It Ic \&~m Ns Ar messages 748Read the named messages into the message being sent, indented by a 749tab or by the value of 750.Ar indentprefix . 751If no messages are specified, 752read the current message. 753Message headers currently being ignored (by the 754.Ic ignore 755or 756.Ic retain 757command) are not included. 758.It Ic \&~M Ns Ar messages 759Identical to 760.Ic \&~m , 761except all message headers are included. 762.It Ic \&~p 763Print out the message collected so far, prefaced by the message header 764fields. 765.It Ic \&~q 766Abort the message being sent, copying the message to 767.Dq Pa dead.letter 768in your home directory if 769.Ic save 770is set. 771.It Ic \&~x 772Exits as with \&~q, except the message is not saved in dead.letter. 773.It Ic \&~r Ns Ar filename 774.It Ic \&~< Ns Ar filename 775Reads the named file into the message. 776If the argument begins with !, 777the rest of the string is taken as an arbitrary system command and is 778executed, with the standard output inserted into the message. 779.It Ic \&~s Ns Ar string 780Cause the named string to become the current subject field. 781.It Ic \&~\&t Ns Ar name ... 782Add the given names to the direct recipient list. 783.It Ic \&~\&v 784Invoke an alternative editor (defined by the 785.Ev VISUAL 786option) on the 787message collected so far. 788Usually, the alternative editor will be a 789screen editor. 790After you quit the editor, you may resume appending 791text to the end of your message. 792.It Ic \&~w Ns Ar filename 793Write the message onto the named file. 794.It Ic \&~\&| Ns Ar command 795Pipe the message through the command as a filter. 796If the command gives 797no output or terminates abnormally, retain the original text of the 798message. 799The command 800.Xr fmt 1 801is often used as 802.Ic command 803to rejustify the message. 804.It Ic \&~: Ns Ar mail-command 805Execute the given mail command. 806Not all commands, however, are allowed. 807.It Ic \&~~ Ns Ar string 808Insert the string of text in the message prefaced by a single ~. 809If 810you have changed the escape character, then you should double 811that character in order to send it. 812.El 813.Ss Mail Options 814Options are controlled via 815.Ic set 816and 817.Ic unset 818commands. 819Options may be either binary, in which case it is only 820significant to see whether they are set or not; or string, in which 821case the actual value is of interest. 822The binary options include the following: 823.Bl -tag -width append 824.It Ar append 825Causes messages saved in 826.Ar mbox 827to be appended to the end rather than prepended. 828This should always be set (perhaps in 829.Pa /etc/mail.rc ) . 830.It Ar ask , Ar asksub 831Causes 832.Nm 833to prompt you for the subject of each message you send. 834If 835you respond with simply a newline, no subject field will be sent. 836.sp 837.It Ar askcc 838Causes you to be prompted for additional carbon copy recipients at the 839end of each message. 840Responding with a newline indicates your 841satisfaction with the current list. 842.It Ar autoinc 843Causes new mail to be automatically incorporated when it arrives. 844Setting this is similar to issuing the 845.Ic inc 846command at each prompt, except that the current message is not 847reset when new mail arrives. 848.It Ar askbcc 849Causes you to be prompted for additional blind carbon copy recipients at the 850end of each message. 851Responding with a newline indicates your 852satisfaction with the current list. 853.It Ar autoprint 854Causes the 855.Ic delete 856command to behave like 857.Ic dp 858\- thus, after deleting a message, the next one will be typed 859automatically. 860.It Ar debug 861Setting the binary option 862.Ar debug 863is the same as specifying 864.Fl d 865on the command line and causes 866.Nm 867to output all sorts of information useful for debugging 868.Nm "" . 869.It Ar dot 870The binary option 871.Ar dot 872causes 873.Nm 874to interpret a period alone on a line as the terminator 875of a message you are sending. 876.It Ar hold 877This option is used to hold messages in the system mailbox 878by default. 879.It Ar ignore 880Causes interrupt signals from your terminal to be ignored and echoed as 881@'s. 882.It Ar ignoreeof 883An option related to 884.Ar dot 885is 886.Ar ignoreeof 887which makes 888.Nm 889refuse to accept a control-d as the end of a message. 890.Ar Ignoreeof 891also applies to 892.Nm 893command mode. 894.It Ar metoo 895Usually, when a group is expanded that contains the sender, the sender 896is removed from the expansion. 897Setting this option causes the sender 898to be included in the group. 899.It Ar noheader 900Setting the option 901.Ar noheader 902is the same as giving the 903.Fl N 904flag on the command line. 905.It Ar nosave 906Normally, when you abort a message with two 907.Tn RUBOUT 908(erase or delete) 909.Nm 910copies the partial letter to the file 911.Dq Pa dead.letter 912in your home directory. 913Setting the binary option 914.Ar nosave 915prevents this. 916.It Ar Replyall 917Reverses the sense of 918.Ic reply 919and 920.Ic Reply 921commands. 922.It Ar quiet 923Suppresses the printing of the version when first invoked. 924.It Ar searchheaders 925If this option is set, then a message-list specifier in the form ``/x:y'' 926will expand to all messages containing the substring ``y'' in the header 927field ``x''. The string search is case insensitive. 928If ``x'' is ommitted, it will default to the ``Subject'' header field. 929The form ``/to:y'' is a special case, and will expand 930to all messages containing the substring ``y'' in the ``To'', ``Cc'' 931or ``Bcc'' header fields. 932The check for "to" is case sensitive, so that 933``/To:y'' can be used to limit the search for ``y'' to just 934the ``To:'' field. 935.It Ar verbose 936Setting the option 937.Ar verbose 938is the same as using the 939.Fl v 940flag on the command line. 941When mail runs in verbose mode, 942the actual delivery of messages is displayed on the user's 943terminal. 944.El 945.Ss Option String Values 946.Bl -tag -width Va 947.It Ev EDITOR 948Pathname of the text editor to use in the 949.Ic edit 950command and 951.Ic \&~e 952escape. 953If not defined, then a default editor is used. 954.It Ev LISTER 955Pathname of the directory lister to use in the 956.Ic folders 957command. 958Default is 959.Pa /bin/ls . 960.It Ev PAGER 961Pathname of the program to use in the 962.Ic more 963command or when 964.Ic crt 965variable is set. 966The default paginator 967.Xr more 1 968is used if this option is not defined. 969.It Ev SHELL 970Pathname of the shell to use in the 971.Ic \&! 972command and the 973.Ic \&~! 974escape. 975A default shell is used if this option is 976not defined. 977.It Ev VISUAL 978Pathname of the text editor to use in the 979.Ic visual 980command and 981.Ic \&~v 982escape. 983.sp 984.It Va crt 985The valued option 986.Va crt 987is used as a threshold to determine how long a message must 988be before 989.Ev PAGER 990is used to read it. 991If 992.Va crt 993is set without a value, 994then the height of the terminal screen stored in the system 995is used to compute the threshold (see 996.Xr stty 1 ) . 997.It Ar escape 998If defined, the first character of this option gives the character to 999use in the place of ~ to denote escapes. 1000.It Ar folder 1001The name of the directory to use for storing folders of 1002messages. 1003If this name begins with a `/', 1004.Nm 1005considers it to be an absolute pathname; otherwise, the 1006folder directory is found relative to your home directory. 1007.It Ev MBOX 1008The name of the 1009.Ar mbox 1010file. 1011It can be the name of a folder. 1012The default is 1013.Dq Li mbox 1014in the user's home directory. 1015.It Ar record 1016If defined, gives the pathname of the file used to record all outgoing 1017mail. 1018If not defined, then outgoing mail is not so saved. 1019.It Ar indentprefix 1020String used by the ``~m'' tilde escape for indenting messages, in place of 1021the normal tab character (^I). 1022Be sure to quote the value if it contains 1023spaces or tabs. 1024.It Ar toplines 1025If defined, gives the number of lines of a message to be printed out 1026with the 1027.Ic top 1028command; normally, the first five lines are printed. 1029.El 1030.Sh ENVIRONMENT 1031.Nm 1032utilizes the 1033.Ev HOME 1034and 1035.Ev USER 1036environment variables. 1037.Sh FILES 1038.Bl -tag -width /usr/share/misc/mail.*help -compact 1039.It Pa /var/mail/* 1040Post office. 1041.It ~/mbox 1042User's old mail. 1043.It ~/.mailrc 1044File giving initial mail commands. 1045This can be overridden by setting the 1046.Ev MAILRC 1047environment variable. 1048.It Pa /tmp/R* 1049Temporary files. 1050.It Pa /usr/share/misc/mail.*help 1051Help files. 1052.It Pa /etc/mail.rc 1053System initialization file. 1054.El 1055.Sh SEE ALSO 1056.Xr fmt 1 , 1057.Xr newaliases 1 , 1058.Xr vacation 1 , 1059.Xr aliases 5 , 1060.Xr mailaddr 7 , 1061.Xr sendmail 8 1062and 1063.Rs 1064.%T "The Mail Reference Manual" 1065.Re 1066.Sh HISTORY 1067A 1068.Nm 1069command 1070appeared in 1071.At v6 . 1072This man page is derived from 1073.%T "The Mail Reference Manual" 1074originally written by Kurt Shoens. 1075.Sh BUGS 1076There are some flags that are not documented here. 1077Most are 1078not useful to the general user. 1079.Pp 1080Usually, 1081.Nm 1082is just a link to 1083.Nm Mail , 1084which can be confusing. 1085.Pp 1086The name of the 1087.Ic alternates 1088list is incorrect English (it should be 1089.Dq alternatives ) , 1090but is retained for compatibility. 1091