1# rspamd23The 'rspamd' module implements message filtering by contacting the rspamd4server via HTTP API.56```7check.rspamd {8 tls_client { ... }9 api_path http://127.0.0.1:1133310 settings_id whatever11 tag maddy12 hostname mx.example.org13 io_error_action ignore14 error_resp_action ignore15 add_header_action quarantine16 rewrite_subj_action quarantine17 flags pass_all18}1920rspamd http://127.0.0.1:1133321```2223## Configuration directives2425### tls_client { ... }26Default: not set2728Configure TLS client if HTTPS is used. See [TLS configuration / Client](/reference/tls/#client) for details.2930---3132### api_path _url_33Default: `http://127.0.0.1:11333`3435URL of HTTP API endpoint. Supports both HTTP and HTTPS and can include36path element.3738---3940### settings_id _string_41Default: not set4243Settings ID to pass to the server.4445---4647### tag _string_48Default: `maddy`4950Value to send in MTA-Tag header field.5152---5354### hostname _string_ <br>55Default: value of global directive5657Value to send in MTA-Name header field.5859---6061### io_error_action _action_62Default: `ignore`6364Action to take in case of inability to contact the rspamd server.6566---6768### error_resp_action _action_69Default: `ignore`7071Action to take in case of 5xx or 4xx response received from the rspamd server.7273---7475### add_header_action _action_76Default: `quarantine`7778Action to take when rspamd requests to "add header".7980X-Spam-Flag and X-Spam-Score are added to the header irregardless of value.8182---8384### rewrite_subj_action _action_85Default: `quarantine`8687Action to take when rspamd requests to "rewrite subject".8889X-Spam-Flag and X-Spam-Score are added to the header irregardless of value.9091---9293### flags _string-list..._94Default: `pass_all`9596Flags to pass to the rspamd server.97See [https://rspamd.com/doc/architecture/protocol.html](https://rspamd.com/doc/architecture/protocol.html) for details.