Installing Qmailadmin

QmailAdmin is a cgi program for administering Qmail with vchkpw. It provides a web interface to create users, aliases, install ezmlm lists and also configure mailing robots. For more information, Please see http://www.inter7.com/qmailadmin/

We will want to patch qmailadmin with John Simpsons onchange patch. Since qmailadmin doesn't support onchange out of the box, We need to add support for it:


# cd /usr/ports/mail/qmailadmin
# make extract
# cd work/qmailadmin-1.2.10/ (<< The version here may vary)
# cp /downloads/qmailrocks/qmailadmin-1.2.11-onchange.2.patch qmailadmin-1.2.11-onchange.2.patch
# patch < qmailadmin-1.2.11-onchange.2.patch

You should get a fairly short output:

Hmm...  Looks like a unified diff to me...
The text leading up to this was:
--------------------------
|diff -ruN qmailadmin-1.2.9-factory/mailinglist.c qmailadmin-1.2.9-patched/mailinglist.c
|--- qmailadmin-1.2.9-factory/mailinglist.c     2005-02-16 11:10:37.000000000 -0500
|+++ qmailadmin-1.2.9-patched/mailinglist.c     2007-07-13 00:49:45.000000000 -0400
--------------------------
Patching file mailinglist.c using Plan A...
Hunk #1 succeeded at 30.
Hunk #2 succeeded at 325.
Hunk #3 succeeded at 634.
done


We now want to cd to the port and then run the configure command for qmailadmin. Please change the sections cgibindir, htmldir and imagedir to the cgi, html and image paths on your system.

Please type the make CONFIGURE_ARGS line in as ONE COMPLETE LINE!!!


# cd /usr/ports/mail/qmailadmin
# make CONFIGURE_ARGS="--enable-modify-spam=Y
--enable-spam-command='|preline -f /usr/local/bin/maildrop mailfilter'
--enable-cgibindir=/path/to/cgi-bin --enable-htmldir=/path/to/www
--enable-imagedir=/path/to/www/images --enable-help
--enable-autoresponder-path=/usr/local/bin"

In the above command in the section that reads "--enable-imagedir=/path/to/www/images" you actually have to make the images directory before you run the make install command next. So if your images folder you specified is located at /usr/local/www/apache22/data/images, you have to run mkdir /usr/local/www/apache22/data/images in order for the images to show up correctly. Capish?

Run the following to install qmailadmin:


# make install

If that compiles with no errors, qmailadmin is installed.

Configuring qmailadmin

When we add new users via qmailadmin, we want Spam Fighting turned on by default. Edit the following:


# vi /usr/local/share/qmailadmin/html/add_user.html

and then do a search for

<input type="checkbox" name="spamcheck">

and change it to

<input type="checkbox" name="spamcheck" checked>

This allows the "Spam Detection" box in the users email-account to automatically be checked when each user in qmailadmin is created

Now we want to clean up the install:


# cd /usr/ports/mail/qmailadmin
# make clean

That is it for configuring qmailadmin! If you go to http://www.domain.xxx/cgi-bin/qmailadmin you should see the logon screen. You can create some mailboxes for your domain if you like. If you need to add a domain, I would use the command line tool at ~vpopmail/bin/vadddomain

Installing vqAdmin