2edb7da1a9767f16b3a28615cc56bdee243774b5
[mmh] / man / send.man
1 .\"
2 .\" %nmhwarning%
3 .\"
4 .TH SEND %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
5 .SH NAME
6 send \- send a message
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B send
11 .RB [ \-alias
12 .IR aliasfile ]
13 .RB [ \-filter
14 .IR filterfile ]
15 .RB [ \-nofilter ]
16 .RB [ \-format " | " \-noformat ]
17 .RB [ \-forward " | " \-noforward ]
18 .RB [ \-mime " | " \-nomime ]
19 .RB [ \-msgid " | " \-nomsgid ]
20 .RB [ \-push " | " \-nopush ]
21 .RB [ \-verbose " | " \-noverbose ]
22 .RB [ \-watch " | " \-nowatch ]
23 .RB [ \-server
24 .IR servername ]
25 .RB [ \-port
26 .IR port-name/number ]
27 .RB [ \-width
28 .IR columns ]
29 .RB [ msg
30 \&...]
31 .RB [ \-version ]
32 .RB [ \-help ]
33 .RB [ \-attach
34 .IR header-field-name ]
35 .RB [ \-attachformat
36 .IR 0 " | " 1 " | " 2 ]
37 .ad
38 .SH DESCRIPTION
39 .B Send
40 will cause each of the specified messages to be delivered
41 to each of the destinations in the \*(lqTo:\*(rq, \*(lqcc:\*(rq,
42 \*(lqBcc:\*(rq, \*(lqDcc:\*(rq, and \*(lqFcc:\*(rq fields of the message.  If
43 .B send
44 is re\-distributing a message, as invoked from
45 .BR dist ,
46 then the
47 corresponding \*(lqResent\-xxx\*(rq fields are examined instead.
48 .PP
49 By default,
50 .B send
51 uses the program
52 .B post
53 to do the actual
54 delivery of the messages, although this can be changed by defining the
55 .I postproc
56 profile component.  Most of the features attributed to
57 .B send
58 are actually performed by
59 .BR post .
60
61 .PP
62 If a
63 .I header-field-name
64 is supplied using the
65 .B -attach
66 option, the draft is scanned for a header whose field name matches the
67 supplied
68 .IR header-field-name .
69 The draft is converted to a MIME message if one or more matches are found.
70 This conversion occurs before all other processing.
71 .PP
72 The first part of the MIME message is the draft body if that body contains
73 any non-blank characters.
74 The body of each header field whose name matches the
75 .I header-field-name
76 is interpreted as a file name, and each file named is included as a separate
77 part in the MIME message.
78 .PP
79 For file names with dot suffixes, the context is scanned for a
80 .I mhshow-suffix-
81 entry for that suffix.
82 The content-type for the part is taken from that context entry if a match is
83 found.
84 If no match is found or the file does not have a dot suffix, the content-type
85 is text/plain if the file contains only ASCII characters or application/octet-stream
86 if it contains characters outside of the ASCII range.
87 .PP
88 Each part contains a name attribute that is the last component of the path name.
89 A
90 .I x-unix-mode
91 attribute containing the file mode accompanies each part.
92 Finally, a description attribute is generated by running the
93 .I file
94 command on the file.
95 .PP
96 The
97 .B -attachformat
98 option specifies the MIME header field formats:  a value of
99 .B 0,
100 the default,
101 includes the
102 .I x-unix-mode
103 attribute as noted above.  A value of
104 .B 1
105 suppresses both that and the \*(lqContent-Description\*(rq header, and
106 adds a \*(lqContent-Disposition\*(rq header.  A value of
107 .B 2
108 adds the file
109 .I modification-date
110 parameter to the \*(lqContent-Disposition\*(rq header.  You can
111 specify one value in your profile, and override it for individual
112 messages at the
113 .I whatnow
114 prompt.
115 .PP
116 Here are example message part headers, for an attachment, for each of the
117 .B -attachformat
118 values:
119 .PP
120 .nf
121 -attachformat 0:
122 Content-Type: text/plain; name="VERSION"; x-unix-mode="0644";
123         charset="us-ascii"
124 Content-Description: ASCII text
125
126 -attachformat 1:
127 Content-Type: text/plain; name="VERSION"; charset="us-ascii"
128 Content-Disposition: attachment; filename="VERSION"
129
130 -attachformat 2:
131 Content-Type: text/plain; name="VERSION"; charset="us-ascii"
132 Content-Disposition: attachment; filename="VERSION"; modification-date="Mon, 19 Dec 2005 22:39:51 -0600"
133 .fi
134 .PP
135 If
136 .B \-push
137 is specified,
138 .B send
139 will detach itself from the user's
140 terminal and perform its actions in the background.  If
141 .BR push 'd
142 and the draft can't be sent, then an error message will be sent (using
143 the mailproc) back to the user.  If
144 .B \-forward
145 is given, then a copy
146 of the draft will be attached to this failure notice.  Using
147 .B \-push
148 differs from putting
149 .B send
150 in the background because the output is
151 trapped and analyzed by
152 .BR nmh .
153 .PP
154 If
155 .B \-verbose
156 is specified,
157 .B send
158 will indicate the interactions
159 occurring with the transport system, prior to actual delivery.
160 If
161 .B \-watch
162 is specified
163 .B send
164 will monitor the delivery of local
165 and network mail.  Hence, by specifying both switches, a large detail
166 of information can be gathered about each step of the message's entry
167 into the transport system.
168 .PP
169 .B Send
170 with no
171 .I msg
172 argument will send the current message in the draft folder.
173 .B Send
174 always takes messages from the draft folder.
175 (But, a
176 .I +folder
177 argument might be added in the future.)
178 Consult the
179 .BR mh-draft (5)
180 man page for more information.
181 .PP
182 Once the transport system has successfully accepted custody of the
183 message, the message will be renamed with a leading comma, which allows
184 it to be retrieved until the next draft message is sent.  If there are
185 errors in the formatting of the message,
186 .B send
187 will abort with a
188 (hopefully) helpful error message.
189 .PP
190 If a \*(lqBcc:\*(rq field is encountered, its addresses will be used for
191 delivery, and the \*(lqBcc:\*(rq field will be removed from the message
192 sent to sighted recipients.  The blind recipients will receive an entirely
193 new message with a minimal set of headers.  Included in the body of the
194 message will be a copy of the message sent to the sighted recipients.
195 .PP
196 If a \*(lqDcc:\*(rq field is encountered, its addresses will be used for
197 delivery, and the \*(lqDcc:\*(rq field will be removed from the message.  The
198 blind recipients will receive the same message sent to the sighted
199 recipients. *WARNING* Recipients listed in the \*(lqDcc:\*(rq field receive no
200 explicit indication that they have received a \*(lqblind copy\*(rq.
201 This can cause blind recipients to
202 inadvertently reply to all of the sighted recipients of the
203 original message, revealing that they received a blind copy.
204 On the other hand, since a normal reply to a message sent
205 via a \*(lqBcc:\*(rq field
206 will generate a reply only to the sender of the original message,
207 it takes extra effort in most mailers to reply to the included
208 message, and so would usually only be done deliberately, rather
209 than by accident.
210 .PP
211 If
212 .B \-filter
213 .I filterfile
214 is specified, then this copy is filtered
215 (re\-formatted) by
216 .B mhl
217 prior to being sent to the blind recipients.
218 Alternately, if you specify the
219 .B -mime
220 switch, then
221 .B send
222 will
223 use the MIME rules for encapsulation.
224 .PP
225 Prior to sending the message, the fields \*(lqFrom:\ user@local\*(rq,
226 and \*(lqDate:\ now\*(rq will be appended to the headers in the message.
227 If the environment variable
228 .B $SIGNATURE
229 is set, then its value
230 is used as your personal name when constructing the \*(lqFrom:\*(rq
231 line of the message.  If this environment variable is not set, then
232 .B send
233 will consult the profile entry \*(lqSignature\*(rq for
234 this information.
235 If
236 .B \-msgid
237 is specified, then a \*(lqMessage\-ID:\*(rq field will also
238 be added to the message.
239 .PP
240 If
241 .B send
242 is re\-distributing a message (when invoked by
243 .BR dist ),
244 then \*(lqResent\-\*(rq will be prepended to each of these
245 fields: \*(lqFrom:\*(rq, \*(lqDate:\*(rq, and \*(lqMessage\-ID:\*(rq.
246 If the message already contains a \*(lqFrom:\*(rq field, then a
247 \*(lqSender: user@local\*(rq field will be added as well.  (An already
248 existing \*(lqSender:\*(rq field is an error!)
249 .PP
250 By using the
251 .B \-format
252 switch, each of the entries in the \*(lqTo:\*(rq
253 and \*(lqcc:\*(rq fields will be replaced with \*(lqstandard\*(rq
254 format entries.  This standard format is designed to be usable by all
255 of the message handlers on the various systems around the Internet.
256 If
257 .B \-noformat
258 is given, then headers are output exactly as they appear
259 in the message draft.
260 .PP
261 If an \*(lqFcc:\ folder\*(rq is encountered, the message will be copied
262 to the specified folder for the sender in the format in which it will
263 appear to any non\-Bcc receivers of the message.  That is, it will have
264 the appended fields and field reformatting.  The \*(lqFcc:\*(rq fields
265 will be removed from all outgoing copies of the message.
266 .PP
267 By using the
268 .B \-width
269 .I columns
270 switch, the user can direct
271 .B send
272 as to how long it should make header lines containing addresses.
273 .PP
274 If nmh is using the SMTP MTA, the
275 .B \-server
276 and the
277 .B \-port
278 switches can be used to override the default mail server (defined by the
279 .RI servers
280 entry in
281 .I %etcdir%/mts.conf
282 ).
283 .PP
284 The files specified by the profile entry \*(lqAliasfile:\*(rq and any
285 additional alias files given by the
286 .B \-alias
287 .I aliasfile
288 switch will be
289 read (more than one file, each preceded by
290 .BR \-alias ,
291 can be named).
292 See
293 .BR mh\-alias (5)
294 for more information.
295
296 .SH FILES
297 .fc ^ ~
298 .nf
299 .ta \w'%etcdir%/ExtraBigFileName  'u
300 ^$HOME/\&.mh\(ruprofile~^The user profile
301 ^<mh\-dir>/drafts~^The draft folder
302 .fi
303
304 .SH "PROFILE COMPONENTS"
305 .fc ^ ~
306 .nf
307 .ta 2.4i
308 .ta \w'ExtraBigProfileName  'u
309 ^Path:~^To determine the user's nmh directory
310 ^Draft\-Folder:~^To set the default draft\-folder
311 ^Aliasfile:~^For a default alias file
312 ^Signature:~^To determine the user's mail signature
313 ^mailproc:~^Program to post failure notices
314 ^postproc:~^Program to post the message
315 .fi
316
317 .SH "SEE ALSO"
318 comp(1), dist(1), forw(1), repl(1), mh\-alias(5), post(8)
319
320 .SH DEFAULTS
321 .nf
322 .RB ` msg "' defaults to the current message in the draft folder"
323 .RB ` \-alias "' defaults to %etcdir%/MailAliases"
324 .RB ` \-nofilter '
325 .RB ` \-format '
326 .RB ` \-forward '
327 .RB ` \-nomime '
328 .RB ` \-nomsgid '
329 .RB ` \-nopush '
330 .RB ` \-noverbose '
331 .RB ` \-nowatch '
332 .RB ` "\-width\ 72" '
333 .RB ` "\-attachformat\ 0" '
334 .fi
335
336 .SH CONTEXT
337 None
338
339 .SH BUGS
340 Under some configurations, it is not possible to monitor the mail delivery
341 transaction;
342 .B \-watch
343 is a no-op on those systems.