Using SpamAssassin on macOS (f.k.a. Mac OS X)

SpamAssassin shipped in Mac OS X Server v10.4 (Tiger) through Server.app 5.6 for macOS 10.13 (High Sierra.) Apple has announced that it will be removing most open source services from the Server.app bundle starting in Fall of 2018.

Different versions of Mac OS X and macOS ship with various versions of Perl packaged and customized by Apple, often with more than one on the same system (e.g. 10.6 ships with 5.8.9 and 5.10.0, 10.11 ships with 5.16 and 5.18.) Apple has similar bundled installations of many open source packages, maintained by their OS updates and relied upon by the system to be those bespoke Apple versions. To work around this, there are 2 add-on package managers available for installing open source software – most importantly an independent Perl – to supplement what Apple provides without disrupting it:

  • MacPorts installs packages under /opt/local/, has ports for Perl core and many Perl add-ons including SpamAssassin.
  • Homebrew installs packages under /usr/local/, has a formula for Perl core, uses CPAN for add-ons like SpamAssassin (also compatible with Perlbrew.)

Installing SpamAssassin: Benjamin Trott of MovableType describes the process of installing SpamAssassin on OS X. It assumes that you are using a POP mail server (it could be tweaked to work IMAP, but if you're using IMAP, the popread script won't work). It also assumes that you are using a mail client that can read from mailbox-format files.

Using Open Source Tools to Filter Email on Mac OS X Server: Apple steps you through the installation and setup of some widely-used tools: Perl-based Amasvisd-new, Spam Assassin, and ClamAV. There are other, similar open-source tools available, but completing this exercise shows you one way to keep your mail server clean of viruses; you can try other solutions, as well.

Fighting Spam on Mac OS X Server: Another article from developer.apple.com: Installing and setting up SpamAssassin on a Mac OS X Server v10.3 machine.

Using Stalker CommuniGate: on a Mac OS X 10.3 machine.

Tenon's Post.Office is a commercial package which comes with a Spam{{`Assassin module (the 10 user version is free). Scripts and tips for using Spam}}Assassin and Post.Office. The Post.Office Wiki has information about advanced Spam`Assassin setups.

AFP548.com have a great tutorial on setting up SpamAssassin in conjunction with Amavis and Clam-AV

There are preliminary steps required to install on Mac OS 10.13 High Sierra. See InstallingOnMacHighSierra

See also: CommercialMacOSX