Admin of hashed directories Before starting on this document, you should read the USERNAMES document. For each user, you need to have a target Maildir (or mbox or .qmail file). All of these live in the /maildirs directory (if that's the setting you have for maildirs_basedir in hash_core.h). This whole directory structure is owned by the HASH_USER mentioned in the Makefile. Before any of the code will work, you need to create the /maildirs directory and all first level hashes, making sure these are owned by the HASH_USER, so for example, /bin/sh mkdir /maildirs for x in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 do; mkdir /maildirs/$x; done chown -R hashuser /maildirs exit Note that if you're using shared storage, /maildirs will probably be your mount-point. In this case, create a /maildirs on the local disks, and create the first level hashes on the shared storage (only). Why all this fuss over first level hashes? See USAGE.DELIVERY where it mentions temporary and permanent errors. For extra security, you may like to restrict access to just the HASH_USER, chmod -R 0700 /maildirs Now you're ready to populate this structure with directories for each of your users. This is done with the addhashuser program. You need to run this (and the other hashing programs) as the hash user: The easiest way to do this is to login as the hash user. If you don't wish to make the hash user a login user, you could make relevant binaries (addhashuser, addhashmaildir, hashop) SetUID to the hash user, but in this case, make sure you read the file SECURITY, which points out some of the issues relating to SetUID. OK, before we go on, let's be sure your PATH is meaningful. It should contain the directory where the hashing binaries and scripts are located - e.g. /var/qmail/hashbin. In addition, it should contain the qmail bin directory, e.g. /var/qmail/bin (this in particular for the addhashmaildir script which we'll see shortly...). Assuming you're logging in as the hash user to run the scripts, and that the hash user's shell is using Bourne shell, you might have a .profile for that user including the line, PATH=$PATH:/var/qmail/hashbin:/var/qmail/bin;export PATH Alternatively, if you're going down the perilous SetUID route, make sure your PATH is setup in the same way. Back to the addhashuser program: Let's add a user, addhashuser username If a user is to have a Maildir, addhashmaildir username Alternatively you may wish to do something more exotic, such as forward their mail elsewhere. This would normally be handled by a .qmail file, and this functionality still exists, hashop username vi .qmail The hashop program will move to username's directory: This way the .qmail file is in the correct location. You may have a number of different names for the same user, normally termed "aliases". You can add an alias as follows, addhashalias username aliasname If you're curious and wish to see where a particular user is hashed, showhashdir username and if you can't remember whether a name refers to an alias or is the actual username, showhashtype name