pop3d::dbox(3tcl)
π pop3d::dbox β the Tcl POP3 Server Package manual, but make it cute β¨
okay bestie, buckle up, because this is the 3tcl manual page for pop3d::dbox and it's genuinely iconic π
πΈ NAME πΈ
pop3d::dbox β a simple mailbox database for pop3d π
β¨ SYNOPSIS β¨
package require Tcl 8.5 9
package require pop3d::dbox ?1.0.3?
::pop3d::dbox::new ?dbName?
dbName option ?arg arg ...?
dbName destroy
dbName base base
dbName add mbox
dbName remove mbox
dbName move old new
dbName list
dbName exists mbox
dbName locked mbox
dbName lock mbox
dbName unlock mbox
dbName stat mbox
dbName size mbox ?msgId?
dbName dele mbox msgList
storageCmd get mbox msgId
π¦ DESCRIPTION π¦
so the package pop3d::dbox hands you simple/basic mailbox management facilities. no cap. π
Every mailbox object manages a single base directory, and the subdirectories inside it are the mailboxes it manages. Mails inside a mailbox? They're just files in that mailbox's directory β each file holds one single mail, headers and body together, in RFC 822 (<http://www.rfc-editor.org/rfc/rfc822.txt>) conformant format. slay.
Any mailbox object that follows the interface described below can be used together with the pop3 server core provided by the package pop3d. And it is especially possible to directly use the objects created by this package in the storage callback of pop3 servers that follow the same interface as servers created by the package pop3d. it's giving plug-and-play, honestly. π₯
::pop3d::dbox::new ?dbName?
This command creates a new database object with an associated global Tcl command whose name is dbName. main character energy fr fr π
The command dbName may be used to invoke various operations on the database. It has the following general form:
dbName option ?arg arg ...?
option and the args determine the exact behavior of the command. iykyk.
The following commands are possible for database objects:
dbName destroy
Destroys the mailbox database and all transient data. π The directory associated with the object is not destroyed β she stays, she's fine, don't worry.
dbName base base
Defines the base directory containing the mailboxes to manage. ποΈ Heads up: if this method is not called, none of the following methods will work. like, none. zero. nada. π
dbName add mbox
Adds a mailbox of name mbox to the database. The name must be a valid path component. π
dbName remove mbox
Removes the mailbox specified through mbox, and the mails contained therein, from the database. This method will fail if the specified mailbox is locked. π (locked girlies stay locked, sorry.)
dbName move old new
Changes the name of the mailbox old to new. glow-up rebrand, we love to see it β¨
dbName list
Returns a list containing the names of all mailboxes in the directory associated with the database. π
dbName exists mbox
Returns true if the mailbox with name mbox exists in the database, or false if not. vibe check β
dbName locked mbox
Checks if the mailbox specified through mbox is currently locked. π
dbName lock mbox
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 unlock. The command will return true if the lock could be set successfully or false if not.
dbName unlock mbox
This is the complementary method to lock, it revokes the lock on the specified mailbox. π«Ά
dbName stat mbox
Determines the number of messages in the specified mailbox and returns this number. This method fails if the mailbox mbox is not locked. πβ‘οΈπ
dbName size mbox ?msgId?
Determines the size of the message specified through its id in msgId, 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 msgId has to be in the range "1 ... [dbName stat]" or this call will fail. β And if stat was not called before this call, size will assume that there are zero messages in the mailbox. π
dbName dele mbox msgList
Deletes the messages whose numeric ids are contained in the msgList from the mailbox specified via mbox.
The msgList must not be empty or this call will fail. The numeric ids in msgList have to be in the range "1 ... [dbName stat]" or this call will fail. If stat was not called before this call, dele will assume that there are zero messages in the mailbox. π
storageCmd get mbox msgId
Returns a handle for the specified message. This handle is a mime token following the interface described in the documentation of package mime. π§
The token is read-only. In other words, the caller is allowed to do anything with the token except to modify it. look respectfully, don't touch π
The msgId has to be in the range "1 ... [dbName stat]" or this call will fail. If stat was not called before this call, get will assume that there are zero messages in the mailbox.
π BUGS, IDEAS, FEEDBACK π
This document, and the package it describes, will undoubtedly contain bugs and other problems. π bestie it is what it is. Please report such in the category pop3d of the Tcllib Trackers [http://core.tcl.tk/tcllib/reportlist]. Please also report any ideas for enhancements you may have for either package and/or documentation. we want the feedback fr fr π«Ά
When proposing code changes, please provide unified diffs, i.e the output of diff -u. π
Note further that attachments are strongly preferred over inlined patches. Attachments can be made by going to the Edit form of the ticket immediately after its creation, and then using the left-most button in the secondary navigation bar. π
π KEYWORDS π
internet, network, pop3, protocol, rfc 822
π CATEGORY π
Networking
π COPYRIGHT π
Copyright (c) 2002 Andreas Kupries <andreas_kupries@users.sourceforge.net>
and that's the whole page, bestie!! this was pop3d::dbox, version 1.0.3, straight outta tcllib β you ate that, periodt. go lock a mailbox and be free πβ¨
π¦ where this page comes from
- debian trixie: tcllib 2.0+dfsg-4 Β· Tcl
- ubuntu questing: tcllib 2.0+dfsg-4
- ubuntu resolute: tcllib 2.0+dfsg-5 Β· Tcl
- ubuntu stonking: tcllib 2.0+dfsg-6 Β· Tcl
- Copyright (c) 2002 Andreas Kupries <andreas_kupries@users\&.sourceforge\&.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms