Installing vQadmin

vqadmin is a web based cgi program. It allows system administrators to perform actions which require root access. The cgi is authenticated using Apache style htpasswd files. Root access is required for adding and deleting domains. A user based ACL provides control over what actions can be performed, such as adding/deleting a domain. Accessing user email account information to allow modification of user passwords and quota's. Account service restrictions include enabling or disabling of pop access, authentication based smtp relay control, courier-imap access and sqwebmail access.

vqadmin and qmailadmin can work together. qmailadmin can be used to allow users to administer thier own domains but not create new domains. Creation or deletion of domains is normally associated with the owner/admin's of the machine. Vqadmin is for owner/admin's or their technical support staff.

Lets start by changing to the vqadmin folder and then running the following make commands. Please change the cgi-bin and htmldir paths as required:

# cd /usr/ports/mail/vqadmin
# make CONFIGURE_ARGS="--enable-cgibindir=/path/to/cgi-bin --enable-htmldir=/path/to/www"
# make install clean

Now we will want to setup the .htaccess/.htpasswd files. This will allow only the people you choose to add/delete email addresses and control quotas, etc.

# cd /path/to/your/cgi-bin/vqadmin
# vi .htaccess

The following is what you will want to include in the .htaccess file. Please change the path for the AuthUserFile to the path where you will put the .htpasswd file. You can put this file anywhere on your system but I do not recommend that you put it into your www or cgi-bin folders. This is VERY insecure if you do that

AuthType Basic
AuthUserFile /path/to/where/you/want/to/store/the/password/file/.htpasswd
AuthName vQadmin
require valid-user
satisfy any

We will now want to chown the .htaccess file so only the Apache user can read it. You may need to change the chown to either "nobody", "apache" or "www" etc., depending on what user your installation of Apache is running as:

# chown www .htaccess

The following is the section where we create the .htpasswd. Again, You can put this file anywhere on your system but I would not recommend that you put it go into your www or cgi-bin folders. This is VERY unsecure if you do that. Please change the admin_password below to a password you choose to use to login to the site.

# htpasswd -bc /path/to/where/you/want/to/store/the/password/file/.htpasswd admin admin_password

Now you will need to add the following to your server's Apache configuration file (usually called httpd.conf):

<Directory "/path/to/your/cgi-bin/vqadmin">
deny from all
Options ExecCGI
AllowOverride AuthConfig
Order deny,allow

Run the following to restart apache:

# apachectl restart

Now to set the correct permissions on .htpasswd:

# chmod 644 /path/to/where/you/want/to/store/the/password/file/.htpasswd

To test vqadmin, browse to Log in with username admin and the password you created with the htpasswd command.

From within vqadmin you can add and configure your domains and E-mail user accounts.

You may now continue on to Upgrading and Maintaining the qmailrocks system