Import sendmail 8.13.4 into a new contrib directory as the first step
[dragonfly.git] / contrib / sendmail-8.13.4 / 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 "] [" \-d "] [" \-D
20 .IR mbdb ]
21 .RB [ \-l "] [" \-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 Return a permanent error instead of a temporary error
43 if a mailbox exceeds quota.
44 .TP 
45 .B \-d
46 Specify this is a delivery (for backward compatibility).
47 This option has no effect.
48 .TP 
49 .BI \-D " mbdb"
50 Specify the name of the mailbox database
51 which is used to look up local recipient names.
52 This option defaults to "pw", which means use getpwnam().
53 .TP 
54 .BI \-f " from"
55 Specify the sender's name.
56 .TP
57 .B \-l
58 Turn on LMTP mode.
59 .TP 
60 .BI \-r " from"
61 Specify the sender's name (for backward compatibility).
62 Same as \-f.
63 .TP
64 .BI \-h " filename"
65 Store incoming mail in \fIfilename\fR in the user's home directory instead
66 of a system mail spool directory.
67 .PP
68 The next options are only available if
69 .B mail.local
70 has been compiled with -DHASHSPOOL.
71 .TP
72 .BI \-H " hashtypehashdepth"
73 Select hashed mail directories.
74 Valid hash types are
75 .B u
76 for user name and
77 .B m
78 for MD5 (requires compilation with -DHASHSPOOLMD5).
79 Example:
80 .BI \-H " u2"
81 selects user name hashing with a hash depth of 2.
82 Note: there must be no space between the hash type and the depth.
83 .TP
84 .BI \-p " path"
85 Specify an alternate mail spool path.
86 .TP
87 .BI \-n
88 Specify that the domain part of recipient addresses in LMTP mode
89 should not be stripped.
90 .PP
91 Individual mail messages in the mailbox are delimited by an empty
92 line followed by a line beginning with the string ``From ''.
93 A line containing the string ``From '', the sender's name and a time stamp
94 is prepended to each delivered mail message.
95 A blank line is appended to each message.
96 A greater-than character (``>'') is prepended to any line in the message
97 which could be mistaken for a ``From '' delimiter line
98 (that is,
99 a line beginning with the five characters
100 ``From '' following a blank line).
101 .PP
102 The mail files are exclusively locked with 
103 flock(2) 
104 while mail is appended, 
105 and a
106 .B user.lock
107 file also is created while the mailbox is locked 
108 for compatibility with older MUAs.
109 .PP
110 If the ``biff'' service is returned by 
111 getservbyname(3), 
112 the biff server is notified of delivered mail.
113 .PP
114 The
115 .B mail.local
116 utility exits 0 on success, and >0 if an error occurs.
117 .SH ENVIRONMENT
118 .IP TZ
119 Used to set the appropriate time zone on the timestamp.
120 .SH FILES
121 .PD 0.2v
122 .TP 2.2i
123 /tmp/local.XXXXXX
124 temporary files
125 .TP
126 /var/mail/user
127 user's default mailbox directory
128 .TP 
129 /var/mail/user.lock
130 lock file for a user's default mailbox
131 .PD
132 .SH SEE ALSO
133 mail(1), 
134 xsend(1), 
135 flock(2), 
136 getservbyname(3), 
137 comsat(8), 
138 sendmail(8)
139 .SH WARNING
140 .B mail.local
141 escapes only "^From " lines that follow an empty line.
142 If all lines starting with "From " should be escaped,
143 use the 'E' flag for the local mailer in the
144 sendmail.cf file.
145 .SH HISTORY
146 A superset of
147 .B mail.local
148 (handling mailbox reading as well as mail delivery)
149 appeared in 
150 Version 7 AT&T UNIX 
151 as the program
152 .BR mail .