DevHeads.net

Is it possible to use header checks on multiple headers

I am receiving some not very nice spam and I was wondering if I could
use as a single filter:

Return-Path: is not from my domain

Or am I using completely the wrong tool for this?

Thanks,
Nick

Comments

Re: Is it possible to use header checks on multiple headers

By Andrey Repin at 04/13/2019 - 04:26

Greetings, Nick Howitt!

If you search list archive, you'll find that each check made by postfix is
made in isolation, if you want some complex rules, you'd need a milter.

Re: Is it possible to use header checks on multiple headers

By Nick Howitt at 04/16/2019 - 05:24

On 13/04/2019 09:26, Andrey Repin wrote:

Re: Is it possible to use header checks on multiple headers

By Dominic Raferd at 04/16/2019 - 06:05

Look at postfwd milter (<a href="http://postfwd.org/" title="http://postfwd.org/">http://postfwd.org/</a>), where a single rule can
combine tests on different headers.

Re: Is it possible to use header checks on multiple headers

By Noel Jones at 04/16/2019 - 13:32

On 4/16/2019 5:05 AM, Dominic Raferd wrote:

postfwd is a policy service (not a milter), and doesn't see headers.
It *can* combine tests on multiple envelope items, such as client,
mail from, and rcpt to.

If you need arbitrary header checks, milter-regex can do complex
regular expression matching on multiple headers or the body of the
message. See google for examples.

-- Noel Jones

Re: Is it possible to use header checks on multiple headers

By Ralph Seichter at 04/16/2019 - 15:59

* Noel Jones:

I can recommend milter-regex. It is small, effective, and easy to
configure. Also, the author added a useful feature after I asked
him for it, which made milter-regex even better for me.

-Ralph