Red Hat Bugzilla – Bug 454784
denyhosts daemon should start after Mail Transport Agent by default
Last modified: 2008-08-11 13:57:15 EDT
The default settings /etc/rc.d/init.d/denyhosts have it at a priority of 50 and
/etc/rc.d/init.d/sendmail is at priority 80, which is clearly later. This causes
the emailing done by the denyhosts service on bootup to fail. Please fix.
/etc/rc.d/init.d/exim and /etc/rc.d/init.d/postfix also have a default priority
setting of 80, FYI. Might I suggest that this line in /etc/rc.d/init.d/denyhosts
# chkconfig: - 50 01
be changed to
# chkconfig: - 85 15
Unfortunately that would cause it to start after sshd. It is not the default
behavior of denyhosts to send email when it starts, so I'm not entirely sure
what behavior you're seeing, but I'm not sure there's a correct answer here.
BTW, postfix does not have this problem; it will queue the mail properly until
the daemon starts. Exim should have the same behavior.
Further testing on F9 shows that sendmail queues the mail properly as well;
messages sent while sendmail is stopped are delivered fine when it is started.
Could you provide more information on the actual problem you are seeing? Do you
have any logs or other data which indicate the failure of any generated mail to
be delievered once sendmail is running?
I ran into this problem when I installed denyhosts for the first time, set the
service to on in chkconfig and rebooted. The first time denyhosts ran was before
the MTA was running and it failed to email the denied hosts message to root,
dumping the email on my console instead.
Is it really a big problem if denyhosts comes up a few seconds after sshd? It's
retroactive in banning hosts in any case. Also, shouldn't the denyhosts service
depend on sshd (and possibly the MTA) starting successfully?
I checked in a fix for this about a month ago and built for rawhide, but did neglected to address this bug report before I left for vacation.
I don't see any real reason to push this as an updateto F8 and F9 currently; if there are other changes that need to be pushed then this will go along with them.