Qmailrocks.org FreeBSD Pre-Installation Checklist

A successful QMR installation requires certain packages be installed and certain configurations be present on your server. I've put together this page to provide a general checklist for visitors to use before they begin the installation. Keep in mind that, since setups will vary from server to server, you may find some requirements that are not listed here. This list is by no means a finished list, so if you find a requirement that you feel is vital and is not present on this page, please feel free to let me know.

1) First I would suggest using FreeBSD 7.0-STABLE.

2) Adequate storage depnding on use of mail services. If you plan on having a small scale server or one just for testing, you shouldn't have to worry about storage. If you plan on using a qmail server in a production enviornment, plan on adjusting /var and /home/vpopmail as needed. if you plan on hosting 100+ virtual domains, plan on a large /var and /home/vpopmail as these are where the qmail log files are and also your virtual domains.

3) I would also HIGHLY SUGGEST that you have at least 1-2 years of freeBSD/Unix experience. The more you know about FreeBSD/linux distros, the more comfortable you will be with qmail. If you plan on running a qmail server with no prior experience in FreeBSD/linux, plan on having more problems that just qmail.

4) As far as whats required, any dependancies needed by any program are installed from the ports system automatically. Any of the optional components as far as adding or removing accounts/domains via webmail will need the following installed:

Apache 2.2 or Higher
PHP 5.x or Higher
Bash Shell - You need to have the bash shell installed in order for qmail-scanner to install properly. You can install it using the freebsd port at /usr/ports/shells/bash
Gmake . Please install this using the port - /usr/ports/devel/gmake. If you don't, compiling vpopmail will give you some issues.
Unzip - As of 3/8/07 when I was running qms-config it complained about not having unzip installed. So go and install the port at /usr/ports/archivers/unzip

One last thing is before you install qmail, please make sure your Ports are updated. There are several ways to do this so if you have updated your /etc/make.conf to include port updates, you can do this by running the following:


# cd /usr/ports
# make update

5) IMPORTANT NOTE: Keep in mind the the following ports are what are required to be open for only the QMR install. More than likely, a fully functioning webserver is going to have more ports open for various other services. So, do not use the port listing below to construct a NEW firewall without first determining what other ports you will need to open.

Outbound ports (tcp)

25 - SMTP
80 - HTTP
110 - POP services
143 - IMAP
443 - HTTPS
465 - SMTP SSL
783 - Spamassassin
993 - IMAP-SSL
995 - POP3-SSL

Inbound Ports (tcp)

25 - SMTP
80 - HTTP
110 - POP services
143 - IMAP
443 - HTTPS
465 - SMTP SSL
783 - Spamassassin
993 - IMAP-SSL
995 - POP3-SSL

As of this writing 12/17/08: I have now removed outgoing auth on port 25. You can go to John Simpsons site and look up the options to turn this back on if you like. I would HIGHLY SUGGEST that you leave SMTP-AUTH on port 25 off and go on with the rest of the documentation. You can tell your customers/users to send mail via port 465 (SSL). This way, You can turn on validrcptto, RBLs, jgreylist and the like without having your clients email programs time out on you. If they send mail via SSL, this will skip all these checks.

I will give you a for instance case: Lets say you currently have your customers sending mail on port 25. If you enable anything in the qmail-smtpd/run script this will cause additional delay when your clients send mail. If you enable greylisting and you set the delay to answer for 10 seconds, thats an additional 10 seconds your client has to wait to send auth.

This documentation will install everything you need virtually from ports. When I say virtually, I mean just a few key components are not ported at the present time of this writing. What I love about ports is that upgradng the software is quite simple by just running the portupgrade command and checking a few conf files, running some ownership/permissions and you're off and running.

The vpopmail skel patch allows you to patch vpopmail so you can make your own custom directories. If you create a user with just the normal vpopmail install, you get a default Maildir with new, tmp and cur in it which really doesn't allow you to do too much with filtering and the like. If you create a new user and vpopmail has been patched with the skel patch, The users maildir is copied from the ~vpopmail/skel dir. If you really think about it, you can pretty much add your own maildrop recipe into the skel dir along with the .qmail file. If you add the qmailadmin into the mix, you or your users can turn on or off the spam filtering at your or their leisure. If you really know what you're doing, this can open up a whole new worl d with vpopmail. I have been using a custom Maildir structure for more than 2 years without any issues.

I am dividing up the qmail install into a few separate sections. The first part involves getting qmail running on your box and getting everything working. The second part of it, what I would call "webify" qmail, is adding the options to add users and email lists via qmailadmin and other types of web interfaces like squirrelmail.

Please note that as of this writing vpopmail with mysql is not an option at this point. Generally as a rule you do not need vpopmail with mysql unless you're running 100's or 1000's of domains and/or usernames or unless you have a sepcific need for mysql. The vpopmail with mysql option will be available at some point.

So, in closing I hope you enjoy the install. Please email me if you have any questions! Lets start with the first step!

Download qmailrocks and update it