On Thu, 2007-10-11 at 12:42 +0200, Sven Söhnel wrote: > > I use the following script by cron.daily: > > -------------------------- > #!/bin/sh > > ( date; /usr/local/bin/rkhunter --check --sk --nocolors --update --pkgmgr RPM > --versioncheck && echo "" ) \ > | /bin/mail -s "Rkhunter daily run on `uname -n`" root > > exit 0 > -------------------------- > > As I'm not so big in Linux: is there anyway to append the > logfile created by RKH to the generated mail? > Hello,
Your subject line mentions 'attachment' rather than just appending the log file. For attachments the short answer is probably going to be no. An attachment can be of any type. That is, it could be plain text, as in this case, or a postscript file, or an encoded binary program, or something in a completely different language. To enable this requires carefully crafting the actual message to be sent, including special headers which will tell the receiving mail client the type of attachment being sent, its size and where it starts and ends within the message. I did try this a couple of years ago for a completely different program, and whilst it did work, it was a lot of trouble just to send an attachment. If you just want to append the log file to the output you currently receive, then you could use the '--display-logfile' option: ( date; /usr/local/bin/rkhunter --check --sk --nocolors --update --pkgmgr RPM --versioncheck --display-logfile ) \ | /bin/mail -s "Rkhunter daily run on `uname -n`" root If, however, you only want to see any warning messages then look at the '--report-warnings-only' option (in the man page or just type 'rkhunter -h'). Note, I have removed the '&& echo ""' you had because it was unnecessary. John. -- --------------------------------------------------------------- John Horne, University of Plymouth, UK Tel: +44 (0)1752 233914 E-mail: [EMAIL PROTECTED] Fax: +44 (0)1752 233839 ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Rkhunter-users mailing list Rkhunter-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rkhunter-users