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!

Block Email With Certain Subject On Specific Domain

Discussion in 'E-mail Discussion' started by Osama Tariq, Jul 6, 2015.

  1. Osama Tariq

    Osama Tariq Well-Known Member

    Joined:
    Nov 27, 2014
    Messages:
    206
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Lahore, Pakistan
    cPanel Access Level:
    Root Administrator
    Twitter:
    How can i block email with certain subject on specific domain ?
     
  2. keat63

    keat63 Well-Known Member

    Joined:
    Nov 20, 2014
    Messages:
    998
    Likes Received:
    44
    Trophy Points:
    28
    cPanel Access Level:
    Root Administrator
    In the specific users CPanel, you can do this in Account Level Filtering.

    Maybe there's a way to modify the config file at ssh level.
     
  3. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,861
    Likes Received:
    89
    Trophy Points:
    78
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    You can create a custom Exim system filter file with the following code on your server to block mail with the subject.

    Code:
    if
      $header_subject: contains “YOUR SUBJECT TO BLOCK“
    then
      fail text “Your mail is not welcome.”
    seen finish
    endif
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

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

    To clarify, are you looking for a way to block emails with a specific subject for a single account or single email account? If so, are the account or user level filter options in cPanel helpful?

    Account Level Filtering

    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Osama Tariq

    Osama Tariq Well-Known Member

    Joined:
    Nov 27, 2014
    Messages:
    206
    Likes Received:
    2
    Trophy Points:
    18
    Location:
    Lahore, Pakistan
    cPanel Access Level:
    Root Administrator
    Twitter:

    The custom filter is not working properly, it also blocked emails with other subject.
    I have created filter on this path: nano /etc/vfilters/domainname
     
  6. cPanelMichael

    cPanelMichael Technical Support Community Manager
    Staff Member

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

    Could you let us know the exact filter rule you created? Also, please use the "Account Level Filtering" option in cPanel to ensure all required files are populated correctly.

    Thank you.
     
    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