I sometime want to send special email with only part of the log file as shell 
script from cron.  I use egrep to get the parts I want in the email so it is 
formatted to my liking:

#!/bin/sh
EMAILTO="m...@whatever.com"
/usr/local/bin/rkhunter --check --enable properties --report-warnings-only 
--logfile /var/log/r***********   **************
egrep '(Rootkit Hunter|Start |: Free|warnings-only|Warning: |File:       \ 
/u2/batch/phishline| summary|==========|Suspect|checked:|took:)'        \ 
/var/log/rkhunter_special.log |                                                 
                               \
/usr/bin/mail -s "rkhunter report (special warnings) `hostname -s` (daily)" 
$EMAILTO

-----------
Does anyone know how to whitelist a file with a SPACE in it?  Double-quotes did 
not seem to work in conf file with SCRIPTWHITELIST.
[10:23:37]   /whatever/License<SP>Information.rtf [ Warning ]
[10:23:37] Warning: No hash value found for file 
'/whatever/License<SP>Information.rtf ' in the 'rkhunter.dat' file.

$ grep License /usr/local/etc/rkhunter.conf
SCRIPTWHITELIST=/whatever/License Information.rtf

Thanks,

Bruce C
From: Fred Sahakian via Rkhunter-users <rkhunter-users@lists.sourceforge.net>
Reply-To: Fred Sahakian <fre...@me.com>
Date: Sunday, May 10, 2020 at 11:40 PM
To: "rkhunter-users@lists.sourceforge.net" 
<rkhunter-users@lists.sourceforge.net>
Subject: [Rkhunter-users] Log file attached

I have a new installation of Rkhunter running nicely. The reporting logs are 
coming as an attachment in an email. On another server I have, log information 
is embedded within the email. Im stumped on how to get the report on the new 
installation to be embedded as well instead of an attachment.  Thanks.

===========================================================
Get all the latest cyber security industry news directly in your inbox

Subscribe to the Barracuda blog for daily or weekly updates:

https://blog.barracuda.com/subscription

DISCLAIMER:
This e-mail and any attachments to it contain confidential and proprietary 
material of Barracuda, its affiliates or agents, and is solely for the use of 
the intended recipient. Any review, use, disclosure, distribution or copying of 
this transmittal is prohibited except by or on behalf of the intended 
recipient. If you have received this transmittal in error, please notify the 
sender and destroy this e-mail and any attachments and all copies, whether 
electronic or printed.
===========================================================
_______________________________________________
Rkhunter-users mailing list
Rkhunter-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkhunter-users

Reply via email to