DirectAdmin Knowledge Base and Support

DirectAdmin is a web panel for a simple administration of both virtual and dedicated servers. DirectAdmin is faster, safe and more powerful than any other CP. And we know how to customize and support it.

How to install rspamd on DirectAdmin server?

| 15:27:37 04.04.2019

I know DirectAdmin supports Rspamd spam filtering system. How to install it on a Linux server with the control panel?


Rspamd is an advanced spam filtering system that allows evaluation of messages by a number of rules including regular expressions, statistical analysis and custom services such as URL black lists. Each message is analysed by Rspamd and given a spam score.

According to this spam score and the user’s settings, Rspamd recommends an action for the MTA to apply to the message, for example, to pass, reject or add a header. Rspamd is designed to process hundreds of messages per second simultaneously, and provides a number of useful features.


Here is a list of basic requirements which your server should meet for the filtering system to work:

  • DirectAdmin Version 1.56.0 or higher
  • CentOS
  • Exim 
  • EasySpamFighter 1.17+
  • exim.conf 4.5+

If it's all OK then we proceed with an installation.

Installation on DirectAdmin server

Connect as root to your server console and run the following commands to let CustomBuild do it for you.

cd /usr/local/directadmin/custombuild
./build update
./build set eximconf yes
./build set eximconf_release 4.5
./build set blockcracking yes
./build set easy_spam_fighter yes
./build set spamd rspamd
./build set exim yes
./build exim
./build rspamd
./build exim_conf

Run the commands one-by-one and make sure no error occurs. If any command ends with an error, you should first fix it and then only process remaining.

The command ./build rspamd is expected to finish with the following lines on CentOS 7:

Enabling rspamd in systemd...
Disabling spamassassin in systemd...
Removed symlink /etc/systemd/system/
Removed symlink /etc/systemd/system/spamd.service.
Removing directory: /var/lib/spamassassin...
Removing directory: /usr/share/perl5/Mail/SpamAssassin...
Removing directory: /usr/lib64/perl5/auto/Mail/SpamAssassin...
Removing directory: /usr/share/spamassassin...
Removing directory: /etc/mail/spamassassin...
Removing directory: /root/.spamassassin...
Removing file: /usr/bin/spamassassin...
Removing file: /usr/bin/sa-check_spamd...
Removing file: /usr/bin/spamc...
Removing file: /usr/bin/sa-learn...
Removing file: /usr/bin/spamd...
Removing file: /usr/bin/sa-awl...
Removing file: /usr/bin/sa-update...
Removing file: /usr/bin/sa-compile...
Removing file: /etc/exim.spamassassin.conf...
Removing file: /etc/cron.daily/sa-update...
SpamAssassin has been successfully removed
Restarting rspamd.
Restarting exim.
[root@good custombuild]#

As it's compiled into binary code, it should run much faster than SpamAssassin, and use fewer resources.

Check the logs under /var/log/rspamd/rspamd.log for details to see how it runs.

Directadmin page for the feature:

About Us
We are a team of professionals, and specialize in installation, configuring and managing of remote virtual and dedicated servers powered by Linux/Unix-like OS with DirectAdmin. We support various sets of software, including web-servers Apache, Nginx; internet domain name servers Bind, PowerDNS; mail-servers with POP3, IMAP and SMTP, FTP-servers, etc. After years of working through the most complex server challenges our team has gathered valuable experience and universal solutions suitable for everyday tasks. We are here to lend you a helping hand and take care of your servers in order to let you have enough time to do more of what you love.

All of the information and data on this site is for informational purposes only and is provided for the convenience of the user.
Powered by: Amiro.CMS - Free edition