imapext-2007

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

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

UW-IMAP'd extensions by yuuji