+254725682556 +254725052660 info@ziprof.co.ke
Client Area

Mail Filters & SPAM

How to Create a Mail Filter to Block or Sort Messages

A mail filter is a rule that checks each incoming message against conditions you set, such as the sender's address, the subject line, or a spam score, and then takes an action like moving the message to a folder, forwarding it, or deleting it. Filters are how you turn a SpamAssassin score into something that actually happens to a message, and they're also useful for basic sender blocking without needing anything else enabled.

In cPanel

  1. Log in to cPanel and open Email Filters.
  2. Click the account you want to add a filter to, then click Create a New Filter.
  3. Give the filter a name, then set the rule. To block a sender, choose From as the field, contains as the condition, and enter their address. To act on spam, choose X-Spam-Status as the field and check for Yes.
  4. Under Actions, choose what should happen, such as Discard Message or Deliver to Folder.
  5. Click Create to save.

In DirectAdmin

  1. Log in to DirectAdmin and open Email Filters under the Email section, or access filters from within webmail's Filters settings.
  2. Click Create Filter (or add a new rule).
  3. Set the condition, for example the From header contains a specific address, or the subject or spam flag matches a pattern.
  4. Set the action: delete the message, move it to another folder, or forward it elsewhere.
  5. Save the filter.
Test a new filter with a lenient action first, such as moving matching mail to a review folder rather than deleting it outright, until you're confident the rule only catches what you intend.

Filters run in the order they're listed, and most control panels stop at the first matching rule unless you set the filter to continue evaluating further rules. If you have several filters, put the most specific ones first so a broad rule doesn't catch a message before a more precise one gets a chance to run.

Mail Filters & SPAM