<html><head>
<title>pop3d::dbox - Tcl POP3 Server Package</title>
<style type="text/css"><!--
HTML {
background: #FFFFFF;
color: black;
}
BODY {
background: #FFFFFF;
color: black;
}
DIV.doctools {
margin-left: 10%;
margin-right: 10%;
}
DIV.doctools H1,DIV.doctools H2 {
margin-left: -5%;
}
H1, H2, H3, H4 {
margin-top: 1em;
font-family: sans-serif;
font-size: large;
color: #005A9C;
background: transparent;
text-align: left;
}
H1.doctools_title {
text-align: center;
}
UL,OL {
margin-right: 0em;
margin-top: 3pt;
margin-bottom: 3pt;
}
UL LI {
list-style: disc;
}
OL LI {
list-style: decimal;
}
DT {
padding-top: 1ex;
}
UL.doctools_toc,UL.doctools_toc UL, UL.doctools_toc UL UL {
font: normal 12pt/14pt sans-serif;
list-style: none;
}
LI.doctools_section, LI.doctools_subsection {
list-style: none;
margin-left: 0em;
text-indent: 0em;
padding: 0em;
}
PRE {
display: block;
font-family: monospace;
white-space: pre;
margin: 0%;
padding-top: 0.5ex;
padding-bottom: 0.5ex;
padding-left: 1ex;
padding-right: 1ex;
width: 100%;
}
PRE.doctools_example {
color: black;
background: #f5dcb3;
border: 1px solid black;
}
UL.doctools_requirements LI, UL.doctools_syntax LI {
list-style: none;
margin-left: 0em;
text-indent: 0em;
padding: 0em;
}
DIV.doctools_synopsis {
color: black;
background: #80ffff;
border: 1px solid black;
font-family: serif;
margin-top: 1em;
margin-bottom: 1em;
}
UL.doctools_syntax {
margin-top: 1em;
border-top: 1px solid black;
}
UL.doctools_requirements {
margin-bottom: 1em;
border-bottom: 1px solid black;
}
--></style>
</head>
<! -- Generated from file 'pop3d_dbox.man' by tcllib/doctools with format 'html'
-->
<! -- Copyright © 2002 Andreas Kupries <[email protected]>
-->
<! -- pop3d::dbox.n
-->
<body><hr> [
<a href="../../../../../../../../home">Tcllib Home</a>
| <a href="../../../../toc.html">Main Table Of Contents</a>
| <a href="../../../toc.html">Table Of Contents</a>
| <a href="../../../../index.html">Keyword Index</a>
| <a href="../../../../toc0.html">Categories</a>
| <a href="../../../../toc1.html">Modules</a>
| <a href="../../../../toc2.html">Applications</a>
] <hr>
<div class="doctools">
<h1 class="doctools_title">pop3d::dbox(n) 1.0.2 tcllib "Tcl POP3 Server Package"</h1>
<div id="name" class="doctools_section"><h2><a name="name">Name</a></h2>
<p>pop3d::dbox - Simple mailbox database for pop3d</p>
</div>
<div id="toc" class="doctools_section"><h2><a name="toc">Table Of Contents</a></h2>
<ul class="doctools_toc">
<li class="doctools_section"><a href="#toc">Table Of Contents</a></li>
<li class="doctools_section"><a href="#synopsis">Synopsis</a></li>
<li class="doctools_section"><a href="#section1">Description</a></li>
<li class="doctools_section"><a href="#section2">Bugs, Ideas, Feedback</a></li>
<li class="doctools_section"><a href="#keywords">Keywords</a></li>
<li class="doctools_section"><a href="#category">Category</a></li>
<li class="doctools_section"><a href="#copyright">Copyright</a></li>
</ul>
</div>
<div id="synopsis" class="doctools_section"><h2><a name="synopsis">Synopsis</a></h2>
<div class="doctools_synopsis">
<ul class="doctools_requirements">
<li>package require <b class="pkgname">Tcl 8.3</b></li>
<li>package require <b class="pkgname">pop3d::dbox <span class="opt">?1.0.2?</span></b></li>
</ul>
<ul class="doctools_syntax">
<li><a href="#1"><b class="cmd">::pop3d::dbox::new</b> <span class="opt">?<i class="arg">dbName</i>?</span></a></li>
<li><a href="#2"><b class="cmd">dbName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></li>
<li><a href="#3"><i class="arg">dbName</i> <b class="method">destroy</b></a></li>
<li><a href="#4"><i class="arg">dbName</i> <b class="method">base</b> <i class="arg">base</i></a></li>
<li><a href="#5"><i class="arg">dbName</i> <b class="method">add</b> <i class="arg">mbox</i></a></li>
<li><a href="#6"><i class="arg">dbName</i> <b class="method">remove</b> <i class="arg">mbox</i></a></li>
<li><a href="#7"><i class="arg">dbName</i> <b class="method">move</b> <i class="arg">old new</i></a></li>
<li><a href="#8"><i class="arg">dbName</i> <b class="method">list</b></a></li>
<li><a href="#9"><i class="arg">dbName</i> <b class="method">exists</b> <i class="arg">mbox</i></a></li>
<li><a href="#10"><i class="arg">dbName</i> <b class="method">locked</b> <i class="arg">mbox</i></a></li>
<li><a href="#11"><i class="arg">dbName</i> <b class="method">lock</b> <i class="arg">mbox</i></a></li>
<li><a href="#12"><i class="arg">dbName</i> <b class="method">unlock</b> <i class="arg">mbox</i></a></li>
<li><a href="#13"><i class="arg">dbName</i> <b class="method">stat</b> <i class="arg">mbox</i></a></li>
<li><a href="#14"><i class="arg">dbName</i> <b class="method">size</b> <i class="arg">mbox</i> <span class="opt">?<i class="arg">msgId</i>?</span></a></li>
<li><a href="#15"><i class="arg">dbName</i> <b class="method">dele</b> <i class="arg">mbox msgList</i></a></li>
<li><a href="#16"><i class="arg">storageCmd</i> <b class="method">get</b> <i class="arg">mbox</i> <i class="arg">msgId</i></a></li>
</ul>
</div>
</div>
<div id="section1" class="doctools_section"><h2><a name="section1">Description</a></h2>
<p>The package <b class="package">pop3d::dbox</b> provides simple/basic mailbox
management facilities. Each mailbox object manages a single base
directory whose subdirectories represent the managed mailboxes. Mails
in a mailbox are represented by files in a mailbox directory, where
each of these files contains a single mail, both headers and body, in
RFC 822 (<a href="http://www.rfc-editor.org/rfc/rfc822.txt">http://www.rfc-editor.org/rfc/rfc822.txt</a>) conformant
format.</p>
<p>Any mailbox object following the interface described below can be used
in conjunction with the pop3 server core provided by the package
<b class="package"><a href="pop3d.html">pop3d</a></b>. It is especially possible to directly use the objects
created by this package in the storage callback of pop3 servers
following the same interface as servers created by the package
<b class="package"><a href="pop3d.html">pop3d</a></b>.</p>
<dl class="doctools_definitions">
<dt><a name="1"><b class="cmd">::pop3d::dbox::new</b> <span class="opt">?<i class="arg">dbName</i>?</span></a></dt>
<dd><p>This command creates a new database object with an associated global
Tcl command whose name is <i class="arg">dbName</i>.</p></dd>
</dl>
<p>The command <b class="cmd">dbName</b> may be used to invoke various operations on
the database. It has the following general form:</p>
<dl class="doctools_definitions">
<dt><a name="2"><b class="cmd">dbName</b> <i class="arg">option</i> <span class="opt">?<i class="arg">arg arg ...</i>?</span></a></dt>
<dd><p><i class="arg">Option</i> and the <i class="arg">arg</i>s determine the exact behavior of the
command.</p></dd>
</dl>
<p>The following commands are possible for database objects:</p>
<dl class="doctools_definitions">
<dt><a name="3"><i class="arg">dbName</i> <b class="method">destroy</b></a></dt>
<dd><p>Destroys the mailbox database and all transient data. The directory
associated with the object is not destroyed.</p></dd>
<dt><a name="4"><i class="arg">dbName</i> <b class="method">base</b> <i class="arg">base</i></a></dt>
<dd><p>Defines the base directory containing the mailboxes to manage. If this
method is not called none of the following methods will work.</p></dd>
<dt><a name="5"><i class="arg">dbName</i> <b class="method">add</b> <i class="arg">mbox</i></a></dt>
<dd><p>Adds a mailbox of name <i class="arg">mbox</i> to the database. The name must be a
valid path component.</p></dd>
<dt><a name="6"><i class="arg">dbName</i> <b class="method">remove</b> <i class="arg">mbox</i></a></dt>
<dd><p>Removes the mailbox specified through <i class="arg">mbox</i>, and the mails
contained therein, from the database. This method will fail if the
specified mailbox is locked.</p></dd>
<dt><a name="7"><i class="arg">dbName</i> <b class="method">move</b> <i class="arg">old new</i></a></dt>
<dd><p>Changes the name of the mailbox <i class="arg">old</i> to <i class="arg">new</i>.</p></dd>
<dt><a name="8"><i class="arg">dbName</i> <b class="method">list</b></a></dt>
<dd><p>Returns a list containing the names of all mailboxes in the directory
associated with the database.</p></dd>
<dt><a name="9"><i class="arg">dbName</i> <b class="method">exists</b> <i class="arg">mbox</i></a></dt>
<dd><p>Returns true if the mailbox with name <i class="arg">mbox</i> exists in the
database, or false if not.</p></dd>
<dt><a name="10"><i class="arg">dbName</i> <b class="method">locked</b> <i class="arg">mbox</i></a></dt>
<dd><p>Checks if the mailbox specified through <i class="arg">mbox</i> is currently locked.</p></dd>
<dt><a name="11"><i class="arg">dbName</i> <b class="method">lock</b> <i class="arg">mbox</i></a></dt>
<dd><p>This method locks the specified mailbox for use by a single connection
to the server. This is necessary to prevent havoc if several
connections to the same mailbox are open. The complementary method is
<b class="method">unlock</b>. The command will return true if the lock could be set
successfully or false if not.</p></dd>
<dt><a name="12"><i class="arg">dbName</i> <b class="method">unlock</b> <i class="arg">mbox</i></a></dt>
<dd><p>This is the complementary method to <b class="method">lock</b>, it revokes the lock
on the specified mailbox.</p></dd>
<dt><a name="13"><i class="arg">dbName</i> <b class="method">stat</b> <i class="arg">mbox</i></a></dt>
<dd><p>Determines the number of messages in the specified mailbox and returns
this number. This method fails if the mailbox <i class="arg">mbox</i> is not
locked.</p></dd>
<dt><a name="14"><i class="arg">dbName</i> <b class="method">size</b> <i class="arg">mbox</i> <span class="opt">?<i class="arg">msgId</i>?</span></a></dt>
<dd><p>Determines the size of the message specified through its id in
<i class="arg">msgId</i>, in bytes, and returns this number. The command will
return the size of the whole maildrop if no message id was specified.
If specified the <i class="arg">msgId</i> has to be in the range "1 ... [<i class="arg">dbName</i> <b class="method">stat</b>]"
or this call will fail. If <b class="method">stat</b> was not called before this
call, <b class="method">size</b> will assume that there are zero messages in the
mailbox.</p></dd>
<dt><a name="15"><i class="arg">dbName</i> <b class="method">dele</b> <i class="arg">mbox msgList</i></a></dt>
<dd><p>Deletes the messages whose numeric ids are contained in the
<i class="arg">msgList</i> from the mailbox specified via <i class="arg">mbox</i>.
The <i class="arg">msgList</i> must not be empty or this call will fail.
The numeric ids in <i class="arg">msgList</i> have to be in the range "1 ...
[<i class="arg">dbName</i> <b class="method">stat</b>]" or this
call will fail. If <b class="method">stat</b> was not called
before this call, <b class="method">dele</b> will assume
that there are zero messages in the mailbox.</p></dd>
<dt><a name="16"><i class="arg">storageCmd</i> <b class="method">get</b> <i class="arg">mbox</i> <i class="arg">msgId</i></a></dt>
<dd><p>Returns a handle for the specified message. This handle is a mime
token following the interface described in the documentation of
package <b class="package"><a href="../mime/mime.html">mime</a></b>. The token is <em>read-only</em>. In other
words, the caller is allowed to do anything with the token except to
modify it.
The <i class="arg">msgId</i> has to be in the range "1 ...
[<i class="arg">dbName</i> <b class="method">stat</b>]" or this
call will fail. If <b class="method">stat</b> was not called
before this call, <b class="method">get</b> will assume
that there are zero messages in the mailbox.</p></dd>
</dl>
</div>
<div id="section2" class="doctools_section"><h2><a name="section2">Bugs, Ideas, Feedback</a></h2>
<p>This document, and the package it describes, will undoubtedly contain
bugs and other problems.
Please report such in the category <em>pop3d</em> of the
<a href="http://core.tcl.tk/tcllib/reportlist">Tcllib Trackers</a>.
Please also report any ideas for enhancements you may have for either
package and/or documentation.</p>
</div>
<div id="keywords" class="doctools_section"><h2><a name="keywords">Keywords</a></h2>
<p><a href="../../../../index.html#key131">internet</a>, <a href="../../../../index.html#key672">network</a>, <a href="../../../../index.html#key444">pop3</a>, <a href="../../../../index.html#key133">protocol</a>, <a href="../../../../index.html#key333">rfc 822</a></p>
</div>
<div id="category" class="doctools_section"><h2><a name="category">Category</a></h2>
<p>Networking</p>
</div>
<div id="copyright" class="doctools_section"><h2><a name="copyright">Copyright</a></h2>
<p>Copyright © 2002 Andreas Kupries <[email protected]></p>
</div>
</div></body></html>