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