View previous topic :: View next topic |
Author |
Message |
Seron Apprentice
Joined: 31 Dec 2002 Posts: 293 Location: Malmö, Sweden
|
Posted: Thu Sep 09, 2010 11:01 am Post subject: rkhunter sends email also when no problems are detected |
|
|
I've set up rkhunter to send me email by means of the /etc/cron.daily/rkhunter script. In it I've set VERBOSITY=1 expecting only mail when there are actual warnings or errors. Instead, I get email daily, most of the time with no contents as no problems were detected. While it reports nicely when it finds problems, I'd like it to send me mail at those occasions and not otherwise. How can it be made to do this?
I have my email-address set in /etc/cron.daily/rkhunter and have disabled it in /etc/rkhunter.conf (MAIL-ON-WARNING=""). It's somewhat confusing that there are two different files to enter the email address and don't understand the reason for this. I've tried using both but end up getting twice the mail, slightly different in content.
[edit:]
I also have these settings in /etc/cron.daily/rkhunter
RKHUNTER_OPTS="--cronjob --report-warnings-only --update"
ENABLE=yes
UPDATE=no
SEND_EMAIL=yes
I also found bug 150391 which seems to address the same thing. And this bug from contribs.org, where it says that cron should suppress empty email, but I don't understand how to apply it in my case. _________________ man cannot be brave without being afraid |
|
Back to top |
|
|
gerdesj l33t
Joined: 29 Sep 2005 Posts: 621 Location: Yeovil, Somerset, UK
|
Posted: Sun Sep 12, 2010 12:28 am Post subject: Re: rkhunter sends email also when no problems are detected |
|
|
Which cron daemon are you using?
There are several ...
Cheers
Jon |
|
Back to top |
|
|
Seron Apprentice
Joined: 31 Dec 2002 Posts: 293 Location: Malmö, Sweden
|
Posted: Sun Sep 12, 2010 5:40 am Post subject: |
|
|
I'm using vixie-cron 4.1-r10. _________________ man cannot be brave without being afraid |
|
Back to top |
|
|
dcandea n00b
Joined: 18 Jan 2008 Posts: 4
|
Posted: Tue Aug 06, 2013 7:45 am Post subject: Re: rkhunter sends email also when no problems are detected |
|
|
it's because of line 25 from crontab script, the piped mail command send also empty mails.
I solved it with -e mail option:
EMAIL_CMD="|mail -e -s \"${EMAIL_SUBJECT}\" ${EMAIL_RECIPIENT}" |
|
Back to top |
|
|
|