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:
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.
Using Stalker CommuniGate: on a Mac OS X 10.3 machine.
Tenon's Post.Office is a commercial package which comes with a SpamAssassin module (the 10 user version is free). Scripts and tips for using SpamAssassin and Post.Office. The Post.Office Wiki has information about advanced SpamAssassin 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