]> CyberLeo.Net >> Repos - FreeBSD/releng/8.1.git/blob - contrib/sendmail/mail.local/mail.local.8
Copy stable/8 to releng/8.1 in preparation for 8.1-RC1.
[FreeBSD/releng/8.1.git] / contrib / sendmail / mail.local / mail.local.8
1 .\" Copyright (c) 1998-2001, 2003 Sendmail, Inc. and its suppliers.
2 .\"      All rights reserved.
3 .\" Copyright (c) 1990, 1993
4 .\"     The Regents of the University of California.  All rights reserved.
5 .\"
6 .\" By using this file, you agree to the terms and conditions set
7 .\" forth in the LICENSE file which can be found at the top level of
8 .\" the sendmail distribution.
9 .\"
10 .\"
11 .\"     $Id: mail.local.8,v 8.25 2003/10/20 20:26:51 ca Exp $
12 .\"
13 .TH MAIL.LOCAL 8 "$Date: 2003/10/20 20:26:51 $"
14 .SH NAME
15 mail.local
16 \- store mail in a mailbox
17 .SH SYNOPSIS
18 .B mail.local
19 .RB [ \-7 "] [" \-B "] [" \-b "] [" \-d "] [" \-D
20 .IR mbdb ]
21 .RB [ \-l "] [" \-s "] [" \-f 
22 \fIfrom\fR|\fB\-r\fR
23 .IR from ]
24 .RB [ \-h
25 \fIfilename\fR ]
26 .I "user ..."
27 .SH DESCRIPTION
28 .B Mail.local
29 reads the standard input up to an end-of-file and appends it to each
30 .I user's
31 .B mail 
32 file.  The
33 .I user
34 must be a valid user name.
35 .PP
36 The options are as follows:
37 .TP 1i
38 .B \-7
39 Do not advertise 8BITMIME support in LMTP mode.
40 .TP 
41 .B \-B
42 Turn off the attempts to notify the
43 .Dq biff
44 service.
45 .TP 
46 .B \-b
47 Return a permanent error instead of a temporary error
48 if a mailbox exceeds quota.
49 .TP 
50 .B \-d
51 Specify this is a delivery (for backward compatibility).
52 This option has no effect.
53 .TP 
54 .BI \-D " mbdb"
55 Specify the name of the mailbox database
56 which is used to look up local recipient names.
57 This option defaults to "pw", which means use getpwnam().
58 .TP 
59 .BI \-f " from"
60 Specify the sender's name.
61 .TP
62 .B \-l
63 Turn on LMTP mode.
64 .TP
65 .B \-s
66 Turn off the
67 .Xr fsync 2
68 call that forces the mailbox to be committed to disk before returning a
69 .Dq success
70 status.
71 .TP 
72 .BI \-r " from"
73 Specify the sender's name (for backward compatibility).
74 Same as \-f.
75 .TP
76 .BI \-h " filename"
77 Store incoming mail in \fIfilename\fR in the user's home directory instead
78 of a system mail spool directory.
79 .PP
80 The next options are only available if
81 .B mail.local
82 has been compiled with -DHASHSPOOL.
83 .TP
84 .BI \-H " hashtypehashdepth"
85 Select hashed mail directories.
86 Valid hash types are
87 .B u
88 for user name and
89 .B m
90 for MD5 (requires compilation with -DHASHSPOOLMD5).
91 Example:
92 .BI \-H " u2"
93 selects user name hashing with a hash depth of 2.
94 Note: there must be no space between the hash type and the depth.
95 .TP
96 .BI \-p " path"
97 Specify an alternate mail spool path.
98 .TP
99 .BI \-n
100 Specify that the domain part of recipient addresses in LMTP mode
101 should not be stripped.
102 .PP
103 Individual mail messages in the mailbox are delimited by an empty
104 line followed by a line beginning with the string ``From ''.
105 A line containing the string ``From '', the sender's name and a time stamp
106 is prepended to each delivered mail message.
107 A blank line is appended to each message.
108 A greater-than character (``>'') is prepended to any line in the message
109 which could be mistaken for a ``From '' delimiter line
110 (that is,
111 a line beginning with the five characters
112 ``From '' following a blank line).
113 .PP
114 The mail files are exclusively locked with 
115 flock(2) 
116 while mail is appended, 
117 and a
118 .B user.lock
119 file also is created while the mailbox is locked 
120 for compatibility with older MUAs.
121 .PP
122 If the ``biff'' service is returned by 
123 getservbyname(3), 
124 the biff server is notified of delivered mail.
125 .PP
126 The
127 .B mail.local
128 utility exits 0 on success, and >0 if an error occurs.
129 .SH ENVIRONMENT
130 .IP TZ
131 Used to set the appropriate time zone on the timestamp.
132 .SH FILES
133 .PD 0.2v
134 .TP 2.2i
135 /tmp/local.XXXXXX
136 temporary files
137 .TP
138 /var/mail/user
139 user's default mailbox directory
140 .TP 
141 /var/mail/user.lock
142 lock file for a user's default mailbox
143 .PD
144 .SH SEE ALSO
145 mail(1), 
146 flock(2), 
147 getservbyname(3), 
148 comsat(8), 
149 sendmail(8)
150 .SH WARNING
151 .B mail.local
152 escapes only "^From " lines that follow an empty line.
153 If all lines starting with "From " should be escaped,
154 use the 'E' flag for the local mailer in the
155 sendmail.cf file.
156 .SH HISTORY
157 A superset of
158 .B mail.local
159 (handling mailbox reading as well as mail delivery)
160 appeared in 
161 Version 7 AT&T UNIX 
162 as the program
163 .BR mail .
164 .\" $FreeBSD$