-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove mention of the control block
- Loading branch information
Showing
1 changed file
with
0 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -229,26 +229,6 @@ Where `<header_name>` represents header's name, and the value is the order of th | |
} | ||
``` | ||
|
||
## Rspamd JSON control block | ||
|
||
Starting from Rspamd version 0.9, it's also possible to transmit additional data by prepending a JSON control block to a message. Therefore, you have the flexibility to utilize either headers or a JSON block to convey information from the MTA to Rspamd. | ||
|
||
To employ a JSON control block, you must include an additional header named `Message-Length` when forwarding the message to Rspamd. This header should specify the size of the message, but it should **exclude** the JSON control block. Consequently, the size of the control block is calculated as `Content-Length - Message-Length`. Rspamd assumes that the message immediately follows the control block without any additional CRLF (Carriage Return Line Feed) characters. This approach is equally compatible with streaming transfers. However, even when you don't explicitly specify `Content-Length`, you are still required to specify `Message-Length`. | ||
|
||
Here's an illustrative example of a JSON control block: | ||
|
||
~~~json | ||
{ | ||
"from": "[email protected]", | ||
"pass_all": "true", | ||
"ip": "95.211.146.161", | ||
"helo": "localhost.localdomain", | ||
"hostname": "localhost" | ||
} | ||
~~~ | ||
|
||
Furthermore, it's worth noting that [UCL](https://github.com/vstakhov/libucl) JSON extensions and syntax conventions are fully supported within the control block. | ||
|
||
## Curl example | ||
|
||
To check a message without rspamc: | ||
|