imapext-2007

view src/tmail/tmail.1 @ 0:ada5e610ab86

imap-2007e
author yuuji@gentei.org
date Mon, 14 Sep 2009 15:17:45 +0900
parents
children
line source
1 .ig
2 * ========================================================================
3 * Copyright 1988-2007 University of Washington
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 *
12 * ========================================================================
13 ..
14 .TH TMAIL 1 "September 27, 2007"
15 .SH NAME
16 tmail \- Mail Delivery Module
17 .nh
18 .SH SYNOPSIS
19 .B tmail
20 .I [-b format] [\-D] [-f from_name] [\-I inbox_specifier] user[+folder] ...
21 .SH DESCRIPTION
22 .I tmail
23 delivers mail to a user's INBOX or a designated folder.
24 .I tmail
25 may be configured as a drop-in replacement for
26 .IR binmail (1),
27 .IR mail.local (1)
28 or any program intended for use for mail delivery by a mail delivery program
29 such as
30 .IR sendmail (8).
31 .PP
32 .I tmail
33 is intended to be used for direct delivery by the mailer daemon;
34 .IR dmail (1)
35 is the preferred tool for user applications, e.g. a mail delivery
36 filter such as
37 .IR procmail (1) .
38 If
39 .I tmail
40 is used for a user application,
41 then the calling program must be aware of the restrictions noted below.
42 .PP
43 When
44 .I tmail
45 exits, it returns exit status values to enable the mail delivery program
46 to determine whether a message was delivered successfully or had a
47 temporary (requeue for later delivery) or permanent (return to sender)
48 failure.
49 .PP
50 If the
51 .I +folder
52 extension is included in the user argument,
53 .I tmail
54 will attempt to deliver to the designated folder. If the folder does not
55 exist or the extension is not included, the message is delivered to the
56 user's INBOX.
57 If delivery is to INBOX and no INBOX currently exists,
58 .I tmail
59 will create a new INBOX, using the \fB-I\fR or \fB-b\fR flag if specified.
60 .I tmail
61 recognizes the format of an existing INBOX or folder, and appends the new
62 message in that format.
63 .PP
64 The \fB-b\fR flag specifies a format to create INBOX if INBOX does not
65 already exist. This flag requires privileges, and can not be used with
66 \fB-I\fR. The argument is
67 a format name such as mix, mbx, etc.
68 .PP
69 The \fB-D\fR flag specifies debugging; this enables additional message
70 telemetry.
71 .PP
72 The \fB-f\fR or \fB-r\fR flag is used by
73 the mail delivery program to specify a Return-Path. The header
74 .br
75 Return-Path: <\fIfrom_name\fR>
76 .br
77 is prepended to the message before delivery.
78 .PP
79 The \fB-I\fR flag is used by the mail delivery program
80 to specify an alternative INBOX name. This flag requires privileges,
81 and can not be used with \fB-b\fR. This affects the location and format
82 of INBOX. If specified, it should be in one of three forms:
83 .sp
84 The first form of argument to \fB-I\fR is the string "INBOX", which
85 means to write to the system default inbox using the system default
86 mailbox format. These system defaults are defined when the c-client
87 library is built.
88 .sp
89 The second form of argument to \fB-I\fR is a delivery specification,
90 consisting of "#driver.", a c-client mailbox format driver name, "/",
91 and a file name. This will write to the specified file in the
92 specified format. For example, #driver.mbx/INBOX will write to file
93 "INBOX" in the home directory in mbx format; and
94 #driver.unix/mail/incoming will write to file "incoming" in the
95 user's "mail" subdirectory in unix (default UNIX) format.
96 .sp
97 The third form of argument to \fB-I\fR is any other name. Normally,
98 this will write to the specified file on the user's home directory in
99 the specified format. However, certain names are special. These are:
100 .PP
101 .nf
102 value equivalant to
103 ----- -------------
104 INBOX.MTX #driver.mtx/INBOX.MTX
105 mbox #driver.unix/mbox
106 mail.txt #driver.tenex/mail.txt
107 .fi
108 .PP
109 If \fB-I\fR is not specified, the default action is \fB-I INBOX\fR.
110 .PP
111 If multiple recipients are specified on the command line,
112 .I tmail
113 spawns one child process per recipient to perform actual delivery. This
114 way of calling
115 .I tmail
116 is not recommended; see below under
117 .IR RESTRICTIONS .
118 .SH INSTALLATION
119 If
120 .I tmail
121 is to be used for mail delivery from the mail delivery program, it
122 .I must
123 be installed setuid root.
124 .sp
125 If sendmail is the mail delivery program,
126 .I tmail
127 is invoked from sendmail.cf. Look for the "Mlocal" line, and substitute
128 the path name for the
129 .I tmail
130 binary in place of /bin/mail, /usr/lib/mail.local, etc. You should also
131 add the flag to invoke
132 .I tmail
133 with CRLF style newlines; this is usually done with E=\\r\\n in the Mlocal
134 line.
135 .sp
136 Here is an example of an Mlocal line in sendmail version 8:
137 .sp
138 .nf
139 Mlocal, P=/usr/local/etc/tmail, F=lsDFMAw5:/|@qPrn+,
140 S=10/30, R=20/40, E=\\r\\n, T=DNS/RFC822/X-Unix,
141 A=tmail $u
142 .fi
143 .PP
144 If
145 .I tmail
146 is to be called with the \fB-I\fR flag, it must be invoked with both
147 real and effective UID root. Many sendmail configurations invoke the
148 local mailer as the sending user when that user is local, which
149 will prevent \fB-b\fR or \fB-I\fR from working.
150 .SH SECURITY CONSIDERATIONS
151 If
152 .I tmail
153 is invoked by an ordinary user, the Received: header line will
154 indicate the name or UID of the user that invoked it.
155 .PP
156 Ordinary users are not permitted to use the \fB-b\fR or \fB-I\fR flag since
157 otherwise a user could create any file on another user's directory.
158 .PP
159 .I tmail
160 can deliver mail to home directories. In addition,
161 .I tmail
162 can be used to deliver mail to other mail folders in a home directory
163 or an inferior directory of a home directory.
164 .SH RESTRICTIONS
165 The calling program should invoke
166 .I tmail
167 with CRLF newlines, otherwise
168 .I tmail
169 will complain in syslog.
170 .PP
171 Absolute pathnames and
172 .I ~user
173 specifications are not permitted in
174 .I +folder
175 extensions.
176 .PP
177 Ordinary users are not permitted to use the \fB-I\fR flag.
178 .PP
179 IMAP4 namespace names are not yet supported in
180 .I +folder
181 extensions.
182 .PP
183 It is not possible to use
184 .I tmail
185 to deliver to
186 .IR mh (1)
187 format mailboxes.
188 .PP
189 If delivery to multiple users is specified and delivery to any single user
190 fails, the entire delivery will be reported as having failed, even though
191 delivery to other users may have succeeded. If
192 .I tmail
193 is used for mail delivery from
194 .IR sendmail (8),
195 a separate tmail invocation should be done for each user. Otherwise a
196 delivery failure for a single user in a message going to multiple users
197 will cause multiple deliveries to all the other users every time
198 .IR sendmail (8),
199 retries.
200 .SH AUTHOR
201 Mark Crispin, MRC@CAC.Washington.EDU
202 .SH "SEE ALSO"
203 binmail(1)
204 .br
205 sendmail(8)

UW-IMAP'd extensions by yuuji