Rspamd packages

CentOS, Fedora

Supported distributions:

  • CentOS 7 (x86_64), requires EPEL. Hyperscan and LuaJIT are enabled.
  • CentOS 8 (x86_64), requires EPEL. Hyperscan and LuaJIT are enabled.

Please note that CentOS rpm packages requires EPEL to be installed in your system as many dependencies are missing from the base CentOS repositories. You can learn how to install EPEL from their site: https://fedoraproject.org/wiki/EPEL. Fedora packages do not require EPEL or any other third-party repository. Please bear in mind, that you might also need debug symbols package for Rspamd to be able to fill bug reports about possible crashes. Debug symbols are placed in rspamd-debug package and could be safely installed even in the production environment.

To install rspamd repo, please download the corresponding repository file and the signing key (both repo and all packages are signed with my GPG key). You could use the following commands to install rspamd stable1 RPM repository:

curl https://rspamd.com/rpm-stable/centos-7/rspamd.repo > /etc/yum.repos.d/rspamd.repo # For Centos-7
#curl https://rspamd.com/rpm-stable/centos-8/rspamd.repo > /etc/yum.repos.d/rspamd.repo # Uncomment for Centos-8
rpm --import https://rspamd.com/rpm-stable/gpg.key
yum update
yum install rspamd

For experimental2 branch packages, download rpm-experimental repofile as following:

curl https://rspamd.com/rpm/centos-7/rspamd-experimental.repo > /etc/yum.repos.d/rspamd.repo # For Centos-7
#curl https://rspamd.com/rpm/centos-8/rspamd-experimental.repo > /etc/yum.repos.d/rspamd.repo # Uncomment for Centos-8
rpm --import https://rspamd.com/rpm/gpg.key
yum update
yum install rspamd

For asan2 branch packages, download rpm-experimental-asan repofile as following:

curl https://rspamd.com/rpm-asan/centos-7/rspamd-experimental.repo > /etc/yum.repos.d/rspamd.repo # For Centos-7
#curl https://rspamd.com/rpm-asan/centos-8/rspamd-experimental.repo > /etc/yum.repos.d/rspamd.repo # Uncomment for Centos-8
rpm --import https://rspamd.com/rpm/gpg.key
yum update
yum install rspamd

1. Use STABLE branch of packages: those packages are the official rspamd releases which are recommended for production usage.

2. Use EXPERIMENTAL branch of packages: these packages are less stable and they are generated frequently from the current development branch. Experimental packages usually have more features but might be SOMETIMES broken in some points (nevertheless, bugs are usually quickly fixed after detection).

3. Use ASAN branch of packages: these are packages (both stable and experimental) designed to debug Rspamd issues, especially core files, using advanced debugging tools. Use these packages if you encounter an issue in Rspamd and you want it to be fixed.

Debian and Ubuntu Linux

Rspamd supports the following .deb based distributives:

  • Debian stretch (only x86_64) Hyperscan and LuaJIT are enabled.
  • Debian buster (only x86_64) Hyperscan and LuaJIT are enabled.
  • Debian sid (only x86_64) Hyperscan and LuaJIT are enabled.
  • Ubuntu xenial (only x86_64) Hyperscan and LuaJIT are enabled.
  • Ubuntu bionic (only x86_64) Hyperscan and LuaJIT are enabled.
  • Ubuntu focal (since 2.5) Same as above.

To install the rspamd stable1 apt repository, please use the following commands:

sudo apt-get install -y lsb-release wget # optional
CODENAME=`lsb_release -c -s`
sudo mkdir -p /etc/apt/keyrings
wget -O- https://rspamd.com/apt-stable/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/rspamd.gpg > /dev/null
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rspamd.gpg] http://rspamd.com/apt-stable/ $CODENAME main" | sudo tee /etc/apt/sources.list.d/rspamd.list
echo "deb-src [arch=amd64 signed-by=/etc/apt/keyrings/rspamd.gpg] http://rspamd.com/apt-stable/ $CODENAME main"  | sudo tee -a /etc/apt/sources.list.d/rspamd.list
apt-get update
apt-get --no-install-recommends install rspamd

To obtain your distributive’s codename, you could use the command lsb_release -s -c from the package called lsb-release.

For Hyperscan and LuaJIT information see the FAQ.

For experimental2 branch replace apt-stable with just apt:

sudo apt-get install -y lsb-release wget # optional
CODENAME=`lsb_release -c -s`
sudo mkdir -p /etc/apt/keyrings
wget -O- https://rspamd.com/apt-stable/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/rspamd.gpg > /dev/null
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rspamd.gpg] http://rspamd.com/apt/ $CODENAME main" | sudo tee /etc/apt/sources.list.d/rspamd.list
echo "deb-src [arch=amd64 signed-by=/etc/apt/keyrings/rspamd.gpg] http://rspamd.com/apt/ $CODENAME main"  | sudo tee -a /etc/apt/sources.list.d/rspamd.list
apt-get update
apt-get --no-install-recommends install rspamd

