docs: add documentation for the MAIL_FORCE_THREAD environment variable

This commit is contained in:
ttionya
2025-07-31 21:44:34 +08:00
parent dd86d927c9
commit 13d23fce88
2 changed files with 32 additions and 14 deletions
+16 -7
View File
@@ -444,13 +444,14 @@ Starting from v1.19.0, we will be using [`s-nail`](https://www.sdaoden.eu/code-n
Please note that `heirloom-mailx` is a stub for `s-nail`, and most of its functionality is compatible. Therefore, you may not need to modify any environment variables for this change.
| Environment Variable | Default Value | Description |
| --- | --- |-------------------------------------------------------|
| MAIL_SMTP_ENABLE | `FALSE` | Enable sending mail. |
| MAIL_SMTP_VARIABLES | | Mail sending options. |
| MAIL_TO | | The recipient of the notification email. |
| MAIL_WHEN_SUCCESS | `TRUE` | Send an email when the backup completes successfully. |
| MAIL_WHEN_FAILURE | `TRUE` | Send an email if the backup fails. |
| Environment Variable | Default Value | Description |
| --- | --- |-----------------------------------------------------------------------------------------------------------------------|
| MAIL_SMTP_ENABLE | `FALSE` | Enable sending mail. |
| MAIL_SMTP_VARIABLES | | Mail sending options. |
| MAIL_TO | | The recipient of the notification email. |
| MAIL_WHEN_SUCCESS | `TRUE` | Send an email when the backup completes successfully. |
| MAIL_WHEN_FAILURE | `TRUE` | Send an email if the backup fails. |
| MAIL_FORCE_THREAD | `FALSE` | Particularly useful when mail clients fail to group related messages in conversation view despite identical subjects. |
For `MAIL_SMTP_VARIABLES`, you need to configure the mail sending options yourself. **We will set the email subject based on the usage scenario, so you should not use the `-s` flag.**
@@ -468,6 +469,14 @@ For `MAIL_SMTP_VARIABLES`, you need to configure the mail sending options yourse
Console showing warnings? Check [issue #177](https://github.com/ttionya/vaultwarden-backup/issues/117#issuecomment-1691443179) for more details.
For `MAIL_FORCE_THREAD`, particularly useful when receiving systems fail to properly aggregate messages into conversation threads. It supports three modes of operation:
1. `FALSE`: Default email sending behavior
2. `TRUE`: Auto-generates RFC-compliant Message-ID to force thread creation
3. `Valid Message-ID string`: Uses specified Message-ID to associate with existing thread
When enabled, the system automatically adds required headers (`Message-ID`, `References`, `In-Reply-To`) to enforce proper thread association on the receiving end.
<br>
+16 -7
View File
@@ -441,13 +441,14 @@ docker run --rm -it \
请注意,`heirloom-mailx``s-nail` 的存根,它们大部分功能是兼容的。因此你可能不需要为这个改变修改任何环境变量。
| 环境变量 | 默认值 | 描述 |
| --- |--------|-----------|
| MAIL_SMTP_ENABLE | `FALSE` | 启用邮件发送功能 |
| MAIL_SMTP_VARIABLES | | 邮件发送参数 |
| MAIL_TO | | 接收邮件的地址 |
| MAIL_WHEN_SUCCESS | `TRUE` | 备份成功后发送邮件 |
| MAIL_WHEN_FAILURE | `TRUE` | 备份失败后发送邮件 |
| 环境变量 | 默认值 | 描述 |
| --- |--------|----------------------------------------|
| MAIL_SMTP_ENABLE | `FALSE` | 启用邮件发送功能 |
| MAIL_SMTP_VARIABLES | | 邮件发送参数 |
| MAIL_TO | | 接收邮件的地址 |
| MAIL_WHEN_SUCCESS | `TRUE` | 备份成功后发送邮件 |
| MAIL_WHEN_FAILURE | `TRUE` | 备份失败后发送邮件 |
| MAIL_FORCE_THREAD | `FALSE` | 尤其适用于邮件客户端在主题相同的情况下仍无法在对话视图中将相关邮件分组的情况 |
对于 `MAIL_SMTP_VARIABLES`,你需要自行配置邮件发送参数。**我们会根据使用场景设置邮件主题,所以你不应该使用 `-s` 标志。**
@@ -465,6 +466,14 @@ docker run --rm -it \
控制台有警告?查看 [issue #177](https://github.com/ttionya/vaultwarden-backup/issues/117#issuecomment-1691443179) 了解更多。
对于 `MAIL_FORCE_THREAD`,在邮件客户端无法正确将邮件聚合到同一会话中时特别有用。它支持三种操作模式:
1. `FALSE`:默认电子邮件发送行为
2. `TRUE`:自动生成符合 RFC 的 Message-ID 以强制会话关联
3. `有效 Message-ID 字符串`:使用指定的 Message-ID 与现有会话关联
启用后,系统会自动添加所需的标头(`Message-ID``References``In-Reply-To`),以便邮件客户端适当地关联会话。
<br>