1

Is it possible to create a new rule for mail to perform an action if the message contains a custom header?

I want to automaticaly detect emails that contain the "X-hashcash" header.

1 Answer 1

3

Yes.

If you go to Preferences Rules and Add Rule then the first of the condition pop up lists has Edit header list.. as the last choice. In the dialog click on the + and add in X-hashcash. Done.

2
  • Just to clarify, unless I'm wrong, there's no way currently to have a rule act on a header simply existing, you have to fill in a value. I was searching for a way to include "any" value or to make my rule react simply to the existence of a specific header but I can't find how. If at least the value of the header allowed range for characters such as regex ranges (a-z0-9). I also tried to reverse the logic and say header "does not contain", but it becomes truthy if the header isn't included in the e-mail at all which is illogical but to be expected, alas.
    – davidwebca
    Commented Nov 1, 2022 at 23:00
  • To be honest I've stopped supporting Mail on macOS. I assume you've tried 'contains' with '*' It may well be impossible with 'Mail'. Commented Nov 5, 2022 at 8:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .