Setting up SpamAssassin is fairly easy. It is a free and open-source SPAM filter written in Perl from the same makers as Apache. This tutorial was made for Ubuntu 18.04 but should work on all (not too old) Ubuntu and Debian versions.
Virtualmin together with LAMP is a great setup for basic server needs. This tutorial is meant for Ubuntu and Debian.