Integration with exim MTA

Starting from Exim 4.86, you can use Rspamd directly just like SpamAssassin:

For versions 4.70 through 4.84, a patch can be applied to enable integration. In the exim source directory run patch -p1 < ../rspamd/contrib/exim/patch-exim-src_spam.c.diff.

For version 4.85, run the following from contrib/exim in the rspamd source directory:
patch patch-exim-src_spam.c.diff < patch-exim-src_spam.c.diff.exim-4.85.diff
And then follow the steps above to apply the patch.

For versions 4.86 and 4.87 it is recommended to apply a patch to disable half-closed sockets:
patch -p1 < ../rspamd/contrib/exim/shutdown.patch

Alternatively, you can set enable_shutdown_workaround = true in $LOCAL_CONFDIR/local.d/options.inc

In this mode, rspamc cannot reject or greylist messages, but it appends the following headers that can be used for further filtering by means of the LDA (for example, sieve or procmail):

X-Spam-Scanner: name and version of rspamd

X-Spam: has value yes if rspamd detects that a message as a spam (either reject or add header actions)

X-Spam-Action: the desired action for a message (e.g. no action, add header or reject)

X-Spam-Result: contains base64 encoded JSON reply from rspamd if --json option was given to rspamc

Please note that despite the fact that this method can be used with any MTA (or even without an MTA), it has more overhead than other methods and it cannot apply certain actions, like greylisting (however, that could also be implemented using external tools).