How to make a Search Folder that filters using SMTP headers?

I would like to create a custom search folder that displays only email messages with a specific SMTP headers such as:

X-GitHub-Reason: mention
X-Spam-Status: No

The “Edit Search” dialog box has a link for “Choose fields” that shows many built-in fields, but I cannot find a way to add a custom SMTP header name.

Searching/filtering is one of the main purposes that email has SMTP headers. For comparison, Microsoft Outlook supports this kind of filtering via the “with specific words in the message header” rule option.

1 Like

Unfortunately you can’t use headers in Search Folder arguments.

However, you can create Rules to find headers like this:

Note that your argument won’t work on sent messages though (SMTP), as they do not have the X-Spam header. That is only on messages you receive.

This solution is annoying because I need to create a tag for each rule. And whenever I modify the rule, I need to manually clear all the tags and reapply them. :thinking:

However it does solve the problem. Thank you! :+1: