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.\" $Id$ 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 more 486.Pq Ic \mo 487Takes a list of messages and invokes the pager on that list. 488.It Ic mbox 489Indicate that a list of messages be sent to 490.Ic mbox 491in your home directory when you quit. 492This is the default 493action for messages if you do 494.Em not 495have the 496.Ic hold 497option set. 498.It Ic next 499.Pq Ic n 500like 501.Ic \&+ 502or 503.Tn CR ) 504Goes to the next message in sequence and types it. 505With an argument list, types the next matching message. 506.It Ic preserve 507.Pq Ic pre 508A synonym for 509.Ic hold . 510.It Ic print 511.Pq Ic p 512Takes a message list and types out each message on the user's terminal. 513.It Ic quit 514.Pq Ic q 515Terminates the session, saving all undeleted, unsaved messages in 516the user's 517.Ar mbox 518file in his login directory, preserving all messages marked with 519.Ic hold 520or 521.Ic preserve 522or never referenced 523in his system mailbox, and removing all other messages from his system 524mailbox. 525If new mail has arrived during the session, the message 526.Dq Li "You have new mail" 527is given. 528If given while editing a 529mailbox file with the 530.Fl f 531flag, then the edit file is rewritten. 532A return to the Shell is 533effected, unless the rewrite of edit file fails, in which case the user 534can escape with the 535.Ic exit 536command. 537.It Ic reply 538.Pq Ic r 539Takes a message list and sends mail to the sender and all 540recipients of the specified message. 541The default message must not be deleted. 542.It Ic respond 543A synonym for 544.Ic reply . 545.It Ic retain 546Add the list of header fields named to the 547.Ar retained list 548Only the header fields in the retain list 549are shown on your terminal when you print a message. 550All other header fields are suppressed. 551The 552.Ic Type 553and 554.Ic Print 555commands can be used to print a message in its entirety. 556If 557.Ic retain 558is executed with no arguments, it lists the current set of 559retained fields. 560.It Ic save 561.Pq Ic s 562Takes a message list and a filename and appends each message in 563turn to the end of the file. 564The filename in quotes, followed by the line 565count and character count is echoed on the user's terminal. 566.It Ic set 567.Pq Ic se 568With no arguments, prints all variable values. 569Otherwise, sets 570option. 571Arguments are of the form 572.Ar option=value 573(no space before or after =) or 574.Ar option . 575Quotation marks may be placed around any part of the assignment statement to 576quote blanks or tabs, i.e. 577.Dq Li "set indentprefix=\*q->\*q" 578.It Ic saveignore 579.Ic Saveignore 580is to 581.Ic save 582what 583.Ic ignore 584is to 585.Ic print 586and 587.Ic type . 588Header fields thus marked are filtered out when 589saving a message by 590.Ic save 591or when automatically saving to 592.Ar mbox . 593.It Ic saveretain 594.Ic Saveretain 595is to 596.Ic save 597what 598.Ic retain 599is to 600.Ic print 601and 602.Ic type . 603Header fields thus marked are the only ones saved 604with a message when saving by 605.Ic save 606or when automatically saving to 607.Ar mbox . 608.Ic Saveretain 609overrides 610.Ic saveignore . 611.It Ic shell 612.Pq Ic sh 613Invokes an interactive version of the shell. 614.It Ic size 615Takes a message list and prints out the size in characters of each 616message. 617.It Ic source 618The 619.Ic source 620command reads 621commands from a file. 622.It Ic top 623Takes a message list and prints the top few lines of each. 624The number of 625lines printed is controlled by the variable 626.Ic toplines 627and defaults to five. 628.It Ic type 629.Pq Ic t 630A synonym for 631.Ic print . 632.It Ic unalias 633Takes a list of names defined by 634.Ic alias 635commands and discards the remembered groups of users. 636The group names 637no longer have any significance. 638.It Ic undelete 639.Pq Ic u 640Takes a message list and marks each message as 641.Ic not 642being deleted. 643.It Ic unread 644.Pq Ic U 645Takes a message list and marks each message as 646.Ic not 647having been read. 648.It Ic unset 649Takes a list of option names and discards their remembered values; 650the inverse of 651.Ic set . 652.It Ic visual 653.Pq Ic v 654Takes a message list and invokes the display editor on each message. 655.It Ic write 656.Pq Ic w 657Similar to 658.Ic save , 659except that 660.Ic only 661the message body 662.Pq Ar without 663the header) is saved. 664Extremely useful for such tasks as sending and receiving source 665program text over the message system. 666.It Ic xit 667.Pq Ic x 668A synonym for 669.Ic exit . 670.It Ic z 671.Nm Mail 672presents message headers in windowfuls as described under the 673.Ic headers 674command. 675You can move 676.Nm mail Ns 's 677attention forward to the next window with the 678.Ic \&z 679command. 680Also, you can move to the previous window by using 681.Ic \&z\&\- . 682.El 683.Ss Tilde/Escapes 684.Pp 685Here is a summary of the tilde escapes, 686which are used when composing messages to perform 687special functions. 688Tilde escapes are only recognized at the beginning 689of lines. 690The name 691.Dq Em tilde\ escape 692is somewhat of a misnomer since the actual escape character can be set 693by the option 694.Ic escape . 695.Bl -tag -width Ds 696.It Ic \&~! Ns Ar command 697Execute the indicated shell command, then return to the message. 698.It Ic \&~b Ns Ar name ... 699Add the given names to the list of carbon copy recipients but do not make 700the names visible in the Cc: line ("blind" carbon copy). 701.It Ic \&~c Ns Ar name ... 702Add the given names to the list of carbon copy recipients. 703.It Ic \&~d 704Read the file 705.Dq Pa dead.letter 706from your home directory into the message. 707.It Ic \&~e 708Invoke the text editor on the message collected so far. 709After the 710editing session is finished, you may continue appending text to the 711message. 712.It Ic \&~f Ns Ar messages 713Read the named messages into the message being sent. 714If no messages are specified, read in the current message. 715Message headers currently being ignored (by the 716.Ic ignore 717or 718.Ic retain 719command) are not included. 720.It Ic \&~F Ns Ar messages 721Identical to 722.Ic \&~f , 723except all message headers are included. 724.It Ic \&~h 725Edit the message header fields by typing each one in turn and allowing 726the user to append text to the end or modify the field by using the 727current terminal erase and kill characters. 728.It Ic \&~m Ns Ar messages 729Read the named messages into the message being sent, indented by a 730tab or by the value of 731.Ar indentprefix . 732If no messages are specified, 733read the current message. 734Message headers currently being ignored (by the 735.Ic ignore 736or 737.Ic retain 738command) are not included. 739.It Ic \&~M Ns Ar messages 740Identical to 741.Ic \&~m , 742except all message headers are included. 743.It Ic \&~p 744Print out the message collected so far, prefaced by the message header 745fields. 746.It Ic \&~q 747Abort the message being sent, copying the message to 748.Dq Pa dead.letter 749in your home directory if 750.Ic save 751is set. 752.It Ic \&~r Ns Ar filename 753Read the named file into the message. 754.It Ic \&~s Ns Ar string 755Cause the named string to become the current subject field. 756.It Ic \&~\&t Ns Ar name ... 757Add the given names to the direct recipient list. 758.It Ic \&~\&v 759Invoke an alternate editor (defined by the 760.Ev VISUAL 761option) on the 762message collected so far. 763Usually, the alternate editor will be a 764screen editor. 765After you quit the editor, you may resume appending 766text to the end of your message. 767.It Ic \&~w Ns Ar filename 768Write the message onto the named file. 769.It Ic \&~\&| Ns Ar command 770Pipe the message through the command as a filter. 771If the command gives 772no output or terminates abnormally, retain the original text of the 773message. 774The command 775.Xr fmt 1 776is often used as 777.Ic command 778to rejustify the message. 779.It Ic \&~: Ns Ar mail-command 780Execute the given mail command. 781Not all commands, however, are allowed. 782.It Ic \&~~ Ns Ar string 783Insert the string of text in the message prefaced by a single ~. 784If 785you have changed the escape character, then you should double 786that character in order to send it. 787.El 788.Ss Mail Options 789Options are controlled via 790.Ic set 791and 792.Ic unset 793commands. 794Options may be either binary, in which case it is only 795significant to see whether they are set or not; or string, in which 796case the actual value is of interest. 797The binary options include the following: 798.Bl -tag -width append 799.It Ar append 800Causes messages saved in 801.Ar mbox 802to be appended to the end rather than prepended. 803This should always be set (preferably in one of the system-wide 804.Pa mail.rc 805files). 806.It Ar ask 807Causes 808.Nm mail 809to prompt you for the subject of each message you send. 810If 811you respond with simply a newline, no subject field will be sent. 812.It Ar askcc 813Causes you to be prompted for additional carbon copy recipients at the 814end of each message. 815Responding with a newline indicates your 816satisfaction with the current list. 817.It Ar autoprint 818Causes the 819.Ic delete 820command to behave like 821.Ic dp 822\- thus, after deleting a message, the next one will be typed 823automatically. 824.It Ar debug 825Setting the binary option 826.Ar debug 827is the same as specifying 828.Fl d 829on the command line and causes 830.Nm mail 831to output all sorts of information useful for debugging 832.Nm mail . 833.It Ar dot 834The binary option 835.Ar dot 836causes 837.Nm mail 838to interpret a period alone on a line as the terminator 839of a message you are sending. 840.It Ar hold 841This option is used to hold messages in the system mailbox 842by default. 843.It Ar ignore 844Causes interrupt signals from your terminal to be ignored and echoed as 845@'s. 846.It Ar ignoreeof 847An option related to 848.Ar dot 849is 850.Ar ignoreeof 851which makes 852.Nm mail 853refuse to accept a control-d as the end of a message. 854.Ar Ignoreeof 855also applies to 856.Nm mail 857command mode. 858.It Ar metoo 859Usually, when a group is expanded that contains the sender, the sender 860is removed from the expansion. 861Setting this option causes the sender 862to be included in the group. 863.It Ar noheader 864Setting the option 865.Ar noheader 866is the same as giving the 867.Fl N 868flag on the command line. 869.It Ar nosave 870Normally, when you abort a message with two 871.Tn RUBOUT 872(erase or delete) 873.Nm mail 874copies the partial letter to the file 875.Dq Pa dead.letter 876in your home directory. 877Setting the binary option 878.Ar nosave 879prevents this. 880.It Ar Replyall 881Reverses the sense of 882.Ic reply 883and 884.Ic Reply 885commands. 886.It Ar quiet 887Suppresses the printing of the version when first invoked. 888.It Ar searchheaders 889If this option is set, then a message-list specifier in the form ``/x:y'' 890will expand to all messages containing the substring ``y'' in the header 891field ``x''. The string search is case insensitive. 892.It Ar verbose 893Setting the option 894.Ar verbose 895is the same as using the 896.Fl v 897flag on the command line. 898When mail runs in verbose mode, 899the actual delivery of messages is displayed on the user's 900terminal. 901.El 902.Ss Option String Values 903.Bl -tag -width Va 904.It Ev EDITOR 905Pathname of the text editor to use in the 906.Ic edit 907command and 908.Ic \&~e 909escape. 910If not defined, then a default editor is used. 911.It Ev LISTER 912Pathname of the directory lister to use in the 913.Ic folders 914command. 915Default is 916.Pa /bin/ls . 917.It Ev PAGER 918Pathname of the program to use in the 919.Ic more 920command or when 921.Ic crt 922variable is set. 923The default paginator 924.Xr more 1 925is used if this option is not defined. 926.It Ev SHELL 927Pathname of the shell to use in the 928.Ic \&! 929command and the 930.Ic \&~! 931escape. 932A default shell is used if this option is 933not defined. 934.It Ev VISUAL 935Pathname of the text editor to use in the 936.Ic visual 937command and 938.Ic \&~v 939escape. 940.It Va crt 941The valued option 942.Va crt 943is used as a threshold to determine how long a message must 944be before 945.Ev PAGER 946is used to read it. 947If 948.Va crt 949is set without a value, 950then the height of the terminal screen stored in the system 951is used to compute the threshold (see 952.Xr stty 1 ) . 953.It Ar escape 954If defined, the first character of this option gives the character to 955use in the place of ~ to denote escapes. 956.It Ar folder 957The name of the directory to use for storing folders of 958messages. 959If this name begins with a `/', 960.Nm mail 961considers it to be an absolute pathname; otherwise, the 962folder directory is found relative to your home directory. 963.It Ev MBOX 964The name of the 965.Ar mbox 966file. 967It can be the name of a folder. 968The default is 969.Dq Li mbox 970in the user's home directory. 971.It Ar record 972If defined, gives the pathname of the file used to record all outgoing 973mail. 974If not defined, then outgoing mail is not so saved. 975.It Ar indentprefix 976String used by the ``~m'' tilde escape for indenting messages, in place of 977the normal tab character (^I). 978Be sure to quote the value if it contains 979spaces or tabs. 980.It Ar toplines 981If defined, gives the number of lines of a message to be printed out 982with the 983.Ic top 984command; normally, the first five lines are printed. 985.El 986.Sh ENVIRONMENT 987.Nm Mail 988utilizes the 989.Ev HOME 990and 991.Ev USER 992environment variables. Also, if the 993.Ev MAIL 994environment variable is set, it is used as the 995location of the user's mailbox instead of the 996default in /var/mail. 997.Sh FILES 998.Bl -tag -width /usr/share/misc/mail.*help -compact 999.It Pa /var/mail/* 1000Post office. 1001.It ~/mbox 1002User's old mail. 1003.It ~/.mailrc 1004File giving initial mail commands. 1005.It Pa /tmp/R* 1006Temporary files. 1007.It Pa /usr/share/misc/mail.*help 1008Help files. 1009.sp 1010.It Pa /usr/share/misc/mail.rc 1011.It Pa /usr/local/etc/mail.rc 1012.It Pa /etc/mail.rc 1013System-wide initialization files. Each file will be sourced, in order, 1014if it exists. 1015.El 1016.Sh SEE ALSO 1017.Xr fmt 1 , 1018.Xr newaliases 1 , 1019.Xr vacation 1 , 1020.Xr aliases 5 , 1021.Xr mailaddr 7 , 1022.Xr sendmail 8 1023and 1024.Rs 1025.%T "The Mail Reference Manual" . 1026.Re 1027.Sh HISTORY 1028A 1029.Nm 1030command 1031appeared in 1032.At v1 . 1033This man page is derived from 1034.%T "The Mail Reference Manual" 1035originally written by Kurt Shoens. 1036.Sh BUGS 1037There are some flags that are not documented here. 1038Most are 1039not useful to the general user. 1040.Pp 1041Usually, 1042.Nm mail 1043is just a link to 1044.Nm Mail , 1045which can be confusing. 1046