Since update to 11.04, I keep receiving messages from 'Anacron', with some errors. Two types of messages, actually.

The first of those types is like:

/etc/denyhosts.conf: 28: SECURE_LOG: not found
/etc/denyhosts.conf: 36: HOSTS_DENY: not found
/etc/denyhosts.conf: 60: PURGE_DENY: not found
/etc/denyhosts.conf: 95: BLOCK_SERVICE: not found
/etc/denyhosts.conf: 110: DENY_THRESHOLD_INVALID: not found
/etc/denyhosts.conf: 121: DENY_THRESHOLD_VALID: not found
/etc/denyhosts.conf: 131: DENY_THRESHOLD_ROOT: not found
/etc/denyhosts.conf: 142: DENY_THRESHOLD_RESTRICTED: not found
/etc/denyhosts.conf: 155: WORK_DIR: not found
/etc/denyhosts.conf: 200: LOCK_FILE: not found
/etc/denyhosts.conf: 221: ADMIN_EMAIL: not found
/etc/denyhosts.conf: 232: SMTP_HOST: not found
/etc/denyhosts.conf: 233: SMTP_PORT: not found
/etc/denyhosts.conf: 252: Syntax error: newline unexpected
error: error running non-shared postrotate script for /var/log/denyhosts of '/var/log/denyhosts '
run-parts: /etc/cron.daily/logrotate exited with return code 1

These are the corresponding entries in /etc/denyhosts.conf

SECURE_LOG = /var/log/auth.log
HOSTS_DENY = /etc/hosts.deny
WORK_DIR = /var/lib/denyhosts
LOCK_FILE = /var/run/denyhosts.pid
ADMIN_EMAIL = root@localhost
SMTP_HOST = localhost

All of them seem fine to me.

Also, lines 251-253 in the same file go like:

SMTP_FROM = DenyHosts <DenyHosts@localhost>

So I don't see the "unexpected newline", either...

The other type of mail message I get from 'Anacron' is:

readline() on closed filehandle FILES at /usr/sbin/popularity-contest line 104.

(with the former line repeated some tens times)

Any hint on these messages?


The denyhosts error seems to be Debian Bug #608672. It seems that the logrotate script for denyhosts tries to execute /etc/denyhosts.conf as a shell script to access the configuration variables.

While your configuration file is fine for denyhosts itself, it causes the logrotate script to fail. It looks like the problem has been fixed for the 11.10 release but the fix has not yet been released as an update for 11.04.

You should be able to work around the problem by removing the spaces before and after the equals sign on each line of your /etc/denyhosts.conf file.

| improve this answer | |
  • Changed the logrotate script according to what is suggested in the bug page.... I'll have to wait for a week until I get (or don't get) anacron mail, but, for now, I'll mark your answer as accepted :). – luri Jun 2 '11 at 19:12

The popularity contest mail is a known bug in 10.10, still not fixed in 11.10 - run

sudo dpkg-reconfigure popularity-contest

to fix it.

Regards John

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.