checkcdb allows you to authorize POP users from a cdb database file. It's designed to be used with a qmail single-user-id setup, as outlined in Paul Gregg's Qmail Single UID HOWTO (except that you will, of course, be using checkcdb instead of any of the checkpasswords recommended in the HOWTO).
First, download checkcdb-0.54.tar.gz. Unzip and untar the tarball, and then run "make" to compile it and "make setup check" to install it. By default checkcdb will be installed in /usr/local/bin/. If you don't like this location, you can edit conf-home to taste.
In order to create the cdb files from which checkcdb authorizes POP users, you'll need to install Dan Bernstein's cdb package.
Two perl scripts--poppasswd and newpop--are included in the checkcdb distribution and will be installed along with checkcdb. They assume that the perl executable is /usr/bin/perl. If that's not what it is on your system, you'll need to edit poppasswd and newpop.
That's it for the installation. Now create a text file in /var/qmail/users containing your POP usernames and account information. Each record should be on a single line, formatted like this:
pop_login:crypted_password:real_login:pathFor example:
joe:pBrJZgj6qoJF2:popuser:/var/qmail/popboxes/joe
Call this file poppasswd. To compile it into a cdb, run newpop. Note that newpop doesn't attempt to protect you if you have invalid data in your poppasswd file. It just reads the lines, splits them up, and feeds them to cdbmake.
If all goes well, no errors will be reported, and you'll end up with your user database in /var/qmail/users/poppasswd.cdb.
You can use the included poppasswd perl script to edit users' passwords. If your system's crypt() doesn't support the type of passwords that mine does, you may need to fiddle with this script.
Chris Johnson