source: trunk/athena/bin/mitmailscan/mitmailscan.1 @ 20671

Revision 20671, 4.8 KB checked in by rbasch, 20 years ago (diff)
Accept message IDs as optional command line arguments. Add --key as an alternate for --search-key. Change send_command() to accept a format string and arguments.
Line 
1.\"
2.\" $Id: mitmailscan.1,v 1.2 2004-09-10 16:35:44 rbasch Exp $
3.\"
4.TH MITMAILSCAN 1
5.SH NAME
6mitmailscan \- scan messages in an IMAP folder
7.SH SYNOPSIS
8.B mitmailscan
9[
10.B \--answered
11] [
12.B \--before
13.I dd-Mon-yyyy
14] [
15.B \--by-uid
16] [
17.B \--debug
18] [
19.B \--deleted
20] [
21.B \--from
22.I sender
23] [
24.B \--help
25] [
26.B \--host
27.I name
28] [
29.B \--id-only
30] [
31.B \--key
32.I string
33] [
34.B \--larger
35.I number
36] [
37.B \--mailbox
38.I name
39] [
40.B \--new
41] [
42.B \--old
43] [
44.B \--recent
45] [
46.B \--search-key
47.I string
48] [
49.B \--seen
50] [
51.B \--since
52.I dd-Mon-yyyy
53] [
54.B \--smaller
55.I number
56] [
57.B \--subject
58.I string
59] [
60.B \--text
61.I string
62] [
63.B \--to
64.I recipient
65] [
66.B \--unanswered
67] [
68.B \--undeleted
69] [
70.B \--unseen
71] [
72.IB message-ID ...
73]
74.SH DESCRIPTION
75The
76.I mitmailscan
77program scans a folder on an IMAP server for messages.  Unless the
78.B \--id-only
79option is given, for each message found,
80.I mitmailscan
81displays a line containing the message ID (sequence number or unique
82identifier), the date sent, the sender, and the subject (the latter two
83fields are truncated to ensure that the output fits on one terminal
84line).  The message ID will be followed by \fIU\fR or \fID\fR to denote
85a message which is unseen or deleted, respectively.
86
87When no command line options or arguments are specified,
88.I mitmailscan
89lists all messages in the mailbox.  The display can be limited by
90options specifying various search criteria, and by message ID
91arguments.  Note that when multiple search-related options are
92specified, the result is the intersection (i.e. logical \fIAND\fR) of
93the matching messages.
94
95For options which require a value argument, the value can be specified
96either as the next argument in the command line, or directly after the
97option name, separated by \fB=\fR.
98
99.I mitmailscan
100understands the following options:
101.TP
102.B \--answered
103display only those messages which have been marked as answered.
104.TP
105.B \--before \fIdd-Mon-yyyy\fR
106display only those messages which were sent earlier than the given date.
107.TP
108.B \--by-uid
109accept and display the message's unique identifier instead of the
110sequence number.
111.TP
112.B \--debug
113turn on debugging.
114.TP
115.B \--deleted
116display only those messages which have been marked as deleted.
117.TP
118.B \--from \fIsender\fR
119display only those messages with \fIsender\fR in the \fBFrom\fR field.
120.TP
121.B \--help
122display usage information and exit.
123.TP
124.B \--host \fIname\fR
125query the given host, instead of the default post office server.
126.TP
127.B \--id-only
128output message IDs only, separated by a space, instead of the standard
129display.  This option is useful when you want to specify the message IDs
130as part of another command.
131.TP
132.B \--key \fIstring\fR
133same as \fB--search-key\fR \fIstring\fR.
134.TP
135.B \--larger \fInumber\fR
136display only those messages whose size in bytes is greater than the given
137number.
138.TP
139.B \--mailbox \fIname\fR
140scan the IMAP folder \fIname\fR.  If this option is not specified,
141.I mitmailscan
142scans the INBOX folder.
143.TP
144.B \--new
145display only new messages.  This option is equivalent to specifying
146\fI--recent --unseen\fR).
147.TP
148.B \--old
149display only those messages which are not marked as recent.
150.TP
151.B \--on \fIdd-Mon-yyyy\fR
152display only those messages sent on the given date.
153.TP
154.B \--recent
155display only those messages which are marked as recent.
156.TP
157.B \--search-key \fIstring\fR
158specifies an explicit IMAP search key (see RFC 2060).  This option is
159useful for performing a complex search, i.e. one which cannot be done
160via the other options.
161.TP
162.B \--seen
163display only those messages which are marked as having been seen.
164.TP
165.B \--since \fIdd-Mon-yyyy\fR
166display only those messages sent on or after the given date.
167.TP
168.B \--smaller \fInumber\fR
169display only those messages whose size in bytes is less than the given number.
170.TP
171.B \--subject \fIstring\fR
172display only those messages with \fIstring\fR in the \fBSubject\fR field.
173.TP
174.B \--text \fIstring\fR
175display only those messages with \fIstring\fR in either the header or body.
176.TP
177.B \--to \fIrecipient\fR
178display only those messages with \fIrecipient\fR in the \fBTo\fR field.
179.TP
180.B \--unanswered
181display only those messages which are not marked as having been answered.
182.TP
183.B \--undeleted
184display only those messages which are not marked as deleted.
185.TP
186.B \--unseen
187display only those messages which are not marked as having been seen.
188.SH ARGUMENTS
189.I mitmailscan
190optionally accepts one or more message ID arguments.  The ID is
191either the message's sequence number, or, if the
192.I \--by-uid
193option is given, its unique identifier.
194
195The message ID argument can be \fB*\fR, to indicate the last message
196in the mailbox.  An argument of the form
197.IB ID1 : ID2
198can be used to specify a range of IDs.
199.SH "SEE ALSO"
200mitmailshow(1), mitmailappend(1), mitmaildel(1),
201imtest(1), RFC\-2060 (Internet Message Access Protocol - Version 4rev1)
Note: See TracBrowser for help on using the repository browser.