~ubuntu-branches/debian/stretch/alpine/stretch

« back to all changes in this revision

Viewing changes to imap/src/mailutil/mailutil.1

  • Committer: Bazaar Package Importer
  • Author(s): Asheesh Laroia
  • Date: 2007-02-17 13:17:42 UTC
  • Revision ID: james.westby@ubuntu.com-20070217131742-99x5c6cpg1pbkdhw
Tags: upstream-0.82+dfsg
ImportĀ upstreamĀ versionĀ 0.82+dfsg

Show diffs side-by-side

added added

removed removed

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