1mailutil(1)                 General Commands Manual                mailutil(1)
2
3
4

NAME

6       mailutil - mail utility program
7

SYNTAX

9       mailutil command [switches] [arguments]
10
11       All  commands  accept  the  -d,  -v, and -u switches in addition to any
12       command-specific switches.
13
14       mailutil check [MAILBOX]
15
16       mailutil create MAILBOX
17
18       mailutil delete MAILBOX
19
20       mailutil rename SOURCE DESTINATION
21
22       mailutil copy [-rw] [-kw] [-ig] SOURCE DESTINATION
23
24       mailutil move [-rw] [-kw] [-ig] SOURCE DESTINATION
25
26       mailutil append [-rw] [-kw] [-ig] SOURCE DESTINATION
27
28       mailutil appenddelete [-rw] [-kw] [-ig] SOURCE DESTINATION
29
30       mailutil prune MAILBOX CRITERIA
31
32       mailutil transfer [-m mode] [-rw] [-kw] [-ig] SOURCE DESTINATION
33

DESCRIPTION

35       mailutil  replaces  the  old  chkmail,  imapcopy,  imapmove,  imapxfer,
36       mbxcopy, mbxcreat, and mbxcvt programs.
37
38       mailutil  check determines whether new mail exists in the given mailbox
39       (the default is INBOX).  The number of new messages is defined  as  the
40       number  of  messages  that  have  "Recent"  status set.  If the mailbox
41       contains no new messages, mailutil check will indicate that no new mail
42       is  present;  otherwise, it will report the number of new messages.  In
43       either case, it will also indicate the canonical form of  the  name  of
44       the mailbox.
45
46       mailutil create creates a new mailbox with the given name.  The mailbox
47       name must not already exist.  A mailbox can be created in a  particular
48       format by prefixing the name with #driver.  followed by the format name
49       and a / character.  For example, the command
50          mailutil create #driver.mbx/junkmail
51       will create a new mailbox named "junkmail" in mbx format.
52
53       mailutil delete deletes an existing mailbox with the given name.
54
55       mailutil rename renames an existing mailbox to a new name  (which  must
56       not  already  exist).   This only works if the old and new names are in
57       the same mail store.  A more general means to rename a mailbox is to do
58       a mailutil copy of the old name to the new name, followed by a mailutil
59       delete of the old name.
60
61       mailutil copy creates a new mailbox and copies messages  from  the  old
62       mailbox to the new mailbox.  As in mailutil create a mailbox format can
63       be specified with the new mailbox.  For example, the command
64          mailutil copy INBOX #driver.mbx/INBOX
65       will copy messages from your existing INBOX to an mbx-format INBOX.
66
67       mailutil move is similar to mailutil copy but  in  addition  will  also
68       remove  (delete  and  expunge)  the messages from the old mailbox after
69       copying them to the new mailbox.
70
71       mailutil append and mailutil appenddelete are similar to mailutil  copy
72       and  mailutil  move  respectively  except  that  they do not create the
73       destination mailbox.
74
75       mailutil prune prunes the  mailbox  of  messages  which  match  certain
76       criteria,  which  are in the form of IMAP2 (RFC 1176) SEARCH arguments.
77       For example, the command.
78         mailutil prune INBOX "before 1-jan-2004"
79       will delete and expunge all messages written before January 1, 2004.
80
81       Note  that  mailutil  implements  pruning  by  deleting  the   matching
82       messages,  and then expunging the mailbox.  Consequently, mailutil will
83       also expunge any messages  which  were  deleted  at  the  time  of  the
84       pruning.
85
86       mailutil  transfer  copies  an  entire  hierarchy of mailboxes from the
87       named source to the named destination.  Mailboxes are  created  on  the
88       destination  as  needed.   Any error in copying messages will cause the
89       transfer to stop.
90
91       Normally, any error in  creation  will  cause  the  transfer  to  stop.
92       However,  if -m MODE or -merge MODE is specified, a merging transfer is
93       performed.  The MODE argument indicats the type of merge:
94
95       -m[erge] prompt  indicates  that  the  user  should  be  asked  for  an
96       alternative  name  to create.  If creating the new name fails, the user
97       will be asked again.
98
99       -m[erge] append indicates that it's alright to copy the  messages  into
100       an existing mailbox with that name.  If the mailbox does not exist, the
101       user will be prompted for an alternative name.
102
103       -m[erge] suffix=XXXX where  XXXX  is  any  string,  indicates  that  an
104       alternative  name  should be built by appending the given suffix to the
105       name.  It that alternative name can't be created, then the user will be
106       prompted for an alternative name.
107
108       The  source  hierarchy  consists  of all mailboxes which start with the
109       given source name.  With the exception of a remote system specification
110       (within  "{}"  braces),  the  source  name  is  used as the name of the
111       destination.  The destination hierarchy is a prefix applied to any  new
112       names being created.  For example,
113          mailutil transfer foo bar
114       will  copy  all  mailboxes  with  names  beginning  with "foo" to names
115       beginning with "bar" (hence "foobar" will be  copied  to  "barfoobar").
116       Similarly,
117          mailutil transfer "{imap.foo.com}" "{imap.bar.com}old/"
118       will copy all mailboxes from the imap.foo.com IMAP server to equivalent
119       names starting with "old/" on the imap.bar.com IMAP server.
120

