1.\" Copyright (c) 1990 Regents of the University of California.
2.\" All rights reserved.  The Berkeley software License Agreement
3.\" specifies the terms and conditions for redistribution.
4.\"
5.\"     @(#)mail.local.8	6.6 (Berkeley) 06/26/90
6.\"
7.Dd
8.Dt DELIVERMAIL 8
9.Os ATT 7th
10.Sh NAME
11.Nm delivermail
12.Nd send or receive mail among users
13.Sh SYNOPSIS
14.Nm delivermail
15.Op Ic +
16.Op Fl i
17.Op Ar person
18.Op \&...
19.Nm delivermail
20.Op Ic +
21.Op Fl i
22.Fl f
23.Ar file
24.Pp
25.Sh DESCRIPTION
26Note: This is the old version 7 UNIX system mail program.  The default
27.Nm mail
28command is described in
29.Xr Mail  1  .
30.Pp
31.Nm Mail
32with no argument prints a user's mail, message-by-message,
33in last-in, first-out order; the optional argument
34.Ic +
35displays the mail messages in first-in, first-out order.
36For each message, it reads a line from the standard input
37to direct disposition of the message.
38.Tw Fl
39.Tp Li newline
40Go on to next message.
41.Tp Ic d
42Delete message and go on to the next.
43.Tp Ic p
44Print message again.
45.Tp Fl
46Go back to previous message.
47.Tc Ic s
48.Op Ar file
49.Cx \&...
50.Cx
51Save the message in the named
52.Ar files
53(`mbox' default).
54.Tc Ic w
55.Op Ar file
56.Cx \&...
57.Cx
58Save the message, without a header, in the named
59.Ar files ,
60.Pa mbox
61is the default.
62.Tc Ic m
63.Op Ar person
64.Cx \&...
65.Cx
66Mail the message to the named
67.Ar persons
68(yourself is default).
69.Tp Li EOT
70(control-D)
71Put unexamined mail back in the mailbox and stop.
72.Tp Ic q
73Same as
74.Li EOT .
75.Tc Ic \&!
76.Ar command
77.Cx
78Escape to the Shell to do
79.Ar command  .
80.Tp Ic \&*
81Print a command summary.
82.Tp
83.Pp
84An interrupt normally terminates the
85.Ar mail
86command; the mail file is unchanged.  The optional argument
87.Fl i
88tells
89.Ar mail
90to continue after interrupts.
91.Pp
92When
93.Ar persons
94are named,
95.Ar mail
96takes the standard input up to an end-of-file (or a line with just `.')
97and adds it to each
98.Sf Ar person \'s
99.Pa mail
100file.  The message is preceded by the sender's name and a postmark.
101Lines that look like postmarks are prepended with `>'.  A
102.Ar person
103is usually a user name recognized by
104.Xr login  1  .
105To denote a recipient on a remote system, prefix
106.Ar person
107by the system name and exclamation mark (see
108.Xr uucp  1  ) .
109.Pp
110The
111.Fl f
112option causes the named file, for example,
113.Pa mbox ,
114to be printed as if it were the mail file.
115.Pp
116When a user logs in he is informed of the presence of mail.
117.Sh ENVIRONMENT
118.Tw Fl
119.Tp Ev HOME
120The
121.Ev HOME
122variable is used by
123.Nm delivermail
124to find the file
125.Pa mbox.
126.Tp Ev HOSTALIASES
127Used to find host aliases.
128.Tp Ev NAME
129.Nm Delivermail
130extracts the users full name from the
131.Ev NAME
132variable.
133.Tp Ev TZ
134Used to set the appropriate time zone
135on the postmark.
136.Sh FILES
137.Dw /var/spool/mail/*
138.Di L
139.Dp Pa /etc/passwd
140to identify sender and locate persons
141.Dp Pa /var/spool/mail/*
142incoming mail for user *
143.Dp Pa mbox
144saved mail
145.Dp Pa /tmp/ma*
146temp file
147.Dp Pa dead.letter
148unmailable text
149.Dp
150.Sh SEE ALSO
151.Xr Mail 1 ,
152.Xr write 1 ,
153.Xr uucp 1 ,
154.Xr uux 1 ,
155.Xr xsend 1 ,
156.Xr sendmail 8
157.Sh HISTORY
158.Nm Delivermail
159appeared in Version 7 AT&T Unix as the program
160.Nm mail.
161.Sh BUGS
162Race conditions sometimes result in a failure to remove a lock file.
163.Pp
164Normally anybody can read your mail, unless it is sent by
165.Xr xsend  1  .
166An installation can overcome this by making
167.Nm mail
168a set-user-id command that owns the mail directory.
169