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