On Fri, Apr 14, 2023 at 05:51:21PM -0300, SysAdmin EM via Postfix-users wrote:

> postmap -q "Subject: [KIS] ERROR (EXTERNAL IP): Invalid HTTP_HOST header: 
> '10.54.130.188:8020'. You may need to add u'10.54.130.188' to ALLOWED_HOSTS." 
> regexp:/etc/postfix/header_checks

Works here (bash syntax):

    $ hdr="Subject: [KIS] ERROR (EXTERNAL IP): Invalid HTTP_HOST header: 
'10.54.130.188:8020'. You may need to add u'10.54.130.188' to ALLOWED_HOSTS."
    $ rule='/^Subject:.*You may need to add.*/ DISCARD BLOCK_TEMPORAL'
    $ postmap -q "$hdr" regexp:<(printf "%s\n" "$rule")
    DISCARD BLOCK_TEMPORAL

> any ideas??

Your testing methodology is flawed or regexp rule file is malformed.
The file should contain:

    /^Subject:.*You may need to add.*/  DISCARD BLOCK_TEMPORAL

on a single line with no leading whitespace, and not have any syntax
issues on any other lines.

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

Reply via email to