Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
rkhunter sends email also when no problems are detected
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Seron
Apprentice
Apprentice


Joined: 31 Dec 2002
Posts: 293
Location: Malmö, Sweden

PostPosted: Thu Sep 09, 2010 11:01 am    Post subject: rkhunter sends email also when no problems are detected Reply with quote

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
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 621
Location: Yeovil, Somerset, UK

PostPosted: Sun Sep 12, 2010 12:28 am    Post subject: Re: rkhunter sends email also when no problems are detected Reply with quote

Which cron daemon are you using?

There are several ...

Cheers
Jon
Back to top
View user's profile Send private message
Seron
Apprentice
Apprentice


Joined: 31 Dec 2002
Posts: 293
Location: Malmö, Sweden

PostPosted: Sun Sep 12, 2010 5:40 am    Post subject: Reply with quote

I'm using vixie-cron 4.1-r10.
_________________
man cannot be brave without being afraid
Back to top
View user's profile Send private message
dcandea
n00b
n00b


Joined: 18 Jan 2008
Posts: 4

PostPosted: Tue Aug 06, 2013 7:45 am    Post subject: Re: rkhunter sends email also when no problems are detected Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum