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.

Block Email With Certain Subject On Specific Domain

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

  1. Osama Tariq

    Osama Tariq Well-Known Member

    Joined:
    Nov 27, 2014
    Messages:
    187
    Likes Received:
    1
    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:
    765
    Likes Received:
    20
    Trophy Points:
    18
    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,146
    Likes Received:
    34
    Trophy Points:
    48
    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
     
  4. 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 :)

    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.
     
  5. Osama Tariq

    Osama Tariq Well-Known Member

    Joined:
    Nov 27, 2014
    Messages:
    187
    Likes Received:
    1
    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 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 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.
     
Loading...

Share This Page