Add IP to deny list through an Exim filter

ebizindia

Well-Known Member
Oct 13, 2005
105
4
168
Kolkata, India
cPanel Access Level
Root Administrator
I am using an Exim filter to filter mails from unwanted extensions. I want to add these IPs to the deny list of Configserver Firewall (CSF) so that a spammer gets blocked (at least on a temp basis) if the emails from him/her are not allowed to be transmitted.

Example:

A spammer from example.xyz using IP xx.xx.xx.xx sends an email to [email protected] on my server. The anti-filter rejects this. I want to add the IP xx.xx.xx.xx to the deny IP list on my CSF (or block it on temp basis by some other means).

Q1. How to trigger this addition (I think we need to update some data file that CSF uses)?

Q2. How to restart CSF to take this into account?

I am wondering if this is a bad idea because I may end up having multiple restarts of CSF.
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,884
2,250
463
Hello :)

This would require a custom script that takes the IP address blocked in Exim and manually adds it to the CSF deny list. You may need to ask this question on the CSF forums for more information about their configuration files at:

General Discussion (csf) - ConfigServer Community Forum

Thank you.