I am using the mod_evasive apache module for my website and it seems to work just fine. Since you can specify in the config to run an external command when a rule is triggered I have added something like
DOSEmailNotify my_email<br/>
DOSSystemCommand "sudo /usr/bin/perl /etc/csf/csf.pl --tempdeny %s 300 -d in"<br/>
DOSLogDir "/var/log/httpd/mod_evasive"
Everything works fine but the email I receive has sender nobody and no subject and the body looks like this:
To: my_email
Subject: HTTP BLACKLIST 83.166.209.41
mod_evasive HTTP Blacklisted 83.166.209.41
Is there anyway I can configure mod_evasive with a custom from address and also a custom subject?
you could use the DOSSystemCommand instead of DOSEmailNotify: