Rspamd Packages
- Docker
- RHEL
- Debian/Ubuntu
- Other Linux
- BSD
- Build from Source
Docker
An official docker image is available at rspamd/rspamd on Dockerhub, with sources on GitHub. This is a recommended way to run Rspamd.
In this build, upstream config files are installed in /usr/share/rspamd/config
, allowing /etc/rspamd
to contain only local configuration.
This build provides a language identification model to enable language detection using fasttext
, distributed under version 3.0 of the Creative Commons Attribution-Share-Alike License.
Volumes or bind mounts should be used for the /var/lib/rspamd
directory and optionally for /etc/rspamd
. If bind mounts are used, the /var/lib/rspamd
directory should be writable by 11333:11333
on the host machine.
The root directory may be set read-only for added security at the cost of being less tactile for the administrator.
Basic usage:
docker run -v rspamd_dbdir:/var/lib/rspamd -v rspamd_confdir:/etc/rspamd -ti rspamd/rspamd
A Docker compose example is available in the source repo.
RHEL-alike distributions
Packages are available for RHEL-compatible distributions such as Oracle Linux, AlmaLinux, Rocky Linux, and CentOS. Currently, versions 8 through 9 are supported.
Please note that these packages require EPEL to be installed on your system as many dependencies are missing from the base repositories.
Please bear in mind that you might also need the debug symbols package for Rspamd to be able to file bug reports about possible crashes. Debug symbols are placed in the rspamd-debug
package and can be safely installed even in a production environment.
To install the rspamd repo, please download the corresponding repository file and the signing key (both repo and all packages are signed with my GPG key). You can use the following commands to install the rspamd stable1 RPM repository:
source /etc/os-release
export EL_VERSION=`echo -n $PLATFORM_ID | sed "s/.*el//"`
curl https://rspamd.com/rpm-stable/centos-${EL_VERSION}/rspamd.repo > /etc/yum.repos.d/rspamd.repo
dnf install rspamd
For experimental2 branch packages, download the rpm-experimental
repofile as follows:
source /etc/os-release
export EL_VERSION=`echo -n $PLATFORM_ID | sed "s/.*el//"`
curl https://rspamd.com/rpm/centos-${EL_VERSION}/rspamd-experimental.repo > /etc/yum.repos.d/rspamd.repo
dnf install rspamd
For asan3 packages, install rspamd-asan
.
1 Use STABLE branch of packages: these 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 distributions:
- Debian bookworm (since 3.5)
- Debian bullseye
- Ubuntu focal (since 2.5)
- Ubuntu jammy (since 3.3)
- Ubuntu noble (since 3.9)
To install the rspamd stable1 apt repository, please use the following commands:
#apt update # if running a minimal system
#apt-get install sudo # if running a minimal system
sudo apt-get install -y lsb-release wget gpg # for install
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 [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 [signed-by=/etc/apt/keyrings/rspamd.gpg] http://rspamd.com/apt-stable/ $CODENAME main" | sudo tee -a /etc/apt/sources.list.d/rspamd.list
sudo apt-get update
sudo apt-get --no-install-recommends install rspamd
For Hyperscan and LuaJIT information see the FAQ.
For experimental2 branch replace apt-stable
with just apt
:
#apt update # if running a minimal system
#apt-get install sudo # if running a minimal system
sudo apt-get install -y lsb-release wget gpg # for install
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 [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 [signed-by=/etc/apt/keyrings/rspamd.gpg] http://rspamd.com/apt/ $CODENAME main" | sudo tee -a /etc/apt/sources.list.d/rspamd.list
sudo apt-get update
sudo apt-get --no-install-recommends install rspamd
For ASAN3 branch install the rspamd-asan
package instead of rspamd
(since 3.5).
Please bear in mind that you might also need the debug symbols package for Rspamd to be able to file bug reports about possible crashes. Debug symbols are placed in the rspamd-dbg
(or rspamd-asan-dbg
) package and can be safely installed even in a production environment.
Check the quick start document for further steps.
Packages support policy
Check the support policy document to clarify what OS versions are supported by Rspamd packages.
Debian standard
repos notes
Please DO NOT use those packages, as they are likely outdated and are not supported by the Rspamd project in any way (so any associated issue will likely be closed automatically). If you decide to use those packages then please address any issues to the Debian package maintainers.
1 Use STABLE branch of packages: these 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 available on the following Linux distributions:
- Alpine Linux
- Arch Linux
- Gentoo Linux
- OpenSUSE
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.
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 3rd-party software packages 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/Vectorscan - optional regexp performance boost library
- zlib - compression library
You can either install them from sources or (recommended) install using the 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) or Vectorscan (aarch64/ppc64le) and Jemalloc to improve performance.
Build process
To build rspamd we recommend creating a separate build directory:
mkdir rspamd.build
cd rspamd.build
cmake ../rspamd -DENABLE_HYPERSCAN=ON -DENABLE_LUAJIT=ON -DCMAKE_BUILD_TYPE=RelWithDebuginfo
make
sudo make install
On unsupported Debian-alike or RPM-based systems, you might use in-repo fixtures to build a package.
An example for Debian-like systems:
export RSPAMD_VERSION=3.7.3 # set this to desired Rspamd version
git clone -b ${RSPAMD_VERSION} https://github.com/rspamd/rspamd.git
cd rspamd
sed -i s/\(.*\)/\(${RSPAMD_VERSION}\)/ debian/changelog
sed -i s/quilt/native/ debian/source/format
sudo apt install devscripts
mk-build-deps
sudo bash -c "dpkg -i rspamd-build-deps_${RSPAMD_VERSION}_*.deb && apt install -f -y"
debuild -us -uc
sudo "dpkg -i ../rspamd_${RSPAMD_VERSION}_*.deb"