1pop3d::dbox(n)              Tcl POP3 Server Package             pop3d::dbox(n)
2
3
4
5______________________________________________________________________________
6

NAME

8       pop3d::dbox - Simple mailbox database for pop3d
9

SYNOPSIS

11       package require Tcl  8.3
12
13       package require pop3d::dbox  ?1.0.2?
14
15       ::pop3d::dbox::new ?dbName?
16
17       dbName option ?arg arg ...?
18
19       dbName destroy
20
21       dbName base base
22
23       dbName add mbox
24
25       dbName remove mbox
26
27       dbName move old new
28
29       dbName list
30
31       dbName exists mbox
32
33       dbName locked mbox
34
35       dbName lock mbox
36
37       dbName unlock mbox
38
39       dbName stat mbox
40
41       dbName size mbox ?msgId?
42
43       dbName dele mbox msgList
44
45       storageCmd get mbox msgId
46
47______________________________________________________________________________
48

DESCRIPTION

50       The package pop3d::dbox provides simple/basic mailbox management facil‐
51       ities. Each mailbox object manages a single base directory whose subdi‐
52       rectories  represent the managed mailboxes. Mails in a mailbox are rep‐
53       resented by files in a mailbox directory, where  each  of  these  files
54       contains   a   single   mail,   both  headers  and  body,  in  RFC  822
55       (http://www.rfc-editor.org/rfc/rfc822.txt) conformant format.
56
57       Any mailbox object following the interface described below can be  used
58       in conjunction with the pop3 server core provided by the package pop3d.
59       It is especially possible to directly use the objects created  by  this
60       package  in  the  storage  callback  of pop3 servers following the same
61       interface as servers created by the package pop3d.
62
63       ::pop3d::dbox::new ?dbName?
64              This command creates a new database object  with  an  associated
65              global Tcl command whose name is dbName.
66
67       The  command  dbName  may  be  used to invoke various operations on the
68       database.  It has the following general form:
69
70       dbName option ?arg arg ...?
71              Option and the args determine the exact behavior of the command.
72
73       The following commands are possible for database objects:
74
75       dbName destroy
76              Destroys the mailbox database and all transient data. The direc‐
77              tory associated with the object is not destroyed.
78
79       dbName base base
80              Defines  the  base directory containing the mailboxes to manage.
81              If this method is not called none of the following methods  will
82              work.
83
84       dbName add mbox
85              Adds  a mailbox of name mbox to the database. The name must be a
86              valid path component.
87
88       dbName remove mbox
89              Removes the mailbox specified through mbox, and the  mails  con‐
90              tained  therein, from the database. This method will fail if the
91              specified mailbox is locked.
92
93       dbName move old new
94              Changes the name of the mailbox old to new.
95
96       dbName list
97              Returns a list containing the names  of  all  mailboxes  in  the
98              directory associated with the database.
99
100       dbName exists mbox
101              Returns  true  if the mailbox with name mbox exists in the data‐
102              base, or false if not.
103
104       dbName locked mbox
105              Checks if  the  mailbox  specified  through  mbox  is  currently
106              locked.
107
108       dbName lock mbox
109              This method locks the specified mailbox for use by a single con‐
110              nection to the server. This is necessary  to  prevent  havoc  if
111              several connections to the same mailbox are open. The complemen‐
112              tary method is unlock. The command will return true if the  lock
113              could be set successfully or false if not.
114
115       dbName unlock mbox
116              This is the complementary method to lock, it revokes the lock on
117              the specified mailbox.
118
119       dbName stat mbox
120              Determines the number of messages in the specified  mailbox  and
121              returns  this  number.  This method fails if the mailbox mbox is
122              not locked.
123
124       dbName size mbox ?msgId?
125              Determines the size of the message specified through its  id  in
126              msgId,  in  bytes,  and  returns  this  number. The command will
127              return the size of the whole maildrop if no message id was spec‐
128              ified.   If  specified  the  msgId has to be in the range "1 ...
129              [dbName stat]" or this call will fail. If stat  was  not  called
130              before  this call, size will assume that there are zero messages
131              in the mailbox.
132
133       dbName dele mbox msgList
134              Deletes the messages whose numeric  ids  are  contained  in  the
135              msgList  from  the mailbox specified via mbox.  The msgList must
136              not be empty or this call will fail.  The numeric ids in msgList
137              have to be in the range "1 ...  [dbName stat]" or this call will
138              fail. If stat was not called before this call, dele will  assume
139              that there are zero messages in the mailbox.
140
141       storageCmd get mbox msgId
142              Returns  a  handle  for  the specified message. This handle is a
143              mime token following the interface described in  the  documenta‐
144              tion  of  package  mime. The token is read-only. In other words,
145              the caller is allowed to do anything with the  token  except  to
146              modify  it.   The  msgId  has to be in the range "1 ...  [dbName
147              stat]" or this call will fail. If stat  was  not  called  before
148              this  call,  get will assume that there are zero messages in the
149              mailbox.
150

BUGS, IDEAS, FEEDBACK

152       This document, and the package it describes, will  undoubtedly  contain
153       bugs  and  other problems.  Please report such in the category pop3d of
154       the  Tcllib  Trackers  [http://core.tcl.tk/tcllib/reportlist].   Please
155       also  report any ideas for enhancements you may have for either package
156       and/or documentation.
157
158       When proposing code changes, please provide unified diffs, i.e the out‐
159       put of diff -u.
160
161       Note  further  that  attachments  are  strongly  preferred over inlined
162       patches. Attachments can be made by going  to  the  Edit  form  of  the
163       ticket  immediately  after  its  creation, and then using the left-most
164       button in the secondary navigation bar.
165

KEYWORDS

167       internet, network, pop3, protocol, rfc 822
168

CATEGORY

170       Networking
171
173       Copyright (c) 2002 Andreas Kupries <andreas_kupries@users.sourceforge.net>
174
175
176
177
178tcllib                               1.0.2                      pop3d::dbox(n)
Impressum