pop3d::udb(n)

πŸ“¦
version 2.0 Β· 2 versions
, in fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

πŸ’– NAME πŸ’–

pop3d::udb β€” the simplest little user database for pop3d, bestie. it's giving "small but mighty" and honestly? iconic. ✨

(it's a Tcl POP3 Server Package page, for the record β€” pop3d::udb(n), that's her full government name πŸ’…)


🌸 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

like, look at her. so organized. so slay. πŸŽ€


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so the package pop3d::udb hands you simple in-memory databases that you can plug right into the pop3 server core from the package pop3d. no cap. 🫢

the way it works is: the users' names are the keys, and the database associates passwords and storage references with them. that's the whole vibe.

and here's the best part β€” objects created by this package can be dropped directly into the authentication callback of pop3 servers that follow the same interface as servers created by the package pop3d. plug and play, periodt. πŸ’…

🌟 ::pop3d::udb::new ?dbName?

this command creates a brand new database object, and it comes with a global Tcl command whose name is dbName. new bestie unlocked ✨

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. classic.

the following commands are possible for database objects:

✨ the commands ✨

  • dbName destroy β€” destroys the database object. she's gone, she's at peace, we love a clean exit. πŸ’€
  • dbName add user pwd storage β€” add a new user, or change the data of a user who already exists. stores the password and the storage reference for the given user. lowkey the workhorse of the whole operation.
  • dbName remove user β€” removes the specified user from the database. bye bestie πŸ¦‹
  • dbName rename user newName β€” changes the name of the specified user to newName. glow-up name change, we support it. πŸ’…
  • dbName lookup user β€” searches the database for the specified user and returns a two-element list containing the associated password and storage reference, in this order: password first, storage second. > throws an error if the user could not be found. 😭 and this, right here, is the interface as expected by the authentication callback of package pop3d. iykyk.
  • dbName exists user β€” returns true if the specified user is known to the database, else false. simple. honest. a vibe check, basically. ⭐
  • dbName who β€” returns a list of users known to the database. the full roster. the guest list. πŸ‘‘
  • dbName save ?file? β€” saves the contents of the database into the given file. if the file is not specified, the system will use the path last used in a call to dbName read. and the generated file can be read by the read method β€” it's a whole circular ecosystem, we love to see it. 🌈
  • dbName read file β€” reads the specified file and adds the contained user definitions to the database. here's the important part, bestie: because the file is actually source'd, a safe interpreter is employed to safeguard against malicious code. πŸ›‘οΈ that safe interpreter knows the add command for adding users and their associated data to this database, and that command has the same argument signature as the method add. also, the path of the file is remembered internally, so it can be used in the next call of dbName save without an argument. see? ecosystem. 🧚

πŸ’€ BUGS, IDEAS, FEEDBACK πŸ’€

ngl, this document and the package it describes will undoubtedly contain bugs and other problems. that's just how it is, no shade. please report such in the category pop3d of the Tcllib Trackers at [http://core.tcl.tk/tcllib/reportlist]. πŸ™ˆ

also please report any ideas for enhancements you may have for either the package and/or the documentation. we're listening, we're invested. 🫢

when proposing code changes, please provide unified diffs, i.e the output of diff -u. fr fr, this one matters.

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. that's the move. ✨


πŸ”₯ KEYWORDS πŸ”₯

internet, network, pop3, protocol


πŸŽ€ CATEGORY πŸŽ€

Networking


Copyright (c) 2002 Andreas Kupries <andreas_kupries@users.sourceforge.net>


okay that's the whole page, bestie!! this was brought to you by tcllib, version 1.0.1 β€” go off, drink water, and remember: your user database is only as good as your safe interpreter. πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…

πŸ“¦ where this page comes from