FLAGS

122       The -d  or  -debug  flag  prints  full  debugging  telemetry  including
123       protocol operations.
124
125       The -v or -verbose flag prints verbose (non-error) telemetry.
126
127       The  -u  USERID or -user USERID switch attempts to become the indicated
128       user.  This is for the benefit of system administrators who want to  do
129       mailutil  operations  on  a  userid  that  does not normally have shell
130       access.
131
132       The -rw or -rwcopy flag  causes  the  source  mailbox  to  be  open  in
133       readwrite  mode rather than readonly mode.  Normally, mailutil tries to
134       use readonly mode to avoid altering any flags in  the  source  mailbox,
135       but some mailbox types, e.g.  POP3, can't be open in readonly mode.
136
137       The -kw or -kwcopy flag causes the keywords of the source mailbox to be
138       created in the destination mailbox.  Normally, mailutil does not create
139       keywords  in  the  destination  mailbox so only those keywords that are
140       already defined in the destination mailbox  will  be  preserved.   Note
141       that  some IMAP servers may automatically create keywords, so this flag
142       may not be necessary.
143
144       The -ig or -ignore flag causes the keywords of the source mailbox to be
145       ignored  completely  and  no  attempt  is  made  to  copy  them  to the
146       destination mailbox.
147
148       The -ig[nore] and -kw[copy] flags are mutually exclusive.
149

ARGUMENTS

151       The arguments are  standard  c-client  mailbox  names.   A  variety  of
152       mailbox  name formats and types of mailboxes are supported by c-client;
153       examples of the most common forms of names are:
154
155       Name           Meaning
156
157       INBOX          primary incoming mail folder on the local system
158
159       archive/tx-project
160                      mail folder named "tx-project" in "archive" subdirectory
161                      of local filesystem home directory
162
163       {imapserver.foo.com}INBOX
164                      primary  incoming  mail  folder  on  IMAP  server system
165                      "imapserver.foo.com"
166
167       {imapserver.foo.com}archive/tx-project
168                      mail folder named "tx-project" in "archive" subdirectory
169                      on IMAP server system "imapserver.foo.com"
170
171       #news.comp.mail.misc
172                      newsgroup "comp.mail.misc" on local filesystem
173
174       {newserver.foo.com/nntp}comp.mail.misc
175                      newsgroup   "comp.mail.misc"   on   NNTP  server  system
176                      "newserver.foo.com"
177
178       {popserver.foo.com/pop3}
179                      mail folder on POP3 server system "popserver.foo.com"
180
181       See your system  manager  for  more  information  about  the  types  of
182       mailboxes which are available on your system.
183

RESTRICTIONS

185       You  must surround a {host}mailbox argument with quotation marks if you
186       run mailutil from csh(1) or another shell for which braces have special
187       meaning.
188
189       You  must  surround  a  #driver.format/mailbox  argument with quotation
190       marks if you run mailutil from a shell in  which  "#"  is  the  comment
191       character.
192

AUTHOR

194       Mark Crispin, MRC@Washington.EDU
195
196
197
198                                 March 3, 2008                     mailutil(1)
Impressum