9b642e045bde5ead7678bcfd78e108287dade46f
[mmh] / man / sendfiles.man
1 .\"
2 .\" %nmhwarning%
3 .\" $Id$
4 .\"
5 .TH SENDFILES %manext1% "%nmhdate%" MH.6.8 [%nmhversion%]
6 .SH NAME
7 sendfiles \- send multiple files via a MIME message
8 .SH SYNOPSIS
9 .HP
10 .B sendfiles
11 .RB [ delay ]
12 .I mailpath
13 .I subject
14 .I file1
15 .RI [ file2
16 \&...]
17 .SH DESCRIPTION
18 The shell script
19 .BR sendfiles ,
20 is used to send a collection
21 of files and directories via electronic mail.
22 .PP
23 .RS 5
24 sendfiles mailpath \*(lqsubject\*(rq files\0...
25 .RE
26 .PP
27 .B Isendfiles
28 will archive the files and directories you name
29 with the
30 .B tar
31 command, and then mail the compressed
32 archive to the \*(lqmailpath\*(rq with the given \*(lqsubject\*(rq.
33 The archive
34 will be automatically split up into as many messages as necessary
35 in order to get past most mailers.
36 .PP
37 Sometimes you want
38 .B sendfiles
39 to pause after posting a partial
40 message.  This is usually the case when you are running
41 .B sendmail
42 and expect to generate a lot of partial messages.  If the first
43 argument given to
44 .B sendfiles
45 starts with a dash, then it is
46 interpreted as the number of seconds to pause in between postings,
47 e.g.,
48 .PP
49 .RS 5
50 sendfiles -30 mailpath \*(lqsubject\*(rq files\0...
51 .RE
52 .PP
53 will pause 30 seconds in between each posting.
54 .PP
55 .SS "Extracting the Received Files"
56 When these messages are received, invoke
57 .B mhstore
58 once for
59 the list of messages.  The default is for
60 .B mhstore
61 to store
62 the combined parts as a new message in the current folder, although
63 this can be changed using storage formatting strings.  You can then
64 use
65 .B mhlist
66 to find out what's inside; possibly followed by
67 .B mhstore
68 again to write the archive to a file where you can
69 subsequently uncompress and untar it.  For instance:
70 .PP
71 .RS 5
72 .nf
73 % mhlist 5-8
74  msg part  type/subtype             size description
75    5       message/partial           47K part 1 of 4
76    6       message/partial           47K part 2 of 4
77    7       message/partial           47K part 3 of 4
78    8       message/partial           18K part 4 of 4
79 % mhstore 5-8
80 reassembling partials 5,6,7,8 to folder inbox as message 9
81 % mhlist -verbose 9
82  msg part  type/subtype             size description
83    9       application/octet-stream 118K
84              (extract with uncompress | tar xvpf -)
85              type=tar
86              conversions=compress
87 % mhstore 9
88 % uncompress < 9.tar.Z | tar xvpf -
89 .fi
90 .RE
91 .PP
92 Alternately, by using the
93 .B \-auto
94 switch,
95 .B mhstore
96 will automatically do the extraction for you:
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 -auto 9
115 -- tar listing appears here as files are extracted
116 .fi
117 .RE
118 .PP
119 As the second
120 .B tar
121 listing is generated, the files are extracted.
122 A prudent user will never put
123 .B \-auto
124 in the
125 .I \&.mh\(ruprofile
126 file.  The correct procedure is to first use
127 .B mhlist
128 to find out what will be extracted.  Then
129 .B mhstore
130 can be invoked with
131 .B \-auto
132 to perform the extraction.
133
134 .SH FILES
135 .fc ^ ~
136 .nf
137 .ta \w'/usr/local/nmh/etc/ExtraBigFileName  'u
138 ^$HOME/\&.mh\(ruprofile~^The user profile
139 .fi
140
141 .SH "PROFILE COMPONENTS"
142 .fc ^ ~
143 .nf
144 .ta 2.4i
145 .ta \w'ExtraBigProfileName  'u
146 ^Path:~^To determine the user's nmh directory
147 ^Current\-Folder:~^To find the default current folder
148 .fi
149
150 .SH "SEE ALSO"
151 mhbuild(1), mhlist(1), mhshow(1), mhstore(1). 
152 .I "Proposed Standard for Message Encapsulation"
153 (RFC\-934)
154
155 .SH DEFAULTS
156 .nf
157 .RB ` \-noverbose '
158 .fi
159
160 .SH CONTEXT
161 None