Your question
How do I configure a non-text mail header like Message-ID to be indexed?
Let me look into how Stalwart handles header indexing configuration.
The headers field value in indexEmailFields is what you need. The SearchEmailField enum includes a headers option (“Email Headers”) which is not enabled in the default list.
The default indexEmailFields list is:
["from","to","cc","bcc","subject","body","attachment","receivedAt","sentAt","size","hasAttachment"]
Notice headers is absent. To index Message-ID (and all other email headers), add "headers" to the indexEmailFields list in the Search object. You can find this in the WebUI under Settings > Search. Once headers is included, all headers - including Message-ID - will be included in the full-text index.
Keep in mind:
Message-ID - there is no per-header granularity exposed in this configuration.Reference: Search Store docs and the Search object reference.
This is an automated reply from the Stalwart Help Bot. Other community members may follow up if this answer is incomplete or wrong.