How to manually block/reject emails from domain in Exim ?

How to manually block/reject emails from domain in Exim ?

Do you have spam mails problem? If you are getting spam mails from a particular domain then you can easily block those annoying spam mails on your Exim mail server. But it only works for the companies who are sending spam mails from a particular domain, if the spam mails are sending from Gmail or hotmail then it won’t work. In this article you can find detailed information about blocking mails from domain.

1. First you have to create a Exim blacklist file in /etc/Eximblacklist and enter the domain name which you want to black list with following command:

  • First login as a root on your server.
  • Enter the command to create a new file :
Nano /etc/Eximblacklist
  • In this file you can enter those domain names which you want to block.
Code: etc
2. Now you have to configure the Exim so that it can check the blacklist file and block the mails according to list. Let’s see how to configure Exim in WHM :

  • Login to WHM and search “Exim”.
  • Click on “Exim Configuration Manager” under Advanced Configuration tab.

  • Here click on “Add additional configuration setting” and two textboxes will appear. In first box you have to enter the code “domainlist Exim_blacklist” and in second box “lsearch;/etc/Exim_blacklist”.

  • In the domain configuration section add the following code :
driver = redirect
# RBL Blacklist incoming hosts
domains = +Exim_blacklist
data = :fail: Connection rejected: SPAM source $domain is manually blacklisted.
3. At last click on save button and restart your Exim.
Bhawani Singh
First release
Last update
0.00 star(s) 0 ratings

More resources from Bhawani Singh