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