[PR #1152] [MERGED] Server supports custom headers #1306

Closed
opened 2026-02-25 21:37:52 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/cypht-org/cypht/pull/1152
Author: @Shadow243
Created: 8/9/2024
Status: Merged
Merged: 8/12/2024
Merged by: @kroky

Base: masterHead: server-supports-custom-headers


📝 Commits (1)

  • 700f49c checking if the server supports custom headers

📊 Changes

1 file changed (+49 additions, -1 deletions)

View changed files

📝 modules/imap/hm-imap.php (+49 -1)

📄 Description

Description

Based on a discussion from the Stalwart GitHub issue https://github.com/stalwartlabs/mail-server/discussions/477, it appears that Stalwart's IMAP server only indexes standard headers defined in RFCs and does not support searching custom headers (such as X-Auto-Bcc) by default. This design choice is intended to optimize server performance by maintaining a manageable index size, as most users typically search by common fields like recipients, subjects, or message contents.

Key Points

  • Custom Header Search Not Supported: Stalwart currently does not support searching for custom headers (e.g., X-Auto-Bcc) because these headers are not indexed.

A server_supports_custom_headers function is implemented to determine if the server supports searching custom headers. This function sends a test command to the server and inspects the response to check for support.

Related Issue: https://github.com/cypht-org/cypht/issues/1149

Screenshot 2024-08-09 at 03 35 41

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/cypht-org/cypht/pull/1152 **Author:** [@Shadow243](https://github.com/Shadow243) **Created:** 8/9/2024 **Status:** ✅ Merged **Merged:** 8/12/2024 **Merged by:** [@kroky](https://github.com/kroky) **Base:** `master` ← **Head:** `server-supports-custom-headers` --- ### 📝 Commits (1) - [`700f49c`](https://github.com/cypht-org/cypht/commit/700f49cb261ae4f94639cb8fd7882b63e271467e) checking if the server supports custom headers ### 📊 Changes **1 file changed** (+49 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `modules/imap/hm-imap.php` (+49 -1) </details> ### 📄 Description ### Description Based on a discussion from the [Stalwart GitHub issue https://github.com/stalwartlabs/mail-server/discussions/477](https://github.com/stalwartlabs/mail-server/discussions/477), it appears that Stalwart's IMAP server only indexes standard headers defined in RFCs and does not support searching custom headers (such as `X-Auto-Bcc`) by default. This design choice is intended to optimize server performance by maintaining a manageable index size, as most users typically search by common fields like recipients, subjects, or message contents. ### Key Points - **Custom Header Search Not Supported:** Stalwart currently does not support searching for custom headers (e.g., `X-Auto-Bcc`) because these headers are not indexed. A `server_supports_custom_headers` function is implemented to determine if the server supports searching custom headers. This function sends a test command to the server and inspects the response to check for support. [Related Issue: https://github.com/cypht-org/cypht/issues/1149](https://github.com/cypht-org/cypht/issues/1149) <img width="1214" alt="Screenshot 2024-08-09 at 03 35 41" src="https://github.com/user-attachments/assets/c865e362-6086-4f2e-b726-9b22e79fc89c"> --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-25 21:37:52 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#1306
No description provided.