NixUser | Unix User | Linux User | NixUser

Filter rule to discard emails with .exe attachment in cPanel


You can add custom email filters to discard email attachments in cPanel for a particular user. Use Global Filters option to add it for the whole account. For this, use Email Filters in cPanel >> Email Tab.


For example, you want to delete emails with .exe attachments.


In cPanel, go to Email Filters and select the email address from the emails list and then select Manage Filters option. Click on Create a New Filter button which will present you with the options to create a custom filter for your account.


Add the Filter name, then select the option body in drop down under Rules section and select matches regex in the next drop down menu.


In the next blank field, add the following:




You can also change the extension name as per your need, or create another filter for another one.


Now select the drop down under Actions as per your need, I will chose Deliver to folder option from there to test the filter rule. You can also set it to discard option.


Now click on the Create button to save the filter and there will be a confirmation message saying “You have successfully created a new filter. You can create another one now, or you can return to the filters list.” on saving it.