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.

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!

Support Center Login

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

Social Media Login

   
Social Login Joomla

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
n/a Points
2015-10-23 12:57 am

HI 

I have a question

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

or

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

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

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

Best Regards,
TJ Edens
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

Staff
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
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

Staff
9,731 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
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?

Staff
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 admin@google.com . 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-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? 

Staff
9,731 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-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.

Staff
13,707 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
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...

Staff
1,459 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!

Sincerely,
Carlos E
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 - clustermx2.nwk01.hosting.com [204.12.102.37]:49461 is in an RBL: Blocked - see http://www.spamcop.net/bl.shtml?204.12.102.37"

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.

Staff
39,957 Points
2017-10-18 4:37 pm
Hello,

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.

Post a Comment

Name:
Email Address:
Phone Number:
Comment:
Submit

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

19 Questions & Comments

Post a comment

Back to first comment | top

Need more Help?

Search

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: support@InMotionHosting.com
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!