Updated: 15 November 2026 · Applies to: DirectAdmin (Evolution skin) with Exim, SpamAssassin or Rspamd

To block every email from one domain, open SPAM Filters in DirectAdmin, choose the option to block by domain, enter the sender's domain (for example spammer.example) and add it. From then on, mail from any address at that domain is dropped for the domain you set the filter on. There is a second way, the SpamAssassin blacklist, which is often the better choice; both are explained below.

Method 1: SPAM Filters (block by domain)

  1. Log in to DirectAdmin (usually https://your-server:2222; the address is in your welcome email).
  2. Open SPAM Filters (you can type its name in the menu search box). If you have several domains, select the one that receives the unwanted mail.
  3. Choose the block-by-domain option.
  4. Enter only the domain part, such as spammer.example, without @ or a user name.
  5. Add the filter. It appears in the list of active filters on the same page.

According to DirectAdmin, SPAM Filters are a basic Exim filter that drops messages after the server has accepted them. Because the server has already accepted the message, the sender gets no bounce, and a dropped message is not kept in any folder, so there is nothing to recover if you block a domain by mistake.

Method 2: the SpamAssassin blacklist

If SpamAssassin (or Rspamd, which DirectAdmin can use in its place) is enabled for your domain, you can add the domain to its blacklist instead:

  1. Open SpamAssassin Setup. If it is not switched on yet, see How to Enable Apache SpamAssassin in DirectAdmin for Spam Protection.
  2. In the blacklist box, enter the domain in wildcard form, one entry per line:
*@spammer.example

According to DirectAdmin, the blacklist and whitelist accept these forms, among others:

  • *@domain.com for every address at one domain
  • fred@domain.com for a single sender
  • *.com or @.com for a whole ending (use with great care: this would block a very large part of the internet)

A blacklisted sender is treated as spam, so what happens next follows the spam handling you chose in SpamAssassin Setup (for example delivery to a spam folder), and you can keep a copy rather than lose it silently.

Which method should you use?

  • Use the SpamAssassin blacklist when you want blocked mail kept in a spam folder in case you need it, or when you also want to whitelist a few senders.
  • Use SPAM Filters for a domain you are sure you never want to hear from.
  • Neither helps much against spam that arrives from many different, often forged, sender domains. For that, SpamAssassin scoring works better than a list. See How to Block Spam Emails Using Filters in DirectAdmin.

Things to know

  • A block works on the sender's address in the message. Spammers change domains often, so a block that worked last week may need a new entry.
  • Make sure you do not block a domain your customers or suppliers use. A block on a shared mail service domain would stop every one of its users from reaching you.
  • To undo a block, delete the filter from the SPAM Filters list (see How to Remove Spam Filters in DirectAdmin) or remove the line from the SpamAssassin blacklist.

If the spam is a phishing message pretending to be Ucartz, please report it: How to Report Abuse, Spam or Phishing to Ucartz.

Official documentation: DirectAdmin, preventing spam and filtering incoming spam.

Related services

Server management

on-demand administration, hardening, migrations and monitoring.

KVM VPS hosting

NVMe SSD and full root access, with Free Basic Managed Support.

Was this answer helpful?

Still stuck? Open a ticket