If you are getting waves of spam in a language you do not read, such as Chinese, Russian, or Japanese, there are three practical ways to stop it. Some you can set up yourself in cPanel in a few minutes, and one is a server-level country filter our team can switch on for you. This guide explains each option, when to use it, and how to avoid blocking mail you actually want.
There is no one-click "reject all Chinese email" toggle, but you have two tools that get very close. In cPanel you can build an email filter that discards messages written in a non-Latin character set (this is the real "block by language" method). For region-specific spam, our team can also enable a server-level country filter that rejects incoming mail from the countries you name. Most people use both: the country filter for the bulk, and the charset filter to catch the rest.
01. Why There Is No Simple "Block This Language" Button
Mail does not carry a clean "this message is in Chinese" label, so there is nothing a mail program can flip on to reject a language outright. What a message does carry is two useful clues that we can filter on instead:
- The character set it is encoded in. A message written in Chinese almost always declares a Chinese encoding such as GB2312, GBK, GB18030, or Big5 in its headers. That declaration is something a filter can match.
- The sending server's location. Every message arrives from a mail server with an IP address, and that IP maps to a country. Mail that starts in a particular country can be refused at the door based on that.
Those two clues map directly to the two methods below. The character set is the better match for "this specific language", and the sending country is the better match for "this whole region keeps spamming me". Neither is about the recipient's settings, which is why the options you read about in generic email guides do not quite fit.
02. Option 1: Tune SpamAssassin (You Control This)
Every hosting account already runs Apache SpamAssassin, and it is the first thing to get right before adding filters of your own. On its own it will not target a specific language, but a well-tuned installation catches a large share of foreign-language spam because that mail tends to score high on other signals too.
- In cPanel, open Spam Filters (listed under the Email section).
- Confirm Apache SpamAssassin is enabled.
- Lower the spam threshold score if too much is getting through. The default is 5. Dropping it to 4 or even 3 makes the filter more aggressive. Go one step at a time and watch for false positives.
- Decide what happens to flagged mail. Spam Box moves it to a separate folder you can review. Auto-Delete discards anything above a score you set. Spam Box is the safer starting point.
Add known-good senders to the Whitelist (the Allow List) in the same Spam Filters screen before you make the filter more aggressive. That way a lower threshold cannot touch the people you actually correspond with.
For the full set of spam-reduction settings, see Greatly Reduce SPAM.
03. Option 2: Block a Language by Character Set
This is the closest thing to a real "block Chinese email" switch, and you can set it up yourself. A cPanel email filter can read the message headers and discard anything that declares a Chinese (or other non-Latin) character set.
Use Global Email Filters if you want the rule to apply to every address on your account, or Email Filters if you only want it on one mailbox. Both live under the Email section in cPanel and work the same way.
- Open Global Email Filters in cPanel and click Create a New Filter.
- Give it a clear name, such as
Block Chinese charset. - Set the rule to: Any Header · matches regex · and paste this value:
(?i)charset="?(gb2312|gbk|gb18030|big5) - For the action, choose Discard Message (silently dropped) or Deliver to Folder if you would rather review it for a while first.
- Click Create.
The (?i) at the front makes the match case-insensitive, and the list in parentheses covers the common Chinese encodings. Spammers writing in Chinese almost always declare one of them, so this single rule removes most of it.
Some messages only reveal the encoding in a MIME-encoded Subject line (it looks like =?gb2312?B?...?=). If a few slip past the rule above, add a second filter on Subject · matches regex · (?i)=\?(gb2312|gbk|gb18030|big5) to cover that case.
You can build the same kind of rule for other languages by swapping in their encodings, for example koi8-r|windows-1251 for Russian/Cyrillic or iso-2022-jp|euc-jp|shift_jis for Japanese.
This blocks by encoding, not by meaning. If you ever expect legitimate mail written in that language, this rule will catch it too. Read the false-positive section below before using Discard, and consider Deliver to Folder for the first week so you can confirm nothing good is being caught.
04. Option 3: Ask Us to Block a Country
When the spam is clearly coming from one region, blocking that whole country at the server is the most thorough option. This is a server-level filter that our team enables for your domain. It inspects the location of each sending mail server and refuses connections from the countries you choose, while letting the rest of the world through normally.
Because it runs at the mail server rather than in your mailbox, it stops the mail before it is ever delivered or scored, which is lighter on your account than filtering every message after the fact.
To request it, open a support ticket and tell us:
- Your domain, so we apply the filter to the right account.
- The countries to block, by name (for example China, Russia, Vietnam).
- Any known exceptions, such as a supplier or customer in one of those countries whose mail must still arrive.
You do not have to get the list perfect up front. Start with the one country sending you the most spam, give it a day or two, then ask us to add more if needed. It is easy to adjust.
05. Which Option Should You Use
These options complement each other rather than compete. Here is how to choose a starting point:
Character Set Filter
Use when the spam is written in one language regardless of where it comes from. Catches Chinese spam even if it is relayed through a server in another country. You set it up yourself in minutes.
Country Filter
Use when the spam clearly originates from one country and you have no legitimate contacts there. Stops it at the server before delivery. We enable it for you on request.
A message written in Chinese but sent through a US email provider will slip past a country block, and a spam run from a country you blocked might arrive in plain English and slip past a charset filter. Running both, on top of a well-tuned SpamAssassin, closes most of the gap.
06. Avoiding False Positives
Any block that is this broad will occasionally catch mail you wanted. A few habits keep that from becoming a problem:
- Review before you discard. For the first week, send filtered mail to a folder (SpamAssassin Spam Box, or Deliver to Folder on an email filter) instead of deleting it. Confirm nothing legitimate is landing there before you switch to discard.
- Whitelist the senders you trust. Add important contacts to the SpamAssassin Allow List. A country filter can also be set up with exceptions for specific senders, so tell us about them when you open the ticket.
- Think about shared services. Payment processors, shipping notifications, and newsletters sometimes send through servers in unexpected countries. If a service suddenly stops emailing you after a country block, that is the first thing to check.
- Keep the rule narrow. Block the one language or country causing the problem rather than a long list "just in case". Every entry you add is another chance to catch something good.
07. A Note on BoxTrapper
You may have seen BoxTrapper suggested elsewhere. It takes a different approach: it holds mail from any unknown sender and emails them a challenge they must answer before their message is released. It will stop foreign-language spam, but it also delays or blocks legitimate first-time senders, automated receipts, and mailing lists that cannot reply to a challenge.
For the problem of unwanted mail in a particular language or from a particular country, the charset filter and the country filter are more precise and far less disruptive, which is why we recommend them first. If BoxTrapper is not available on your plan, you are not missing the better tool.
Frequently Asked Questions
Can I block all emails from China?
Yes. Our team can enable a server-level country filter that refuses incoming mail from the countries you name, based on the location of the sending mail server. Open a support ticket with your domain and the countries to block, such as China, and we will switch it on. It leaves mail from every other country untouched.
How do I block emails written in a foreign language like Chinese?
Create a Global Email Filter in cPanel that matches the message character set. Set the rule to Any Header, matches regex, with the value (?i)charset="?(gb2312|gbk|gb18030|big5) and the action to Discard Message. Those are the common Chinese encodings, so this one rule removes most Chinese-language mail. You can swap in other encodings for Russian or Japanese.
Will blocking a country stop all the spam in that language?
Not completely. A country block stops mail sent from servers in that country, but spam written in a language can also be relayed through providers in other countries, such as Gmail. Pair the country filter with a character-set email filter and a well-tuned SpamAssassin to catch what each one misses.
Will a country or language block delete legitimate emails?
It can, because the block is based on encoding or sending location rather than meaning. For the first week, send filtered mail to a folder instead of discarding it so you can confirm nothing good is being caught. Whitelist contacts you trust, and tell us about any legitimate senders in a blocked country so we can add an exception.
Can I set this up myself or do I need to contact support?
SpamAssassin tuning and the character-set email filter are both things you can do yourself in cPanel in a few minutes. The server-level country filter is enabled by our team on request, so open a ticket for that one. We are also happy to set up the email filter for you if you would rather we handle it.
Want Us to Block a Country for You?
Open a ticket with your domain and the countries you want blocked, and we will enable the server-level filter. We are also happy to set up a charset filter on your account if you would rather we handle it.
Open a Support TicketQuick Recap: Stopping Foreign-Language Spam
If you only do a few things from this guide, do these:
- Make sure SpamAssassin is on and tuned in cPanel under Spam Filters, and whitelist your real contacts first
- Add a Global Email Filter on Any Header matching the Chinese character sets to discard that mail yourself
- Open a ticket to block a whole country at the server when the spam is clearly region-specific
- Review before you delete by sending filtered mail to a folder for the first week
- Keep the rules narrow and tell us about any legitimate senders in a blocked country
