Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
howtos:macosx [2008/07/05 14:51] amatubuhowtos:macosx [2015/04/11 12:07] (current) – external edit 127.0.0.1
Line 1: Line 1:
-====== Using POPFile on Mac OS X Platforms (draft) ======+====== Using POPFile on Mac OS X Platforms ======
  
-POPFile v1.1.0 comes with the first official Mac OS X installer! You can now install POPFile on your Mac easily.+POPFile v1.1.0 comes with the first official Mac OS X installer! You can now install POPFile on your Mac easily.  **POPFile v1.1.3 is compatible with Mac OS X 10.10 (Yosemite)**.
  
 ===== System Requirements ===== ===== System Requirements =====
Line 9: Line 9:
   * Mac OS X 10.3.9 or later.   * Mac OS X 10.3.9 or later.
  
-  * The [[/download|latest POPFile release]]. (not yet)+  * The [[/download|latest POPFile release]]. \\ **Note:** there are three versions of Mac OS X installer. One is for Mac OS X 10.7 (Lion), one is for Mac OS X 10.6 (Snow Leopard) and the other is for older versions of Mac OS X.
  
   * 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]]).   * 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 14MB free disk space is required for the default installation created by the Mac OS X installer.+  * Approximately 12.2MB free disk space is required for the default installation created by the Mac OS X installer.
  
-  * POPFile itself occupies about 4MB.+  * 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 8MB. These modules are compiled in the Universal binary format, which means that POPFile will run natively on both PPC and Intel Macs.+  * 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 'Nihongo' parser used to analyse the Japanese text.+  * The installer installs the 'Nihongo' parser (Kakasi) used to analyse the Japanese text.
  
   * The installer also installs XMLRPC module, NNTP/SMTP proxies and IMAP module.   * The installer also installs XMLRPC module, NNTP/SMTP proxies and IMAP module.
  
-  * If you need the optional SSL Support, you can install it using //POPFile-addssl.pkg// installer. The module will allow POPFile to use SSL when connecting to a mail server, an additional 800KB of disk space is required for the extra Perl components and SSL libraries.+  * 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.   * 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.
Line 29: Line 29:
 ===== Installation =====  ===== Installation ===== 
  
-  - Download the Mac OS X installer from the [[/download| POPFile Download Page]]. (not yet)+  - Download the Mac OS X installer from the [[/download| POPFile Download Page]].
   - Run //POPFile-x.x.x.pkg// and follow the installation instructions.   - Run //POPFile-x.x.x.pkg// and follow the installation instructions.
   - POPFile will be installed in ''/Library/POPFile/'' and it will be automatically launched in background. \\ **Important note:** Nothing will appear on your screen! To check if it's running correctly, read the "Accessing POPFile" section below.   - POPFile will be installed in ''/Library/POPFile/'' and it will be automatically launched in background. \\ **Important note:** Nothing will appear on your screen! To check if it's running correctly, read the "Accessing POPFile" section below.
-  - Configura buckets. See [[:HowTos:BucketSetup | Bucket Setup]]. \\ **Important note:** The Mac OS X installer does not create any bucket on your installation unlike the Windows installer. You need to make at least two buckets before using it.+  - Configure buckets. See [[:HowTos:BucketSetup | Bucket Setup]]. \\ **Important note:** The Mac OS X installer does not create any bucket on your installation unlike the Windows installer. You need to create at least two buckets before using it.
   - Configure your email client. See [[:HowTos | Configuring Specific Mail Clients]].   - Configure your email client. See [[:HowTos | Configuring Specific Mail Clients]].
  
Line 45: Line 45:
 ===== Utility scripts included in the installer package ===== ===== 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.+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.   * start-popfile - Launch POPFile (in background). Requires root privilege.
Line 55: Line 55:
   * start-popfile-with-console - Lanuch POPFile in the Terminal.app. Useful for debugging.   * 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.
  
-====== Installing POPfile MANUALLY on Mac OS X 10.4.x (Tiger) ======+  * uninstall-popfile - Remove POPFile program and data files (corpus and configuration files) from your Mac.
  
