Configure DenyHosts to stop sending emails Print

  • 2

Problem Description

DenyHosts defaults to sending an email to root whenever it adds an IP address to its blocklist. This can result in a large number of emails being sent to the server admin.

Problem Resolution

To resolve this issue, login to the server which is sending the notifications via SSH. Edit /etc/denyhosts.conf and look for the ADMIN_EMAIL option. Change its value to be blank:

ADMIN_EMAIL =

You may then wish to enable logging of denied IPs so there is a record of when an IP has been blocked. To do this, change the configuration option called SYSLOG_REPORT to:

SYSLOG_REPORT=YES

To make these changes take effect, restart DenyHosts:

/sbin/service denyhosts restart

Was this answer helpful?

← Back