Guide updated on 29th of December 2011

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 :

<VirtualHost *:80>
        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>


a2ensite mailadmin.yourdomain.tld
/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

Remove installed MTA


Users comments
Richard mastny - 03/02/2012 03:55

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

Abdullah aykir - 11/11/2011 16:48

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.

Greg - 29/10/2011 07:42

What is the default User Account , Domain Name and Password for qmailadmin ?? After this process ??

Noritaka - 21/01/2011 19:38

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.

 

Thibs - 20/12/2010 12:36

>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


Rdun - 15/12/2010 03:48

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?

Ivo - 27/09/2010 18:50

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

Thibs - 06/08/2010 15:34

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

Omur - 06/08/2010 01:14

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.


Color Coded Qmail Installation Key
  Regular Black Text     Qmail installation notes and summaries by the author.
  Bold Black Text     Commands to be run by you, the installer.
  Bold/Regular Red Text    Vital and/or critical information.
  Regular Blue text     Denotes helpful tips and hints or hyperlinks.
  Regular Orange Text     Command line output.
  Bold/Regular green text     Denotes the contents of a file or script.