-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. +===== Uninstalling ===== 
 + 
 +  - Run the 'uninstall-popfile' script mentioned above. \\ **Note:** The uninstaller will remove not only POPFile program but also the corpus and configuration files. If you want to use them later, please backup them before uninstalling. 
 + 
 +====== 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 or later systems, and how to create a startup item that will start POPfile each time you reboot the system. 
  
 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::SQLite2. So to run POPfile in Mac OS X 10.4.x, you'll need to install: +To run POPfile in Mac OS X 10.4.x or later, you'll need to install: 
  
   * Apple's Xcode developer tools — to compile and install some Perl library packages    * Apple's Xcode developer tools — to compile and install some Perl library packages 
   * 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**: 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. 
Line 74: Line 80:
  
 **TIP**: On the command line, %%~%% means "your home directory". So ''~/Desktop/packages'' means ''/Users/yourusername/Desktop/packages''. **TIP**: On the command line, %%~%% means "your home directory". So ''~/Desktop/packages'' means ''/Users/yourusername/Desktop/packages''.
- 
-**Note**: An alternative set of instructions is available [[http://www.artz-net.de/popfile/ | here]] by Michael Artz. 
  
 ===== Step By Step Instructions ===== ===== Step By Step Instructions =====
Line 87: Line 91:
   - Download the cross-platform version of POPFile from here: [[http://sourceforge.net/project/showfiles.php?group_id=63137&package_id=59947| Cross-Platform POPfile]]   - Download the cross-platform version of POPFile from here: [[http://sourceforge.net/project/showfiles.php?group_id=63137&package_id=59947| Cross-Platform POPfile]]
   - Download these Perl library packages (from the [[http://search.cpan.org| CPAN Web Site]]) and place them all into a folder on your desktop named "packages":   - Download these Perl library packages (from the [[http://search.cpan.org| CPAN Web Site]]) and place them all into a folder on your desktop named "packages":
-    * Date::Parse - part of [[http://search.cpan.org/~gbarr/TimeDate-1.16/| TimeDate]] +    * Date::Parse - part of [[http://search.cpan.org/~gbarr/TimeDate/| TimeDate]] 
-    * Date::Format - also part of [[http://search.cpan.org/~gbarr/TimeDate-1.16/| TimeDate]] +    * Date::Format - also part of [[http://search.cpan.org/~gbarr/TimeDate/| TimeDate]] 
-    * HTML::Tagset - [[http://search.cpan.org/~petdance/HTML-Tagset-3.10/| HTML-Tagset-3.10]] +    * HTML::Tagset - [[http://search.cpan.org/~petdance/HTML-Tagset/| HTML-Tagset]] 
-    * DBI - [[http://search.cpan.org/~timb/DBI-1.53/| DBI-1.53]] +    * DBI - [[http://search.cpan.org/~timb/DBI/| DBI]] 
-    * DBD::SQLite2 - [[http://search.cpan.org/~msergeant/DBD-SQLite2-0.33/| DBD-SQLite2-0.33]] +    * DBD::SQLite2 - [[http://search.cpan.org/~msergeant/DBD-SQLite2/| DBD-SQLite2]] **for POPFile v1.0.1 or before** 
-    * MIME::Base64 - [[http://search.cpan.org/~gaas/MIME-Base64-3.07/| MIME-Base64-3.07]] +    * DBD::SQLite - [[http://search.cpan.org/~adamk/DBD-SQLite/| DBD-SQLite]] **for POPFile v1.1.0 or later** 
-    * HTML::Template - [[http://search.cpan.org/~samtregar/HTML-Template-2.8/| HTML-Template-2.8]] +    * HTML::Template - [[http://search.cpan.org/~samtregar/HTML-Template/| HTML-Template]] 
-    * HTML::Tagset - [[http://search.cpan.org/~petdance/HTML-Tagset-3.10/| HTML-Tagset-3.10]]+    * HTML::Tagset - [[http://search.cpan.org/~petdance/HTML-Tagset/| HTML-Tagset]] 
 +    * Net::SSLeay [[http://search.cpan.org/~flora/Net-SSLeay/| Net-SSLeay]] **to use SSL** 
 +    * IO::Socket::SSL - [[http://search.cpan.org/~sullr/IO-Socket-SSL/| IO-Socket-SSL]] **to use SSL** 
 +    * SOAP::Lite - [[http://search.cpan.org/~mkutter/SOAP-Lite/| SOAP-Lite]] **to use XMLRPC** 
 +    * IO::Socket::Socks - [[http://search.cpan.org/~reatmon/IO-Socket-Socks/| IO-Socket-Socks]] **to use SOCKS**
   - 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 118: Line 126:
   - 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 ~/Library/POPfile folder: <code>cd ~/Library/POPfile</code>   - Enter the command to change the working directory to the ~/Library/POPfile folder: <code>cd ~/Library/POPfile</code>
-  - Enter the command to start POPfile manually: <code>perl popfile.pl</code> +  - Enter the command to start POPfile manually: <code>sudo perl popfile.pl</code> 
-  - 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/SQLite2.pm in @INC, that means you still need to install one or more Perl library packages. The package name is right after the word "locate" (in this example, the Perl library package you need to install is DBD::SQLite2). +  - 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/SQLite2.pm in @INC, that means you still need to install one or more Perl library packages. The package name is right after the word "locate" (in this example, the Perl library package you need to install is DBD::SQLite2). \\ **Note 2:** If you see following error, <code>Couldn't start the pop3 proxy because POPFile could not bind to the 
 +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). </code> you may need to run POPFile as root (use //sudo//) or change the POP3 and the UI port greater than 1024. To change the port settings, use following command (this command will change the POP3 port to 1110 and the UI port to 9090): <code>perl popfile.pl --set pop3_port=1110 --set html_port=9090</code> For more information about the command-line options, see [[:OptionReference]] 
 + 
   - 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.
  
Line 127: Line 141:
  
  
 +==== Creating a POPfile Startup Item for Mac OS X 10.10 (Yosemite) ====
  
 +  - Create the Mac OS X POPFile <nowiki>LaunchDaemons</nowiki> file:
 +  - Create a plain text file named %%"popfile.plist"%% in the %%/Library/LaunchDaeons%% folder with this content: <code><?xml version="1.0" encoding="UTF-8"?>
 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
 +<plist version="1.0">
 +<dict>
 + <key>Disabled</key>
 + <false />
 + <key>EnvironmentVariables</key>
 + <dict>
 + <key>ITAIJIDICTPATH</key>
 + <string>/Library/POPFile/kakasi/itaijidict</string>
 + <key>KANWADICTPATH</key>
 + <string>/Library/POPFile/kakasi/kanwadict</string>
 + <key>MECABRC</key>
 + <string>/Library/POPFile/mecab/etc/mecabrc</string>
 + <key>POPFILE_ROOT</key>
 + <string>/Library/POPFile/</string>
 + <key>POPFILE_USER</key>
 + <string>/Library/POPFile/</string>
 + <key>VERSIONER_PERL_VERSION</key>
 + <string>5.18</string>
 + </dict>
 + <key>StandardErrorPath</key>
 + <string>/Library/Logs/POPFile/error.log</string>
 + <key>StandardOutPath</key>
 + <string>/Library/Logs/POPFile/console.log</string>
 + <key>Label</key>
 + <string>org.getpopfile.popfile</string>
 + <key>KeepAlive</key>
 + <false />
 + <key>RunAtLoad</key>
 + <true />
 + <key>ProgramArguments</key>
 + <array>
 + <string>/usr/bin/perl</string>
 + <string>-I/Library/POPFile/lib</string>
 + <string>/Library/POPFile/popfile.pl</string>
 + <string>-logger_logdir</string>
 + <string>/Library/Logs/POPFile/</string>
 + </array>
 +</dict>
 +</plist>
 +</code>
 +  - In a terminal window, enter these commands: <code>cd /Library/LaunchDaemons
 +sudo chown root:wheel popfile.plist
 +sudo chmod 644 popfile.plist
 +sudo launchctl load /Library/LaunchDaemons/popfile.plist
 +</code>
 +  - Finally, to start up POPFile without rebooting enter this terminal command: <code>sudo launchctl start org.getpopfile.popfile</code>
  
-==== Creating a POPfile Startup Item for Mac OS X ====+==== 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.
  
   - Create the Mac OS X POPfile startup item:   - Create the Mac OS X POPfile startup item:
-  - Enter this command to create the folder /Library/StartupItems/POPfile: <code>sudo mkdir -p /Library/StartupItems/POPfile</code> +  - Enter this command to create the folder %%/Library/StartupItems/POPfile%%: <code>sudo mkdir -p /Library/StartupItems/POPfile</code> 
-  - Create a plain text file named "StartupParameters.plist" in the /Library/StartupItems/POPfile folder with this content: <code>{+  - Create a plain text file named %%"StartupParameters.plist"%% in the %%/Library/StartupItems/POPfile%% folder with this content: <code>{
  Description = "POPfile mail classification proxy";  Description = "POPfile mail classification proxy";
  Provides = ("popfile");  Provides = ("popfile");
Line 147: Line 211:
  };  };
 }</code>  }</code> 
-  - Create a plain text file named "POPfile" in the /Library/StartupItems/POPfile/ folder with this content: <code bash>+  - Create a plain text file named "POPfile" in the %%/Library/StartupItems/POPfile/%% folder with this content: <code bash>
 #!/bin/sh #!/bin/sh
 # #
Line 156: Line 220:
 . /etc/rc.common . /etc/rc.common
    
-PFPATH='/Users//yourusername/Library/POPfile'+PFPATH='/Users/yourusername/Library/POPfile'
  
 if [ "$1" == "start" ] if [ "$1" == "start" ]
 then then
- pid=$( ps -auxww | grep popfile.pl | grep -v grep | awk '{ print $}' )+ pid=$( ps -axww | grep popfile.pl | grep -v grep | awk '{ print $}' )
  if ! [ $pid ]; then  if ! [ $pid ]; then
  ConsoleMessage "Starting POPfile mail classification proxy"  ConsoleMessage "Starting POPfile mail classification proxy"
  cd "$PFPATH"  cd "$PFPATH"
  perl popfile.pl > /dev/null 2>&1 &  perl popfile.pl > /dev/null 2>&1 &
 +
  fi  fi
   
 elif [ "$1" == "stop" ] elif [ "$1" == "stop" ]
 then then
- pid=$( ps -auxww | grep popfile.pl | grep -v grep | awk '{ print $}' )+ pid=$( ps -axww | grep popfile.pl | grep -v grep | awk '{ print $}' )
  if [ $pid ]; then    if [ $pid ]; then  
  ConsoleMessage "Stopping POPfile mail classification proxy"   ConsoleMessage "Stopping POPfile mail classification proxy"
Line 177: Line 242:
 elif [ "$1" == "restart" ] elif [ "$1" == "restart" ]
 then then
- pid=$( ps -auxww | grep popfile.pl | grep -v grep | awk '{ print $}' )+ pid=$( ps -axww | grep popfile.pl | grep -v grep | awk '{ print $}' )
  ConsoleMessage "Restarting POPfile mail classification proxy"  ConsoleMessage "Restarting POPfile mail classification proxy"
  kill -6 $pid  kill -6 $pid
Line 205: Line 270:
         Localizable.strings</code>         Localizable.strings</code>
   - In a terminal window, enter these commands: <code>cd /Library/StartupItems   - In a terminal window, enter these commands: <code>cd /Library/StartupItems
-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</code> sudo chmod 644 StartupParameters.plist</code>
   - Finally, to start up POPFile without rebooting enter this terminal command: <code>sudo /Library/StartupItems/POPfile/POPfile start</code>   - Finally, to start up POPFile without rebooting enter this terminal command: <code>sudo /Library/StartupItems/POPfile/POPfile start</code>
 
howtos/macosx.1215269467.txt.gz · Last modified: 2008/07/05 16:51 (external edit)
Old revisions

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.

Recent changes RSS feed Donate Driven by DokuWiki
The content of this wiki is protected by the GNU Fee Documentation License