I would like to create a spam filter that spans multiple lines in headers. This is my /etc/postfix/header_checks
file:
/^From:.*name[0-9]+@.+[\r\n]+To:.*name@domain\.com/ REJECT
It's a valid regex, but doesn't work, because header_checks applies the filters to one line at a time. How can I check for multiple headers at the same time? Matching against the whole raw headers block would work just fine, but I can't find an option for that.