How to Install SpamAssassin DirectAdmin Servers
SpamAssassin on a DirectAdmin server will help keep spam to a minimum. Much like on cPanel servers SpamAssassin runs as a separate service on your server but can be configured to catch most spam emails reducing the amount of junk in your and your user’s mailboxes. Here we will provide a step-by-step guide to installing SpamAssassin on a DirectAdmin server. First, check you have Perl installed and the required modules on your DirectAdmin server.
Install SpamAssassin – DirectAdmin CentOS
yum -y install perl-ExtUtils-MakeMaker perl-Digest-SHA perl-Net-DNS perl-NetAddr-IP perl-Archive-Tar perl-IO-Zlib perl-Digest-SHA perl-Mail-SPF \ perl-IP-Country perl-Razor2 perl-Net-Ident perl-IO-Socket-INET6 perl-IO-Socket-SSL perl-Mail-DKIM perl-DBI perl-Encode-Detect perl-HTML-Parser \ perl-HTML-Tagset perl-Time-HiRes perl-libwww-perl perl-Sys-Syslog perl-DB_File perl-Razor-Agent pyzor
Install SpamAssassin – DirectAdmin Debian
apt-get install libhtml-parser-perl libhttp-date-perl libnet-dns-perl libnetaddr-ip-perl libsocket6-perl libsys-hostname-long-perl libwww-perl \ libio-socket-inet6-perl libmail-spf-perl libsys-syslog-perl libdbi-perl libencode-detect-perl libio-socket-ssl-perl \ libmail-dkim-perl razor libio-socket-ip-perl libnet-patricia-perl
Finally, use custombuild to install to the DirectAdmin NVMe VPS Server
cd /usr/local/directadmin/custombuild
./build set spamd spamassassin
./build spamassassin
SpamAssassin On Direct Admin Servers
You should now see SpamD running on the system and can now be enabled via the user-level account in DirectAdmin.
ps ax | grep spamd
Now that you have this installed users can configure the software from the user-level section and the SpamAssassin link. Care should be taken here to now delete messages that could be legitimate. We find that a custom level of 4 catches most spam. When send to the spam folder helps keep our mailboxes junk-free. We do not recommend any users automatically delete mail marked as junk because false positives can happen. We have included below the settings we generally use. Should you find level 4 is too vicious and sending legitimate emails to the junk folder you can just go back to the user level and up the limit to 4.5