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