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