InMotion Hosting Support Center

Using Blacklist/Whitelist in SpamAssassin

In SpamAssasin you have the ability to Blacklist (block), and Whitelist (allow) email address. In this guide we will show you how to Whitelist/Blacklist email address in SpamAssassin, which is included in cPanel.

Did you know? Not all hosting companies provide free access to cPanel. InMotion does and it's just one of the many features of our various web hosting plans.

Whitelist an Email Address:

  1. Login to cPanel.
  2. Click the Spam Assassin button in the Email section.
    accessing SpamAssassin
  3. On the SpamAssassin settings page, click the Configure SpamAssassin button.
  4. Next to the whitelist_from option, enter the email address you want to Allow, then click the Save button.
    white listing email address

    You will then see a message stating "Your settings have been saved!"

Blacklist an Email Address:

  1. Login to cPanel.
  2. Click the Spam Assassin button in the Mail section.
  3. On the SpamAssassin settings page, click the Configure SpamAssassin button.
  4. Next to the blacklist_from option, enter the email address you want to Block, then click the Save button. You will then see a message stating "Your settings have been saved!"

Congratulations, now you know how to Blacklist and Whitelist email addresses using SpamAssassin!

Was this article helpful?

Related Questions

Here are a few questions related to this article that our customers have asked:
Why Are We Limited to Five Entries on Spam Assassin White List
Would you like to ask a question about this page? If so, click the button below!
Ask a Question

Support Center Login

Our Login page has moved, Click the button below to be taken to the login page.

n/a Points
2018-07-05 12:03 pm

Can I blacklist email domains or can i only blacklist email addresses because my web registration form is getting bombarded with SPAM bots all using different addresses but with the same domain.

42,247 Points
2018-07-05 5:19 pm

Sorry for the spam issues. Yes, you can use the "*" wildcard in the Blacklist filter for Spam Assassin. In cPanel, go to the Email section, then click on Spam Filters. Next, click on Show Additional Configurations, then click on Edit Spam Blacklist Settings. Click on Add a New "blacklist_from" item and then type in *.domain name to specify emails from a specific domain. Click on Update Blacklist (blacklist_from) in order to save your change. If you continue to have problems with spam, make sure to contact your live technical support team for additional assistance. Make sure to give your setting at least a day (or 2) to take effect.

n/a Points
2018-03-21 6:18 pm

If I blacklist an e-mail adddress in Horde, does it blacklist it on the server so that it is also blacklisted from other clients like Outlook?

31,313 Points
2018-03-22 10:02 am
Yes, since Horde is an IMAP client, any rules created there will affect other clients (such as Outlook).

Thank you,
n/a Points
2018-01-08 9:06 am

Hi, how can I block a domain?  Seems Apache spamassassin won't block anything that is, where "variable" always varies on each email.  I want to block @*.space.  Is this possible?

1,173 Points
2018-01-08 1:33 pm
Hello, if you are trying to block all emails from a specic domain such as "" you would add a rule under the blacklist for * If you are trying to block an entire Top Level Domain such as ".com" you would add a blacklist rule for *.com
n/a Points
2017-10-18 4:10 pm

I have added a specific email address to the SpamAssasin whitelist but the email still get blocked with the following message "JunkMail rejected - []:49461 is in an RBL: Blocked - see"

What else can i do to allow emails form this sender (or even domain) to get through? It's getting really frustrating. One particaular account has a fair bit of issues with emails getting blocked, even when the addresses are added to the whitelist. 

Any help would be hugely apprecaited. Thanks in advance.

42,247 Points
2017-10-18 4:37 pm

Sorry for the problems with the email being blocked. It appears that the email is being blocked because they are in a block list. They would need to follow the link provided in the message and request that they are unblocked by Spam.cop in order for the message to not be filtered by the service.
n/a Points
2017-08-31 8:00 pm

