xref: /386bsd/usr/src/libexec/mail.local/mail.local.8 (revision a2142627)
1.\" Copyright (c) 1990 The Regents of the University of California.
2.\" 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.local.8	6.8 (Berkeley) 4/27/91
33.\"
34.Dd April 27, 1991
35.Dt MAIL.LOCAL 8
36.Os
37.Sh NAME
38.Nm mail.local
39.Nd store mail in a mailbox
40.Sh SYNOPSIS
41.Nm mail.local
42.Op Fl f Ar from
43.Ar user ...
44.Sh DESCRIPTION
45.Nm Mail.local
46reads the standard input up to an end-of-file and appends it to each
47.Ar user 's
48.Pa mail
49file.
50The
51.Ar user
52must be a valid user name.
53.Pp
54The options are as follows:
55.Bl -tag -width xxxfrom
56.It Fl f Ar from
57Specify the sender's name.
58.El
59.Pp
60Individual mail messages in the mailbox are delimited by an empty
61line followed by a line beginning with the string ``From ''.
62A line containing the string ``From '', the sender's name and a time stamp
63is prepended to each delivered mail message.
64A blank line is appended to each message.
65A greater-than character (``>'') is prepended to any line in the message
66which could be mistaken for a ``From '' delimiter line.
67.Pp
68The mail files are exclusively locked with
69.Xr flock 2
70while mail is appended.
71.Pp
72If the ``biff'' service is returned by
73.Xr getservbyname 3 ,
74the biff server is notified of delivered mail.
75.Pp
76The
77.Nm mail.local
78utility exits 0 on success, and >0 if an error occurs.
79.Sh ENVIRONMENT
80.Bl -tag -width indent
81.It Ev TZ
82Used to set the appropriate time zone on the timestamp.
83.El
84.Sh FILES
85.Bl -tag -width /tmp/local.XXXXXX -compact
86.It Pa /tmp/local.XXXXXX
87temporary files
88.It Pa /var/mail/user
89user's mailbox directory
90.El
91.Sh SEE ALSO
92.Xr mail 1 ,
93.Xr xsend 1 ,
94.Xr flock 2 ,
95.Xr getservbyname 3 ,
96.Xr comsat 8 ,
97.Xr sendmail 8
98.Sh HISTORY
99A superset of
100.Nm mail.local
101(handling mailbox reading as well as mail delivery)
102appeared in
103.At v7 .
104as the program
105.Nm mail .
106