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.

Regex on Account Level Filtering not working

Discussion in 'E-mail Discussions' started by chiledelara, Nov 27, 2013.

  1. chiledelara

    chiledelara Registered

    Joined:
    Nov 27, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Reseller Owner
    hi everybody

    We receive a lot of annoying emails from a conference company that always change their name, subject and email address using free email services (someuser@gmail.com, someuser@hotmail.com, someuser@yahoo.com, etc).


    The only text that always repeat on the message's body is:
    ... Tels (33) 3121 1350 con 10 Líneas / Lada Nacional Sin Costo : 01800 8417770
    Para desuscribir su correo ...


    I created the next rule on the Account Level Filtering section to delete these messages (.cpanel/filter.yaml):
    -----------------------------------
    -
    actions:
    -
    action: save
    dest: /dev/null
    enabled: 1
    filtername: Cursos Avanzado
    rules:
    -
    match: matches
    opt: or
    part: $message_body
    val: 8.?.?4.?.?1.?.?7.?.?7.?.?7.?.?0
    -
    match: matches
    opt: or
    part: $message_body
    val: 3.?.?1.?.?2.?.?1.?.?1.?.?3.?.?5.?.?0
    -
    match: matches
    opt: or
    part: $message_body
    val: "[Dd]esuscribir"
    unescaped: 1
    -----------------------------------------------

    Explained:
    --regex 1 match: 8417770 with 1,2 o no spaces or characters between the numbers-- or --regex 2 match: 31211350 with 1,2 o no spaces or characters between the numbers-- or --regex 3 match Desuscrubir or desuscribir--)


    I test it on cpanl and return this
    ...Testing Exim filter file "/etc/vfilters/mydomain.com.mx"

    Save message to: /dev/null 0660
    Save message to: /dev/null 0660
    Save message to: /dev/null 0660
    Save message to: /dev/null 0660
    Filtering set up at least one significant delivery or other action.
    No other deliveries will occur.
    ...


    :( But we still receive more than 50 messages daily with this text in every of our 54 email accounts. :(


    can anybody help me?


    (sorry about my english, i promise i will improve it)
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    Have you tried entering just standard text to see if that makes a difference? For instance, you could focus on the "Lada Nacional Sin Costo" aspect of the message body.

    Thank you.
     
  3. vlevin

    vlevin Registered

    Joined:
    Feb 7, 2015
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Website Owner
    Do you know how to create a filter for a row of a table? There is a table-formatted text that appears at the end of many SPAM messages we receive and filtering its row formatted as text or html doesn't work. Thanks.
     
  4. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,762
    Likes Received:
    662
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    You may receive more user-feedback if post to a developer's forum such as StackOverflow for assistance with specific questions regarding custom regular expressions.

    Thank you.
     
Loading...

Share This Page