Re: [Rkhunter-users] RKH 1.3.0, Send logfile as attachment (on warnings)

2007-10-15 Thread Brian McKee
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


On 11-Oct-07, at 7:55 AM, John Horne wrote:

 On Thu, 2007-10-11 at 12:42 +0200, Sven Söhnel wrote:


 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.

If for some reason it *must* be an attachment - 'mutt' will send  
files as attachments and handle encoding properly etc from a  
commandline, but inline would certainly be cleaner and easier...

Brian
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (Darwin)
Comment: Verify this email or encrypt your email for free - see gnupg.org

iD8DBQFHE297GnOmb9xIQHQRAuIyAJ41Vpk+Uv/eUs62b7PND1b41IFdLgCgv0M4
NaZ4ibjMpMaT15EcjQnYUq4=
=zrFI
-END PGP SIGNATURE-

-
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


Re: [Rkhunter-users] RKH 1.3.0, Send logfile as attachment (on warnings)

2007-10-15 Thread Sven Söhnel
 If for some reason it *must* be an attachment - 'mutt' will send
 files as attachments and handle encoding properly etc from a
 commandline, but inline would certainly be cleaner and easier...

 Brian

Inline is the better way of course.
But: How could I implement this?
Any suggestions?

Thanks in advance!

Sven

---
Söhnel-Software - Webmail [Horde Groupware Webmail Edition]


-
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


Re: [Rkhunter-users] RKH 1.3.0, Send logfile as attachment (on warnings)

2007-10-11 Thread John Horne
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