~ubuntu-branches/ubuntu/natty/archmbox/natty

« back to all changes in this revision

Viewing changes to man/archmbox.1

  • Committer: Bazaar Package Importer
  • Author(s): Alberto Furia
  • Date: 2009-11-22 17:19:47 UTC
  • mfrom: (2.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20091122171947-5uabxe6le811uf8f
Tags: 4.10.0-2
* Taking back maintainership. (Closes: #547224)
* New build set bzip2 location to /bin/bzip2 (Closes: #382105)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
.TH "archmbox" "1" "" "" ""
2
 
.SH "NAME"
3
 
archmbox \- a simple email archiver
4
 
.SH "SYNOPSIS"
5
 
.LP 
6
 
archmbox [ \fB\-h\fR | \fB\-\-version\fR ]
7
 
.br 
8
 
archmbox \fBMODE\fR [ \fBOPTIONS\fR ]
9
 
\fB\-d\fR \fIdate\fR \fImailbox\fR [ \fImailbox\fR ... ]
10
 
.br 
11
 
archmbox \fBMODE\fR [ \fBOPTIONS\fR ]
12
 
\fB\-o\fR \fIdays\fR \fImailbox\fR [ \fImailbox\fR ... ]
13
 
.SH "DESCRIPTION"
14
 
.LP 
15
 
Archmbox is a simple email archiver written in perl; it parses one or more
16
 
mailboxes, select some or all messages and then perform specific
17
 
actions on the selected messages.
18
 
 
19
 
.LP 
20
 
Four different \fBMODES\fR are available:
21
 
 
22
 
.IP \(bu
23
 
list mode, which is useful to list all selected messages before 
24
 
archmbox performs the real operations (archiving or deleting)
25
 
.IP \(bu
26
 
kill mode, if messages should be deleted from the mailbox(es) rather
27
 
than archived
28
 
.IP \(bu
29
 
archive mode, to archive the selected messages in a different mailbox
30
 
.IP \(bu
31
 
copy mode, to copy selected messages from a source mailbox(es) without modifying it
32
 
 
33
 
.LP 
34
 
Messages selection is based upon a date criteria; an absolute date or a
35
 
days offset can be specified. It is also possible to refine the selection
36
 
using regular expressions on the header fields of the message.
37
 
.br 
38
 
All archived messages are stored in a new mailbox with the same name of
39
 
the original one + .archived as extension (this is the default, but can be
40
 
changed); the archive mailbox can be saved in gz or bz2 compressed format
41
 
as well.
42
 
.br 
43
 
Please note that the archive mailbox format is always mbox,
44
 
regardless of original mailbox format. Moreover, mailboxes must be specified using the full path.
45
 
.br 
46
 
Messages are appended to the archive mailbox to allow multiple executions
47
 
of the script against the same mailbox.
48
 
.SH "MODES"
49
 
.TP 
50
 
\fB\-a\fR, \fB\-\-archive\fR
51
 
Selected messages are archived in a different mailbox.
52
 
 
53
 
.TP 
54
 
\fB\-k\fR, \fB\-\-kill\fR
55
 
Selected messages are deleted rather than archived.
56
 
 
57
 
.TP 
58
 
\fB\-l\fR, \fB\-\-list\fR
59
 
List all selected messages.
60
 
 
61
 
.TP 
62
 
\fB\-y\fR, \fB\-\-copy\fR
63
 
Selected messages are copied from the source mailbox.
64
 
.SH "OPTIONS"
65
 
.LP 
66
 
.TP 
67
 
\fB\-b, \-\-backup\fR
68
 
Creates a backup of the original mailbox before archmbox execution.
69
 
The mailbox is called
70
 
\fImailbox.backup\fR
71
 
 
72
 
.TP 
73
 
\fB\-\-bzip2\fR
74
 
Use bzip2 to compress the archive mailbox (use with \-c).
75
 
 
76
 
.TP 
77
 
\fB\-c, \-\-compress\fR
78
 
Compress the archive mailbox after script execution.
79
 
 
80
 
.TP 
81
 
\fB\-d, \-\-date <date>\fR
82
 
Specifies the threshold date for messages. The date must be supplied in the
83
 
following format: yyyy\-mm\-dd
84
 
 
85
 
.TP 
86
 
\fB\-D, \-\-date\-header\fR
87
 
Force the use of the "Date:" header to age a message. If the header is somehow
88
 
corrupt, the date/time informations are gathered for the beginning line of the
89
 
message.
90
 
 
91
 
.TP 
92
 
\fB\-e, \-\-extension <extension>\fR
93
 
Specifies the suffix for the archive mailbox; the default is \fIarchived\fR.
94
 
If \fInone\fR is specified, no suffix will be used (use carefully).
95
 
 
96
 
.TP 
97
 
\fB\-f, \-\-full\-name\fR
98
 
Prepends the path of the mailbox to the name of the archive mailbox.
99
 
 
100
 
.TP 
101
 
\fB\-\-format\fR
102
 
Specifies the format of the mailboxes to parse. Legal values are mbox and mbx.
103
 
Defaults to "mbox".
104
 
 
105
 
.TP 
106
 
\fB\-h, \-\-help\fR
107
 
Prints help.
108
 
 
109
 
.TP 
110
 
\fB\-i, \-\-ignore <regexp>\fR
111
 
Any mailbox/directory matching <regexp> will be skipped while archiving.
112
 
 
113
 
.TP 
114
 
\fB\-\-keep\-flagged\fR
115
 
Flagged messages will not be archived.
116
 
 
117
 
.TP 
118
 
\fB\-\-keep\-unread\fR
119
 
Unread messages will not be archived.
120
 
 
121
 
.TP 
122
 
\fB\-m, \-\-minsize\fR
123
 
Specifies the minimum size of the mailbox to be archived. Mailboxes smaller than <minsize> will not be parsed for archiving.
124
 
 
125
 
.TP 
126
 
\fB\-\-nosymlink\fR
127
 
Do not follow symbolic links when processing mailboxes.
128
 
 
129
 
.TP 
130
 
\fB\-\-nowarnings\fR
131
 
Suppress mailbox related warnings. Use only if you know what you're doing!
132
 
 
133
 
.TP 
134
 
\fB\-\-omit\-prefix <prefix>\fR
135
 
Omit <prefix> from the name of the mailbox when full name (option \-f) is required.
136
 
 
137
 
.TP 
138
 
\fB\-o, \-\-offset <days>\fR
139
 
Specifies the offset (in days) from today for threshold date of a message. This
140
 
option replaces \-d. If you specify \-1, archmbox will operate on all messages.
141
 
 
142
 
.TP 
143
 
\fB\-p, \-\-path <directory>\fR
144
 
Specifies where to store the archive mailbox (default: ".").
145
 
<directory> must be specified using full path.
146
 
 
147
 
.TP 
148
 
\fB\-r, \-\-reverse\fR
149
 
Reverse the sense of 
150
 
\fIoffset\fR or \fIdate\fR
151
 
value. It usually means 
152
 
\fIolder than\fR
153
 
but with this switch, it means
154
 
\fInewer than\fR.
155
 
 
156
 
.TP 
157
 
\fB\-R, \-\-recursive\fR
158
 
Act recursively on directories. If one or more directories are specified on the
159
 
command line, all mailboxes stored in those directories will be parsed for
160
 
archiving. Implies option \-f.
161
 
 
162
 
.TP 
163
 
\fB\-t, \-\-tmpdir <directory>\fR
164
 
Specify a temporary working directory. This value overrides the one specified at compilation time or the one hard coded in the script.
165
 
.br 
166
 
<directory> must be specified using full path.
167
 
 
168
 
.TP 
169
 
\fB\-\-time <time>\fR
170
 
Use <time> in conjunction with <date> (option \-d) to refine the threshold age for archiving. <time> must be specified in the following format: hh:mm:ss.
171
 
 
172
 
.TP 
173
 
\fB\-\-totals\fR
174
 
Prints an overall summary of the archiving operations. The summary contains the number of parsed and skipped mailboxes, the total number of messages parsed and saved, the total space used and saved.
175
 
 
176
 
.TP 
177
 
\fB\-v, \-\-verbose\fR
178
 
Verbosity level. Default is 1 (line per message) in \-\-list output. So, if set
179
 
to 1 it only lists msgid, sender and subject. With \-v=2, it also
180
 
prints date.
181
 
 
182
 
.TP 
183
 
\fB\-\-version\fR
184
 
Prints version number.
185
 
 
186
 
.TP 
187
 
\fB\-x, \-\-regexp <header=regexp>\fR
188
 
It is specified in form \-x field='regexp', where field can be any header. The \fIheader\fR part is case sensitive, while the \fIregexp\fR part is not.
189
 
.br 
190
 
If message satisfies date range, but does not satisfy regexp match on  specified field, it won't be archived.
191
 
.br 
192
 
The option can be specified more than once; in this case, the message is
193
 
regexp matched against all the given rules, an if it satisfies
194
 
\fIany\fR, it will be archived.
195
 
.SH "CONFIGURATION"
196
 
.LP 
197
 
Archmbox is completely written in perl, but it uses some shell helpers to
198
 
perform its job (fuser, rm, gzip/gunzip etc.).
199
 
.LP 
200
 
The correct path for the helpers (both required and optional ones) is probed at
201
 
installation time. If one required helper is missing the installation
202
 
will not take place. If one optional helper is missing, the feature provided using
203
 
that helper will be unavailable, but the script will be installed anyway.
204
 
.LP 
205
 
All other relevant configuration options can be specified at installation time or at run time using the command line switches.
206
 
 
207
 
.SH "USAGE EXAMPLES"
208
 
.LP 
209
 
A complete example:
210
 
.LP 
211
 
\fBarchmbox \-a \-b \-c \-e 01 \-f \-d 2002\-01\-01 \-p ~/mail\-archive ~/Mail/personal\-stuff\fR
212
 
.LP 
213
 
This will archive all messages older than (received before...) Jan 1st 2002
214
 
from the 
215
 
\fIpersonal\-stuff\fR
216
 
mailbox in the Mail directory. Archive messages are
217
 
saved in a mailbox called 
218
 
\fIMail\-personal\-stuff.01.gz\fR
219
 
in the
220
 
\fI~/mail\-archive\fR
221
 
directory. After execution, you'll find a mailbox called
222
 
\fIpersonal\-stuff.backup\fR
223
 
in
224
 
\fI~/Mail\fR.
225
 
 
226
 
.LP 
227
 
Some simpler examples:
228
 
.LP 
229
 
\fBarchmbox \-a \-o 15 ~/Mail/personal\-stuff\fR
230
 
.LP 
231
 
This will archive all messages older than 15 days in 
232
 
\fIpersonal\-stuff.archived\fR
233
 
(uncompressed mailbox).
234
 
.LP 
235
 
\fBarchmbox \-a \-r \-o 15 ~/Mail/personal\-stuff\fR
236
 
.LP 
237
 
The same as above, but only messages 
238
 
\fInewer\fR
239
 
than 15 days will be archived.
240
 
.LP 
241
 
\fBarchmbox \-k \-o 15 ~/Mail/personal\-stuff\fR
242
 
.LP 
243
 
This will delete all messages older than 15 days from 
244
 
\fIMail/personal\-stuff\fR
245
 
.LP 
246
 
\fBarchmbox \-a \-o 15 ~/Mail/* \-c\fR
247
 
.LP 
248
 
This will archive all messages older than 15 days in 
249
 
every mailbox found in
250
 
\fI~/Mail\fR.
251
 
All the archive mailboxes will be compressed.
252
 
.LP 
253
 
\fBarchmbox \-l \-r \-c /tmp/mbox \-o 20\fR
254
 
.LP 
255
 
List all messages in 
256
 
\fI/tmp/mbox\fR
257
 
which are newer than 20 days. 
258
 
Option \-c is meaningless (and so ignored...).
259
 
.LP 
260
 
\fBarchmbox \-l \-r \-c /tmp/mbox \-o 20 \-a \-\-bzip2\fR
261
 
.LP 
262
 
Same as above, but archiving is forced (\-a) and bzip2 is used for compression.
263
 
.LP 
264
 
\fBarchmbox \-a \-x subject='archmbox' \-o 7 ~/mbox\fR
265
 
.LP 
266
 
Select for archiving all messages older than 7 days whose subject field
267
 
satisfies regexp match 
268
 
\fIsubject =~ /archmbox/\fR
269
 
(it is case insensitive).
270
 
.LP 
271
 
\fBarchmbox \-l \-x subject='archmbox' \-x from='fritz' \-o 7 ~/mbox\fR
272
 
.LP 
273
 
Select for archiving all messages older than 7 days whose subject field
274
 
contains 
275
 
\fIarchmbox\fR
276
 
or the sender is
277
 
\fIfritz\fR
278
 
(matches are case insensitive).
279
 
.LP 
280
 
\fBarchmbox \-a \-o 5 \-R /tmp/mbox ~/Mail\fR
281
 
.LP 
282
 
archmbox will archive all messages older than five days in
283
 
\fI/tmp/mbox\fR.
284
 
It then start parsing all mailboxes stored in
285
 
\fI~/Mail\fR
286
 
(recursion is active, and ~/Mail is a directory).
287
 
If one or more directories will be found in ~/Mail, those directories will be
288
 
explored as well.
289
 
.LP 
290
 
\fBarchmbox \-a \-o \-1 ~/Mail/my_mbx_mailbox \-\-format mbx\fR
291
 
.LP 
292
 
archmbox archives all messages stored in
293
 
\fImy_mbx_mailbox\fR
294
 
and puts them into
295
 
\fImy_mbx_mailbox.archived\fR.
296
 
The source mailbox is a mbx mailbox (\-\-format mbx is used). The archive mailbox will be a mbox mailbox.
297
 
.SH "NOTES"
298
 
.LP 
299
 
When the script has to decide if a message needs to be selected from the
300
 
mailbox, it looks for the header 
301
 
\fIFrom\fR
302
 
generated by the mail server (this is
303
 
the first line of the message) and doesn't care about the date specified by the
304
 
sender's mail client. This is useful to avoid removing messages sent from
305
 
misconfigured mail clients.
306
 
This behavior can be changed by forcing the use of the "Date:" header (option \-D).
307
 
.LP 
308
 
Not all options are meaningfull in all modes, ie compression is
309
 
meaningless in list or kill mode. If you specify a useless option for a
310
 
particular mode, archmbox simply ignores it.
311
 
.LP 
312
 
Archmbox uses a working directory to store temporary mailboxes. A default value for that directory is hard coded in the script, but can be changed during the configuration/installation process (see INSTALL for details).
313
 
It might happen that your mailboxes are too big for the partition holding this temporary directory, or you might want to perform archiving on too much mailboxes at the same time. In other words, you may run out of space.
314
 
Use the \-t option to specify a suitable working directory at runtime.
315
 
.LP 
316
 
If you see some differences in the mailbox's dimension (size/free space), keep in mind that your mailbox may contain a special message (512 bytes in size) with internal information related to the mailbox.
317
 
This message is meaningless for you, though archmbox recognizes it and lets you be aware of it. That message is left untouched in your source mailbox.
318
 
.LP 
319
 
A few words about locking. There has been a discussion about archmbox handles
320
 
file locking. The answer is simple: no mailbox is ever locked.
321
 
The reason behind this behavior is that I want archmbox to be as least invasive as possible, so other kind of checks are performed to ensure that no data is lost (mailbox has changed/mailbox is in use by another program). I will surely add some locking mechanism in the future.
322
 
.LP 
323
 
You don't need to execute archmbox as root... just take care to have write
324
 
permissions for the directories you use.
325
 
.SH "LINKS"
326
 
.LP 
327
 
Archmbox can be downloaded from:
328
 
.LP 
329
 
http://adc\-archmbox.sourceforge.net
330
 
.LP 
331
 
Archmbox is distributed under the terms of the \fBGPL\fR
332
 
.SH "AUTHOR(S)"
333
 
Copyright (C) 2001\-2005
334
 
.LP 
335
 
Alessandro Dotti Contra <adotti@users.sourceforge.net>
336
 
.LP 
337
 
Parts of the code were contributed by:
338
 
.LP 
339
 
Alex Aminoff, Brian Medley, Buck Holsinger, Davor Ocelic, Fabrice Noilhan, Jayanth Varma, Juergen Edner, Laurent Cheylus, Nicolas Ecarnot, Paco Regodon, Scott Thompson.
340
 
.LP 
341
 
The FreeBSD port is maintained by Talal Al\-Dik.
342
 
.br 
343
 
The OpenDarwin port is maintained by Markus Weissman.
344
 
.SH "BUGS"
345
 
.LP 
346
 
Please report bugs to <adotti@users.sourceforge.net>