I am far from an expert, but Clamav is a good starting point. Check out how to set it up.
I'm only getting locally generated spam, and it's marked with ***SPAM*** in the subject.
I haven't yet worried about it because it's a small problem for me at the moment.
TBH, spam is a larger subject than just one or two commands, and I still have a lot of reading (and asking of questions
)to go myself.
My VPS system:
(Ubuntu 14.04 LTS, Kernel 3.15.4-x86_64, Apache 2.4.7, MySQL 5.5.38, PHP 5.5.9, ISPConfig 22.214.171.124p5, Webmin, PureFTP & Quota, phpMyAdmin, postfix, dovecot, amavis, clamav, spamassassin, awstats, fail2ban, Jailkit, bind9, vlogger, webalizer)