Guide updated on 29th of February 2016

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.conf as following :

<VirtualHost *:80>
        ServerAdmin your_email_adress
        DocumentRoot /var/www/mail
        ServerName mailadmin.yourdomain.tld
        ErrorLog /var/log/apache2/mailadmin.yourdomain.tld-error.log
        CustomLog /var/log/apache2/mailadmin.yourdomain.tld-access.log common
        <Directory /var/www/mail>
                AllowOverride All
                Options -Indexes
                Require all granted
        </Directory>
        <Directory /var/www/mail/cgi-bin/>
                Options +ExecCGI +FollowSymLinks
                ForceType cgi-script
                Require all granted
        </Directory>
        <Directory /var/www/mail/cgi-bin/vqadmin>
                AddHandler cgi-script .cgi
                ForceType Off
                AllowOverride None
                AuthType basic
                AuthName "private"
                AuthUserFile /var/www/mail/cgi-bin/vqadmin/.htpasswd
                Require valid-user
        </Directory>
        <Directory /var/www/mail/images/qmailadmin/>
                ForceType Off
                Require all granted
        </Directory>
</VirtualHost>

You can create this virtualhost file like this :

cp /downloads/scripts/mailadmin.yourdomain.tld /etc/apache2/sites-available/mailadmin.yourdomain.tld.conf
cd /etc/apache2/sites-available/
sed -i 's/mailadmin.yourdomain.tld/mailadmin.yourdomain.tld/' mailadmin.yourdomain.tld.conf
sed -i 's/your_email_adress/[email protected]/' mailadmin.yourdomain.tld.conf

a2ensite mailadmin.yourdomain.tld
sed -e '/ScriptAlias/ s/^#*/#/' -i /etc/apache2/conf-available/serve-cgi-bin.conf
a2enmod cgi
systemctl restart apache2

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


Error connecting to Database!



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.