using nested "if endif" postfix pcre:header_checks

Discussion in 'HOWTO-Related Questions' started by kekahuna, Aug 19, 2007.

  1. kekahuna

    kekahuna New Member

    Hope there's someone out there that can help on this. I am trying to use pcre header_checks to filter a great deal of email going to one user on my mail server.
    I tried reading the man pcre_table 5 docs and the description is a little vague but I came up with this:
    if /^X-Original-To:.*[email protected]/
    !/^From:.*([email protected]|[email protected]|[email protected])/ REJECT You shall not pass

    It doesn't seem to work. I know I can do this in the .procmailrc file, but the mail to this specific user is so huge that I would rather reject everyone that is not listed as a friend right up front. Fortunately there aren't too many friends 10 to be accurate with no need to grow the list.
    Would appreciate some direction there.
  2. falko

    falko Super Moderator ISPConfig Developer

    Can you try this?
    if /^X-Original-To:.*[email protected][B][COLOR="Red"]*[/COLOR][/B]/
  3. kekahuna

    kekahuna New Member

    Falko, I'll give it a shot, but is there a bug in pcre_tables or something?
    The reason I ask is
    /^X-Original-To:.*[email protected]/ should produce the same result as if the * is appened,,, in other words if the X-Original-To is from [email protected] or [email protected] etc... that portion of the patter should match without including the * (which I maybe interpreting incorrectly to be a wildcard letter or letters 0 or more times)
  4. kekahuna

    kekahuna New Member

    This did not work. Its as if !/([email protected]|[email protected])/ Reject is being ignored.

Share This Page