On Mon, Jun 16, 2025 at 01:59:05PM +0200, Florian Piekert via Postfix-users 
wrote:

> I am seeking guidance on the following header_checks.pcre directives,
> which do not seem to work.  Especially the
> /by .*\.t-com\.hr...$/
> lines apparently.

You should have read the pcre_table(5) manpage.

> I am wondering if the $ at the end of the line is the problem, since
> the header entry Received: continues for another line...

See the description of the available PCRE flags.

Examples:

    $ postmap -q "$(printf 'foo\nbar\n')" 'pcre:{{/foo$/ match}}'
    $ postmap -q "$(printf 'foo\nbar\n')" 'pcre:{{/foo$/m match}}'
    match
    $ postmap -q "$(printf 'foo\nbar\n')" 'pcre:{{/foo\n/ match}}'
    match

Also avoid sloppy REs, all *literal* "." characters need to be
escaped, pick your poison:

    - /\./, or
    - /[.]/, or
    - /\x{2e}/

If Postfix had PCRE Unicode support,

    - /\N{U+2e}/<unicode-flag>

-- 
    Viktor.
_______________________________________________
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org

Reply via email to