Martin F Krafft
2006-Dec-12 12:07 UTC
[Logcheck-devel] Bug#402739: attaching logcheck output instead of inline inclusion
Package: logcheck Version: 1.2.51 Severity: wishlist Tags: patch This patch add the ability to attach logcheck output to mails instead of including it inline. ----- Forwarded message from Roland Kruggel <rkruggel at bbf7.de> ----- mail1:/etc/logcheck# diff -uprN logcheck.conf.org logcheck.conf --- logcheck.conf.org 2006-11-28 20:37:22.918143500 +0100 +++ logcheck.conf 2006-11-28 21:03:31.604180250 +0100 @@ -28,6 +28,11 @@ REPORTLEVEL="server" SENDMAILTO="root" +# Send the results as attachment or not. +# 0=not as attachment; 1=as attachment +# Default ist 0 +MAILASATTACH=0 + # Should the hostname in the subject of generated mails be fully qualified? FQDN=1 mail1:/usr/sbin# diff -uprN logcheck.org logcheck --- logcheck.org 2006-11-28 19:52:15.892965000 +0100 +++ logcheck 2006-11-28 21:01:15.467672250 +0100 @@ -81,6 +81,7 @@ SYSLOG_SUMMARY="/usr/bin/syslog-summary" INTRO=1 LOGCHECKDEBUG=0 MAILOUT=0 +MAILASATTACH=0 NOCLEANUP=0 REBOOT=0 FQDN=0 @@ -296,7 +297,11 @@ sendreport() { debug "Sent report to STDOUT" else debug "Sending report: '$subject' to $SENDMAILTO" + if [ $MAILASATTACH -eq 1 ]; then + echo -e "Report at the attachment" | nail -s "$subject" -a "$TMPDIR/report" "$SENDMAILTO" + else cat $TMPDIR/report | mail -s "$subject" "$SENDMAILTO" + fi fi } ----- End forwarded message ----- -- Martin F. Krafft <mail at martin-krafft.net> http://martin-krafft.net/ Debian developer, open source software researcher Author of "The Debian System" (http://debiansystem.info/) Linux and network security consultant Spamtraps: <mail.bogus at martin-krafft.net> -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Digital signature (GPG/PGP) Url : http://lists.alioth.debian.org/pipermail/logcheck-devel/attachments/20061212/d9da283f/attachment.pgp
Justin Pryzby
2007-Sep-25 12:47 UTC
[Logcheck-devel] Bug#402739: logcheck depends nail (Re: Bug#402739: marked as done (attaching logcheck output instead of inline inclusion))
I think some incarnation of dependency on "nail" should be added with with this change. On Mon, Sep 24, 2007 at 11:06:06PM +0000, Debian Bug Tracking System wrote:> Package: logcheck > Version: 1.2.51 > Severity: wishlist > Tags: patch > > This patch add the ability to attach logcheck output to mails > instead of including it inline. > > ----- Forwarded message from Roland Kruggel <rkruggel at bbf7.de> -----> --- logcheck.org 2006-11-28 19:52:15.892965000 +0100 > +++ logcheck 2006-11-28 21:01:15.467672250 +0100> @@ -296,7 +297,11 @@ sendreport() { > debug "Sent report to STDOUT" > else > debug "Sending report: '$subject' to $SENDMAILTO" > + if [ $MAILASATTACH -eq 1 ]; then > + echo -e "Report at the attachment" | > nail -s "$subject" -a "$TMPDIR/report" "$SENDMAILTO" > + else > cat $TMPDIR/report | mail -s "$subject" "$SENDMAILTO" > + fi > fi > }> * apply patch by Rolan Kruggel which allos logcheck to be configured to > attach log output, rather than inlining it (closes: #402739).