This software is not provided or supported by the POPfile developers or Apple Inc. but by a customer for their own use. Please see the copyright notice and terms below.
- What you will need
- The installation
- Known bugs and limitations
- Release Notes
In general, installing software on the Mac is just as easy as on a PC; in many cases easier if you do the PC properly with a separate admin account—you don’t need to on OS X because of the Sudo based “run as admin” facility which really works. But some of the more obscure open source packages don’t have proper installers, probably due to low demand and/or lack of resources. One of these is the POPfile email classification (anti-spam) system. It works fine but is a pain to install with a dozen pre-req bits and pieces, some of which need to be compiled from scratch and even the documentation is a bit out of date. Having now done it, I will make my contribution to the project and publish an install script. Not a full blown installer, because I don’t know how to do that, but a scripted version of all the little bits that have to be done which will make it much simpler.
Note that some of this process requires the Admin password. Please ensure that you have this to hand before you start.
The first thing I had to decide was where to install it. As the portable POPfile system stores its database in the same location as the package code I came to the conclusion that putting it in the user's home directory was best because, from there, it would be easier to backup. There was also the decison on when to start it up; either at boot time or at login time. As the program needs to run as root (admin) because it opens a privileged port (110) to contact the email servers, I chose the former. These two requirements somewhat contradict but it works fine. This arrangement is most suited to a single user machine or one where multiple users are to share a common classification configuration and database. If you want an arrangement where multiple users each have their own configuration it would have to be done a different way.
There are some instructions on how to do this on the POPfile web site but they are a bit out of date and have some typographical errors but this is where I started. I thank the writer of that page (manni?) for much of information contained here. It states that POPfile doesn't fully support SQLite3 which is pre-installed on Mac OS X. I haven't verified whether this is still the case so I install and use SQLite2 as he does.
What you will need
There are eight files that you will need to download. I haven't bundled them all together because that will make the package flexible for new versions and save me having to track the changes with new releases here. These files should all be downloaded to the same place. It doesn't matter where but I would suggest “Downloads” in your home directory
- The installer package from this site (see below)
- The latest version of the Cross Platform version of POPfile. At the time of writing this is version 1.0.0 and is a ZIP file (don't open/expand it).
- Some Perl modules. Although Perl is pre-installed on OS
X, these are some extra modules which POPfile needs. They can
all be found on the CPAN web site.
Use the search engine at the top to find the latest versions
available using the keywords below. The link to the download
page you will need is the small one below the title which
includes the version number and then use the Download button
at the top. You will get files which end
“.tar.gz”. If they end “.pm” then you
have got the wrong ones.
- DBD-SQLite2—currently version 0.33
- DBI—currently version 1.604
- HTML-Tagset—currently version 3.20
- HTML-Template—currently version 2.9
- MIME-Base64—currently version 3.07
- TimeDate—currently version 1.16
You will also need the Apple Mac Xcode developer kit. It doesn't come pre-installed but can be found on Disc 2 (of 2) in your OS X 10.5 Leopard pack. If you haven't already done it for another project then it can be installed in the usual simple way by double clicking the package after inserting the disk, it doesn't require a reboot. Do this first before the other steps below. If you don't have the disks then it can also be downloaded from the Apple Website.
First you will need to extract the Installer files from their ZIP package. This can be done easily by double-clicking the file in Finder. This will put three files into your download directory—Install.sh, popfile.htm; a copy of this documentation and POPfile-AutoStart.tar.gz. We can ignore the latter for the moment but the Install.sh script may need a little bit of tailoring. This is the only hard bit that I couldn't automate. It has to be done so that the correct versions of the packages are installed. To do this you will need to open the Install.sh file in a plain text editor. You can use vi if you are familiar with it or TextEdit or aniother editor of your choice but it must not be a Word Processor. To use TextEdit, start it up from the applications folder and select File=>Open and locate the Install file. At the start, after the title, there is a section of definitions which give the version numbers of each of the packages e.g.
POPfile="1.0.0" SQLite2="0.33" DBI="1.604" Tagset="3.20" Template"2.9" Base64="3.07" TimeDate="1.16"
These numbers must be changed to match the versions of the packages that you have downloaded. Now this has been done save the file back as a plain text file. This is done in TextEdit using File=>Save.
The installer is a command line system, no GUI I'm afraid, but it is very simple so you needn't be afraid of openeing a Terminal session from the Applications folder. The first thing to do is navigate to the directory where all the files you have downloaded are. e.g.
brecon:- Rick$ cd Downloads brecon:- Rick$
Now run the installer—very simple. It will ask for your admin password fairly early so enter that when prompted…
brecon:- Rick$ sh Install.sh Password: <Lots of messages including some warnings for DBI> brecon:- Rick$
That is it. It will have checked for an existing instalation and stopped it if necessary, unloaded the POPfile package, installed all the Perl modules, created the boot time startup files and started POPfile. Now all you need to do is configure it using the instructions on the web site either using the Quickstart or the full How To manual. Go to http://localhost:8080 to get started.
Known bugs and limitations
- There are none known at present beyond the scope described in the introduction.
Before you report any bugs (and there are bound to be some) please check that you have followed the instructions exactly. If you need to report a problem please send as much information as possible to help with the diagnosis and so I can work with the same information that you have.
Contact information can be found on my Home Page.
Copyright ©2008 Rick Parsons, Bristol, England except those things that belong to the POPfile developers, The Perl developers or Apple Inc.
This software is published Open Source Freeware. You are free to use the programs either in full or part without charge. I would ask however that this notice is included with any extract or onward distribution.
No charge may be made for the use of this code, however there is no objection to including modest extracts (with acknowledgement) in otherwise commercial software.
No warranty is given or implied by the use of the software which you do at your own risk. No compensation can be considered regarding damage to data, computers or any thing else arising as a result of using these programs.
I try to keep my system virus free but you do check downloaded files yourself, don’t you? <grin>
The zip file contains the Installer, these instructions and all the AutoStart files. It does not contain POPfile itself or any of the pre-requisite stuff.
15 Apr 2008—Version 1.0 for POPfile 1.0.0 and Mac OS X 10.5.x (Leopard)—Beta Test Status
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (MingW32) iD8DBQBIBQZn34TVFVVXJwoRAp8CAKCZzNEA17dUYcS45aep4vkiPUkkYQCgyAOL HwcnBHMv7ZmQOG0Er0DhuX0= =dj2T -----END PGP SIGNATURE-----
For further information on digital signatures see The International PGP Home Page or the PGP Corporation. N.B. This signature will NOT be correct if you are reading this document offline from the zip file. The correct one is the online copy. I leave it as an exercise for the reader to decide why.
V1.0—Initial Beta test release.