1TMAIL(1)                    General Commands Manual                   TMAIL(1)
2
3
4

NAME

6       tmail - Mail Delivery Module
7

SYNOPSIS

9       tmail   [-b   format]   [-D]   [-f   from_name]   [-I  inbox_specifier]
10       user[+folder] ...
11

DESCRIPTION

13       tmail delivers mail to a user's INBOX or a  designated  folder.   tmail
14       may   be   configured   as   a   drop-in  replacement  for  binmail(1),
15       mail.local(1) or any program intended for use for mail  delivery  by  a
16       mail delivery program such as sendmail(8).
17
18       tmail  is intended to be used for direct delivery by the mailer daemon;
19       dmail(1) is the preferred tool  for  user  applications,  e.g.  a  mail
20       delivery  filter  such  as  procmail(1).   If  tmail is used for a user
21       application, then the calling program must be aware of the restrictions
22       noted below.
23
24       When  tmail  exits,  it  returns  exit status values to enable the mail
25       delivery  program  to  determine  whether  a  message   was   delivered
26       successfully  or  had  a  temporary  (requeue  for  later  delivery) or
27       permanent (return to sender) failure.
28
29       If the +folder extension is included in the user argument,  tmail  will
30       attempt  to  deliver  to the designated folder.  If the folder does not
31       exist or the extension is not included, the message is delivered to the
32       user's  INBOX.   If delivery is to INBOX and no INBOX currently exists,
33       tmail will create a new INBOX, using the -I or -b  flag  if  specified.
34       tmail recognizes the format of an existing INBOX or folder, and appends
35       the new message in that format.
36
37       The -b flag specifies a format  to  create  INBOX  if  INBOX  does  not
38       already exist.  This flag requires privileges, and can not be used with
39       -I.  The argument is a format name such as mix, mbx, etc.
40
41       The -D  flag  specifies  debugging;  this  enables  additional  message
42       telemetry.
43
44       The  -f  or  -r  flag is used by the mail delivery program to specify a
45       Return-Path.  The header
46          Return-Path: <from_name>
47       is prepended to the message before delivery.
48
49       The -I flag is  used  by  the  mail  delivery  program  to  specify  an
50       alternative  INBOX name.  This flag requires privileges, and can not be
51       used with -b.  This affects the  location  and  format  of  INBOX.   If
52       specified, it should be in one of three forms:
53
54       The  first form of argument to -I is the string "INBOX", which means to
55       write to the system default inbox  using  the  system  default  mailbox
56       format.  These system defaults are defined when the c-client library is
57       built.
58
59       The second  form  of  argument  to  -I  is  a  delivery  specification,
60       consisting  of  "#driver.", a c-client mailbox format driver name, "/",
61       and a file name.   This  will  write  to  the  specified  file  in  the
62       specified  format.   For  example, #driver.mbx/INBOX will write to file
63       "INBOX"   in    the    home    directory    in    mbx    format;    and
64       #driver.unix/mail/incoming  will write to file "incoming" in the user's
65       "mail" subdirectory in unix (default UNIX) format.
66
67       The third form of argument to -I is any  other  name.   Normally,  this
68       will  write  to  the specified file on the user's home directory in the
69       specified format.  However, certain names are special.  These are:
70
71         value       equivalant to
72         -----       -------------
73         INBOX.MTX   #driver.mtx/INBOX.MTX
74         mbox        #driver.unix/mbox
75         mail.txt    #driver.tenex/mail.txt
76
77       If -I is not specified, the default action is -I INBOX.
78
79       If multiple recipients are specified on the command line, tmail  spawns
80       one  child  process per recipient to perform actual delivery.  This way
81       of calling tmail is not recommended; see below under RESTRICTIONS.
82

INSTALLATION

84       If tmail is to be  used  for  mail  delivery  from  the  mail  delivery
85       program, it must be installed setuid root.
86
87       If  sendmail  is  the  mail  delivery  program,  tmail  is invoked from
88       sendmail.cf.  Look for the "Mlocal" line, and substitute the path  name
89       for  the  tmail binary in place of /bin/mail, /usr/lib/mail.local, etc.
90       You should also add the flag to invoke tmail with CRLF style  newlines;
91       this is usually done with E=\r\n in the Mlocal line.
92
93       Here is an example of an Mlocal line in sendmail version 8:
94
95       Mlocal, P=/usr/local/etc/tmail, F=lsDFMAw5:/|@qPrn+,
96         S=10/30, R=20/40, E=\r\n, T=DNS/RFC822/X-Unix,
97         A=tmail $u
98
99       If tmail is to be called with the -I flag, it must be invoked with both
100       real and effective UID root.  Many sendmail configurations  invoke  the
101       local  mailer  as  the sending user when that user is local, which will
102       prevent -b or -I from working.
103

SECURITY CONSIDERATIONS

105       If tmail is invoked by an ordinary user, the Received: header line will
106       indicate the name or UID of the user that invoked it.
107
108       Ordinary  users  are  not  permitted  to  use  the  -b or -I flag since
109       otherwise a user could create any file on another user's directory.
110
111       tmail can deliver mail to home directories.  In addition, tmail can  be
112       used  to  deliver  mail to other mail folders in a home directory or an
113       inferior directory of a home directory.
114

RESTRICTIONS

116       The calling program should invoke tmail with CRLF  newlines,  otherwise
117       tmail will complain in syslog.
118
119       Absolute  pathnames  and  ~user  specifications  are  not  permitted in
120       +folder extensions.
121
122       Ordinary users are not permitted to use the -I flag.
123
124       IMAP4 namespace names are not yet supported in +folder extensions.
125
126       It is not possible to use tmail to deliver to mh(1) format mailboxes.
127
128       If delivery to multiple users is specified and delivery to  any  single
129       user fails, the entire delivery will be reported as having failed, even
130       though delivery to other users may have succeeded.  If  tmail  is  used
131       for  mail delivery from sendmail(8), a separate tmail invocation should
132       be done for each user.  Otherwise a delivery failure for a single  user
133       in  a message going to multiple users will cause multiple deliveries to
134       all the other users every time sendmail(8), retries.
135

AUTHOR

137       Mark Crispin, MRC@CAC.Washington.EDU
138

SEE ALSO

140       binmail(1)
141       sendmail(8)
142
143
144
145                              September 27, 2007                      TMAIL(1)
Impressum