The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

cpanel's mail filter regexp lacking?

Discussion in 'E-mail Discussions' started by cnbingham, Sep 14, 2007.

  1. cnbingham

    cnbingham Registered

    Joined:
    Sep 14, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Folks,
    I've tried to create mail filters using cpanel's Mail->Filter commands and it seems that cpanel's implementation of regexp is either lacking or my understanding of regexp is lacking.

    It doesn't seem to handle regexp with word boundaries:

    \bbadword|badword2|badword3\b

    The above will only match badword2 in the subject line--the two on both ends are ignored.

    Similarly I have the following regexp set up for the subject filter to eliminate anything marked as [*SPAM*10.0*] or above by SpamAssassin, but the test doesn’t seem to work despite working on some other regexp testing facilities:

    \[\*SPAM\*[1-9][0-9].[0-9]\*\]*

    This should match (and delete) an email with the subject [*SPAM*10.0*], but not [*SPAM*9.9*] (or anything lower). However, when I try the Filter Test, it says that even a 1.0 will fail and be deleted.

    When I try the regexp at http://www.regular-expressions.info/javascriptexample.html, it matches properly.

    Anyone else run into these problems?

    Curtis
     
  2. cPanelBilly

    cPanelBilly Guest

  3. cnbingham

    cnbingham Registered

    Joined:
    Sep 14, 2007
    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    1
    Thanx, cpanelbilly. How should the word boundary tags be represented? I don't see a difference in Perl handling.

    I've tried

    Code:
    (\bbadword|badword2\b)
    but it doesn't seem to make a difference....

    Thanx,
    Curtis
     
Loading...

Share This Page