You are almost finished. Adding SquirrelMail to provide Webmail services will top off your server. Install SquirrelMail using the following command:
% /usr/sbin/pkg_add "r squirrelmailIf you watch the messages that FreeBSD shows onscreen, you'll notice that it installs several packages that Squirrelmail depends on, including PHP and the Apache Web server. Read the screen that appears after the SquirrelMail package is installed. It describes configuration actions you will need to take before SquirrelMail will work. To allow access to SquirrelMail in a browser, add an alias in /usr/local/etc/apache/httpd.conf pointing to /usr/local/www/squirrelmail. If the server isn't going to a webserver per se, you can do this by changing the variable DocumentRoot to /usr/local/www/squirrelmail. One dependency that will be installed with SquirrelMail is the scripting language PHP4. This adds several configuration files to /usr/local/etc, including two sample php.ini files. Create a php.ini file for the system as follows:
% cp php.ini-recommended php.iniLook in your new /usr/local/etc/php.ini and make sure that the following option is set:
file_uploads = OnSquirrelMail has a menu-driven configuration program, accessed by issuing this command:
% cd /usr/local/www/squirrelmail && ./configureGo through the menu items to configure SquirrelMail's options for your server—for example, the domain name. The menu items are self-explanatory and include examples. Now is a good time to start up Apache and see if your SquirrelMail configuration is any good. First, start Apache:
% /usr/local/sbin/apachectl startNext, open a Web browser on a second machine on your network and point it to http://
Look at the bottom of the sreen for the text "Congratulations, your SquirrelMail setup looks fine to me!" If you see it, click on the "Login now" link down at the bottom of the page. This will take you to the login screen:
By now you should haveve created at least one user other than root. Enter that non-root user login ID and password, and you'll be presented with your in-box:
For everyday Webmail logins using the configuration detailed in this Recipe, your users should point their Web browser to http://
# Automatically start apache on system boot. apache_enable="YES"
Congratulation, you now have an e-mail server that provides SMTP, POP, and IMAP servers, plus anti-virus and spam filtering, and that is accessible by popular e-mail clients such as Outlook, Mozilla Thunderbird, and Webmail.
That said, we've barely scratched the surface of the functionality offered by each of these programs. I encourage you to delve into their configuration files and the available literature to gain a better understanding of the systems, as well as to learn how to tweak them to best serve your customers' needs.
This is Part 2 of a two-part TechBuilder Recipe. Part 1 shows how how to create a secure, basic e-mail server for SMBs by using three open-source programs: FreeBSD, Postfix, and Dovecot.
DAVID S. MARKOWITZ is a computer network and integration consultant who serves SMBs and home users in the Philadelphia area.