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: mail.1,v 1.7 1996/08/29 18:05:57 wosch Exp $ 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 82.Pa /etc/mail.rc 83upon 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 (perhaps in 801.Pa /etc/mail.rc ) . 802.It Ar ask 803Causes 804.Nm mail 805to prompt you for the subject of each message you send. 806If 807you respond with simply a newline, no subject field will be sent. 808.It Ar askcc 809Causes you to be prompted for additional carbon copy recipients at the 810end of each message. 811Responding with a newline indicates your 812satisfaction with the current list. 813.It Ar autoprint 814Causes the 815.Ic delete 816command to behave like 817.Ic dp 818\- thus, after deleting a message, the next one will be typed 819automatically. 820.It Ar debug 821Setting the binary option 822.Ar debug 823is the same as specifying 824.Fl d 825on the command line and causes 826.Nm mail 827to output all sorts of information useful for debugging 828.Nm mail . 829.It Ar dot 830The binary option 831.Ar dot 832causes 833.Nm mail 834to interpret a period alone on a line as the terminator 835of a message you are sending. 836.It Ar hold 837This option is used to hold messages in the system mailbox 838by default. 839.It Ar ignore 840Causes interrupt signals from your terminal to be ignored and echoed as 841@'s. 842.It Ar ignoreeof 843An option related to 844.Ar dot 845is 846.Ar ignoreeof 847which makes 848.Nm mail 849refuse to accept a control-d as the end of a message. 850.Ar Ignoreeof 851also applies to 852.Nm mail 853command mode. 854.It Ar metoo 855Usually, when a group is expanded that contains the sender, the sender 856is removed from the expansion. 857Setting this option causes the sender 858to be included in the group. 859.It Ar noheader 860Setting the option 861.Ar noheader 862is the same as giving the 863.Fl N 864flag on the command line. 865.It Ar nosave 866Normally, when you abort a message with two 867.Tn RUBOUT 868(erase or delete) 869.Nm mail 870copies the partial letter to the file 871.Dq Pa dead.letter 872in your home directory. 873Setting the binary option 874.Ar nosave 875prevents this. 876.It Ar Replyall 877Reverses the sense of 878.Ic reply 879and 880.Ic Reply 881commands. 882.It Ar quiet 883Suppresses the printing of the version when first invoked. 884.It Ar searchheaders 885If this option is set, then a message-list specifier in the form ``/x:y'' 886will expand to all messages containing the substring ``y'' in the header 887field ``x''. The string search is case insensitive. 888.It Ar verbose 889Setting the option 890.Ar verbose 891is the same as using the 892.Fl v 893flag on the command line. 894When mail runs in verbose mode, 895the actual delivery of messages is displayed on the user's 896terminal. 897.El 898.Ss Option String Values 899.Bl -tag -width Va 900.It Ev EDITOR 901Pathname of the text editor to use in the 902.Ic edit 903command and 904.Ic \&~e 905escape. 906If not defined, then a default editor is used. 907.It Ev LISTER 908Pathname of the directory lister to use in the 909.Ic folders 910command. 911Default is 912.Pa /bin/ls . 913.It Ev PAGER 914Pathname of the program to use in the 915.Ic more 916command or when 917.Ic crt 918variable is set. 919The default paginator 920.Xr more 1 921is used if this option is not defined. 922.It Ev SHELL 923Pathname of the shell to use in the 924.Ic \&! 925command and the 926.Ic \&~! 927escape. 928A default shell is used if this option is 929not defined. 930.It Ev VISUAL 931Pathname of the text editor to use in the 932.Ic visual 933command and 934.Ic \&~v 935escape. 936.It Va crt 937The valued option 938.Va crt 939is used as a threshold to determine how long a message must 940be before 941.Ev PAGER 942is used to read it. 943If 944.Va crt 945is set without a value, 946then the height of the terminal screen stored in the system 947is used to compute the threshold (see 948.Xr stty 1 ) . 949.It Ar escape 950If defined, the first character of this option gives the character to 951use in the place of ~ to denote escapes. 952.It Ar folder 953The name of the directory to use for storing folders of 954messages. 955If this name begins with a `/', 956.Nm mail 957considers it to be an absolute pathname; otherwise, the 958folder directory is found relative to your home directory. 959.It Ev MBOX 960The name of the 961.Ar mbox 962file. 963It can be the name of a folder. 964The default is 965.Dq Li mbox 966in the user's home directory. 967.It Ar record 968If defined, gives the pathname of the file used to record all outgoing 969mail. 970If not defined, then outgoing mail is not so saved. 971.It Ar indentprefix 972String used by the ``~m'' tilde escape for indenting messages, in place of 973the normal tab character (^I). 974Be sure to quote the value if it contains 975spaces or tabs. 976.It Ar toplines 977If defined, gives the number of lines of a message to be printed out 978with the 979.Ic top 980command; normally, the first five lines are printed. 981.El 982.Sh ENVIRONMENT 983.Nm Mail 984utilizes the 985.Ev HOME 986and 987.Ev USER 988environment variables. Also, if the 989.Ev MAIL 990environment variable is set, it is used as the 991location of the user's mailbox instead of the 992default in /var/mail. 993.Sh FILES 994.Bl -tag -width /usr/share/misc/Mail.help* -compact 995.It Pa /var/mail/* 996Post office. 997.It ~/mbox 998User's old mail. 999.It ~/.mailrc 1000File giving initial mail commands. 1001.It Pa /tmp/R* 1002Temporary files. 1003.It Pa /usr/share/misc/mail.help 1004Help files. 1005.It Pa /etc/mail.rc 1006System initialization file. 1007.El 1008.Sh SEE ALSO 1009.Xr fmt 1 , 1010.Xr newaliases 1 , 1011.Xr vacation 1 , 1012.Xr aliases 5 , 1013.Xr mailaddr 7 , 1014.Xr sendmail 8 1015and 1016.Rs 1017.%T "The Mail Reference Manual" . 1018.Re 1019.Sh HISTORY 1020A 1021.Nm 1022command 1023appeared in 1024.At v1 . 1025This man page is derived from 1026.%T "The Mail Reference Manual" 1027originally written by Kurt Shoens. 1028.Sh BUGS 1029There are some flags that are not documented here. 1030Most are 1031not useful to the general user. 1032.Pp 1033Usually, 1034.Nm mail 1035is just a link to 1036.Nm Mail , 1037which can be confusing. 1038