Block all incoming SMTP except from ip's of my spam filter service

Jason Richmond

Registered
Nov 3, 2016
1
0
1
NC
cPanel Access Level
Root Administrator
I use two external spam filtering services.
All MX records for the domains on my cpanel server point to the spam filtering service.
I am getting spam from spammers that just email @mydomain.com and disregard the MX records.

I'd like to modify exim so that it ONLY accepts emails sent to it from the ip's of my spam filtering services. It also needs to accept mail generated inside the server itself.

I've already added those ip's into /etc/trustedmailhosts.
All of the documentation I have found to do this refers to very old cpanel/exim installs.

Can someone help me out?

Thanks!
 

cPanelLauren

Forums Analyst II
Staff member
Nov 14, 2017
8,115
662
263
Houston
cPanel Access Level
DataCenter Provider