On 2022-01-17 at 11:12:50 UTC-0500 (Mon, 17 Jan 2022 11:12:50 -0500)
Jim Popovitch <jim...@domainmail.org>
is rumored to have said:

I'm trying to get a complex header_check to work, and unfortunately it isn't.

Right, because header_check cannot do what you're trying to do, as documented.

The 'if' construct in header_checks (or body_checks) operates on ONE header line, just as every other rule. The condition of the 'if' is operating on the same single header as the rules inside the 'if' block. This means that it is only useful for optimizing sets of rules which would otherwise be duplicative and/or risk excessive backtracking, but which *in principle* could be written without the 'if' by using more complex regexes.

If you want to predicate message handling on a combination of headers, you need a milter operating at the DATA phase or a content_filter.

--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire

Reply via email to