/usr/share/cone/mailtool.html is in cone 0.89-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 | <html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii"/>
<title>mailtool</title>
<link rel="stylesheet" href="manpage.css" type="text/css"/>
<link rel="home" href="index.html" title="Cone: COnsole Newsreader And Emailer"/>
<link rel="up" href="cone00index.html" title="Cone mail client"/>
<link rel="prev" href="leaf.html" title="leaf"/>
<link rel="next" href="libmail.html" title="LibMAIL reference"/>
<link xmlns="" rel="icon" href="icon.gif" type="image/gif"/>
<meta xmlns="" name="MSSmartTagsPreventParsing" content="TRUE"/>
<!--
Copyright 2002 - 2007 Double Precision, Inc. See COPYING for distribution
information.
-->
</head>
<body>
<div class="navheader">
<table width="100%" summary="Navigation header">
<tr>
<th colspan="3" align="center" rowspan="1">mailtool</th>
</tr>
<tr>
<td width="20%" align="left" rowspan="1" colspan="1">
<a accesskey="p" href="leaf.html" shape="rect">Prev</a> </td>
<th width="60%" align="center" rowspan="1" colspan="1">
<span class="application">Cone</span> mail client</th>
<td width="20%" align="right" rowspan="1" colspan="1">
 <a accesskey="n" href="libmail.html" shape="rect">Next</a></td>
</tr>
</table>
<hr/>
</div>
<div class="refentry" title="mailtool">
<a id="mailtool" shape="rect" name="mailtool"> </a>
<div class="titlepage"/>
<div class="refnamediv">
<h2>Name</h2>
<p>mailtool — Process mailboxes</p>
</div>
<div class="refsynopsisdiv" title="Synopsis">
<h2>Synopsis</h2>
<div class="cmdsynopsis">
<p><code class="command">mailtool</code> [options...]</p>
</div>
</div>
<div class="refsect1" title="USAGE">
<a id="id542815" shape="rect" name="id542815"> </a>
<h2>USAGE</h2>
<p><span class="command"><strong>mailtool</strong></span> is
a diagnostic utility for handling various operations on
mailboxes. <span class="command"><strong>mailtool</strong></span>'s main uses
include: display the list of folders in a mailbox; displaying
list of messages in a mailbox; and copying mailboxes.</p>
<p>The following mailboxes can be accessed by <span class="command"><strong>mailtool</strong></span>:</p>
<div class="variablelist">
<dl>
<dt><span class="term">imap://<em class="replaceable"><code>userid</code></em>@<em class="replaceable"><code>server</code></em>[/options]</span></dt>
<dd>
<p>An IMAP account. <span class="command"><strong>mailtool</strong></span> will prompt
for the login password.</p>
</dd>
<dt><span class="term">imaps://<em class="replaceable"><code>userid</code></em>@<em class="replaceable"><code>server</code></em>[/options]</span></dt>
<dd>
<p>An IMAP account accessed via an encrypted SSL
connection.</p>
</dd>
<dt><span class="term">pop3://<em class="replaceable"><code>userid</code></em>@<em class="replaceable"><code>server</code></em>[/options]</span></dt>
<dd>
<p>A POP3 account. <span class="command"><strong>mailtool</strong></span> will prompt
for the login password.</p>
</dd>
<dt><span class="term">pop3s://<em class="replaceable"><code>userid</code></em>@<em class="replaceable"><code>server</code></em>[/options]</span></dt>
<dd>
<p>A POP3 account accessed via an encrypted SSL
connection.</p>
</dd>
<dt><span class="term">maildir:<em class="replaceable"><code>path</code></em></span></dt>
<dd>
<p>A local maildir mailbox. <code class="filename">path</code> specifies the maildir's location
relative to the home directory (NOT the current
directory).</p>
</dd>
<dt><span class="term">mbox:<em class="replaceable"><code>path</code></em></span></dt>
<dd>
<p>Local mbox mail folders. <code class="filename">path</code> specifies the path to an mbox
folder file, or a directory containing mbox folders,
relative to the home directory (NOT the current
directory).</p>
</dd>
<dt><span class="term">inbox:<em class="replaceable"><code>path</code></em></span></dt>
<dd>
<p>Local mbox mail folders, like <span class="quote">“<span class="quote">mbox:<em class="replaceable"><code>path</code></em></span>”</span>;
additionally, the system spool mailbox is automatically
copied to <code class="filename">$HOME/Inbox</code>,
which is accessible as folder <code class="literal">INBOX</code>.</p>
</dd>
</dl>
</div>
<p>The name of a remote IMAP or POP3 server may be followed
by one or more options that control various settings of the
IMAP or POP3 connection:</p>
<div class="variablelist">
<dl>
<dt><span class="term"><code class="literal">/cram</code></span></dt>
<dd>
<p>Do not open the account unless the server supports
secure password authentication. Secure password
authentication verifies the account's password using a
challenge/response authentication mechanism (where the
label "<code class="literal">cram</code>" comes from).
The actual password is never actually transmitted to
the server, and therefore cannot be intercepted while
in transit over an untrusted network.</p>
<p>Secure password authentication is not supported by
all servers. This option may not work with some
servers. This option does not enable secure password
authentication, it only mandates its use. If the server
supports secure password authentication, it will be
used even without the <code class="literal">/cram</code> option. Traditional
userid/password authentication will be used only if the
server does not implement secure password
authentication. The <code class="literal">/cram</code>
option makes secure password authentication
mandatory.</p>
<p>The <code class="literal">/cram</code> option is
marginally useful even with encrypted server
connections. The secure password authentication never
sends the explicit password to the server. Encryption
makes it theoretically impossible to recover the
password from an encrypted data connection; but with
secure authentication the password is never sent over
the connection in the first place (the password's
validity is certified by exchanging certain
mathematical calculations between the server and the
client). If the server is compromised, the compromised
server will not receive the account password (unless
the password is recovered from the server in other
ways).</p>
</dd>
<dt><span class="term"><code class="literal">/imap</code></span></dt>
<dd>
<p>Do not use the <a class="link" href="smap1.html" title="Appendix A. Simple Mail Access Protocol, Version 1" shape="rect">SMAP</a> if the server claims the
availability of this experimental mail access protocol,
and fall back to IMAP compatibility mode (this option
is meaningful only with <span class="quote">“<span class="quote"><code class="literal">imap://</code></span>”</span> and
<span class="quote">“<span class="quote"><code class="literal">imaps://</code></span>”</span>
URLs).</p>
</dd>
<dt><span class="term"><code class="literal">/notls</code></span></dt>
<dd>
<p>Do not upgrade a plain connection to an encrypted
one. This option is primarily used for testing and
debugging purposes. Sometimes this option might be
useful with servers that claim to offer encryption, but
are unable to do so when taken up on their offer.</p>
</dd>
<dt><span class="term"><code class="literal">/novalidate-cert</code></span></dt>
<dd>
<p>Do not validate the server's SSL certificate when
using an encrypted connection. Normally the mail
server's SSL certificate must be validate when using an
encrypted connection. The certificate's name must match
the server's name, and the certificate must be signed
by a trusted certificate authority.</p>
<p>The encrypted connection normally fails if the
certificate cannot be validate. Validation requires
that a list of trusted certificate authorities must be
known and configured. It's simply impossible to know
which certificate authorities are valid without an
explicit list of valid, known, trusted, certificate
authorities. If a trusted authority list is not
configured, no certificate can be validated. If the
server's certificate is a self-signed certificate (this
is often used for testing purposes), or if it's not
signed by a known authority, the encrypted connection
fails.</p>
<p>This <code class="literal">/novalidate-cert</code>
option disables certificate validation. The encrypted
connection will be established even if the server's
certificate would otherwise be rejected.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>This option is applicable even when an encrypted
IMAP or POP3 connection is not explicitly requested.
Many mail servers are capable of automatically
upgrading unencrypted connections to a
fully-encrypted connection. If a mail server claims
to be able to use encryption, then there's no reason
not to use it. The result is that all encryption
certification requirements still apply even when
encryption is not explicitly requested.</p>
</div>
</dd>
</dl>
</div>
<div class="refsect2" title="Displaying mailbox contents">
<a id="id543230" shape="rect" name="id543230"> </a>
<h3>Displaying mailbox contents</h3>
<div class="cmdsynopsis">
<p><code class="command">mailtool</code> -tree | -list
<em class="replaceable"><code>account</code></em></p>
</div>
<p><code class="literal">-tree</code> shows a hierarchical
representation of mail folders in <em class="replaceable"><code>account</code></em>. <code class="literal">-list</code> generates a simple folder listing,
one folder name per line. <code class="literal">-tree</code> shows folder names, while
<code class="literal">-list</code> shows the actual mail
folder path in <em class="replaceable"><code>account</code></em>.</p>
<div class="informalexample">
<pre class="programlisting" xml:space="preserve">
mailtool -tree imap://jsmith@mail.example.com/novalidate-cert/cram
</pre>
</div>
</div>
<div class="refsect2" title="Creating folders">
<a id="id543323" shape="rect" name="id543323"> </a>
<h3>Creating folders</h3>
<div class="cmdsynopsis">
<p><code class="command">mailtool</code> -create |
-createdir <em class="replaceable"><code>folder</code></em> <em class="replaceable"><code>name</code></em> <em class="replaceable"><code>account</code></em></p>
</div>
<p><code class="literal">-create</code> creates a new
subfolder of <em class="replaceable"><code>folder</code></em> in <em class="replaceable"><code>account</code></em>. The new
subfolder's name is <em class="replaceable"><code>name</code></em>. <code class="literal">-createdir</code> creates a new folder directory
(a folder that contains other folders).</p>
<div class="informalexample">
<pre class="programlisting" xml:space="preserve">
mailtool -create INBOX.lists announcements maildir:Maildir
</pre>
</div>
<p>This command creates a new folder <span class="quote">“<span class="quote">announcements</span>”</span> as a subfolders
of <span class="quote">“<span class="quote">INBOX.lists</span>”</span> in the local
maildir.</p>
</div>
<div class="refsect2" title="Deleting folders">
<a id="id543531" shape="rect" name="id543531"> </a>
<h3>Deleting folders</h3>
<div class="cmdsynopsis">
<p><code class="command">mailtool</code> -delete |
-deletedir <em class="replaceable"><code>folder</code></em> <em class="replaceable"><code>account</code></em></p>
</div>
<p><code class="literal">-delete</code> deletes an existing
<em class="replaceable"><code>folder</code></em> in
<em class="replaceable"><code>account</code></em>.</p>
<p><code class="literal">-deletedir</code> deletes a folder
directory.</p>
<div class="informalexample">
<pre class="programlisting" xml:space="preserve">
mailtool -delete INBOX.lists.announcements maildir:Maildir
</pre>
</div>
</div>
<div class="refsect2" title="Renaming folders">
<a id="id543626" shape="rect" name="id543626"> </a>
<h3>Renaming folders</h3>
<div class="cmdsynopsis">
<p><code class="command">mailtool</code> -rename
<em class="replaceable"><code>oldfolder</code></em>
<em class="replaceable"><code>folder</code></em>
<em class="replaceable"><code>name</code></em> <em class="replaceable"><code>account</code></em></p>
</div>
<p><code class="literal">-renames</code> renames an
existing <em class="replaceable"><code>oldfolder</code></em>. The folder is
renamed as <em class="replaceable"><code>name</code></em>,
as a subfolder of <em class="replaceable"><code>folder</code></em>. <em class="replaceable"><code>folder</code></em> may be an empty
string if the folder should be moved to the top level of
<em class="replaceable"><code>account</code></em>'s folder
hierarchy.</p>
<div class="informalexample">
<pre class="programlisting" xml:space="preserve">
mailtool -rename INBOX.lists.announcements INBOX.lists Announcements maildir:Maildir
</pre>
</div>
<p>The folder <span class="quote">“<span class="quote">INBOX.lists.announcements</span>”</span> is
renamed to <span class="quote">“<span class="quote">INBOX.lists.Announcements</span>”</span>.
This slightly unusual way to rename folder allows folders
to be relocated in the mail <em class="replaceable"><code>account</code></em>'s folder
hierarchy.</p>
</div>
<div class="refsect2" title="Reading folder's index">
<a id="id543740" shape="rect" name="id543740"> </a>
<h3>Reading folder's index</h3>
<div class="cmdsynopsis">
<p><code class="command">mailtool</code> -index
<em class="replaceable"><code>folder</code></em>
<em class="replaceable"><code>account</code></em></p>
</div>
<p><code class="literal">-index</code> downloads and prints
a summary of all messages in <em class="replaceable"><code>folder</code></em>, in <em class="replaceable"><code>account</code></em>. The summary shows
the sender's and recipients' address, the message's
subject, and size.</p>
<div class="informalexample">
<pre class="programlisting" xml:space="preserve">
mailtool -index INBOX imap://john@mail.example.com/novalidate-cert
</pre>
</div>
</div>
<div class="refsect2" title="Removing a message from a folder">
<a id="id543811" shape="rect" name="id543811"> </a>
<h3>Removing a message from a folder</h3>
<div class="cmdsynopsis">
<p><code class="command">mailtool</code> -remove
<em class="replaceable"><code>folder</code></em>
<em class="replaceable"><code>n</code></em> <em class="replaceable"><code>account</code></em></p>
</div>
<p><code class="literal">-remove</code> removes message
#<em class="replaceable"><code>n</code></em> (ranging from
1 to the number of messages in the folder) in <em class="replaceable"><code>folder</code></em>, in <em class="replaceable"><code>account</code></em>. The message
numbers may be obtained by using <code class="literal">-index</code>.</p>
<p><em class="replaceable"><code>n</code></em> may be a
comma-separated list of message numbers, in strictly
numerically increasing order. <code class="literal">-remove</code> confirms the list of messages to
remove and issues a <span class="quote">“<span class="quote">Ready:</span>”</span> prompt. Press
<span class="keycap"><strong>ENTER</strong></span> to
remove the messages.</p>
<div class="informalexample">
<pre class="programlisting" xml:space="preserve">
mailtool -remove INBOX 28,31 imap://john@mail.example.com/novalidate-cert
</pre>
</div>
</div>
<div class="refsect2" title="Filtering messages">
<a id="id543923" shape="rect" name="id543923"> </a>
<h3>Filtering messages</h3>
<div class="cmdsynopsis">
<p><code class="command">mailtool</code> -filter
<em class="replaceable"><code>folder</code></em>
<em class="replaceable"><code>account</code></em></p>
</div>
<p><code class="literal">-filter</code> is a combination of
<code class="literal">-index</code> and <code class="literal">-remove</code>. <em class="replaceable"><code>folder</code></em>'s index is
downloaded, and the summary of each message is shown, one
message at a time. Each message's summary is followed by a
prompt: <span class="quote">“<span class="quote">Delete, Skip, or Exit</span>”</span>.
Pressing <span class="keycap"><strong>D</strong></span>
removes the message, <span class="keycap"><strong>S</strong></span> leaves the message
unchanged, and <span class="keycap"><strong>E</strong></span> leaves the remaining
messages unchanged.</p>
<div class="informalexample">
<pre class="programlisting" xml:space="preserve">
mailtool -filter INBOX pop3://john@mail.example.com/novalidate-cert
</pre>
</div>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p><code class="literal">-filter</code> is not meant to
be used with large folders. Unless messages are removed
quickly, the connection to the server may be disconnected
for inactivity.</p>
</div>
</div>
<div class="refsect2" title="Copying folders">
<a id="id544037" shape="rect" name="id544037"> </a>
<h3>Copying folders</h3>
<div class="cmdsynopsis">
<p><code class="command">mailtool</code> [-recurse]
-tofolder <em class="replaceable"><code>tofolder</code></em> -copyto
<em class="replaceable"><code>toaccount</code></em>
-fromfolder <em class="replaceable"><code>fromfolder</code></em> <em class="replaceable"><code>fromaccount</code></em></p>
</div>
<p>This command copies an entire folder, <code class="literal">fromfolder</code> in <code class="literal">fromaccount</code> to a new folder, <code class="literal">tofolder</code> (which will be created, if
necessary) in <code class="literal">toaccount</code>.
Optionally, <code class="literal">-recurse</code> specifies
that all subfolders of <code class="literal">fromfolder</code> should also be copied.</p>
<div class="informalexample">
<pre class="programlisting" xml:space="preserve">
mailtool -tofolder INBOX -copyto maildir:Maildir \
-fromfolder "INBOX" imap://mbox100@mail.example.com/novalidate-cert
mailtool -recurse -tofolder INBOX.converted_mail \
-copyto maildir:Maildir -fromfolder "mail" \
imap://mbox100@mail.example.com/novalidate-cert
</pre>
</div>
<p>This example first copies the INBOX on the IMAP server
to <code class="filename">$HOME/Maildir</code>, then copies
subfolders of <span class="quote">“<span class="quote">mail</span>”</span> on the IMAP server to the
<span class="quote">“<span class="quote">converted_mail</span>”</span> subfolder in
the maildir.</p>
<div class="informalexample">
<pre class="programlisting" xml:space="preserve">
mailtool -tofolder INBOX -copyto maildir:Maildir \
-fromfolder "INBOX" inbox:mail
mailtool -recurse -tofolder INBOX.converted_mail \
-copyto maildir:Maildir -fromfolder "" mbox:mail
</pre>
</div>
<p>This example first copies <code class="filename">$HOME/Inbox</code> (accessed as the INBOX folder
in inbox:mail) to <code class="filename">$HOME/Maildir</code>, then copies mbox folders
from <code class="filename">$HOME/mail</code> to the
<span class="quote">“<span class="quote">converted_mail</span>”</span> subfolder in
the maildir.</p>
<div class="note" title="Note" style="margin-left: 0.5in; margin-right: 0.5in;">
<h3 class="title">Note</h3>
<p>Mail accounts that contain hybrid folders (folders
that contain both messages and subfolders) can only be
copied to account types that also support hybrid folders:
either local maildirs, or to remote servers that support
hybrid folders.</p>
</div>
</div>
</div>
<div class="refsect1" title="SEE ALSO">
<a id="id544238" shape="rect" name="id544238"> </a>
<h2>SEE ALSO</h2>
<p><a class="link" href="cone.html" title="cone" shape="rect"><span class="citerefentry"><span class="refentrytitle">cone</span>(1)</span></a>.</p>
</div>
</div>
<div class="navfooter">
<hr/>
<table width="100%" summary="Navigation footer">
<tr>
<td width="40%" align="left" rowspan="1" colspan="1">
<a accesskey="p" href="leaf.html" shape="rect">Prev</a> </td>
<td width="20%" align="center" rowspan="1" colspan="1">
<a accesskey="u" href="cone00index.html" shape="rect">Up</a></td>
<td width="40%" align="right" rowspan="1" colspan="1">
 <a accesskey="n" href="libmail.html" shape="rect">Next</a></td>
</tr>
<tr>
<td width="40%" align="left" valign="top" rowspan="1" colspan="1">leaf </td>
<td width="20%" align="center" rowspan="1" colspan="1">
<a accesskey="h" href="index.html" shape="rect">Home</a> | <a accesskey="t" href="bk01-toc.html" shape="rect">ToC</a></td>
<td width="40%" align="right" valign="top" rowspan="1" colspan="1">  <span class="application">LibMAIL</span>
reference</td>
</tr>
</table>
</div>
</body>
</html>
|