~ubuntu-branches/ubuntu/precise/dbacl/precise

« back to all changes in this revision

Viewing changes to man/mailinspect.1in

  • Committer: Bazaar Package Importer
  • Author(s): Clint Adams
  • Date: 2005-05-07 12:59:53 UTC
  • Revision ID: james.westby@ubuntu.com-20050507125953-xzy2bwkb2qamglwm
Tags: upstream-1.9
ImportĀ upstreamĀ versionĀ 1.9

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
\" t
 
2
.TH MAILINSPECT 1 "Bayesian Text Classification Tools" "Version @VERSION@" ""
 
3
.SH NAME
 
4
mailinspect \- sort an mbox by category and pipe emails to a command.
 
5
.SH SYNOPSIS
 
6
.HP
 
7
.B mailinspect [-zjiI]
 
8
-c 
 
9
.I category
 
10
FILE [-gG 
 
11
.IR regex ]...
 
12
[-s
 
13
.IR command ]
 
14
[-p 
 
15
.IR style ]
 
16
[-o
 
17
.IR scoring ]
 
18
.HP
 
19
.B mailinspect
 
20
-V
 
21
.SH DESCRIPTION
 
22
.PP
 
23
.B mailinspect
 
24
reads the single mbox folder named FILE and sorts it in order of similarity to
 
25
the 
 
26
.IR category , 
 
27
which must have been 
 
28
created by 
 
29
.BR dbacl (1). 
 
30
It can be used as a command line tool or interactively, when given the 
 
31
.B -I 
 
32
switch. 
 
33
.PP
 
34
When used as a command line tool, 
 
35
.B mailinspect
 
36
prints the sorted list of emails on STDOUT. Each line consists of a
 
37
seek position for the given email within FILE, followed by the score and a description
 
38
string in one of several styles chosen via the 
 
39
.B -p
 
40
option. 
 
41
.PP
 
42
When supplying a 
 
43
.I command
 
44
string in conjunction with the 
 
45
.B -s
 
46
option, 
 
47
.B mailinspect
 
48
spawns a shell and executes 
 
49
.I command 
 
50
for every email in FILE (possibly selected via the 
 
51
.BR -g " or" -G
 
52
options), in the sorted order. This is similar to the 
 
53
.BR formail (1)
 
54
functionality, except the latter doesn't order the emails.
 
55
.PP
 
56
In interactive mode, all the command line functionality is available via
 
57
keypresses. The sorted list of emails is displayed in a scrollable format,
 
58
and can be viewed, searched, tagged, resorted and sent to shell commands. Predefined
 
59
shell commands can be associated with function keys. See the usage section below.
 
60
.PP
 
61
The sorting heuristics are currently (and may always be) experimental, 
 
62
so there is no guarantee that the orderings are particularly well suited
 
63
for anything. 
 
64
.SH EXIT STATUS
 
65
.B
 
66
mailinspect
 
67
returns 1 on success, 0 if some error occurred.
 
68
.SH OPTIONS
 
69
.IP -c
 
70
Use 
 
71
.I category
 
72
to compute the scores and sort the emails, which 
 
73
should be the file name of a 
 
74
.BR dbacl (1)
 
75
category.
 
76
.IP -g
 
77
Only emails matching the regular expression
 
78
.I regex
 
79
are sorted. All other emails are ignored. When several
 
80
.B -g
 
81
and 
 
82
.B -G
 
83
options are present on the command line,
 
84
earlier regular expressions are overridden
 
85
by later ones where applicable.
 
86
.IP -i
 
87
Force internationalized mode. 
 
88
.IP -j
 
89
Force regular expression searches to be case sensitive.
 
90
.IP -o
 
91
Determines the scoring formula to be used. The parameter 
 
92
.I scoring
 
93
must be an integer greater than or equal to zero. By default,
 
94
.I scoring 
 
95
equals zero.
 
96
.IP -p
 
97
Prints the email index in the given style. The parameter 
 
98
.I style
 
99
must be an integer greater than or equal to zero. By default,
 
100
.I style
 
101
equals zero.
 
102
.IP -s
 
103
For each email in the list, execute the shell
 
104
.IR command ,
 
105
with the email body on STDIN. Emails are processed in sorted order.
 
106
.IP -z
 
107
Reverse sort order. Normally, emails are sorted in order of closest 
 
108
to furthest relative to 
 
109
.IR category ,
 
110
but in this case, the opposite is true. 
 
111
.IP -I
 
112
Interactive mode. Instead of printing the sorted list of emails
 
113
on STDOUT, emails are displayed and can be scrolled, viewed, 
 
114
searched and piped interactively at the terminal.
 
