Skip to main content

How to delete messages coming from a domain

Comments

4 comments

  • NOC_Serverpoint
    Hello, Yes, this can be done using email filters. -- How to Configure Mail Filters - cPanel Knowledge Base - cPanel Documentation -- Steps [LIST]
  • Login to cPanel and click on Mail. Then click on the "E-mail Filtering" link.
  • To create a new email filter, click on the "Add Filter" link.
  • Select the required header field in the first drop-down list. These are the various fields in any e-mail message like 'To', 'Body' etc. For example, if you want to block emails containing certain words in the "Subject" of the message then select "Subject" in the header field.
  • Click on the required parameter in the second drop-down list. This will act on the text entered in the third field later. The option used most often is "contains" and it tests if the Subject (or other selected header) "contains" the words to be blocked or not. Equals - will match the text exactly (complete words only)
  • Matches regex - will match the text based on regular expression rules. Regular expressions are a powerful but complex area and you do not need to use regular expression filters mostly. Contains - will match the specified text in any occurrence. "Credit" will block both "Credit" and "Credit Cards". Begins with - will match the text only when it occurs at the beginning of a word.
  • [LIST]
  • Now you must choose what action to take on the identified emails. Enter the destination for the identified email in the Destination field box. There are three types of destinations: To destroy the e-mail type Discard (default option). To send the marked email to another address type the full email address. To send the email to a script type the full path to the script.
  • Finally, click on the Activate button.
  • In case you want to delete an email filter, later on, just login to cPanel, click on "Mail" and then on "Email Filtering". Now you can click on the "Delete" button next to the filter you want to remove. Regards,
  • 0
  • magmatic
    This is great! Thanks! We have thousands of domains we want to black list, so we want to manipulate this list in a better way than manually copying and pasting thousands of domains into it. Does this list live in a file somewhere that I can edit manually? That would be really handy.
    0
  • magmatic
    I figured it out. I made a new file in /usr/local/cpanel/etc/exim/sysfilter/options and now I can customize it how I like. This helped: Customize the Exim System Filter File - 11.52 Documentation - cPanel Documentation
    0
  • cPanelMichael
    I figured it out. I made a new file in /usr/local/cpanel/etc/exim/sysfilter/options and now I can customize it how I like. This helped: How to Customize the Exim System Filter File - cPanel Knowledge Base - cPanel Documentation Thanks!
    0

Please sign in to leave a comment.