Can DenyHosts purge old entries added to the HOSTS_DENY file?
DenyHosts v0.8.0 (and greater) offers the ability to remove old entries from the HOSTS_DENY file (eg. /etc/hosts.deny). You must set the PURGE_DENY parameter in your configuration file and invoke DenyHosts with the –purge command line flag: $ denyhosts.py –purge When DenyHosts is run with the –purge flag it locates entries in the HOSTS_DENY file that have been previously timestamped by DenyHosts that have exceeed the PURGE_DENY value using the following algorithm: • HOSTS_DENY is backed up to a file named HOSTS_DENY.purge.bak • a temp file is created, HOSTS_DENY.purge.tmp • the HOSTS_DENY is parsed and each non-expired entry and each non-timestamped entry will be written to HOSTS_DENY.purge.tmp • each HOSTS_DENY that has expired (based on PURGE_DENY) will not be written to HOSTS_DENY.purge.tmp • after all lines are parsed, if atleast one entry was not written to HOSTS_DENY.purge.tmp (that is, no entries were expired) then HOSTS_DENY.purge.tmp will be deleted and no further processin