|
|
1.1 root 1: .TH MAIL 1
2: .CT 1 comm_users
3: .SH NAME
4: mail \(mi send or receive mail
5: .SH SYNOPSIS
6: .B mail
7: [
8: .B -mpren
9: ]
10: [
11: .B -f
12: .I file
13: ]
14: .PP
15: .B mail
16: [
17: .B -#
18: ]
19: .I person ...
20: .PP
21: .B mail
22: .PP
23: .B /usr/lib/upas/gone.fishing
24: [
25: .I mesg
26: ]
27: .SH DESCRIPTION
28: .SS "Printing Mail"
29: When
30: .I persons
31: are not named,
32: .I mail
33: displays your incoming computer mail.
34: The options are:
35: .TP
36: .B -r
37: Print mail in first-in, first-out order.
38: .PD 0
39: .TP
40: .B -p
41: Print all the mail messages without prompting for commands.
42: .TP
43: .B -m
44: Use a manual style of interface, i.e., print no messages unless directed to.
45: .TP
46: .BI -f " file"
47: Use
48: .IR file ,
49: e.g.
50: .LR mbox ,
51: as if it were the mailbox.
52: .TP
53: .B -e
54: Check silently if there is anything in the mailbox;
55: return zero (true) if so, non-zero otherwise.
56: .TP
57: .B -n
58: Announce mail to the control terminal when it arrives.
59: Do not print mail now.
60: .PD
61: .PP
62: .I Mail
63: prints a user's mail, message by message,
64: prompting between messages.
65: After printing a prompt
66: .I mail
67: reads a line from the standard input
68: to direct disposition of the message.
69: Commands, as in
70: .IR ed (1),
71: are of the form
72: .RI `[ range ]
73: .I command
74: .RI [ arguments ]'.
75: The command is applied to each message in the (optional) range
76: addressed by message number and/or regular expressions
77: in the style of
78: .IR ed (1).
79: A regular expression in slashes searches among header
80: (postmark) lines; an expression in backslashes searches on
81: message content.
82: .TP 1.1i
83: .I address
84: to indicate a single message header
85: .PD0
86: .TP
87: .IB address , address
88: to indicate a range of contiguous message headers
89: .TP
90: .BI g/ expression /
91: to indicate all message headers matching the regular
92: .I expression.
93: .PD
94: .PP
95: The commands are:
96: .PD 0
97: .TP 1.1i
98: .B b
99: Print the headers for the next ten messages.
100: .TP
101: .B d
102: Mark message for deletion on exiting mail.
103: .TP
104: .B h
105: Print the disposition, size in characters, and header line of the message.
106: .TP
107: .BI m " person ...
108: Mail the message to the named
109: .I persons.
110: .TP
111: .BI M " person ...
112: Same as
113: .BI m
114: except that lines typed
115: on the terminal (terminated by
116: .B EOT or
117: .LR . )
118: are prepended to the message.
119: .TP
120: .B p
121: Print message. An interrupt stops the printing.
122: .TP
123: .B r
124: Reply to the sender of the message.
125: .TP
126: .B R
127: Like
128: .L r
129: but with the message
130: appended to the reply.
131: .TP
132: .BI s " file"
133: (Save) Append the message to the named
134: .I file
135: .RL ( mbox
136: default, in
137: .B HOME
138: directory if known, see
139: .IR environ (5)).
140: .TP
141: .B q
142: Put undeleted mail back in the mailbox and stop.
143: .TP
144: EOT (control-D)
145: Same as
146: .LR q .
147: .TP
148: .BI w " file
149: Same as
150: .B s
151: with the mail header line(s) stripped.
152: .TP
153: .B u
154: Remove mark for deletion.
155: .TP
156: .B x
157: Exit, without changing the mailbox file.
158: .TP
159: .B ?
160: Print a command summary.
161: .TP
162: .BI | command
163: Run the
164: .I command
165: with the message as standard input.
166: .TP
167: .BI ! command
168: Escape to the shell to do
169: .I command.
170: .TP
171: .B \&=
172: Print the number of the current message.
173: .PD
174: .ne 5
175: .SS "Sending Mail
176: .PP
177: When
178: .I persons
179: are named,
180: .I mail
181: takes the standard input up to an end-of-file,
182: or (if input is from a terminal) to a line consisting of a single
183: .L .
184: and adds it to each
185: .I person's
186: mailbox.
187: The message is automatically postmarked with the
188: sender's name and date.
189: Lines that look like postmarks are
190: prefixed with
191: .LR > .
192: .PP
193: .I Person
194: is a login name on the local system or a
195: network name for a remote system; see
196: .IR mail (6).
197: .PP
198: Option
199: .B -#
200: does not send mail, but reports instead
201: how the mail would be sent: the sender,
202: the next machine to handle the mail, and the recipient's
203: address relative to that machine.
204: The report reflects address translation; see
205: .IR mail (6)
206: and
207: .IR upas (8).
208: .PP
209: .IR Sh (1)
210: and
211: .IR vismon (9.1)
212: have mechanisms for timely notification of incoming mail.
213: .SS Mailboxes
214: Each user
215: owns a mailbox for incoming mail, normally
216: .BI /usr/spool/mail/ person.
217: .I Mail
218: creates mailboxes as necessary, and never removes them.
219: Mailboxes are created readable but not writable by others.
220: For more privacy, a mailbox's owner may make it unreadable; see
221: .IR chmod (2).
222: .PP
223: If a mailbox contains the sole line
224: .IP
225: .B Forward to
226: .I name,
227: .LP
228: mail for that mailbox is sent instead to
229: .I name.
230: .I Name
231: may be a list of names.
232: If the mailbox contains
233: .IP
234: .B Pipe to
235: .I command
236: .LP
237: the mail is sent to the standard input of
238: .I command
239: instead of being appended to the mailbox.
240: The command is run with the userid and
241: groupid of the mailbox's owner.
242: (On System V machines, the set userid bit must be set.)
243: .PP
244: .I Mail
245: checks centralized forwarding lists before looking in mailboxes.
246: If you have accounts on many machines, but wish to receive
247: mail on only one, it is usually easier to register
248: in forwarding lists than to install
249: .L Forward to
250: in many mailboxes; see
251: .IR upas (8).
252: .PP
253: To use
254: .I mail
255: as an answering machine while you are away,
256: replace the contents of your mailbox
257: with a single line like
258: .IP
259: .BI "Pipe to /usr/lib/upas/gone.fishing /usr/" you / mesg
260: .LP
261: The
262: .I mesg
263: file will be sent (just once) to everyone who
264: sends you mail; arriving messages will be collected in
265: .B gone.mail
266: in your home directory.
267: If you do not name a
268: .I mesg
269: file,
270: .FR /usr/lib/upas/gone.msg
271: will be used by default.
272: .SH FILES
273: .TF /usr/spool/mail/mail.log
274: .TP
275: .F /usr/spool/mail/mail.log
276: mail log file
277: .TP
278: .F /usr/spool/mail/*
279: mailboxes
280: .TP
281: .F /etc/passwd
282: to identify sender and locate persons
283: .TP
284: .F $HOME/mbox
285: saved mail
286: .TP
287: .F $HOME/dead.letter
288: unmailable text
289: .TP
290: .F /usr/lib/upas/edmail
291: the program for editing mail
292: .TP
293: .F /usr/lib/upas/send
294: the program for sending mail
295: .TP
296: .F /bin/rmail
297: a link to
298: .FR /bin/mail ,
299: used to receive remote mail
300: .TP
301: .F /usr/lib/upas/gone.msg
302: .TP
303: .F $HOME/gone.mail
304: .TP
305: .F $HOME/gone.addrs
306: list of senders answered by
307: .I gone.fishing
308: .SH "SEE ALSO"
309: .IR mailx (1),
310: .IR write (1),
311: .IR vismon (9.1),
312: .IR uucp (1),
313: .IR mail (6),
314: .IR upas (8),
315: .IR smtp (8)
316: .SH BUGS
317: Long headers are truncated for header search.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.