Skip to content
OpenSMTPD filter integration for the Rspamd daemon
Branch: master
Clone or download
Latest commit d981a92 Sep 2, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github sponsor me ! Aug 13, 2019
LICENSE LICENSE Aug 12, 2019 update README Sep 2, 2019
filter-rspamd.go register for link-auth and upon successful auth, track username so Aug 27, 2019



This filter implements the Rspamd protocol and allows OpenSMTPD to request an Rspamd analysis of an SMTP transaction before a message is committed to queue.


The filter currently supports:

  • greylisting
  • adding X-Spam related headers to a message
  • rewriting Subject
  • DKIM-signing message


The filter is written in Golang and doesn't have any dependencies beyond standard library.

It requires OpenSMTPD 6.6.0 or higher.

How to install

Install from your operating system's preferred package manager if available. On OpenBSD:

$ doas pkg_add filter-rspamd
quirks-3.167 signed on 2019-08-11T14:18:58Z
filter-rspamd-v0.1.1: ok

Alternatively, clone the repository, build and install the filter:

$ cd filter-rspamd/
$ go build
$ doas install -m 0555 filter-rspamd /usr/local/bin/filter-rspamd

How to configure

The filter itself requires no configuration.

It must be declared in smtpd.conf and attached to a listener for sessions to go through rspamd:

filter "rspamd" proc-exec "/usr/local/bin/filter-rspamd"

listen on all filter "rspamd"

A remote rspamd instance can be specified by providing the -url parameter to the filter:

filter "rspamd" proc-exec "/usr/local/bin/filter-rspamd -url"

listen on all filter "rspamd"

Any configuration with regard to thresholds or enabled modules must be done in rspamd itself.

You can’t perform that action at this time.