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 <[EMAIL PROTECTED]> -----
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 <[EMAIL PROTECTED]> http://martin-krafft.net/
Debian developer, open source software researcher
Author of "The Debian System" (http://debiansystem.info/)
Linux and network security consultant
Spamtraps: <[EMAIL PROTECTED]>
signature.asc
Description: Digital signature (GPG/PGP)
_______________________________________________ Logcheck-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/logcheck-devel

