Enabling web tools
In the two previous section, we 've installed 2 useful web tools (vqadmin and qmailadmin). We'll now enabling it ...
You first need to create appropriate name record in your DNS system (CNAME or A record). I advice you to create the alias mailadmin.yourdomain.tld pointing to your server IP. Whatever is your choice, this name should NOT BE THE SAME as your server hostname.
Then, create a virtual host corresponding to this new name record. Create the file /etc/apache2/sites-available/mailadmin.yourdomain.tld as following :
ServerAdmin your email adress
DocumentRoot /var/www/mail
ServerName mailadmin.yourdomain.tld
Options -Indexes
ErrorLog /var/log/apache2/mailadmin.yourdomain.tld-error.log
CustomLog /var/log/apache2/mailadmin.yourdomain.tld-access.log common
<Directory /var/www/mail/cgi-bin/>
Options ExecCGI FollowSymLinks -Indexes
ForceType cgi-script
AllowOverride All
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/mail/cgi-bin/vqadmin/>
deny from all
Options ExecCGI -Indexes
AllowOverride All
Order deny,allow
</Directory>
<Directory /var/www/mail/qmailadmin/>
Options -Indexes
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/mail/cgi-bin/images/>
ForceType Off
Options -Indexes
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/mail/images/qmailadmin/>
ForceType Off
Options -Indexes
Order allow,deny
Allow from all
</Directory>
<Directory /var/www/mail/images/vqadmin/>
ForceType Off
Options -Indexes
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
/etc/init.d/apache2 reload
We finally can test our web interfaces ...
Point your browser on http://mailadmin.yourdomain.tld/cgi-bin/vqadmin/vqadmin.cgi to test vqadmin (login: admin and the password you had chosen in step 7)
Point your browser on http://mailadmin.yourdomain.tld/cgi-bin/qmailadmin to test qmailadmin
Users comments
You may get
Invalid language file
error if your browser uses a default language encoding other than the ones that are supported by vqadmin. The quick solution is to copy one of the language files with a new name.
Example:
assume your vqadmin is installed in /var/www/mail/cgi-bin/vqadmin/
than you can do
cd /var/www/mail/cgi-bin/vqadmin/html
cp en tr
that solved my problem with Turkish encoding.
Thanks for the greate site.
What is the default User Account , Domain Name and Password for qmailadmin ?? After this process ??
To secure the documentroot directory i add this in the vhost configuration :
<Directory /var/www/mail/>
deny from all
Options -Indexes ExecCGI
AllowOverride All
Order deny,allow
</Directory>
In All directory definition in the Vhost configuration i add :
-Indexes in Options command.
>In your instruction what FQDN do you use to access the webmail interface? mailadmin.yourdomain.tld/webmail
Refer to http://qmailrocks.thibs.com/roundcubemail.php for the webmail part
>Why do you suggest the hostname be different from the mailadmin.yourdomain.tld?
It's to avoid changing the default apache configuration. I just make the changes into a virtual host
Thanks.
In your instruction what FQDN do you use to access the webmail interface? mailadmin.yourdomain.tld/webmail
Why do you suggest the hostname be different from the mailadmin.yourdomain.tld?
If you are not able to add a new domain in vqadmin , try tail -n 20 /var/log/apache2/mailadmin.yourdomain.tld-error.log
If you see something like "Warning: Failed to delete dir_control for yourdomain.tld" then check your mysql connection settings in /home/vpopmail/etc/vpopmail.mysql
Hello Omur,
First of all thanks you for your feedback ! I'm currently adapting this guide with some of your suggestions.
For your problem, did you follow this instruction :
You first need to create appropriate name record in your DNS system. I advice you to create mailadmin.yourdomain.tld pointing to your server IP.
Then, create a virtual host corresponding to this new name record. Create the file /etc/apache2/sites-available/mailadmin.yourdomain.tld as following :
Normally with the instruction
DocumentRoot /var/www/mail
in the the vhost, you do not need to put "mail" in your URL.
and with the instruction
Options ExecCGI
within Directory /var/www/mail/cgi-bin/ the cgi should execute instead of download
Please note that mailadmin.yourdomain.tld could not be your server name because the default apache debian package has special instruction. It should be another name for the same server
There's a problem here, or I've missed something.
First;
http://mailadmin.yourdomain.tld/cgi-bin/vqadmin/vqadmin.cgi
gives error, I've changed it to /mail/cgi-bin/vqadmin/vqadmin.cgi
but my browser now trying to download vqadmin.cgi file instead of opening it on browser. Now I'm stuck on this page.

Invalid language file
cd /var/www/mail/cgi-bin/vqadmin/html
e.g.: cp de de-de
but be aware!
some browsers have set e.g. "de-DE" (the second "DE" is UPPERcase!)
so you have to cp de de-DE