An official docker image is available at rspamd/rspamd on Dockerhub, sources are on GitHub. It is a recommendable 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 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.
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. You can learn how to install EPEL from their site: https://fedoraproject.org/wiki/EPEL.
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:
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 rpm-experimental
repofile as following:
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 asan2 packages, install rspamd-asan
.
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.
Rspamd supports the following .deb based distributives:
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 ASAN2 branch install rspamd-asan
package instead of rspamd
(since 3.5).
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
(or rspamd-asan-dbg
) package and could be safely installed even in the production environment.
Check the quick start document for further steps.
Check the support policy document to clarify what OS versions are supported by Rspamd packages.
standard
repos notesPlease DO NOT use those packages, as they are likely outdated and are not supported by 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: 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.
Rspamd is also available on the following Linux distributions:
Rspamd is available in the community repository
Rspamd is available in the community repository
Ebuilds for Gentoo Linux users are available in the main Gentoo Portage repository.
Packages for OpenSUSE Leap & Tumbleweed are available on OBS.
Rspamd has been ported to the following BSD like operating systems:
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
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
Rspamd requires several 3-rd party software to build and run:
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) or Vectorscan (aarch64/ppc64le) and Jemalloc to improve performance.
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
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"