pop3d::udb(3tcl)
β¨ pop3d::udb β the simple user database for pop3d β¨
okay bestie, welcome to pop3d::udb, part of the Tcl POP3 Server Package (that's the 3tcl manual, iykyk) π
πΈ NAME πΈ
pop3d::udb β a simple user database for pop3d π«Ά
π¦ SYNOPSIS π¦
package require Tcl 8.5 9
package require pop3d::udb ?1.0.1?
::pop3d::udb::new ?dbName?
dbName option ?arg arg ...?
dbName destroy
dbName add user pwd storage
dbName remove user
dbName rename user newName
dbName lookup user
dbName exists user
dbName who
dbName save ?file?
dbName read file
π DESCRIPTION π
So the package pop3d::udb hands you simple in-memory databases that you can use together with the pop3 server core that the pop3d package gives you. The way it works is: user names are the keys, and each one gets a password and a storage reference associated with it. iconic, honestly.
The objects this package makes can be dropped directly into the authentication callback of pop3 servers that follow the same interface as the servers made by the pop3d package. no glue code, no drama π
::pop3d::udb::new?dbName? β creates a brand new database object with an associated global Tcl command whose name is dbName.
The command dbName is what you use to invoke the various operations on the database, and its general form is:
dbName option ?arg arg ...?β option and the args decide exactly what the command does.
Here are all the commands you can run on a database object, bestie:
dbName destroyβ destroys the database object. poof, gone πdbName add user pwd storageβ adds a new user, or changes the data of a user who's already there. stores the password and the storage reference for the given user.dbName remove userβ removes the specified user from the database.dbName rename user newNameβ changes the name of the specified user to newName.dbName lookup userβ searches the database for the specified user and returns a two-element list holding the associated password and storage reference, in that order. it throws an error if the user can't be found π. this is exactly the interface that the authentication callback of the packagepop3dexpects.dbName exists userβ returns true if the specified user is known to the database, otherwise false.dbName whoβ returns a list of the users known to the database. the whole squad π―dbName save ?file?β saves the contents of the database into the given file. if you don't specify a file, the system uses the path last used in a call todbName read. the file it generates can be read back by the read method. πdbName read fileβ reads the specified file and adds the user definitions it contains to the database. because the file is actually source'd, a safe interpreter is employed to safeguard against malicious code π‘οΈ. this interpreter knows theaddcommand for adding users and their associated data to this database, and that command has the same argument signature as the methodadd. the path of the file is remembered internally so it can be used in the next call ofdbName savewith no argument.
π BUGS, IDEAS, FEEDBACK π
ngl, this document β and the package it describes β will undoubtedly contain bugs and other problems. please report them in the category pop3d of the Tcllib Trackers: http://core.tcl.tk/tcllib/reportlist. and please also report any ideas for enhancements you have for either the package and/or the documentation π«Ά
When you propose code changes, please provide unified diffs, i.e the output of diff -u.
Also note: attachments are strongly preferred over inlined patches. you make an attachment 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. don't skip this part bestie, it matters π
π KEYWORDS π
internet, network, pop3, protocol
π CATEGORY π
Networking
π COPYRIGHT π
Copyright (c) 2002 Andreas Kupries <andreas_kupries@users.sourceforge.net>
okay that's the whole vibe, you're all caught up β¨ this was tcllib 1.0.1, pop3d::udb(3tcl), and it ate, no cap π
π¦πΈ
π¦ 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