]> diplodocus.org Git - nmh/blob - docs/historical/mh-jun-1982/man/deliver.8
add documentation on friendly function
[nmh] / docs / historical / mh-jun-1982 / man / deliver.8
1 .TH DELIVER 8 RAND
2 .SH NAME
3 deliver \- deliver a message
4 .SH SYNOPSIS
5 .B /etc/mh/deliver
6 [\fB\-deliver\fR user]
7 [\fB\-verbose\fR] [\fB\-format\fR] [\fB\-msgid\fR]
8 [\fB\-help\fR] [\fB\-noverbose\fR] [\fB\-noformat\fR] [\fB\-nomsgid\fR] file
9 .SH DESCRIPTION
10 .I Deliver
11 is the program called by
12 .I send(1)
13 to deliver the message in
14 .I file
15 to a local or remote user. In fact,
16 all of the functions attributed to
17 .I send
18 on its manual page are peformed by
19 .I deliver,
20 with
21 .I send
22 acting as a relatively simple preprocessor. Thus, it is
23 .I deliver
24 which parses the various header fields, appends From: and
25 Date: lines, and maintains the correct locking on maildrop
26 files.
27 .I Deliver
28 will not normally be called directly by the user.
29 .PP
30 .I Deliver
31 searches the ``To:'', ``Bcc:'', and ``Fcc:'' header lines of
32 the specified message for destination addresses, checks these
33 addresses for validity, and formats them so as to conform to
34 Arpanet Mail protocol, unless the
35 .I \-noformat
36 flag is set. This will normally cause ``AT local-site'' to
37 be appended to each local destination address, as well
38 as any local return addresses.. Destinations are
39 of three types:
40 .PP
41 LOCAL MAIL (e.g. ``To: root''): The message is appended to the
42 appropriate mailbox. The specified name may be mapped
43 into a different user name if it matches an entry in the
44 file /etc/MailAlias. See mh-alias(5) for additional details on the
45 aliasing system..
46 If the recipient user's home directory contains an
47 executable or shell file named .mh\(rureceive, that program will be
48 called via
49
50 execlp (prog, prog, tmpfil, mail, home, alias, 0)
51
52 where prog is the receive program, tmpfil is a file in
53 /usr/tmp which is the mail to be received, mail is the path of
54 the user's mail drop (/usr/spool/mail/name), home is the
55 $HOME directory of the user, and alias is the string that matched
56 the first in a sequence of local aliases. File descriptor 3 will have
57 tmpfil opened on it read only. These are all the RECEIVER'S
58 parameters, not the sender's. Also, the environment is set up
59 with appropriate values for HOME and USER.
60 .PP
61 ARPANET MAIL (e.g. ``To: root@bbn-unix''): A copy of the message is
62 left as a uniquely-named file
63 in the Arpanet mail queue directory (/usr/spool/netmail/),
64 with the text prepended
65 by a list of the network addresses of the recipients. The
66 format of this queue file is given in
67 .I netmail(5).
68 The file is picked up by an Arpanet mailer daemon (
69 .I mailer(8)
70 )
71 for later processing.
72 .PP
73 UUCP MAIL (e.g. ``To: ucbvax!root''): Uux(1) is forked with the
74 .I file
75 as
76 its standard input, so as to execute mail(1) at the remote site.
77 Thus, a message with a field such as given in the example would
78 be given as standard input with a command line of
79
80 uux \- ucbvax!rmail root
81
82 Rmail is assumed to be linked to mail(1) (or an equivalent program
83 such as the UC Berkeley or Bell mail programs)
84 so as to correctly deliver the
85 message at the remote site.
86 .PP
87 It is possible to have all three types of destinations in the various
88 destination fields of the message; each destination is processed
89 separately. It is also possible to mix destinations from the
90 two delivery networks. For example, one might specify a destination
91 of ``csvax!root@Berkeley''. However, there is an ambiguity here as
92 to whether
93 .I deliver
94 should attempt to use the Arpanet to send the message to Berkeley
95 with ``csvax!root'' as the recipient, or whether it should use uux
96 to tell csvax to deliver mail to ``root@Berkeley''. The choice
97 is determined by a compile-time constant which tells whether
98 or not the local machine is on the Arpanet. If it is, the message
99 is sent via the Arpanet to the remote host, which presumably
100 forwards the message via uux. Otherwise the at-sign is given
101 no special treatment,
102 and the message is sent via uux.
103 .PP
104 If the
105 .B \-deliver
106 flag is set,
107 .I deliver
108 will attempt to send the message to the appropriate user
109 with no formatting or header processing. As this is primarily
110 for the use of the
111 .I rmail(1)
112 command, use of this flag is restricted to the super-user.
113 .ta 2.4i
114 .SH FILES
115 /usr/spool/mail/* Recipient mail drop
116 .br
117 /usr/spool/locks/* Lockout for the mail drop
118 .br
119 /usr/spool/netmail/* Arpanet mail queue
120 .br
121 /usr/spool/mailt/* Arpanet temp mail queue
122 .br
123 /usr/tmp/mh/locsXXXX.tmpTemporary local output file
124 .br
125 /usr/tmp/mh/uulcXXXX.tmpTemporary uucp output file
126 .br
127 /etc/MailAliases Alias list
128 .SH PROFILE COMPONENTS
129 fileproc: Used for Fcc: processing
130 .SH SEE ALSO
131 \fIThe MH Message Handling System: User's Manual\fR
132 by B. Borden, R. Gaines, and N. Shapiro
133 .br
134 \fIStandard for the Format of ARPA Network Test Messages\fR
135 by D. Crocker, J. Vittal, K. Pogran, and D. Henderson, Jr.
136 .br
137 send(1)
138 .br
139 mail(1)
140 .br
141 rmail(1)
142 .br
143 uux(1)
144 .br
145 netmail(5)
146 .br
147 mh-mail(5)
148 .br
149 mh-alias(5)
150 .SH DEFAULTS
151 .br
152 `\-noverbose'
153 .br
154 `\-format'
155 .br
156 `\-nomsgid'
157 .SH BUGS
158 If the message is going through a series of hops (say, via UUCP links),
159 the "From" field will not be adequate for a reply. Deliver should,
160 but currently does not, formulate a "Reply-to:" field for such
161 compicated cases.