imapext-2007

view src/mailutil/mailutil.1 @ 0:ada5e610ab86

imap-2007e
author yuuji@gentei.org
date Mon, 14 Sep 2009 15:17:45 +0900
parents
children
line source
1 .ig
2 * ========================================================================
3 * Copyright 1988-2008 University of Washington
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License");
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 *
12 * ========================================================================
13 ..
14 .TH mailutil 1 "March 3, 2008"
15 .SH NAME
16 mailutil - mail utility program
17 .nh
18 .SH SYNTAX
19 .B mailutil command [switches] [arguments]
20 .PP
21 All commands accept the -d, -v, and -u switches in addition to any
22 command-specific switches.
23 .PP
24 .B mailutil check [MAILBOX]
25 .PP
26 .B mailutil create MAILBOX
27 .PP
28 .B mailutil delete MAILBOX
29 .PP
30 .B mailutil rename SOURCE DESTINATION
31 .PP
32 .B mailutil copy [-rw] [-kw] [-ig] SOURCE DESTINATION
33 .PP
34 .B mailutil move [-rw] [-kw] [-ig] SOURCE DESTINATION
35 .PP
36 .B mailutil append [-rw] [-kw] [-ig] SOURCE DESTINATION
37 .PP
38 .B mailutil appenddelete [-rw] [-kw] [-ig] SOURCE DESTINATION
39 .PP
40 .B mailutil prune MAILBOX CRITERIA
41 .PP
42 .B mailutil transfer [-m mode] [-rw] [-kw] [-ig] SOURCE DESTINATION
43 .SH DESCRIPTION
44 .B mailutil
45 replaces the old chkmail, imapcopy, imapmove, imapxfer, mbxcopy,
46 mbxcreat, and mbxcvt programs.
47 .PP
48 .B mailutil check
49 determines whether new mail exists in the given mailbox (the default
50 is INBOX). The number of new messages is defined as the number of
51 messages that have "Recent" status set. If the mailbox contains no
52 new messages,
53 .B mailutil check
54 will indicate that no new mail is present;
55 otherwise, it will report the number of new messages. In either case,
56 it will also indicate the canonical form of the name of the mailbox.
57 .PP
58 .B mailutil create
59 creates a new
60 .I mailbox
61 with the given name. The mailbox name must not already exist. A mailbox
62 can be created in a particular format by prefixing the name with
63 .I #driver.
64 followed by the format name and a
65 .I /
66 character. For example, the command
67 .br
68 mailutil create #driver.mbx/junkmail
69 .br
70 will create a new mailbox named "junkmail" in mbx format.
71 .PP
72 .B mailutil delete
73 deletes an existing
74 .I mailbox
75 with the given name.
76 .PP
77 .B mailutil rename
78 renames an existing mailbox to a new name (which must not already exist).
79 This only works if the old and new names are in the same mail store. A
80 more general means to rename a mailbox is to do a
81 .B mailutil copy
82 of the old name to the new name, followed by a
83 .B mailutil delete
84 of the old name.
85 .PP
86 .B mailutil copy
87 creates a new mailbox and copies messages from the old mailbox to the
88 new mailbox. As in
89 .B mailutil create
90 a mailbox format can be specified with the new mailbox. For example, the
91 command
92 .br
93 mailutil copy INBOX #driver.mbx/INBOX
94 .br
95 will copy messages from your existing INBOX to an mbx-format INBOX.
96 .PP
97 .B mailutil move
98 is similar to
99 .B mailutil copy
100 but in addition will also remove (delete and expunge) the messages from the
101 old mailbox after copying them to the new mailbox.
102 .PP
103 .B mailutil append
104 and
105 .B mailutil appenddelete
106 are similar to
107 .B mailutil copy
108 and
109 .B mailutil move
110 respectively except that they do not create the destination mailbox.
111 .PP
112 .B mailutil prune
113 prunes the mailbox of messages which match certain criteria, which are
114 in the form of IMAP2 (RFC 1176) SEARCH arguments. For example, the
115 command.
116 .br
117 mailutil prune INBOX "before 1-jan-2004"
118 .br
119 will delete and expunge all messages written before January 1, 2004.
120 .PP
121 Note that mailutil implements pruning by deleting the matching messages,
122 and then expunging the mailbox. Consequently, mailutil will also expunge
123 any messages which were deleted at the time of the pruning.
124 .PP
125 .B mailutil transfer
126 copies an entire hierarchy of mailboxes from the named source to the
127 named destination. Mailboxes are created on the destination as
128 needed. Any error in copying messages will cause the transfer to stop.
129 .PP
130 Normally, any error in creation will cause the transfer to stop.
131 However, if
132 .B -m MODE
133 or
134 .B -merge MODE
135 is specified, a merging transfer is performed. The
136 .B MODE
137 argument indicats the type of merge:
138 .PP
139 .B -m[erge] prompt
140 indicates that the user should be asked for an alternative name to create.
141 If creating the new name fails, the user will be asked again.
142 .PP
143 .B -m[erge] append
144 indicates that it's alright to copy the messages into an existing mailbox
145 with that name. If the mailbox does not exist, the user will be prompted
146 for an alternative name.
147 .PP
148 .B -m[erge] suffix=XXXX
149 where XXXX is any string, indicates that an alternative name should be
150 built by appending the given suffix to the name. It that alternative name
151 can't be created, then the user will be prompted for an alternative name.
152 .PP
153 The source hierarchy consists of all mailboxes which start
154 with the given source name. With the exception of a remote system
155 specification (within "{}" braces), the source name is used as the
156 name of the destination. The destination hierarchy is a prefix
157 applied to any new names being created. For example,
158 .br
159 mailutil transfer foo bar
160 .br
161 will copy all mailboxes with names beginning with "foo" to names
162 beginning with "bar" (hence "foobar" will be copied to "barfoobar").
163 Similarly,
164 .br
165 mailutil transfer "{imap.foo.com}" "{imap.bar.com}old/"
166 .br
167 will copy all mailboxes from the imap.foo.com IMAP server to
168 equivalent names starting with "old/" on the imap.bar.com IMAP server.
169 .SH FLAGS
170 The
171 .B -d
172 or
173 .B -debug
174 flag prints full debugging telemetry including protocol operations.
175 .PP
176 The
177 .B -v
178 or
179 .B -verbose
180 flag prints verbose (non-error) telemetry.
181 .PP
182 The
183 .B -u USERID
184 or
185 .B -user USERID
186 switch attempts to become the indicated user. This is for the benefit of
187 system administrators who want to do mailutil operations on a userid that
188 does not normally have shell access.
189 .PP
190 The
191 .B -rw
192 or
193 .B -rwcopy
194 flag causes the source mailbox to be open in readwrite mode rather than
195 readonly mode. Normally, mailutil tries to use readonly mode to avoid
196 altering any flags in the source mailbox, but some mailbox types, e.g.
197 POP3, can't be open in readonly mode.
198 .PP
199 The
200 .B -kw
201 or
202 .B -kwcopy
203 flag causes the keywords of the source mailbox to be created in the
204 destination mailbox. Normally, mailutil does not create keywords in
205 the destination mailbox so only those keywords that are already defined
206 in the destination mailbox will be preserved. Note that some IMAP servers
207 may automatically create keywords, so this flag may not be necessary.
208 .PP
209 The
210 .B -ig
211 or
212 .B -ignore
213 flag causes the keywords of the source mailbox to be ignored completely
214 and no attempt is made to copy them to the destination mailbox.
215 .PP
216 The
217 .B -ig[nore]
218 and
219 .B -kw[copy]
220 flags are mutually exclusive.
221 .SH ARGUMENTS
222 The arguments are standard c-client mailbox names. A
223 variety of mailbox name formats and types of mailboxes are supported
224 by c-client; examples of the most common forms of names are:
225 .PP
226 .I
227 .IP Name 15
228 .I Meaning
229 .IP INBOX
230 primary incoming mail folder on the local system
231 .IP archive/tx-project
232 mail folder named "tx-project" in "archive" subdirectory of local
233 filesystem home directory
234 .IP {imapserver.foo.com}INBOX
235 primary incoming mail folder on IMAP server system
236 "imapserver.foo.com"
237 .IP {imapserver.foo.com}archive/tx-project
238 mail folder named "tx-project" in "archive" subdirectory on IMAP
239 server system "imapserver.foo.com"
240 .IP #news.comp.mail.misc
241 newsgroup "comp.mail.misc" on local filesystem
242 .IP {newserver.foo.com/nntp}comp.mail.misc
243 newsgroup "comp.mail.misc" on NNTP server system "newserver.foo.com"
244 .IP {popserver.foo.com/pop3}
245 mail folder on POP3 server system "popserver.foo.com"
246 .LP
247 See your system manager for more information about the types of
248 mailboxes which are available on your system.
249 .SH RESTRICTIONS
250 You must surround a
251 .I {host}mailbox
252 argument with quotation marks if you run
253 .B mailutil
254 from
255 .IR csh (1)
256 or another shell for which braces have special meaning.
257 .PP
258 You must surround a
259 .I #driver.format/mailbox
260 argument with quotation marks if you run
261 .B mailutil
262 from a shell in which "#" is the comment character.
263 .SH AUTHOR
264 Mark Crispin, MRC@Washington.EDU

UW-IMAP'd extensions by yuuji