Skip to main content

Block Email With Certain Subject On Specific Domain

Comments

5 comments

  • keat63
    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.
    0
  • 24x7server
    Hello, You can create a custom Exim system filter file with the following code on your server to block mail with the subject.
    if $header_subject: contains "YOUR SUBJECT TO BLOCK" then fail text "Your mail is not welcome." seen finish endif
    0
  • cPanelMichael
    How can i block email with certain subject on specific domain ?

    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?
    0
  • Osama Tariq
    Hello, You can create a custom Exim system filter file with the following code on your server to block mail with the subject.
    if $header_subject: contains "YOUR SUBJECT TO BLOCK" then fail text "Your mail is not welcome." seen finish endif

    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
    0
  • cPanelMichael
    it also blocked emails with other subject.

    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.
    0

Please sign in to leave a comment.