Re: Problems with pattern matching using !/MyRegexp/

From: Noel Jones (no email)
Date: Tue Mar 18 2008 - 16:56:11 EDT

  • Next message: mouss: "Re: Fwd: Re: postfix, dovecot auth and rip/lip"

    Glen Edwards wrote:
    > In trouble shooting an if endif statement in header_checks that isn't
    > working, I tried the following by itself:
    >
    > /WesNet Support/ REJECT "test regexp"
    >
    > I then sent an email addressed as: WesNet Support <
    > <mailto:>> which was rejected as it should be.
    >
    > I then changed the pattern by adding in the not, "!":
    >
    > !/WesNet Support/ REJECT "test regexp"
    >
    > Sending the email addressed exactly as before: WesNet Support
    > < <mailto:>> returned the same result, it
    > bounced when this time it shouldn't have. I tried main.cf using both
    > regexp and pcre separately:
    >
    > header_checks = pcre:/etc/postfix/header_checks
    >
    > and then
    >
    > header_checks = regexp:/etc/postfix/header_checks
    >
    > Same results both ways; I can't get Postfix to recognize "!".
    >
    > Suggestions?
    >
    > Glen

    That rule will reject on the first header that doesn't contain
    "WesNet Support".

    It should be obvious that not every header (Received:, Date:,
    Message-ID:, etc.) will contain that string.

    In header_checks, negated expressions are pretty much only
    useful inside IF..ENDIF that limit the scope to a specific header.

    -- 
    Noel Jones
    

  • Next message: mouss: "Re: Fwd: Re: postfix, dovecot auth and rip/lip"





    Hosted Email Solutions

    Invaluement Anti-Spam DNSBLs



    Powered By FreeBSD   Powered By FreeBSD