From fd5625dfe0661e01d49bdee2238f49f9d9ecb281 Mon Sep 17 00:00:00 2001 From: Ivan Stakhov <50211739+LeftTry@users.noreply.github.com> Date: Wed, 12 Jun 2024 16:36:00 +0600 Subject: [PATCH 1/7] Update replies.md --- doc/modules/replies.md | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/doc/modules/replies.md b/doc/modules/replies.md index 4e0e4b8a5..741854ee3 100644 --- a/doc/modules/replies.md +++ b/doc/modules/replies.md @@ -5,7 +5,7 @@ title: Replies module # Replies module -This module gathers the `message-id` header of emails that authenticated users have sent and saves the corresponding hashes to Redis. These hashes expire after a predetermined length of time, which can be set to a maximum of 24 hours by default. Additionally, the module creates hashes of the `in-reply-to` headers of all received messages and checks them for matches, i.e., messages that were sent in response to messages that our system initiated. The module then generates a symbol that can be used to adjust the scoring or force an action, such as accepting the message with no action taken, depending on the configuration. +This module gathers the `message-id` header of emails that authenticated users have sent and saves the corresponding hashes to Redis. These hashes expire after a predetermined length of time, which can be set to a maximum of 24 hours by default. Additionally, the module creates hashes of the `in-reply-to` headers of all received messages and checks them for matches, i.e., messages that were sent in response to messages that our system initiated. After that it approves all recipients of the current sender and adds them to the `local replies set` of this sender (default maximum size is 20). `local replies set` is used to check approved recipients for current sender. This `local replies set` has the time to expire (default is 1 day) after which it is removed from the redis. After this all recipients are also added to the `global replies set` (default maximum size is 30). `global replies set` is used to determine whether the sender is approved. The module then generates a symbol that can be used to adjust the scoring or force an action, such as accepting the message with no action taken, depending on the configuration. ## Configuration @@ -15,7 +15,11 @@ Settings for the module are described below (default values are indicated in bra - `action`: apply the given action to messages identified as replies (should typically be set to "no action" to accept) - `expire`: time, in seconds, after which to expire records (default is one day). - `key_prefix`: string prefixed to keys in Redis (default `rr`) +- `sender_prefix`: string prefixed to replies sets (default `rsrk`) +- `sender_key_global`: string that is used as a key to the global replies set - `symbol`: symbol yielded on messages identified as replies. +- `max_local_size`: maximum ammount of senders that are in the local replies set (default is 20) +- `max_global_size`: maximum ammount of senders that are in the global replies set (default is 30) Additionally, you will need to set up Redis servers to store data, such as `servers` or `read_servers` and `write_servers`. You can specify all standard Redis arguments, including password, timeout, database, and so on. @@ -29,8 +33,11 @@ Configuration should be added to `/etc/rspamd/local.d/replies.conf`: # These are default settings you may want to change expire = 1d; key_prefix = "rr"; +sender_prefix = "rsrk"; message = "Message is reply to one we originated"; symbol = "REPLY"; +max_local_size = 20; +max_global_size = 30; # Module specific redis configuration #servers = "localhost"; ~~~ From b4086158eb17c5be254b3f5adb31982291db4aca Mon Sep 17 00:00:00 2001 From: Ivan Stakhov <50211739+LeftTry@users.noreply.github.com> Date: Wed, 12 Jun 2024 18:53:16 +0600 Subject: [PATCH 2/7] Update known_senders.md --- doc/modules/known_senders.md | 28 ++++++++++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/doc/modules/known_senders.md b/doc/modules/known_senders.md index 23fdc5d08..829872107 100644 --- a/doc/modules/known_senders.md +++ b/doc/modules/known_senders.md @@ -15,12 +15,14 @@ The `known_senders` plugin is designed to help you track and categorize email se - [Maximum Time to Live](#maximum-time-to-live) - [Use Bloom Filters](#use-bloom-filters) - [Unknown Sender Symbol](#unknown-sender-symbol) - + - [Verified Incoming Mail Global Symbol](#verified-incoming-mail-global-symbol) + - [Verified Incoming Mail Local Symbol](#verified-incoming-mail-local-symbol) + - [Sender Prefix](#sender-prefix) --- ## Plugin Overview -The `known_senders` plugin is used to maintain a list of known sender domains and classify incoming emails based on these domains. It can be especially useful for distinguishing known senders from potentially malicious or unknown ones. This plugin is available from the version 3.7.0. +The `known_senders` plugin is used to maintain a list of known sender domains and classify incoming emails based on these domains. It can be especially useful for distinguishing known senders from potentially malicious or unknown ones. Also it can check if incoming `in-reply-to` mail sender and recipients are verified. This plugin is available from the version 3.7.0. ## Configuration @@ -43,6 +45,15 @@ use_bloom = false; # Insert symbol for new senders from the specific domains symbol_unknown = 'UNKNOWN_SENDER'; + +# Insert symbol for verified sender in global replies set +symbol_check_mail_global = 'INC_MAIL_KNOWN_GLOBALLY'; + +# Insert symbol for verified recipients in local replies set +symbol_check_mail_local = 'INC_MAIL_KNOWN_LOCALLY'; + +# Prefix for replies sets +sender_prefix = 'rsrk'; ``` ### Domains @@ -71,3 +82,16 @@ symbol_unknown = 'UNKNOWN_SENDER'; ### Unknown Sender Symbol - **Description**: The `symbol_unknown` parameter specifies the symbol that will be inserted for new senders from the domains listed in the `domains` configuration. This symbol can be used to further classify emails from unknown senders. + +### Verified Incoming Mail Global Symbol + +- **Description**: The `symbol_check_mail_global` parameter specifies the symbol that will be inserted if sender in the incoming mail is verified by `replies` module. Icoming mail is a `in-reply-to` mail. + +### Verified Incoming Mail Local Symbol + +- **Description**: The `symbol_check_mail_global` parameter specifies the symbol that will be inserted if recipients in the incoming `in-reply-to` mail is verified by replies module. + +### Sender Prefix + +- **Description**: The `sender_prefix` parameter is used to define keys in the redis that denote replies sets. +- **Note**: If you changed `sender_prefix` in `local.d/replies.conf` you also need to change it in the `local.d/known_senders.conf`. From 9e4ead1c7468348379e8a87511e9bf1a270d0ca5 Mon Sep 17 00:00:00 2001 From: Ivan Stakhov <50211739+LeftTry@users.noreply.github.com> Date: Wed, 12 Jun 2024 19:08:31 +0600 Subject: [PATCH 3/7] Minor changes in known_senders.md --- doc/modules/known_senders.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/modules/known_senders.md b/doc/modules/known_senders.md index 829872107..b3cef7ecf 100644 --- a/doc/modules/known_senders.md +++ b/doc/modules/known_senders.md @@ -85,11 +85,11 @@ sender_prefix = 'rsrk'; ### Verified Incoming Mail Global Symbol -- **Description**: The `symbol_check_mail_global` parameter specifies the symbol that will be inserted if sender in the incoming mail is verified by `replies` module. Icoming mail is a `in-reply-to` mail. +- **Description**: The `symbol_check_mail_global` parameter specifies the symbol that will be inserted if sender in the incoming mail is verified by `replies` module. ### Verified Incoming Mail Local Symbol -- **Description**: The `symbol_check_mail_global` parameter specifies the symbol that will be inserted if recipients in the incoming `in-reply-to` mail is verified by replies module. +- **Description**: The `symbol_check_mail_global` parameter specifies the symbol that will be inserted if recipients in the incoming mail is verified by `replies` module. ### Sender Prefix From 0d3ea000a3a1f5ddaf915eb4edd4fdb3f354daf7 Mon Sep 17 00:00:00 2001 From: Ivan Stakhov <50211739+LeftTry@users.noreply.github.com> Date: Wed, 12 Jun 2024 19:13:33 +0600 Subject: [PATCH 4/7] Create 2024-02-26-rspamd-3.8.template.md --- _posts/2024-02-26-rspamd-3.8.template.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 _posts/2024-02-26-rspamd-3.8.template.md diff --git a/_posts/2024-02-26-rspamd-3.8.template.md b/_posts/2024-02-26-rspamd-3.8.template.md new file mode 100644 index 000000000..70317b483 --- /dev/null +++ b/_posts/2024-02-26-rspamd-3.8.template.md @@ -0,0 +1,7 @@ +--- +layout: post +title: "Rspamd 3.8... has been released" +categories: announce +--- + +This release includes new features for `replies` and `known_senders` modules. `replies` module now can check `in-reply-to` mails to verify senders and their recipients. `known_senders` module can check incoming mails if sender and recipients have already been verified. From 9d0162a1fecdf291d7b586bb56b8b2343b7840b0 Mon Sep 17 00:00:00 2001 From: Ivan Stakhov <50211739+LeftTry@users.noreply.github.com> Date: Wed, 12 Jun 2024 20:48:34 +0600 Subject: [PATCH 5/7] Delete _posts/2024-02-26-rspamd-3.8.template.md --- _posts/2024-02-26-rspamd-3.8.template.md | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 _posts/2024-02-26-rspamd-3.8.template.md diff --git a/_posts/2024-02-26-rspamd-3.8.template.md b/_posts/2024-02-26-rspamd-3.8.template.md deleted file mode 100644 index 70317b483..000000000 --- a/_posts/2024-02-26-rspamd-3.8.template.md +++ /dev/null @@ -1,7 +0,0 @@ ---- -layout: post -title: "Rspamd 3.8... has been released" -categories: announce ---- - -This release includes new features for `replies` and `known_senders` modules. `replies` module now can check `in-reply-to` mails to verify senders and their recipients. `known_senders` module can check incoming mails if sender and recipients have already been verified. From ac67e42a52972f3b1a0729369724cba654e6113b Mon Sep 17 00:00:00 2001 From: LeftTry Date: Wed, 12 Jun 2024 20:50:08 +0600 Subject: [PATCH 6/7] Add _drats folder for draft release notes. Can be deleted if not needed --- _drafts/template_release.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 _drafts/template_release.md diff --git a/_drafts/template_release.md b/_drafts/template_release.md new file mode 100644 index 000000000..92f6d7fc6 --- /dev/null +++ b/_drafts/template_release.md @@ -0,0 +1,7 @@ +--- +layout: post +title: "Rspamd 3.8... has been released" +categories: announce +--- + +This release includes new features for `replies` and `known_senders` modules. `replies` module now can check `in-reply-to` mails to verify senders and their recipients. `known_senders` module can check incoming mails if sender and recipients have already been verified. \ No newline at end of file From f4ee7d330183815c4c95264569658379a70150c9 Mon Sep 17 00:00:00 2001 From: Ivan Stakhov <50211739+LeftTry@users.noreply.github.com> Date: Wed, 12 Jun 2024 20:52:18 +0600 Subject: [PATCH 7/7] Minor fixes to the known_senders.md --- doc/modules/known_senders.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/modules/known_senders.md b/doc/modules/known_senders.md index b3cef7ecf..b64eb2f81 100644 --- a/doc/modules/known_senders.md +++ b/doc/modules/known_senders.md @@ -89,7 +89,7 @@ sender_prefix = 'rsrk'; ### Verified Incoming Mail Local Symbol -- **Description**: The `symbol_check_mail_global` parameter specifies the symbol that will be inserted if recipients in the incoming mail is verified by `replies` module. +- **Description**: The `symbol_check_mail_local` parameter specifies the symbol that will be inserted if recipients in the incoming mail is verified by `replies` module. ### Sender Prefix