Package: logcheck Version: Version: 1.2.3 Severity: wishlist The subject line is not correct, if any of these options 'ATTACKSUBJECT', 'SECURITYSUBJECT' and 'EVENTSSUBJECT' are combined in a report. The subject line only include the first event of a report. This is not so good for report mail filtering. The patch in the attachment correct this.
-- Bill Gates said: "It requires Windows XP or better", so I installed Linux.
--- logcheck 2005-04-19 17:58:39.000000000 +0200 +++ /usr/sbin/logcheck 2005-12-26 16:04:01.000000000 +0100 @@ -1,4 +1,4 @@ -#!/bin/bash +#! /bin/bash # # Copyright (C) 2004-2005 Debian Logcheck Team # <[EMAIL PROTECTED]> @@ -6,6 +6,8 @@ # Copyright (C) 1999-2002 Rene Mayrhofer <[EMAIL PROTECTED]> # Copyright (C) 1996-1997 Craig Rowland <[EMAIL PROTECTED]> +# Modified by Markus Nass <[EMAIL PROTECTED]> + # This file is part of Logcheck # Logcheck is free software; you can redistribute it and/or modify @@ -740,10 +742,21 @@ fi # If there are results, mail them to sysadmin +SUBJECT="" + if [ $ATTACK -eq 1 ]; then - sendreport "$ATTACKSUBJECT" + SUBJECT="$ATTACKSUBJECT" +fi +if [[ $SUBJECT != "" ]] && [ $SECURITY -eq 1 ]; then + SUBJECT="$SUBJECT, $SECURITYSUBJECT" elif [ $SECURITY -eq 1 ]; then - sendreport "$SECURITYSUBJECT" + SUBJECT="$SECURITYSUBJECT" +fi +if [[ $SUBJECT != "" ]] && [ $SYSTEM -eq 1 ]; then + SUBJECT="$SUBJECT, $EVENTSSUBJECT" elif [ $SYSTEM -eq 1 ]; then - sendreport "$EVENTSSUBJECT" + SUBJECT="$EVENTSSUBJECT" +fi +if [[ $SUBJECT != "" ]]; then + sendreport "$SUBJECT" fi
signature.asc
Description: Digital signature