Guide On How To Install Qmailadmin On FreeBSD

Guide On How To Install Qmailadmin On FreeBSD 2017-08-04T09:49:32+00:00

A Step By Step Guide On How To Add A Domain To Qmail Scanner On FreeBSD
Qmailadmin is a web interface for administrating Qmail. You could live without Qmailadmin and use command line options instead and it would work flawlessly. But if you are not familiar with how that works Qmailadmin can make your life easier.

Preflight checklist

Qmailadmin relies on cgi so make sure is enabled in httd.conf usually located here /usr/local/etc/apache24/httpd.conf

Find the following lines. (This may differ a bit from httpd.conf to httpd.conf) but you get the idea.

# LoadModule cgi_module libexec/apache24/

And remove the # mark for the cgi module like this.

LoadModule cgi_module libexec/apache24/

Check for errors and restart apache.

apachectl configtest
apachectl restart

Download and patching Qmailadmin

The patch we are applying here is John Simpsons onchange patch.

cd ~root
tar zxvf qmailadmin-1.2.16.tar.gz
rm qmailadmin-1.2.16.tar.gz
cd qmailadmin-1.2.16
patch < qmailadmin-1.2.16-onchange.3.patch

You will get a small output ending with the following. The important part is whether it succeeded or not.

Patching file user.c using Plan A...
Hunk #1 succeeded at 626 (offset 15 lines).

Qmailadmin Pre-Configuration

Oh you gonna love this one. Please run the command below as "One Single Line" I can’t emphasize this enough.

Before you run it however please adjust the following statements to represent the paths on your system.


Optional Start.
maxusersperpage=50 (The number of accounts shown before you need to hit next)
maxaliasesperpage=50 (The number of alias's shown before you need to hit next)
Optional Stop.

Right let's go. Remember this is One single line.

./configure --enable-modify-spam=Y --enable-spam-command='|preline -f /usr/local/bin/maildrop mailfilter' --enable-htmldir=/usr/local/www --enable-cgibindir=/usr/local/www/cgi-bin --enable-imagedir=/usr/local/www/qmailimages --enable-qmaildir=/var/qmail --enable-vpopuser=vpopmail --enable-vpopgroup=vchkpw --enable-autoresponder-path=/usr/local/bin --enable-ezmlmdir=/usr/local/bin/ezmlm --enable-modify-quota --disable-ezmlm-mysql --enable-maxusersperpage=50 --enable-maxaliasesperpage=50

If you whish to add or remove functionality you can get a list of all options by running this command.

./configure --help=short

Installing Qmailadmin

make install-strip

Enable Spamcheck

We can enable spamcheck so it's selected by default in /usr/local/share/qmailadmin/html/add_user.html

Find the following line.

And change it to.

Fix Broken Images

If for some reason Qmailadmin images appears as broken you can fix this by adding an alias to your httpd.conf file like this.

Alias /images/qmailadmin "/real/path/to/qmail images/"

As for the logo on the front page that is missing you can grab it here.

cd /real/path/to/qmail images/

Accessing Qmailadmin

Access Qmailadmin from either or http://your-ip/cgi-bin/qmailadmin

And we are done here.

Spell checkers don’t – Grammar checkers don’t either.