Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

SOLVED how to filter out emails with no subject

Discussion in 'E-mail Discussion' started by silverbytes, Aug 7, 2017.

  1. silverbytes

    silverbytes Member

    Joined:
    May 31, 2006
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    151
    I'm getting a lot of spam of emails with no subject.
    In webmail i see this subject [no subject] but in my email client the subject is empty.
    I created a rule where in subject not contains "a" and in sujcted not contains "b" and so on, but that filtered absolutely all email to trash (incluiding good email)
    How do I set up spam assasin or horde to avoid those spam with no subject?
     
  2. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    819
    Likes Received:
    298
    Trophy Points:
    113
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Use matching on the subject line against a regex of
    Code:
    ^$
    which matches an empty string

    If you cant get it to work with spamassassin or horde, I do know they work if you set them up either as a cPanel email account filter, or as a domain global filter
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    #2 rpvw, Aug 7, 2017
    Last edited: Aug 7, 2017
    cPanelMichael likes this.
  3. silverbytes

    silverbytes Member

    Joined:
    May 31, 2006
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    151
    Thanks. Can you tell me step by step how to do that?
     
  4. rpvw

    rpvw Well-Known Member

    Joined:
    Jul 18, 2013
    Messages:
    819
    Likes Received:
    298
    Trophy Points:
    113
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    1. Log into the cPanel account that you want to apply the filter on
    2. In the EMAIL section ether choose to make a filter for the all the accounts on the domain by clicking on the Global Email Filters, or by clicking on the Email Filters and selecting the email address you want to create a filter on.
    3. Click on the Create a New Filter button
    4. Fill in the Filter Name field (Must be a unique name)
    5. In the Rules select Subject from the first dropdown and matches regex from the second
    6. In the next field add the ^$
    7. Now choose an action to apply to the mail when the regex matches eg Discard Message
    8. Click the Create button
    9. You can then test the filter using the Filter Test facility provided or send yourself mails with and without subjects

    Hope this helps
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    cPanelMichael likes this.
  5. silverbytes

    silverbytes Member

    Joined:
    May 31, 2006
    Messages:
    15
    Likes Received:
    0
    Trophy Points:
    151
    Thanks!
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,802
    Likes Received:
    1,896
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Twitter:
    Hello,

    I'm happy to see the solution offered was helpful. I'm marking this thread as solved.

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice