pop3d::dbox(3tcl)

πŸ“¦
version 2.0 Β· 2 versions
, in debian trixie, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’Œ 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 (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