1pop3d::udb(n) Tcl POP3 Server Package pop3d::udb(n)
2
3
4
5______________________________________________________________________________
6
8 pop3d::udb - Simple user database for pop3d
9
11 package require Tcl 8.2
12
13 package require pop3d::udb ?1.0.1?
14
15 ::pop3d::udb::new ?dbName?
16
17 dbName option ?arg arg ...?
18
19 dbName destroy
20
21 dbName add user pwd storage
22
23 dbName remove user
24
25 dbName rename user newName
26
27 dbName lookup user
28
29 dbName exists user
30
31 dbName who
32
33 dbName save ?file?
34
35 dbName read file
36
37_________________________________________________________________
38
40 The package pop3d::udb provides simple in memory databases which can be
41 used in conjunction with the pop3 server core provided by the package
42 pop3d. The databases will use the names of users as keys and associates
43 passwords and storage references with them.
44
45 Objects created by this package can be directly used in the authentica‐
46 tion callback of pop3 servers following the same interface as servers
47 created by the package pop3d.
48
49 ::pop3d::udb::new ?dbName?
50 This command creates a new database object with an associated
51 global Tcl command whose name is dbName. The command dbName may
52 be used to invoke various operations on the database. It has
53 the following general form:
54
55 dbName option ?arg arg ...?
56 Option and the args determine the exact behavior of the command.
57
58 The following commands are possible for database objects:
59
60 dbName destroy
61 Destroys the database object.
62
63 dbName add user pwd storage
64 Add a new user or changes the data of an existing user. Stores
65 password and storage reference for the given user.
66
67 dbName remove user
68 Removes the specified user from the database.
69
70 dbName rename user newName
71 Changes the name of the specified user to newName.
72
73 dbName lookup user
74 Searches the database for the specified user and returns a two-
75 element list containing the associated password and storage ref‐
76 erence, in this order. Throws an error if the user could not be
77 found. This is the interface as expected by the authentication
78 callback of package pop3d.
79
80 dbName exists user
81 Returns true if the specified user is known to the database,
82 else false.
83
84 dbName who
85 Returns a list of users known to the database.
86
87 dbName save ?file?
88 Saves the contents of the database into the given file. If the
89 file is not specified the system will use the path last used in
90 a call to dbName read. The generated file can be read by the
91 read method.
92
93 dbName read file
94 Reads the specified file and adds the contained user definitions
95 to the database. As the file is actually source'd a safe inter‐
96 preter is employed to safeguard against malicious code. This
97 interpreter knows the add command for adding users and their
98 associated data to this database. This command has the same
99 argument signature as the method add. The path of the file is
100 remembered internally so that it can be used in the next call of
101 dbName save without an argument.
102
104 internet, network, pop3, protocol
105
107 Copyright (c) 2002 Andreas Kupries <andreas_kupries@users.sourceforge.net>
108
109
110
111
112pop3d 1.0.1 pop3d::udb(n)