917e271861b047503eb59b3cab0a1671f5e2f98c
[mmh] / man / send.man
1 .\"
2 .\" %nmhwarning%
3 .\" $Id$
4 .\"
5 .TH SEND %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
6 .SH NAME
7 send \- send a message
8 .SH SYNOPSIS
9 .HP 5
10 .B send
11 .RB [ \-alias
12 .IR aliasfile ]
13 .RB [ \-draft ]
14 .RB [ \-draftfolder
15 .IR +folder ]
16 .RB [ \-draftmessage
17 .IR msg ]
18 .RB [ \-nodraftfolder ]
19 .RB [ \-filter
20 .IR filterfile ]
21 .RB [ \-nofilter ]
22 .RB [ \-format " | " \-noformat ]
23 .RB [ \-forward " | " \-noforward ]
24 .RB [ \-mime " | " \-nomime ]
25 .RB [ \-msgid " | " \-nomsgid ]
26 .RB [ \-push " | " \-nopush ]
27 .RB [ \-split
28 .IR seconds ]
29 .RB [ \-verbose " | " \-noverbose ]
30 .RB [ \-watch " | " \-nowatch ]
31 .RB [ \-sasl ]
32 .RB [ \-saslmech
33 .IR mechanism ]
34 .RB [ \-user
35 .IR username ]
36 .RB [ \-width
37 .IR columns ]
38 .RB [ file
39 \&...] 
40 .RB [ \-version ]
41 .RB [ \-help ]
42 .SH DESCRIPTION
43 .B Send
44 will cause each of the specified files to be delivered
45 to each of the destinations in the \*(lqTo:\*(rq, \*(lqcc:\*(rq,
46 \*(lqBcc:\*(rq, and \*(lqFcc:\*(rq fields of the message.  If
47 .B send
48 is re\-distributing a message, as invoked from
49 .BR dist ,
50 then the
51 corresponding \*(lqResent\-xxx\*(rq fields are examined instead.
52 .PP
53 By default,
54 .B send
55 uses the program
56 .B post
57 to do the actual
58 delivery of the messages, although this can be changed by defining the
59 .I postproc
60 profile component.  Most of the features attributed to
61 .B send
62 are actually performed by
63 .BR post .
64 .PP
65 If
66 .B \-push
67 is specified,
68 .B send
69 will detach itself from the user's
70 terminal and perform its actions in the background.  If
71 .BR push 'd
72 and the draft can't be sent, then an error message will be sent (using
73 the mailproc) back to the user.  If
74 .B \-forward
75 is given, then a copy
76 of the draft will be attached to this failure notice.  Using
77 .B \-push
78 differs from putting
79 .B send
80 in the background because the output is
81 trapped and analyzed by
82 .BR nmh .
83 .PP
84 If
85 .B \-verbose
86 is specified,
87 .B send
88 will indicate the interactions
89 occurring with the transport system, prior to actual delivery.
90 If
91 .B \-watch
92 is specified
93 .B send
94 will monitor the delivery of local
95 and network mail.  Hence, by specifying both switches, a large detail
96 of information can be gathered about each step of the message's entry
97 into the transport system.
98 .PP
99 The
100 .B \-draftfolder
101 .I +folder
102 and
103 .B \-draftmessage
104 .I msg
105 switches invoke
106 the
107 .B nmh
108 draft folder facility.  This is an advanced (and highly
109 useful) feature.  Consult the
110 .BR mh-draft (5)
111 man page for more
112 information.
113 .PP
114 If
115 .B \-split
116 is specified,
117 .B send
118 will split the draft into one
119 or more partial messages prior to sending.  This makes use of the
120 MIME features in
121 .BR nmh .
122 Note however that if
123 .B send
124 is
125 invoked under
126 .BR dist ,
127 then this switch is ignored\0--\0it makes
128 no sense to redistribute a message in this fashion.  Sometimes you want
129 .B send
130 to pause after posting a partial message.  This is usually
131 the case when you are running
132 .B sendmail
133 and expect to generate a
134 lot of partial messages.  The argument to
135 .B \-split
136 tells it how long
137 to pause between postings.
138 .PP
139 .B Send
140 with no
141 .I file
142 argument will query whether the draft
143 is the intended file, whereas
144 .B \-draft
145 will suppress this question.
146 Once the transport system has successfully accepted custody of the
147 message, the file will be renamed with a leading comma, which allows
148 it to be retrieved until the next draft message is sent.  If there are
149 errors in the formatting of the message,
150 .B send
151 will abort with a
152 (hopefully) helpful error message.
153 .PP
154 If a \*(lqBcc:\*(rq field is encountered, its addresses will be used for
155 delivery, and the \*(lqBcc:\*(rq field will be removed from the message
156 sent to sighted recipients.  The blind recipients will receive an entirely
157 new message with a minimal set of headers.  Included in the body of the
158 message will be a copy of the message sent to the sighted recipients.
159 If
160 .B \-filter
161 .I filterfile
162 is specified, then this copy is filtered
163 (re\-formatted) by
164 .B mhl
165 prior to being sent to the blind recipients.
166 Alternately, if you specify the
167 .B -mime
168 switch, then
169 .B send
170 will
171 use the MIME rules for encapsulation.
172 .PP
173 Prior to sending the message, the fields \*(lqFrom:\ user@local\*(rq,
174 and \*(lqDate:\ now\*(rq will be appended to the headers in the message.
175 If the environment variable
176 .B $SIGNATURE
177 is set, then its value
178 is used as your personal name when constructing the \*(lqFrom:\*(rq
179 line of the message.  If this environment variable is not set, then
180 .B send
181 will consult the profile entry \*(lqSignature\*(rq for
182 this information.
183 If
184 .B \-msgid
185 is specified, then a \*(lqMessage\-ID:\*(rq field will also
186 be added to the message.
187 .PP
188 If
189 .B send
190 is re\-distributing a message (when invoked by
191 .BR dist ),
192 then \*(lqResent\-\*(rq will be prepended to each of these
193 fields: \*(lqFrom:\*(rq, \*(lqDate:\*(rq, and \*(lqMessage\-ID:\*(rq.
194 If the message already contains a \*(lqFrom:\*(rq field, then a
195 \*(lqSender: user@local\*(rq field will be added as well.  (An already
196 existing \*(lqSender:\*(rq field is an error!)
197 .PP
198 By using the
199 .B \-format
200 switch, each of the entries in the \*(lqTo:\*(rq
201 and \*(lqcc:\*(rq fields will be replaced with \*(lqstandard\*(rq
202 format entries.  This standard format is designed to be usable by all
203 of the message handlers on the various systems around the Internet.
204 If
205 .B \-noformat
206 is given, then headers are output exactly as they appear
207 in the message draft.
208 .PP
209 If an \*(lqFcc:\ folder\*(rq is encountered, the message will be copied
210 to the specified folder for the sender in the format in which it will
211 appear to any non\-Bcc receivers of the message.  That is, it will have
212 the appended fields and field reformatting.  The \*(lqFcc:\*(rq fields
213 will be removed from all outgoing copies of the message.
214 .PP
215 By using the
216 .B \-width
217 .I columns
218 switch, the user can direct
219 .B send
220 as to how long it should make header lines containing addresses.
221 .PP
222 If
223 .B nmh
224 has been compiled with SASL support, the
225 .B \-sasl
226 switch will enable
227 the use of SASL authentication with the SMTP MTA.  Depending on the
228 SASL mechanism used, this may require an additional password prompt from the
229 user (but the
230 .RI \*(lq \&.netrc \*(rq
231 file can be used to store this password).
232 .B \-saslmech
233 switch can be used to select a particular SASL mechanism,
234 and the the
235 .B \-user
236 switch can be used to select a authorization userid
237 to provide to SASL other than the default.
238 .PP
239 Currently SASL security layers are not supported for SMTP.
240 .BR nmh 's
241 SMTP SASL code
242 will always negotiate an unencrypted connection.  This means that while the SMTP
243 authentication can be encrypted, the subsequent data stream can not.  This is in
244 contrast to
245 .BR nmh 's
246 POP3 SASL support, where encryption is supported for both the
247 authentication and the data stream.
248 .PP
249 The files specified by the profile entry \*(lqAliasfile:\*(rq and any
250 additional alias files given by the
251 .B \-alias
252 .I aliasfile
253 switch will be
254 read (more than one file, each preceded by
255 .BR \-alias ,
256 can be named).
257 See
258 .BR mh\-alias (5)
259 for more information.
260
261 .SH FILES
262 .fc ^ ~
263 .nf
264 .ta \w'/usr/local/nmh/etc/ExtraBigFileName  'u
265 ^$HOME/\&.mh\(ruprofile~^The user profile
266 .fi
267
268 .SH "PROFILE COMPONENTS"
269 .fc ^ ~
270 .nf
271 .ta 2.4i
272 .ta \w'ExtraBigProfileName  'u
273 ^Path:~^To determine the user's nmh directory
274 ^Draft\-Folder:~^To find the default draft\-folder
275 ^Aliasfile:~^For a default alias file
276 ^Signature:~^To determine the user's mail signature
277 ^mailproc:~^Program to post failure notices
278 ^postproc:~^Program to post the message
279 .fi
280
281 .SH "SEE ALSO"
282 comp(1), dist(1), forw(1), repl(1), mh\-alias(5), post(8)
283
284 .SH DEFAULTS
285 .nf
286 .RB ` file "' defaults to <mh\-dir>/draft"
287 .RB ` \-alias "' defaults to %etcdir%/MailAliases"
288 .RB ` \-nodraftfolder '
289 .RB ` \-nofilter '
290 .RB ` \-format '
291 .RB ` \-forward '
292 .RB ` \-nomime '
293 .RB ` \-nomsgid '
294 .RB ` \-nopush '
295 .RB ` \-noverbose '
296 .RB ` \-nowatch '
297 .RB ` "\-width\ 72" '
298 .fi
299
300 .SH CONTEXT
301 None
302
303 .SH BUGS
304 Under some configurations, it is not possible to monitor the mail delivery
305 transaction;
306 .B \-watch
307 is a no-op on those systems.
308 .PP
309 Using
310 .B \-split
311 .I 0
312 doesn't work correctly.