This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

PureMessage for UNIX - Content based filtering

Hi all,

I'm using PMX 5.5 for Unix. I want to create a policy rule to block mails containing phrases from a custom list - pretty the same functionality as with the offensive words list. Maybe I'm a bit confused but I can't manage it to work...

I thought pmx_phrase will be the right one but it seems I can't use a list but only a word, phrase or regex as value.

Any ideas?

:12515


This thread was automatically locked due to age.
Parents
  • I've created a List as followed:

    Name: "My Content Filter"

    ID: "my-content-filter"

    Match Type: "Glob"

    The List contains an Entry named "*meta*honig*kuchen*killer*".

    Then I've created the following rule:

     
    # attr NAME=My Content Filter
    if pmx_phrase :matches ["my-content-filter"] {
        pmx_mark1 "*MyContentFilter*";
        pmx_replace_header :index 0 "x-MyContentFilter" "matched";
    }
    
    

    When I test the policy via "Test Current Policy" I can see the rule is triggered but always returns false. Each mail I've tested contained one of the following terms within it's body:

    Meta Honigkuchen Killer

    meta test honigkuchen _test_ killer

    meta-honig-kuchen-killer

    meta*honig*kuchen*killer

    *meta*honig*kuchen*killer*

    But the message only matched when I used "my-content-filter" within the body part. I've also tested ":contains" and ":memberof" instead of ":matches".
    :12551
Reply
  • I've created a List as followed:

    Name: "My Content Filter"

    ID: "my-content-filter"

    Match Type: "Glob"

    The List contains an Entry named "*meta*honig*kuchen*killer*".

    Then I've created the following rule:

     
    # attr NAME=My Content Filter
    if pmx_phrase :matches ["my-content-filter"] {
        pmx_mark1 "*MyContentFilter*";
        pmx_replace_header :index 0 "x-MyContentFilter" "matched";
    }
    
    

    When I test the policy via "Test Current Policy" I can see the rule is triggered but always returns false. Each mail I've tested contained one of the following terms within it's body:

    Meta Honigkuchen Killer

    meta test honigkuchen _test_ killer

    meta-honig-kuchen-killer

    meta*honig*kuchen*killer

    *meta*honig*kuchen*killer*

    But the message only matched when I used "my-content-filter" within the body part. I've also tested ":contains" and ":memberof" instead of ":matches".
    :12551
Children
No Data