KNOWNHOST WIKI

User Tools

Site Tools


dedicated-servers:how-to-manage-email-blacklisting-on-a-dedicated-or-vps-server

How to Manage Email Blacklisting on a Dedicated or VPS Server

There are two sides to email blacklisting. On the one hand, there's the need to get your server off of common online blacklists. On the other, there's the need to manage email blacklists on the server so as to reduce spam.


Getting Removed from Email Blacklists

Check out our 1)guide to getting removed from email blacklists via the KnownHost wiki.


Creating an Exim Blacklist to Reduce Spam - WHM

One method of blacklisting is to block entire domains from sending you email is to create an eximblacklist file and then updating the Exim configuration to make use of that blacklist file.


Create the Blacklist

Step 1 - SSH into the server and login as root Step 2 - Create a new file called eximblacklist in /etc with

  nano /etc/eximblacklist

Step 3 - Add domains to be blocked in this file with one per line, like

  somespammer.net
  otherspamdomain.com

Step 4 - Save and close the file


Update Exim Configuration (Non-WHM Method)

Step 1 - Edit the exim.conf that's in /etc/exim

  nano /etc/exim/exim.conf

Step 2 - Look for the line with Exim 4 Config and add the following

  domainlist exim_blacklist = lsearch;/etc/eximblacklist

Step 3 - Look for the line with Routers Configuration and add the following

  reject_domains:
  driver = redirect
  # RBL Blacklist incoming hosts
  domains = +exim_blacklist
  allow_fail
  data = :fail: Connection rejected: SPAM source $domain is manually blacklisted.

Step 4 - Save and close the exim.conf file Step 5 - Restart exim

  service exim restart


Alternative - Update Exim Configuration (WHM Method)

Step 1 - Login to WHM and in the search bar, search for Exim Step 2 - Click Exim Configuration Manager then Advanced Configuration Step 3 - Click Add Additional Configuration Step 4 - In the first text box add

  domainlist exim_blacklist

Step 5 - In the second text box add

  lsearch;/etc/eximblacklist

Step 6 - Look for the line with Routers Configuration section in the first subsection, Section: PREROUTERS, and add the following

  reject_domains:
  driver = redirect
  # RBL Blacklist incoming hosts
  domains = +exim_blacklist
  allow_fail
  data = :fail: Connection rejected: SPAM source $domain is manually blacklisted.

Step 7 - Save and restart Exim


Creating an Exim Blacklist to Reduce Spam - cPanel

If you've got cPanel and would like to block spam for a particular domain, login to cPanel and follow these steps below.

  1. In the Email section, click on Spam Filters
  2. Scroll to Advanced Configuration and click on Show Additional Configurations
  3. Scroll to Blacklist and click on Edit Spam Blacklist Settings
  4. Click on + Add A New blacklist_from Item
  5. Enter what it is you want blacklisted and click Update Blacklist


What You Can Blacklist in Step #5

There's more than one way to enter blacklist items in Step #5. You can block:

Individual Email Addresses

john@doe.com

Entire Domains

  *@doe.com
dedicated-servers/how-to-manage-email-blacklisting-on-a-dedicated-or-vps-server.txt · Last modified: 2020/10/20 06:53 by Karson N.