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