Hi!

I am still getting NDR-s. I uploaded come ndr header to a txt file to test
with postmap, and I am seeing the REJECT, so the header_check is working if
I understand right.
I used this command to test: postmap -vq -
regexp:/etc/postfix/header_checks < uploaded_text.txt
Output:
(...)
postmap: dict_regexp_lookup: /etc/postfix/header_checks:
 =?us-ascii?Q?7E0z14P8WDtXEwmu8gftuT9PHKgHFzkME8KD0jE=3D?=
Received: from fmfwd00.freemail.hu (195.228.245.78) by  REJECT
Received: by fmfwd00.freemail.hu (Postfix)      REJECT


postconf -n | egrep 'header_checks|receive_override_options' Output is:
header_checks = regexp:/etc/postfix/header_checks
but postconf -M | egrep 'header_checks|receive_override_options' gives
nothing.

Any more ideas what should I check?

Thanks

On Thu, Feb 16, 2023 at 3:46 PM Wietse Venema <wie...@porcupine.org> wrote:

> Spam Petya:
> > Hi!
> > Thank you for the examples. But the solution is this not working. I wrote
> > this to the header_checks:
> > /^From: (.*)mailer-dae...@fmfwd00.freemail.hu(.*)$/ REJECT message
> > /^Received: (.*)fmfwd00.freemail.hu(.*)$/ REJECT message
> >
> > Still NDR-s are passing through. Header examples from NDR:
> >
> > From: mailer-dae...@fmfwd00.freemail.hu (Mail Delivery System)
>
> Your regular expression matches this just fine:
>
> $ cat /path/to/file
> /^From: (.*)mailer-dae...@fmfwd00.freemail.hu(.*)$/ REJECT message
>
> $ postmap -q - regexp:/path/to/file <<EOF
> From: mailer-dae...@fmfwd00.freemail.hu (Mail Delivery System)
> EOF
>
> Output:
>
> From: mailer-dae...@fmfwd00.freemail.hu (Mail Delivery System)  REJECT
> message
>
> (same results with pcre: instead of regexp:).
>
> I suggest that you test the above with your header_checks file.
> ===============================================================
>
> Other possibilities:
>
> - You have misconfigurd header_checks, or you have
> receive_override_options in effect.
>
> postconf -n | egrep 'header_checks|receive_override_options'
> postconf -M | egrep 'header_checks|receive_override_options'
>
> - In your header_checks file, you have an "if /^Subject/" guard
> before a "/^From" rule.
>
>         Wietse
>

Reply via email to