This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
howtos:macosx [2007/01/22 13:48] – manni | howtos:macosx [2015/04/11 09:57] – amatubu | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Installing POPfile | + | ====== Using POPFile |
- | This procedure shows you how to install POPfile on Mac OS X 10.4.x systems, and how to create a startup item that will start POPfile each time you reboot the system. | + | POPFile v1.1.0 comes with the first official Mac OS X installer! You can now install POPFile on your Mac easily. |
+ | |||
+ | ===== System Requirements ===== | ||
+ | |||
+ | You'll need several things to get started with POPFile on Mac OS X. | ||
+ | |||
+ | * Mac OS X 10.3.9 or later. | ||
+ | |||
+ | * The [[/ | ||
+ | |||
+ | * An e-mail account that uses the POP3 protocol (most accounts do, although you can't use POPFile with web-based services like Hotmail and Yahoo! Mail without extra software. See [[:HowTos | Configuring Proxies & Firewalls]]). | ||
+ | |||
+ | * Approximately 12.2MB free disk space is required for the default installation created by the Mac OS X installer. | ||
+ | |||
+ | * POPFile itself occupies about 3.8MB. | ||
+ | |||
+ | * POPFile is written in Perl and requires some extra Perl modules so the installer installs the modules which occupies approximately 4.4MB. These modules are compiled in the Universal binary format, which means that POPFile will run natively on both PPC and Intel Macs. | ||
+ | |||
+ | * The installer installs the ' | ||
+ | |||
+ | * The installer also installs XMLRPC module, NNTP/SMTP proxies and IMAP module. | ||
+ | |||
+ | * The SSL Support is no longer an option. POPFile installer will install the modules which are needed to use SSL connections. | ||
+ | |||
+ | * The word lists (called the corpus) used to classify your email will take some additional space depending on how much mail you use to train POPFile and how many buckets you create. POPFile keeps a temporary copy of recent mail (the Message History) for a few days to make it easy to correct any classification errors so some extra space is required for these recent messages. For some users only a few extra MB will be sufficient for the corpus and Message History, for others an additional 100 MB may be required. | ||
+ | |||
+ | ===== Installation ===== | ||
+ | |||
+ | - Download the Mac OS X installer from the [[/ | ||
+ | - Run // | ||
+ | - POPFile will be installed in ''/ | ||
+ | - Configure buckets. See [[: | ||
+ | - Configure your email client. See [[:HowTos | Configuring Specific Mail Clients]]. | ||
+ | |||
+ | ===== Accessing POPFile ===== | ||
+ | |||
+ | * POPFile doesn' | ||
+ | |||
+ | * To load POPFile, go to [" | ||
+ | |||
+ | * If you get an error message, check that POPFile is really running, and that you have the port number correct (it should be 8080, but if you changed it, you'll also need to change that in the web address you're going to.) | ||
+ | |||
+ | ===== Utility scripts included in the installer package ===== | ||
+ | |||
+ | The installer package includes several utility scripts written in %%AppleScript%%. You can copy them to your hard drive. | ||
+ | |||
+ | * start-popfile - Launch POPFile (in background). Requires root privilege. | ||
+ | |||
+ | * stop-popfile - Stop POPFile. Requires root privilege. | ||
+ | |||
+ | * open-popfile-ui - Open POPFile UI with your default web browser. | ||
+ | |||
+ | * start-popfile-with-console - Lanuch POPFile in the Terminal.app. Useful for debugging. | ||
+ | |||
+ | * custom-data-folder - Choose custom data folder and run POPFile using the chosen data folder. | ||
+ | |||
+ | * uninstall-popfile - Remove POPFile program and data files (corpus and configuration files) from your Mac. | ||
+ | |||
+ | ===== Uninstalling ===== | ||
+ | |||
+ | - Run the ' | ||
+ | |||
+ | ====== Installing POPfile MANUALLY on Mac OS X 10.4.x (Tiger) or later ====== | ||
+ | |||
+ | This procedure shows you how to install POPfile on Mac OS X 10.4.x | ||
As of Mac OS X 10.4, Mac OS X comes with Perl and SQLite3 installed. So you'll simply need to install Xcode, a few Perl library packages, and a startup item. | As of Mac OS X 10.4, Mac OS X comes with Perl and SQLite3 installed. So you'll simply need to install Xcode, a few Perl library packages, and a startup item. | ||
- | At the time of this writing (January 2007), POPfile does not fully support SQLite3. On Mac OS X 10.4.x systems, POPfile requires the SQLite2 Perl package, DBD:: | + | To run POPfile in Mac OS X 10.4.x |
* Apple' | * Apple' | ||
* Perl library packages — that POPfile uses to classify email | * Perl library packages — that POPfile uses to classify email | ||
* POPfile startup item — to automatically start POPfile whenever you restart your computer | * POPfile startup item — to automatically start POPfile whenever you restart your computer | ||
- | * SQLite version 2 command-line tool (Optional) — an external tool you may use to de-fragment or verify the integrity of your POPfile database | ||
- | |||
- | **Note:** Because setting up CPAN, a Perl package manager, or Fink, another package manager, on a virgin system can complicate matters, we'll stick with the source and do it the old-school way to avoid complications. | ||
- | **Note:** To edit scripts | + | **Note**: Because setting up CPAN, a Perl package manager, |
- | **TIP:** On the command line, %%~%% means "your home directory" | + | **Note**: To edit scripts or configuration files, use a plain text editor (like the command-line editor,vi, or the GUI editor [[http:// |
+ | **TIP**: On the command line, %%~%% means "your home directory" | ||
===== Step By Step Instructions ===== | ===== Step By Step Instructions ===== | ||
Line 29: | Line 91: | ||
- Download the cross-platform version of POPFile from here: [[http:// | - Download the cross-platform version of POPFile from here: [[http:// | ||
- Download these Perl library packages (from the [[http:// | - Download these Perl library packages (from the [[http:// | ||
- | * Date::Parse - part of [[http:// | + | * Date::Parse - part of [[http:// |
- | * Date:: | + | * Date:: |
- | * HTML:: | + | * HTML:: |
- | * DBI - [[http:// | + | * DBI - [[http:// |
- | * DBD:: | + | * DBD:: |
- | * MIME::Base64 | + | * DBD::SQLite |
- | * HTML:: | + | * HTML:: |
- | * HTML:: | + | * HTML:: |
+ | * Net:: | ||
+ | * IO:: | ||
+ | * SOAP::Lite - [[http:// | ||
+ | * IO:: | ||
- Install each of the Perl library packages you downloaded in the previous step: | - Install each of the Perl library packages you downloaded in the previous step: | ||
- Open a terminal window if one is not already open. | - Open a terminal window if one is not already open. | ||
Line 43: | Line 109: | ||
- Enter the command to change the working directory to the expanded package folder (where //name// is the name of the expanded package folder): < | - Enter the command to change the working directory to the expanded package folder (where //name// is the name of the expanded package folder): < | ||
- Enter the command to build the GCC make file from the Perl make file: < | - Enter the command to build the GCC make file from the Perl make file: < | ||
- | - Enter the command to compile the project: < | + | - Enter the command to compile the project: < |
- Enter the command to install the library package into your system: < | - Enter the command to install the library package into your system: < | ||
Line 49: | Line 115: | ||
==== Installing POPFile ==== | ==== Installing POPFile ==== | ||
- | - Enter the command to create a folder to hold POPfile (we suggest | + | - Enter the command to create a folder to hold POPfile (we suggest ~/ |
- | - Copy or move the POPfile ZIP archive into < | + | - Copy or move the POPfile ZIP archive into ~/ |
- | - Expand the POPfile ZIP archive archive in the < | + | - Expand the POPfile ZIP archive archive in the ~/ |
+ | |||
Line 57: | Line 125: | ||
- Open a terminal window if one is not already open. | - Open a terminal window if one is not already open. | ||
- | - Enter the command to change the working directory to the < | + | - Enter the command to change the working directory to the ~/ |
- | - Enter the command to start POPfile manually: < | + | - Enter the command to start POPfile manually: < |
- | - Watch the output in the terminal. If POPfile is installed properly, you should not see any errors. \\ **Note:** If you start POPfile and it outputs an error starting out with something like: < | + | - Watch the output in the terminal. If POPfile is installed properly, you should not see any errors. \\ **Note:** If you start POPfile and it outputs an error starting out with something like: Can't locate DBD/ |
+ | listen port 110. This could be because there is another service | ||
+ | using that port or because you do not have the right privileges on | ||
+ | your system (On Unix systems this can happen if you are not root | ||
+ | and the port you specified is less than 1024). | ||
+ | |||
- Type Control-C into the terminal window to stop POPfile and exit to the command prompt. | - Type Control-C into the terminal window to stop POPfile and exit to the command prompt. | ||
+ | |||
At this point POPfile is installed properly, but will not start up automatically every time you reboot. | At this point POPfile is installed properly, but will not start up automatically every time you reboot. | ||
Line 66: | Line 141: | ||
+ | ==== Creating a POPfile Startup Item for Mac OS X 10.10 (Yosemite) ==== | ||
- | ==== Creating a POPfile Startup Item for Mac OS X ==== | + | TODO |
+ | - Create the Mac OS X POPFile < | ||
+ | - Create a plain text file named %%" | ||
+ | < | ||
+ | <plist version=" | ||
+ | < | ||
+ | < | ||
+ | <false /> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | <false /> | ||
+ | < | ||
+ | <true /> | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | </ | ||
+ | - In a terminal window, enter these commands: < | ||
+ | sudo chown root:wheel popfile.plist | ||
+ | sudo chmod 644 popfile.plist | ||
+ | sudo launchctl load / | ||
+ | </ | ||
+ | - Finally, to start up POPFile without rebooting enter this terminal command: < | ||
+ | |||
+ | ==== Creating a POPfile Startup Item for Mac OS X 10.9 (Mavericks or before) | ||
**NOTE**: You should be logged into an administrator account for this procedure. | **NOTE**: You should be logged into an administrator account for this procedure. | ||
- | - Enter this command to create the folder | + | |
- | - Create a plain text file named "< | + | |
+ | - Create a plain text file named %%" | ||
Description = " | Description = " | ||
Provides = (" | Provides = (" | ||
Line 84: | Line 212: | ||
}; | }; | ||
}</ | }</ | ||
- | - Create a plain text file named " | + | - Create a plain text file named " |
#!/bin/sh | #!/bin/sh | ||
# | # | ||
Line 93: | Line 221: | ||
. / | . / | ||
- | PFPATH='/ | + | PFPATH='/ |
if [ " | if [ " | ||
then | then | ||
- | pid=$( ps -auxww | grep popfile.pl | grep -v grep | awk '{ print $2 }' ) | + | pid=$( ps -axww | grep popfile.pl | grep -v grep | awk '{ print $1 }' ) |
if ! [ $pid ]; then | if ! [ $pid ]; then | ||
ConsoleMessage " | ConsoleMessage " | ||
cd " | cd " | ||
perl popfile.pl > /dev/null 2>&1 & | perl popfile.pl > /dev/null 2>&1 & | ||
+ | |||
fi | fi | ||
elif [ " | elif [ " | ||
then | then | ||
- | pid=$( ps -auxww | grep popfile.pl | grep -v grep | awk '{ print $2 }' ) | + | pid=$( ps -axww | grep popfile.pl | grep -v grep | awk '{ print $1 }' ) |
if [ $pid ]; then | if [ $pid ]; then | ||
ConsoleMessage " | ConsoleMessage " | ||
Line 114: | Line 243: | ||
elif [ " | elif [ " | ||
then | then | ||
- | pid=$( ps -auxww | grep popfile.pl | grep -v grep | awk '{ print $2 }' ) | + | pid=$( ps -axww | grep popfile.pl | grep -v grep | awk '{ print $1 }' ) |
ConsoleMessage " | ConsoleMessage " | ||
- | kill -HUP $pid | + | kill -6 $pid |
cd " | cd " | ||
perl popfile.pl > /dev/null 2>&1 & | perl popfile.pl > /dev/null 2>&1 & | ||
fi</ | fi</ | ||
- | | + | - Create a plain text file named " |
- | - Enter this command to crreate a folder at < | + | |
- | | + | |
<?xml version=" | <?xml version=" | ||
< | < | ||
Line 134: | Line 261: | ||
</ | </ | ||
</ | </ | ||
+ | - You should now have this hierarchy of folders and files: < | ||
+ | / | ||
+ | StartupItems/ | ||
+ | POPfile/ | ||
+ | POPfile | ||
+ | StartupParameters.plist | ||
+ | Resources/ | ||
+ | English.lproj/ | ||
+ | Localizable.strings</ | ||
- In a terminal window, enter these commands: < | - In a terminal window, enter these commands: < | ||
- | sudo chown -R root.admin popfile | + | sudo chown -R root:wheel POPfile |
- | cd popfile | + | cd POPfile |
- | sudo chmod 754 popfile | + | sudo chmod 754 POPfile |
sudo chmod 644 StartupParameters.plist</ | sudo chmod 644 StartupParameters.plist</ | ||
- Finally, to start up POPFile without rebooting enter this terminal command: < | - Finally, to start up POPFile without rebooting enter this terminal command: < | ||
Line 144: | Line 280: | ||
//**TODO:** Add instructions to edit the popfile.cfg file and change the bayes_dbconnect property to dbi: | //**TODO:** Add instructions to edit the popfile.cfg file and change the bayes_dbconnect property to dbi: | ||
+ | |||
+ | RevisedStartupItem | ||
+ | |||
Should you find anything in the documentation that is incomplete, unclear, outdated or just plain wrong, please let us know and leave a note in the Documentation Forum.