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