Cleaned up sendfiles(1) man page just a bit.
[mmh] / man / sendfiles.man
1 .TH SENDFILES %manext1% "October 21, 2012" "%nmhversion%"
2 .\"
3 .\" %nmhwarning%
4 .\"
5 .SH NAME
6 sendfiles \- send multiple files via a MIME message
7 .SH SYNOPSIS
8 .HP 5
9 .na
10 .B sendfiles
11 .RB [ -compress
12 .IR bzip2 " | " compress " | " gzip " | " lzma " | " none ]
13 .br
14 .RB [ \-from
15 .IR sender ]
16 .RI [ "\-delay n" " | " \-n ]
17 .RB [ \-version ]
18 .RB [ \-help ]
19 .br
20 .B \-to
21 .I recipient
22 .B \-subject
23 .IR subject " | "
24 .I recipient
25 .I subject
26 .br
27 .I file/directory1
28 .RI [ file/directory2
29 \&...]
30 .ad
31 .SH DESCRIPTION
32 The shell script
33 .BR sendfiles
34 is used to send a collection
35 of files and directories via electronic mail.
36 .PP
37 .B sendfiles
38 will archive the files and directories you name
39 with the
40 .B tar
41 command, and then mail the compressed
42 archive to the \*(lqrecipient\*(rq with the given \*(lqsubject\*(rq.
43 The archive
44 will be automatically split up into as many messages as necessary
45 in order to get past most mailers.
46 .PP
47 The
48 .B \-to
49 switch specifies the recipient.  The
50 .B \-subject
51 switch specifies the subject.  Alternatively, these two required values
52 can be provided without their corresponding switch names.
53 .PP
54 The
55 .B \-from
56 switch can, and should, be used to specify the sender's mailbox (name
57 and email address).  Alternatively, the
58 .B PERSON
59 environment variable can be used for the same purpose.
60 If neither is used,
61 .B sendfiles
62 will supply a \*(lqFrom:\*(rq header field using the sender's local
63 mailbox, see
64 .I localmbox
65 in
66 .IR mh-format (5).
67 .PP
68 The
69 .B \-compress
70 command line switch can be used to override the run-time determination
71 of the compression program by
72 .BR sendfiles .
73 .B \-compress
74 .I none
75 (alternatively,
76 .BR \-none )
77 disables compression.
78 .PP
79 Sometimes you want
80 .B sendfiles
81 to pause after posting a partial
82 message.  This is usually the case when you are running
83 .B sendmail
84 and expect to generate a lot of partial messages.  The
85 .B \-delay
86 switch specifies the number of seconds to pause in between postings,
87 e.g.,
88 .PP
89 .RS 5
90 sendfiles -delay 30 -to recipient -subject \*(lqsubject\*(rq files\0...
91 .RE
92 .PP
93 will pause 30 seconds in between each posting.  An alternate form of
94 the switch with just the delay time,
95 .BR \-30 ,
96 for example, is also supported.
97 .PP
98 .SS "Extracting the Received Files"
99 When these messages are received, invoke
100 .B mhstore
101 once for
102 the list of messages.  The default is for
103 .B mhstore
104 to store
105 the combined parts as a new message in the current folder, although
106 this can be changed using storage formatting strings.  You can then
107 use
108 .B mhlist
109 to find out what's inside; possibly followed by
110 .B mhstore
111 again to write the archive to a file where you can
112 subsequently uncompress and untar it.  For instance:
113 .PP
114 .RS 5
115 .nf
116 % mhlist 5-8
117  msg part  type/subtype             size description
118    5       message/partial           47K part 1 of 4
119    6       message/partial           47K part 2 of 4
120    7       message/partial           47K part 3 of 4
121    8       message/partial           18K part 4 of 4
122 % mhstore 5-8
123 reassembling partials 5,6,7,8 to folder inbox as message 9
124 % mhlist -verbose 9
125  msg part  type/subtype             size description
126    9       application/octet-stream 118K
127              (extract with uncompress | tar xvpf -)
128              type=tar
129              conversions=compress
130 % mhstore 9
131 % uncompress < 9.tar.Z | tar xvpf -
132 .fi
133 .RE
134 .PP
135 Alternately, by using the
136 .B \-auto
137 switch,
138 .B mhstore
139 will automatically do the extraction for you:
140 .PP
141 .RS 5
142 .nf
143 % mhlist 5-8
144  msg part  type/subtype             size description
145    5       message/partial           47K part 1 of 4
146    6       message/partial           47K part 2 of 4
147    7       message/partial           47K part 3 of 4
148    8       message/partial           18K part 4 of 4
149 % mhstore 5-8
150 reassembling partials 5,6,7,8 to folder inbox as message 9
151 % mhlist -verbose 9
152  msg part  type/subtype             size description
153    9       application/octet-stream 118K
154              (extract with uncompress | tar xvpf -)
155              type=tar
156              conversions=compress
157 % mhstore -auto 9
158 -- tar listing appears here as files are extracted
159 .fi
160 .RE
161 .PP
162 As the second
163 .B tar
164 listing is generated, the files are extracted.
165 A prudent user will never put
166 .B \-auto
167 in the
168 .I \&.mh\(ruprofile
169 file.  The correct procedure is to first use
170 .B mhlist
171 to find out what will be extracted.  Then
172 .B mhstore
173 can be invoked with
174 .B \-auto
175 to perform the extraction.
176 .SH FILES
177 .fc ^ ~
178 .nf
179 .ta \w'%etcdir%/ExtraBigFileName  'u
180 ^$HOME/\&.mh\(ruprofile~^The user profile
181 .fi
182 .SH "PROFILE COMPONENTS"
183 .fc ^ ~
184 .nf
185 .ta 2.4i
186 .ta \w'ExtraBigProfileName  'u
187 ^Path:~^To determine the user's nmh directory
188 ^Current\-Folder:~^To find the default current folder
189 .fi
190 .SH "SEE ALSO"
191 .IR mhbuild (1),
192 .IR mhlist (1),
193 .IR mhshow (1),
194 .IR mhstore (1),
195 .IR mh-format (5)
196 .PP
197 .I "Proposed Standard for Message Encapsulation"
198 (RFC\-934)
199 .SH DEFAULTS
200 .nf
201 .RB ` "\-delay\ 0" '
202 .RB ` "\-from localmbox" '
203 .fi
204 .SH CONTEXT
205 None