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