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.

How to set up an Email Filter

Discussion in 'E-mail Discussions' started by nootkan, May 10, 2016.

Tags:
  1. nootkan

    nootkan Well-Known Member

    Joined:
    Oct 25, 2006
    Messages:
    129
    Likes Received:
    2
    Trophy Points:
    18
    I've been to the doc on setting up email filters but I am not sure how to create regex expressions so the docs confuse me. I researched regex expressions but I just cannot get my head around them or how to figure them out.

    I need to set up email filter that blocks bad words like F@ck etc. I tried typing in the actual words separated by commas but that didn't work. Is there another way to block these words on an account basis or globally? I do have mailscanner setup on the server but it isn't doing the job so I wanted to try and do it using cpanels mail filters. I've also looked through some of the posts on the forum but they all reference regex expressions as a solution.
     
  2. keat63

    keat63 Well-Known Member

    Joined:
    Nov 20, 2014
    Messages:
    765
    Likes Received:
    20
    Trophy Points:
    18
    cPanel Access Level:
    Root Administrator
    I'm with you on that one.
    However, consider that this would be an endless task.

    I've seen the word 'Viagra' for instance, spelled in so many different ways, that you'd never create a regex for it.
     
  3. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
  4. nootkan

    nootkan Well-Known Member

    Joined:
    Oct 25, 2006
    Messages:
    129
    Likes Received:
    2
    Trophy Points:
    18
    Well it seems that CSF/Mailscanner disables spamassassin so I can't use the mail filter technique even if I could get my head around regular expressions. Oh well worth a try. Thanks everyone for trying to help, appreciate it. ;)
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    Could you elaborate on this? For instance, is a requirement for the MailScanner plugin that you disable SpamAssassin?

    Thank you.
     
  6. nootkan

    nootkan Well-Known Member

    Joined:
    Oct 25, 2006
    Messages:
    129
    Likes Received:
    2
    Trophy Points:
    18
    Michael, here is what CSF says after their installation of Mailscanner:

     
  7. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,854
    Likes Received:
    676
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    This suggests SpamAssassin is installed so you should be able to use it when filtering emails globally. Is it not working as expected with the MailScanner plugin? If not, you may need to use different methods of preventing SPAM such as enabling RBL lists, or enforcing SPF checking.

    Thank you.
     
Loading...

Share This Page