For ASAN2 branch replace apt-stable or apt with apt-stable-asan and apt-asan correspondingly:

sudo apt-get install -y lsb-release wget # optional
CODENAME=`lsb_release -c -s`
sudo mkdir -p /etc/apt/keyrings
wget -O- https://rspamd.com/apt-stable/gpg.key | gpg --dearmor | sudo tee /etc/apt/keyrings/rspamd.gpg > /dev/null
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/rspamd.gpg] http://rspamd.com/apt-asan/ $CODENAME main" | sudo tee /etc/apt/sources.list.d/rspamd.list
echo "deb-src [arch=amd64 signed-by=/etc/apt/keyrings/rspamd.gpg] http://rspamd.com/apt-asan/ $CODENAME main"  | sudo tee -a /etc/apt/sources.list.d/rspamd.list
apt-get update
apt-get --no-install-recommends install rspamd

Please bear in mind, that you might also need debug symbols package for Rspamd to be able to fill bug reports about possible crashes. Debug symbols are placed in rspamd-dbg package and could be safely installed even in the production environment. Check quick start for further steps.

Debian standard repos notes

Please DO NOT use those packages.

Rspamd is also available in some versions of Debian and Ubuntu. Please DO NOT use those packages, as they are not supported in any way. Any issues or feature requests related to the packages from Debian provided distros will be closed with no feedback (or even rage feedback). Just don’t do it, you are warned!


1. Use STABLE branch of packages: those packages are the official rspamd releases which are recommended for production usage.

2. Use EXPERIMENTAL branch of packages: these packages are less stable and they are generated frequently from the current development branch. Experimental packages usually have more features but might be SOMETIMES broken in some points (nevertheless, bugs are usually quickly fixed after detection).

3. Use ASAN branch of packages: these are packages (both stable and experimental) designed to debug Rspamd issues, especially core files, using advanced debugging tools. Use these packages if you encounter an issue in Rspamd and you want it to be fixed.

Other Linux

Rspamd is also supported on the following Linux distributions:

  • Alpine Linux
  • Arch Linux
  • Gentoo Linux
  • OpenSUSE
  • Void Linux

Alpine Linux

Rspamd is available in the community repository

Arch Linux

Rspamd is available in the community repository

Gentoo Linux

Ebuilds for Gentoo Linux users are available in the main Gentoo Portage repository.

OpenSUSE

Packages for OpenSUSE Leap & Tumbleweed are available on OBS.

Void Linux

Packages for Void Linux are available in the main package repository.

BSD systems

Rspamd has been ported to the following BSD like operating systems:

  • FreeBSD
  • NetBSD
  • OpenBSD
  • macOS (using MacPorts)

FreeBSD users can install Rspamd from ports or use the experimental line of packages by rspamd-devel port.

Users of NetBSD (and other systems with pkgsrc) can use pkgsrc.

OpenBSD users can use ports.

macOS users can install from MacPorts:

sudo port install rspamd
sudo port load rspamd

Build rspamd from the sources

If there are no packages for your system or you want custom build options you can also build rspamd from the source code. To do that grab the source from github using git:

git clone --recursive https://github.com/rspamd/rspamd.git

Build requirements

Rspamd requires several 3-rd party software to build and run:

  • openssl - cryptography and SSL/TLS Toolkit
  • glib2 - common purposes library
  • ragel - state machine compiler.
  • LuaJIT - jit compiler for lua programming language. Plain Lua should work as well.
  • cmake - build system used to configure rspamd
  • sqlite3 - embedded database used to store some data by rspamd
  • libmagic - common library for detecting file types
  • libicu - unicode library
  • PCRE - regular expressions library
  • Hyperscan - optional regexp performance boost library
  • zlib - compression library

You can either install them from sources or (recommended) install using package manager of your system.

It is also highly recommended to use Redis as it can be used by many Rspamd modules to improve their filtering quality (some modules will be turned off completely without Redis).

It is also recommended to build Rspamd with Hyperscan (x86_64 only) and Jemalloc to improve performance.

Build process

To build rspamd we recommend to create a separate build directory:

$ mkdir rspamd.build
$ cd rspamd.build
$ cmake ../rspamd -DENABLE_HYPERSCAN=ON -DENABLE_LUAJIT=ON -DCMAKE_BUILD_TYPE=RelWithDebuginfo
$ make
# make install

Alternatively, you can create a distribution package and use it for build your own packages. Here is an example for Debian GNU Linux OS:

$ mkdir rspamd.build
$ cd rspamd.build
$ ./dist.sh
$ tar xvf rspamd-<rspamd_version>.tar.xz
$ cd rspamd-<rspamd_version>
$ debuild