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