In short
- SpamAssassin scores incoming e-mails and automatically separates spam.
- On DirectAdmin servers it is installed over SSH with CustomBuild in a few commands.
- After installation, spam score and black / white lists can be set per user.
The SpamAssassin system is an automatic e-mail filtering system that tries to identify incoming spam messages and warn users according to the content and body of the e-mail headers. Thanks to the SpamAssassin system, you can automatically delete messages marked as spam and add an email address or domain as a blacklist/whitelist. SpamAssassin examines the spam characteristics for each email message.
To Install SpamAssassin via SSH to Directadmin;

To install yum modules use the command below,
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
Then complete the installation by executing the following commands in order.
cd /usr/local/directadmin/custombuild
./build set spamassassin yes
./build spamassassin
What to do after installation
Once SpamAssassin is installed, the E-mail Management → SpamAssassin Setup section becomes active in DirectAdmin. There you can enable the filter for each domain and set the spam threshold. The default threshold is usually 5 points; a lower value means stricter filtering.
- Move to spam folder: keeps suspicious e-mails in a separate folder instead of deleting them.
- Blacklist: always blocks e-mails from specific addresses or domains.
- Whitelist: prevents important senders from being marked as spam.
How do I know the filter is working?
If you see X-Spam-Status and X-Spam-Score lines in the headers of an incoming e-mail, SpamAssassin is active. Adjust the threshold gradually if legitimate messages are being flagged.
Uzman Tescil Editorial Team
Guides drawn from over 17 years of domain, hosting and web design experience, written to move your business a step ahead online.
Fast and secure hosting
Hosting packages with an easy control panel, corporate e-mail and a free SSL certificate.