tags 479278 patch thanks also sprach John Li <[EMAIL PROTECTED]> [2008.05.04.0615 +0100]: > I won't bother attaching the patch =).
That's a shame. So try mine, attached, and please report back. -- .''`. martin f. krafft <[EMAIL PROTECTED]> : :' : proud Debian developer, author, administrator, and user `. `'` http://people.debian.org/~madduck - http://debiansystem.info `- Debian - when you have better things to do than fixing systems
diff --git a/src/logcheck b/src/logcheck
index e325231..ee94707 100755
--- a/src/logcheck
+++ b/src/logcheck
@@ -297,10 +297,16 @@ sendreport() {
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"
+ debug "Sending report as attachment"
+ if command -v nail >/dev/null; then
+ echo -e "Report attached" | nail -s "$subject" -a "$TMPDIR/report" "$SENDMAILTO"
+ return $?
+ else
+ echo >> $TMPDIR/report
+ echo Could not send report as attachment, nail not installed >> $TMPDIR/report
+ fi
fi
+ cat $TMPDIR/report | mail -s "$subject" "$SENDMAILTO"
fi
}
digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)
_______________________________________________ Logcheck-devel mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/logcheck-devel

