A keyword or stop-word filter matches text in incoming messages according to the server filtering implementation. It can catch a specific recurring pattern, but common words and quoted message history can also produce false positives.
IN THIS ARTICLE
What you need before you begin
Review several unwanted messages and choose a distinctive pattern. Confirm whether the rule affects the entire selected domain rather than one mailbox. Use a mailbox-specific rule if the content decision should apply only to one person.
01 Filter email by a subject or message keyword in DirectAdmin
- Open E-mail Manager > SPAM Filters and select the Stop Word or keyword match type.
- Enter a narrowly chosen word or phrase. Avoid broad terms such as invoice, payment or support that commonly occur in legitimate business correspondence.
- Read the match behavior available for your panel and server. Do not assume that spaces automatically create reliable word boundaries or that capitalization and encoded text are treated exactly as expected.
- Choose reviewable handling where supported, add the rule and save.
- Test both a message that should match and a legitimate message that should not. Review subjects, bodies and quoted replies when assessing the result.
02 Example: check a temporary keyword rule
For a controlled test, choose a distinctive temporary marker such as filter-check-4827 and use a reviewable destination if your service offers one. Send one authorized external test containing that marker and another ordinary test without it. Check both results, including the inbox and spam folder.
If a subject test and a body test behave differently, record that observation before relying on the rule; the server determines which message text is examined. Remove the temporary marker rule when the test ends. Never test by asking a real customer to risk an important message being discarded.
How do I check the keyword filter for false positives?
Confirm matching messages reach the intended filtered destination without excluding useful mail. Recheck the rule after real correspondence accumulates because a small test cannot cover every legitimate use of a phrase.
Troubleshoot unexpected results
If the filter catches too much, remove or refine the exact rule rather than adding several compensating broad rules. If it misses encoded or altered text, use the provider spam-scoring system instead of an increasingly fragile keyword list. Discarded messages may require the sender to resend after correction.