# rkhunter sends email also when no problems are detected

## Seron

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.

----------

## gerdesj

Which cron daemon are you using?  

There are several ...

Cheers

Jon

----------

## Seron

I'm using vixie-cron 4.1-r10.

----------

## dcandea

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}"

----------

