DKIM and ARC: Setup MTA: Using Rspamd
Requirements
-
MTA: Postfix, Sendmail, or maybe OpenSMTPD.
-
Rspamd 3.3 STABLE or later.
-
You have to choose (or confirm) authserv-id to determine the results of domain validation. See descriptions below for details. In this document
mx.example.org
is used for example.
Configuration
Setting Rspamd
Note that, Rspamd also has DKIM signing and ARC sealing capabilities, but we may not configure them: Sympa is responsible for those features.
Thus, basically the configuration of Rspamd we have to do for Sympa is just
adding following line to local.d/milter_headers.conf
:
use = ["authentication-results"];
For details see the documentation.
Setting MTA
See also "MTA integration" in the documentation.
-
Postfix
Add following settings to
main.cf
(Note: Replacemx.example.org
in below):smtpd_milters = (existing settings) inet:localhost:11332 milter_default_action = accept milter_macro_daemon_name = mx.example.org
If
milter_macro_daemon_name
is not specified, value ofmyhostname
is used as authserv-id. -
Sendmail
Edit
sendmail.cf
to add following settings:O InputMailFilters=rspamd Xrspamd, S=inet:11332@localhost
Or, if you are generating
sendmail.cf
fromsendmail.mc
, add following lines afterFEATURE
lines:define(`confINPUT_MAIL_FILTERS', `rspamd') MAIL_FILTER(`rspamd', `S=inet:11332@localhost')
Above is equivalent to below:
INPUT_MAIL_FILTER(`rspamd', `S=inet:11332@localhost')
With sendmail, the authserv-id is the value of
j
macro insendmail.cf
(inDj
line). If you are generatingsendmail.cf
fromsendmail.mc
, it is defined byconfDOMAIN_NAME
configuration parameter. -
OpenSMTPD
It is reported that filter-rspamd (
opensmtpd-filter-rspamd
package on OpenBSD) may be used to integrate Rspamd with OpenSMTPD. For more details see related documents.The authserv-id is the value of
hostname
option insmtpd.conf
.
After you finished setting up MTA, test it.