what if you want to whitelist or blacklist more than 5 email addresses? There are only 5 spots, and commas don't seem to work - in fact, adding a second email after a comma makes the first one stop  working...

2,863 Points
2017-08-31 9:38 pm
Hello! It does seem that the cPanel plugin for configuring SpamAssassin only includes a limited number of fields for whitelisting/blacklisting email addresses. I would suggest utilizing wildcard symbols, as noted in cPanel's documentation to add multiple email addresses into a field.

If you are on a VPS or Dedicated server and have root access, you may be able to modify the SpamAssassin configuration file(s) directly to include more than the cPanel plugin will configure for you. I hope this helps!

Carlos E
13,821 Points
2016-07-13 2:19 pm
You would need to set a filter like the comment above.
n/a Points
2016-07-13 4:21 pm

I realize you are trying to be helpful and I appreciate the reply... but since I don't do this everyday... it took me a while to figure what the heck you're talking about.  A link to FILTERING would have been helpful in your reply.  I was looking for a FILTERING feature in Spam Assassin for sometime trying to figure out what I was missing.

n/a Points
2016-07-13 2:14 pm

Can I blacklist an entire extension.. such as .stream  or .top?   I'm getting tons of junk from these new extensions.

n/a Points
2016-05-29 12:27 pm

I have been getting 400 emails a day from all sorts of domains with a .win TLD.  In looking at all the senders email addresses there are hundreds of new domains being sent from every day.  Is there a way to just block any domain with a .win TLD? 

10,734 Points
2016-05-31 9:14 pm
You could try setting up a filter for Sender "Contains" with the .win TLD in Spam Assassin.
n/a Points
2016-05-20 6:56 pm

Hi. I have a question. Is it possible to upload a large blacklist to spamassassin?  On my old hosting provider we had spam experts which was quite good at blocking the majority of spam, and I created a rather large (500+ adressess and servers) list. Is it possible to just upload that entire list, or do I have to do it one at a time?

10,077 Points
2016-05-20 9:47 pm
Hello Erik,

While there is no auto way to blacklist email addresses I may have an easier solution than entering them manually via the cPanel. In your home directory there is a hidden folder, which can be viewed with File Manager settings checked, called .spamassassin/. Go into that folder, edit the user_prefs file (no extension). At the bottom right above your score requirement will be where your blacklist go. So what you would have to write is: blacklist_from . Be sure that it stays above required_score.

Best Regards,
TJ Edens
n/a Points
2017-08-31 1:03 am

Thank you, this approach worked for mass upload.

n/a Points
2016-05-17 4:35 pm

Any way to have the system automatically add addresses to whom I (and my users on the domain / VPS) SEND email TO??  (TO, CC, BCC)


Tx, David

10,734 Points
2016-05-17 7:44 pm
This may be possible with a great deal of custom coding, but I don't know of a straightforward way to do it in cPanel, SpamAssassin, or with conventional email clients.
n/a Points
2015-10-24 2:09 am

Hello Guys,


when i try to block an email from spam assasin i get this error;


Apache SpamAssassin™ Configuration

You can not call this page directly.


Help pliz

43,761 Points
2015-10-26 9:05 am
Hello Emma,

Are you trying to add an email address to the blacklist like it says above?

Kindest Regards,
Scott M
n/a Points
2015-10-23 12:57 am


I have a question

When we add a DNS blacklist to the spamassassin like Does it stores all the blacklisted domains locaaly onto the databade 


does it goes to online every time it receives an email and check! which will be slower.

If someone can answer this, i will really appreciate him/her

10,077 Points
2015-10-23 9:11 am
Hello Sukhpal,

Unfortunately it does not work like that. If you add to your Spam Assassin blacklist then no one could email you from If you wanted to use as a RBL you would need root access to WHM to make that change.

Best Regards,
TJ Edens

Post a Comment

Email Address:
Phone Number:

Please note: Your name and comment will be displayed, but we will not show your email address.

25 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?


Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail:
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!