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