115
.IP -G
 
116
Only emails 
 
117
.B not
 
118
matching the regular expression
 
119
.I regex
 
120
are sorted. Opposite of 
 
121
.B -g
 
122
switch.
 
123
.IP -V
 
124
Print the program version number and exit. 
 
125
.SH USAGE
 
126
.PP
 
127
.B mailinspect 
 
128
needs to read a prelearned
 
129
.I category 
 
130
before it can sort the emails in FILE. See 
 
131
.BR dbacl (1).
 
132
.PP
 
133
Suppose you have two mail folders named 
 
134
.I good.mbox
 
135
and
 
136
.IR bad.mbox 
 
137
respectively. You can create appropriate categories by typing the commands
 
138
.PP
 
139
.na
 
140
% dbacl -l good good.mbox -T email
 
141
.br
 
142
% dbacl -l bad bad.mbox -T email
 
143
.ad
 
144
.PP
 
145
Next, you can type the following command to view interactively the 
 
146
.I bad.mbox
 
147
file with the emails whose score is closest to the category
 
148
.I good
 
149
listed first:
 
150
.PP
 
151
.na
 
152
% mailinspect -I -c good bad.mbox 
 
153
.ad
 
154
.PP
 
155
Alternatively, you might be interested only in the five emails in the folder 
 
156
.I bad.mbox
 
157
whose score marks them as the furthest away from the category 
 
158
.BR bad ,
 
159
completely independently from any other category such as 
 
160
.I good 
 
161
(ie you want outliers in the scoring sense).
 
162
.PP
 
163
.na
 
164
% mailinspect -z -c bad bad.mbox | head -5
 
165
.ad
 
166
.PP
 
167
In interactive mode, the following keys are defined:
 
168
.IP o
 
169
toggles another scoring formula.
 
170
.IP p
 
171
toggles another display style.
 
172
.IP q
 
173
exits 
 
174
.BR mailinspect .
 
175
.IP s
 
176
sends the currently highlighted email to a shell command.
 
177
.IP S
 
178
sends all currently tagged emails to a shell command, in sorted order.
 
179
Every email executes the shell command independently.
 
180
.IP t
 
181
tags the currently highlighted email.
 
182
.IP T
 
183
tags all listed emails.
 
184
.IP v
 
185
sends the currently highlighted email to $PAGER for viewing. If the environment
 
186
variable PAGER is not defined, sends the email to 
 
187
.BR less (1).
 
188
.IP u
 
189
untags the highlighted email.
 
190
.IP U
 
191
untags all listed emails.
 
192
.IP z
 
193
reverses the sort order of displayed emails.
 
194
.IP /
 
195
searches for a regular expression (see 
 
196
.BR regex (7))
 
197
anywhere within the contents of all listed emails. Hides all emails
 
198
which don't match.
 
199
.IP ?
 
200
like /, but hides all emails which match, keeping all those which don't match.
 
201
.PP
 
202
As a convenience, the function keys F1-F10 can each be associated 
 
203
with a shell command string. In this
 
204
case, typing a function key has the same effect as the S key, but the command is 
 
205
already typed and ready to be edited/accepted.
 
206
The function key associations are read from the configuration file .mailinspectrc
 
207
if it exits. 
 
208
.SH FILES
 
209
.PP
 
210
.IP $HOME/.mailinspectrc
 
211
.B mailinspect 
 
212
reads the file .mailinspectrc in the $HOME directory, if it exists. 
 
213
This is a plain text file which contains entries of the form
 
214
.IP
 
215
.na
 
216
# this is a comment
 
217
.br
 
218
F2 cat >> interesting.mbox
 
219
.br
 
220
F5 mail zarniwoop@megadodo.com
 
221
.ad
 
222
.SH ENVIRONMENT
 
223
.PP
 
224
.IP DBACL_PATH
 
225
When this variable is set, its value is prepended to every 
 
226
.I category
 
227
filename which doesn't start with a '/'.
 
228
.SH SOURCE
 
229
.PP
 
230
The source code for the latest version of this program is available at the
 
231
following locations: 
 
232
.PP
 
233
.na
 
234
http://www.lbreyer.com/gpl.html
 
235
.br
 
236
http://dbacl.sourceforge.net
 
237
.ad
 
238
.SH AUTHOR
 
239
.PP
 
240
Laird A. Breyer <laird@lbreyer.com>
 
241
.SH SEE ALSO
 
242
.PP
 
243
.BR bayesol (1),
 
244
.BR dbacl (1),
 
245
.BR less (1),
 
246
.BR mailcross (1),
 
247
.BR regex (7)
 
248